Ensure get-first-preferred-lang-code.js matches locale codes from local directory names and chrome extension api.

feature/default_network_editable
Dan 7 years ago
parent 69778416ca
commit 5aff114001
  1. 2
      app/scripts/lib/get-first-preferred-lang-code.js

@ -2,7 +2,7 @@ const extension = require('extensionizer')
const promisify = require('pify') const promisify = require('pify')
const allLocales = require('../../_locales/index.json') const allLocales = require('../../_locales/index.json')
const existingLocaleCodes = allLocales.map(locale => locale.code) const existingLocaleCodes = allLocales.map(locale => locale.code.replace('_', '-'))
async function getFirstPreferredLangCode () { async function getFirstPreferredLangCode () {
const userPreferredLocaleCodes = await promisify( const userPreferredLocaleCodes = await promisify(

Loading…
Cancel
Save