PLURAL keyword for languages without grammatical plural forms

PLURAL keyword for languages without grammatical plural forms

At some recent point, there seemingly was a change in how the PLURAL keyword of MediaWiki works. Could anyone shed me the light what the change really is, and how we should now translate messages with PLURAL in the source language?

Here is a bit of what I understand (correct me if I'm wrong): It seems that when the site/user language is specified as Japanese, the MediaWiki function CLDRPluralRuleEvaluator.evaluateCompiled always returns 0. This means that a PLURAL keyword will always be replaced by its first argument. Gramattically, it's correct that nouns have the same form regardless of number in languages like Japanese. However, abandoning PLURAL at all causes a problem in messages such as MediaWiki:Category-article-count/ja.

PLURAL keyword seems to be used beyond just grammatical numbers. Here, the English message MediaWiki:Category-article-count/en uses PLURAL not only for switching between 'page' and 'pages', but also for deciding whether to add the part saying 'out of xx total' or not. Japanese translators here tried to literally translate it, and ended in having MediaWiki to always show the first part, corresponding to the singular case, with no information of the total number. Since most categories have multiple pages, most of the case the rendering is wrong. For instance, see how this message is rendered, on the English Wiktionary, correctly with the English interface [1] , but incorrectly with the Japanese interface [2].

What is the recommended way to translate them now? Do we want to remove all PLURAL when translating into Japanese, regardless of how it is used? If we are to throw out PLURAL for languages without grammatical plural forms, I think we'd have to review all the instances in the messages ...

whym06:20, 13 September 2012

I see the problem. It is pretty obvious from Plural/Comparison_of_plural_rules_in_various_databases where ja and ko have implicit default n != 1 rule in MW while explicit no forms rules in other sets.

Short term fix is to avoid plural in messages, in longer term I think this would be appropritately solved by supporting explicit number forms like {{PLURAL:$1|0=something special|usual text}}.

Nike (talk)16:02, 14 September 2012

Correct me if I'm wrong but this is only an issue for messages with special n=0 cases (for which we usually use different messages altogether).

Nike (talk)16:11, 14 September 2012

I can see the short term fix will work most of the case. Sometimes we'd have to choose translation a bit inconsistent to original, but the difference would be minor anyway.

I'm not sure how to check whether it's a 'n=0' case or not. If MediaWiki:badaccess-groups/ja is a non 'n=0' case, I confirm it's also affected.

whym19:53, 14 September 2012