Opened 5 years ago

Closed 5 years ago

#17065 closed Bug (invalid)

Plural forms are broken in (at least) Russian .po

Reported by: Nikolay Zakharov Owned by: nobody
Component: Translations Version: 1.3
Severity: Normal Keywords: locale plural russian
Cc: dimitris@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

It seems like we introduced plural forms breakage in some languages since the transition to transifex.net.

On the appropriate page one can try to search some plural words, like "week". Russian plural forms for week are "неделя", "недели", "недель". Transifex shows us that there are three forms but second and third are equal.

One can also inspect the current [[source:/trunk/django/conf/locale/ru/LC_MESSAGES/django.po|Russian django.po file]] and see that there are 3 forms defined in Plural-Forms header, but 4 msgstr[i] string for each words with plural forms. And msgstr[1]==msgstr[2]==msgstr[3].

Since this issue can occur in other languages (I suppose to check at least those languages mentioned in r15752) this ticket was created.

I am not a member of any translation team in transifex, so I can't fix it there and will just attach a patch against current git mirror as an example.

Attachments (2)

russian_plural_forms.diff (1.7 KB) - added by Nikolay Zakharov 5 years ago.
russian_plural_forms_with_fourth.diff (1.8 KB) - added by Nikolay Zakharov 5 years ago.
An updated Russian .po with fourth form.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by Nikolay Zakharov

Attachment: russian_plural_forms.diff added

comment:1 Changed 5 years ago by Dimitris Glezos

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

We generally follow the Unicode standard, which states four plural forms in total:

http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html

one → n mod 10 is 1 and n mod 100 is not 11;
few → n mod 10 in 2..4 and n mod 100 not in 12..14;
many → n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14;
other → everything else

comment:2 Changed 5 years ago by Dimitris Glezos

Cc: dimitris@… added

comment:3 Changed 5 years ago by Dimitris Glezos

Upstream ticket (closed as invalid): http://trac.transifex.org/ticket/638

comment:4 Changed 5 years ago by Nikolay Zakharov

Okay, but the main thing is not about the number of plural forms. The current msgstrs are still wrong.

Changed 5 years ago by Nikolay Zakharov

An updated Russian .po with fourth form.

comment:5 Changed 5 years ago by Dmitry Pisklov

Easy pickings: set
Has patch: set
Triage Stage: UnreviewedAccepted

comment:6 Changed 5 years ago by Claude Paroz

Resolution: invalid
Status: newclosed

Reading the latest patch, I don't see anything which cannot be fixed at Transifex level. So please fix it in Transifex.

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