The same with "time ago", statistics show "1 hour ago" (localized) instead of 11 and 21 hours ago, the same with minutes etc.

Everything works correctly in English.

Comments

dave reid’s picture

Status: Active » Closed (won't fix)
sniegs’s picture

Version: 6.10 » 6.13
Component: statistics.module » locale.module
Status: Closed (won't fix) » Active

I have no idea how to fix it and even where do language specific "format_plural" functions resist. So where should I look?...

gábor hojtsy’s picture

You've imported a .po file with a broken plural formula. Import a .po file with a good plural formula, and this issue should be solved.

andypost’s picture

Version: 6.13 » 6.x-dev

This is a really annoing issue for languages different from english...
Translators should know that they MUST use @count in singular

For example russian have 3 plural forms:

"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"

msgid "1 comment"
msgid_plural "@count comments"
msgstr[0] "@count комментарий" // for 1, 21, 31 and others
msgstr[1] "@count комментария"
msgstr[2] "@count[2] комментариев"

Also JS Drupal.formatPlural() translation is totally broken #504506: Drupal.formatPlural incorrectly handle complex plural rules
EDIT: this is a different issue - #532512: Plural string storage is broken, editing UI is missing

damien tournoud’s picture

Status: Active » Closed (won't fix)

There are three possible explanations for this issue:

  • Either the plural formula of the language in question is broken (unlikely), or
  • The source .po file of the translation doesn't follow the language plural convention (as in the example @andypost displayed, if you imagine that the first line reads 1 комментарий instead of @count комментарий), or
  • The user tries to translate an auto-detected plural form from the UI, which is totally broken (#532512: Plural string storage is broken, editing UI is missing)

The two first are not related to core (and should be reported in the language-specific issue queue). We already have an issue for the third one.

=> Won't fix.