Commit dd810fa1 authored by Dave Vandyke's avatar Dave Vandyke 🐈

Refs #17 - Provide the locale in a consistent format

parent 1099b467
Pipeline #64458940 passed with stages
in 11 minutes and 3 seconds
......@@ -22,6 +22,11 @@ let Utils = exports.Utils = {
get appLocale()
{
let locale = browser.i18n.getUILanguage();
// Firefox <56 separates the locale parts with an underscore instead of
// hyphen. https://bugzilla.mozilla.org/show_bug.cgi?id=1374552
locale = locale.replace("_", "-");
Object.defineProperty(this, "appLocale", {value: locale, enumerable: true});
return this.appLocale;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment