pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

Special case plural handling should be on the primary subtag

Open ImUrX opened this issue 1 year ago • 4 comments

Because of how #2780 got fixed, if someone makes a new language like es-419, it will again add plural for many and its the same for any other language. I don't really understand why this implementation of the fix checks for specific language tags instead of checking if the primary language is the expected one if this is a bug. I also cant find the original reason as they are kinda correct plural rules, what happens if I use fluent.js? Does it have somewhere hardcoded that es is just ['one', 'other']?

ImUrX avatar Sep 16 '24 20:09 ImUrX

ah the fluent.js part gets fixed because other is default, makes sense haha

ImUrX avatar Sep 16 '24 20:09 ImUrX

@eemeli ?

mathjazz avatar Sep 22 '24 20:09 mathjazz

The check could indeed be on just the primary subtag (e.g. es for es-419). These special cases are included to 1) support some languages that are not included yet in the CLDR, and 2) not default to including the many case for millions in romance languages.

eemeli avatar Sep 22 '24 23:09 eemeli

yeah i noticed the bug because I had both es-es and es-419 active and saw that they had different plural rules which didnt make sense

ImUrX avatar Sep 23 '24 00:09 ImUrX