aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-04-04 07:04:28 +0800
committerDan <danjm.com@gmail.com>2018-04-04 07:04:28 +0800
commit5aff114001d21696e7a7670db56b53cf3f36afa5 (patch)
treee3b99544f2838b85750744cc833c3a7998003220
parent69778416cab4900d2c6ef5876ecddc92aa63642b (diff)
downloadtangerine-wallet-browser-5aff114001d21696e7a7670db56b53cf3f36afa5.tar
tangerine-wallet-browser-5aff114001d21696e7a7670db56b53cf3f36afa5.tar.gz
tangerine-wallet-browser-5aff114001d21696e7a7670db56b53cf3f36afa5.tar.bz2
tangerine-wallet-browser-5aff114001d21696e7a7670db56b53cf3f36afa5.tar.lz
tangerine-wallet-browser-5aff114001d21696e7a7670db56b53cf3f36afa5.tar.xz
tangerine-wallet-browser-5aff114001d21696e7a7670db56b53cf3f36afa5.tar.zst
tangerine-wallet-browser-5aff114001d21696e7a7670db56b53cf3f36afa5.zip
Ensure get-first-preferred-lang-code.js matches locale codes from local directory names and chrome extension api.
-rw-r--r--app/scripts/lib/get-first-preferred-lang-code.js2
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(