If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Missing plural rules for a few locales

NEW
Assigned to

Status

Firefox OS
Gaia::L10n
2 years ago
2 years ago

People

(Reporter: tchevalier, Assigned: gandalf)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
In bug 1183379 we added new locales, but I just noticed that most of them don't have any plural rule defined in l10n.js or l20n.js.
Here for instance, https://github.com/mozilla-b2g/gaia/blob/master/shared/js/l10n.js#L119

There are actually many more locales (actually 10% of our locales) that don't have plural rules. We never did QA on them, so we never caught that in past releases.

List of missing locales (we might want to double check):

ast
dsb
ht
hsb
hy-AM
lij
mai
si
son
zam


Some of the locales are covered by Unicode CLDR http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
Not sure what's the best way of gathering missing info. NI'ing localizers? Stas, gandalf, any idea?
Flags: needinfo?(stas)
Flags: needinfo?(gandalf)
(Assignee)

Comment 1

2 years ago
That's a great opportunity to rework plurals code since it does contribute to our overall library weight.

Since it's in CLDR I'd love to think if we could get it to extend Intl API so that we don't have to carry them with us all the time.
Assignee: nobody → gandalf
Flags: needinfo?(gandalf)
The main issue is that several of them are not covered by CLDR. 

One useful thing would be a test that checks all locales in languages_all.json and throws if one of them doesn't have a plural rule.
I guess the first order of business would be to work with the localizers on defining the plural rules.  Then we can add them to our current infrastructure.  Let's do this in this bug.  Lazy-loading or keeping the rules in localization files should come next: let's file a new bug for this.  I'd like to find a solution soon as it would make our codebase leaner.
Flags: needinfo?(stas)
You need to log in before you can comment on or make changes to this bug.