Closed iafan closed 7 years ago
The many
case (or was it the few
case, I don't remember right now) never occurs for integer numbers in Russian. CLDR data is for any number, gettext only for non negative integers.
Does this solve your question?
Michele, thanks for your reply, but this doesn't really answer the question. From what I see in CLDR specs, one
, few
, many
is what the standard suggests for three forms commonly used for integers, both positive and negative, and all these are used (I speak Russian myself). The other
form is the one that is only used for non-integer (fractional) numbers. So I still don't quite understand why many
is replaced with other
in your data. Your explanation suggests that you do that replacement deliberately based on some assumptions rather than it is some technical bug in a converter.
Did you happen to have some bug report or an issue in your own practice that would indicate that one
, few
, many
should be replaced with one
, few
, other
in Russian?
Ok, now I understand. I "renamed" "many" to "other" for consistency: every language has rules for one/few/many/... If a number does not satisfy those rules, we always use the "other" case. For consistency, I made the Russian change to have that "other" case. That makes sense?
Thanks, that answers the question, but doesn't make sense: this change makes the results of your export rather inconsistent with the official specification for no good reason. If I were to use your data to convert the results of the gettext formula back to CLDR name mappings, I would get wrong results. And this is quite opposite to what you state here: https://github.com/mlocati/cldr-to-gettext-plural-rules#is-this-data-correct
I'd recommend not doing such adjustments and stick with the official specs, or put a prominent disclaimer in the README that the plural form names that your tool produces are not 100% identical to CLDR.
Sorry for the short answers I posted before: I was writing with a mobile phone during my holidays.
I feel your posts quite aggressive, and I don't know why. BTW, I'll try to answer you.
CLDR applies to all numbers (negative, positive, decimal), gettext only works with non-negative integers. So, gettext plurals are just a subset of CLDR plurals: they can't be 100% identical.
About the statement of mine that you criticize: it states that the generated gettext plural rules are correct, and not that they are biunivocally equivalent to the CLDR plural rules (as I stated above that's not possible).
Finally, back to the real subject and not to the criticisms...
I adopted the rule to always have a common gettext fallback rule (called other
).
In the specific case for Belarusian, Polish, Russian and Ukrainian, since the CLDR other
rule never occurs in gettext, there wouldn't be any other
rule.
So, for consistency, I renamed the CLDR many
rule to the gettext other
rule.
If that doesn't work for you, you can fork this repository and implement your own logic: I released it with the most permissive license available, you can do anything you want with it.
In your exported data for plurals, including the http://mlocati.github.io/cldr-to-gettext-plural-rules/ page, Russian (
ru
locale) lists three plural forms:one
,few
,other
. However, if one looks at the original CLDR specs at http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html, Russian plural forms for integers are:one
,few
,many
. Is that a bug or some workaround you implemented in your converter?