Plural changes in many languages

Plural changes in many languages

Edited by 2 users.
Last edit: 13:22, 6 January 2014

Russian and languages having Russian as fallback

MediaWiki's plural rules have been updated to CLDR 24. We use these to be standard-compliant. CLDR 24 introduces some changes in the Russian plural forms. The changes are applicable to all languages that do not define explicit plural forms in CLDR and fall back to Russian.

The language codes affected are: ab, av, ba, bxr, ce, crh_cyrl, cv, inh, koi, krc, kv, lbe, lez, mhr, mrj, myv, ru, tt_cyrl, tyv, udm, xal

Russian used to have 3 plural forms, defined as follows:

  • Form 1: singular form. Examples: 1, 21, 31, 41...
  • Form 2: paucal form. Examples 2, 3, 4, 22, 23, 24, 32, 33, 34...
  • Form 3: plural form. Examples 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26...

This has changed to:

  • Form 1: 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …
  • Form 2: 0, 5, 6, 7,8,...18, 19, 100, 1000, 10000, 100000, 1000000, …
  • Form 3: 2, 3, 4, 22, 23, 24, 32, 33, 34, 42, 43, 44, 52, 53, 54, 62, 102, 1002, …

Effectively, this means, plural form 2 is now form 3, and plural form 3 is now form 2. Example:

$1 {{PLURAL:$1|страница|страниц|страницы}}

Russian, languages having Russian as fallback, Serbian, Ukrainian and Belarusian

There used to be a special case where translators could supply only 2 plural forms. The first one would be used only for the case of 1 and the second for all other numbers. This special case has been merged with the explicit number plural forms. From now on, when {{PLURAL}} is uses two forms, the first form will be used for 1, 21, 31 etc., and the second for all other numbers. To get the same functionality as before, use the following syntax:

  • be-tarask: {{PLURAL:$1|1=Катэгорыя|Катэгорыі}}
  • ru: {{PLURAL: $1|1=Категория|Категории}}
  • sr: {{PLURAL:$1|1=Категорија|Категорије}}
  • uk: {{PLURAL:$1|1=Категорія|Категорії}}

We updated existing messages to use the new formats. We have also marked them as outdated, so please correct and review them as soon as possible. Please mind the above mentioned changes when making new translations.

Thank you for your help!

Nike (talk)12:58, 3 January 2014

Apparently, there are more languages than what you have mentioned. Messages fro Belarusian (be, be-tarask) were also marked as fuzzy.

Wizardist (talk)15:22, 3 January 2014

As you can see, those languages are mentioned in this message further down, as something different changed for them: Russian, languages having Russian as fallback, Serbian, Ukrainian and Belarusian.

Siebrand19:27, 3 January 2014

Yeah, I figured it out in a private chat with Amir. From the prepending obscure notifications of changes that I've recieved, I thought Belarusian would suffer form order changes as well, but the MediaWiki implementation is the same as CLDR rules, so it's going well for me. :)

Wizardist (talk)19:31, 3 January 2014

This MW-installation is updated? If so, this test is not successful (for Russian).

Kaganer (talk)19:54, 3 January 2014

This is due to English being the content language of the page. Try it in MediaWiki namespace with /ru postfix (MediaWiki:Test/ru is a good start; preview is enough) and see the thing working.

Wizardist (talk)20:03, 3 January 2014

Okay, test in MediaWiki:Test/ru is successful. Thanks!

Kaganer (talk)20:38, 3 January 2014

Please also check wiki-code of MediaWiki:Newmessageslinkplural and MediaWiki:Newmessagesdifflinkplural - maybe "999" is invalid or undocumented parameter for PLURAL.

Kaganer (talk)20:14, 3 January 2014

Seems legit to me.

Wizardist (talk)20:18, 3 January 2014

Was it really useful to change the behaviour of 2-arguement form? The old one was useful (and was often used) when one didn't use explicit number, e.g. ru: Выполняя это действие, вы '''отвергаете''' изменение исходного текста в {{PLURAL:$1|1=следующей версии|следующих версиях}} (from MediaWiki:Revreview-reject-text-list/ru). Well, the new syntax also can be useful in some case forms, like Есть изменения в $1 {{PLURA:$1|категории|категориях}} (prepositive case, 1st declesion). But is there a recommended replacement of the first variant?

Ignatus (talk)15:15, 7 January 2014

Was it useful? Yes, it was useful because our code is now more standard-compliant, maintainable, robust and consistent with other languages. This will also make future developments quicker, more portable and more stable. For example, we shall be able to use other internationalized libraries more easily and let other projects use our code as well.

For the recommended replacement, the old syntax was {{PLURAL:$1|следующей версии|следующих версиях}} and the new syntax is {{PLURAL:$1|1=следующей версии|следующих версиях}}, as we already wrote in the beginning.

Amir E. Aharoni (talk)13:43, 9 January 2014