First time here? Check out the FAQ!

Revision history  [back]

Translate "hours ago" in utils.js

When translate string from utils.js then appear bugs. See row 3074:

return interpolate(
                    ngettext(
                        '%s hour ago',
                        '%s hours ago',
                        hours
                    ),
                    [Math.floor(hours),]
                )

If translate to Russian and add three variants:

msgid "%s hour ago"
msgid_plural "%s hours ago"
msgstr[0] "%s час назад"
msgstr[1] "%s часа назад"
msgstr[2] "%s часов назад"

We get:

1 часа назад (must be 1 час назад)

4 часов назад (must be 4 часа назад)

Cause by shifting from floor.

Code must be:

return interpolate(
                        ngettext(
                            '%s hour ago',
                            '%s hours ago',
                            Math.floor(hours)
                        ),
                        [Math.floor(hours),]
                    )

The same for minutes. Please update.

Translate "hours ago" in utils.js

When translate string from utils.js then appear bugs. See row 3074:

return interpolate(
                    ngettext(
                        '%s hour ago',
                        '%s hours ago',
                        hours
                    ),
                    [Math.floor(hours),]
                )

If translate to Russian and add three variants:

msgid "%s hour ago"
msgid_plural "%s hours ago"
msgstr[0] "%s час назад"
msgstr[1] "%s часа назад"
msgstr[2] "%s часов назад"

We get:

1 часа назад (must be 1 час назад)

4 часов назад (must be 4 часа назад)

Cause by shifting from floor.

Code must be:

return interpolate(
                        ngettext(
                            '%s hour ago',
                            '%s hours ago',
                            Math.floor(hours)
                        ),
                        [Math.floor(hours),]
                    )

The same for minutes. Please update.

Translate "hours ago" min ago in utils.js

When translate string from utils.js then appear bugs. See row 3074:

return interpolate(
                    ngettext(
                        '%s hour ago',
                        '%s hours ago',
                        hours
                    ),
                    [Math.floor(hours),]
                )

If translate to Russian and add three variants:

msgid "%s hour ago"
msgid_plural "%s hours ago"
msgstr[0] "%s час назад"
msgstr[1] "%s часа назад"
msgstr[2] "%s часов назад"

We get:

1 часа назад (must be 1 час назад)

4 часов назад (must be 4 часа назад)

Cause by shifting from floor.

Code must be:

return interpolate(
                        ngettext(
                            '%s hour ago',
                            '%s hours ago',
                            Math.floor(hours)
                        ),
                        [Math.floor(hours),]
                    )

The same for minutes. Please update.

Translate min ago in utils.js

When translate string from utils.js then appear bugs. See row 3074:

return interpolate(
                    ngettext(
                        '%s hour ago',
                        '%s hours ago',
                        hours
                    ),
                    [Math.floor(hours),]
                )

If translate to Russian and add three variants:

msgid "%s hour ago"
msgid_plural "%s hours ago"
msgstr[0] "%s час назад"
msgstr[1] "%s часа назад"
msgstr[2] "%s часов назад"

We get:

get: 1 часа назад (must be 1 час назад)

) 4 часов назад (must be 4 часа назад)

) Cause by shifting from floor.

Code must be:

return interpolate(
                        ngettext(
                            '%s hour ago',
                            '%s hours ago',
                            Math.floor(hours)
                        ),
                        [Math.floor(hours),]
                    )

The same for minutes. Please update.