Opened 8 years ago

Closed 8 years ago

#26268 closed Bug (duplicate)

Incorrect plurals formula for Russian translation

Reported by: Nick Malakhov Owned by: nobody
Component: Internationalization Version: 1.9
Severity: Normal Keywords: plural nplurals russian belarusian
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I am currently developing a Django application for internal use in our company. I've noticed big changes introduced with the commit

One of the big changes is the nplurals=4 and the new plurals formula for Russian language.The new formula looks like this:

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

The problem with this formula it that it never returns plural=3.

I know there was some KDE effort to enforce nplurals=4 for Russian and some other slavic languages, and they were going to use another formula, which should be similar to the serbian one. I don't know what intentions was behind the move to the formula above and therefore I can't suggest the proper fix.

There used to be three forms of plural:

  1. sungular (for 1, 21, 31 and so on, excluding *11),
  2. dual (for 2, 3, 4, 22, 23, 24, 32, 33, 33 and so on, excluding *12,13 and *14)
  3. plural for all other cases.

And then there was fourth form added for the "real single 1" (n==1) case.

Looks like the formula above was going to add "plural=3" for this case (n==1) but it failed to do so, since it never returns that result. Also I can see the new translation strings introduced along with the formula, and there is a clearly plural form used for the "plural=3" case which defeats the idea that plural=3 is for the "real single 1" case.

I can imagine that this change was influenced by the new collaboration with Transifex project. I did send them same feedback about the formula.

The same formula is used for Belarusian language, which, I think, have the same issue.

Change History (1)

comment:1 by Claude Paroz, 8 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #26123. Sorry, but we have our hands tied for this change.

Note: See TracTickets for help on using tickets.
Back to Top