Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Rework locale specific pluralization rules #137
I regenerated pluralization rules according to internal sources that are
Names of plural types are purely mnemonic and do not imply a specific
Polyglot supports locales that we don't use internally that were
There were a couple areas of disagreement between sources. In these
The specific changes in this PR are
Additionally, per our records, fa would be chineseLike instead of
I also generated tests based on some other pluralization specs we had in a different implementation.
schleyfox left a comment
I'm working off an internal list reviewed by our linguists. Most things do match up with CLDR, but there are a couple deviations from either CLDR or what's implemented in polyglot. Specifically
I did not audit the categorizations that did not change to see whether those were in compliance with CLDR or some other source. Additionally, our pluralization does not support decimals, which leads to some mismatches with CLDR definitions for number of forms (in czechLike and lithuanian and possibly others)
Conceptually, I agree that it would be good to use CLDR as the source of truth, but our internal review recommended some deviations.
I'd agree, though it's worth noting that what we currently have implemented is not entirely in line with CLDR and is far from complete (and I'm not going to make it complete).
I suppose I could expose plural types/mappings as an option that can be passed to the constructor and then take my marbles and go home.