webL10n icon indicating copy to clipboard operation
webL10n copied to clipboard

Plural rules are not updated when setLanguage() executed

Open OleksandrSemenov opened this issue 9 years ago • 1 comments

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); ...

OleksandrSemenov avatar Feb 18 '16 11:02 OleksandrSemenov

Patches are welcome. The proper fix is not to unconditionally call getPluralRules, but call getPluralRules again in setLanguage if the language changed.

Rob--W avatar Feb 19 '16 11:02 Rob--W