﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26268	Incorrect plurals formula for Russian translation	Nick Malakhov	nobody	"I am currently developing a Django application for internal use in our company. I've noticed big changes introduced with the commit https://github.com/django/django/commit/6a4649c27e66a4eb6a26391548072a66807e071d 

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."	Bug	closed	Internationalization	1.9	Normal	duplicate	plural nplurals russian belarusian		Unreviewed	0	0	0	0	0	0
