diff options
Ensure get-first-preferred-lang-code.js matches locale codes from local directory names and chrome extension api.
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/get-first-preferred-lang-code.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/scripts/lib/get-first-preferred-lang-code.js b/app/scripts/lib/get-first-preferred-lang-code.js index 28612f763..25221ff98 100644 --- a/app/scripts/lib/get-first-preferred-lang-code.js +++ b/app/scripts/lib/get-first-preferred-lang-code.js @@ -2,7 +2,7 @@ const extension = require('extensionizer') const promisify = require('pify') const allLocales = require('../../_locales/index.json') -const existingLocaleCodes = allLocales.map(locale => locale.code) +const existingLocaleCodes = allLocales.map(locale => locale.code.replace('_', '-')) async function getFirstPreferredLangCode () { const userPreferredLocaleCodes = await promisify( |