webL10n
webL10n copied to clipboard
Plural rules are not updated when setLanguage() executed
Subj. Error is here: ... // initialize _pluralRules if (!gMacros._pluralRules) { gMacros._pluralRules = getPluralRules(gLanguage); } ... so, pluralRules are intializaed only once. To fix it, remove if statement: ... // initialize _pluralRules gMacros._pluralRules = getPluralRules(gLanguage); ...
Patches are welcome. The proper fix is not to unconditionally call getPluralRules
, but call getPluralRules
again in setLanguage
if the language changed.