fixed L10N_DEV option

This commit is contained in:
Danny Coates 2019-03-31 13:03:50 -07:00
parent 219b1d6806
commit 7f76a279c3
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
2 changed files with 2 additions and 4 deletions

View File

@ -27,7 +27,7 @@
"test:report": "nyc report --reporter=html",
"test-integration": "cross-env NODE_ENV=development wdio test/wdio.docker.conf.js",
"circleci-test-integration": "cross-env NODE_ENV=development wdio test/wdio.circleci.conf.js",
"start": "npm run clean && cross-env NODE_ENV=development FXA_CLIENT_ID=fced6b5e3f4c66b9 BASE_URL=http://localhost:8080 webpack-dev-server --mode=development",
"start": "npm run clean && cross-env NODE_ENV=development L10N_DEV=true FXA_CLIENT_ID=fced6b5e3f4c66b9 BASE_URL=http://localhost:8080 webpack-dev-server --mode=development",
"android": "cross-env ANDROID=1 npm start",
"prod": "node server/bin/prod.js"
},

View File

@ -11,9 +11,7 @@ const langData = require('cldr-core/supplemental/likelySubtags.json');
const acceptLanguages = /(([a-zA-Z]+(-[a-zA-Z0-9]+){0,2})|\*)(;q=[0-1](\.[0-9]+)?)?/g;
function allLangs() {
return fs.readdirSync(
path.join(__dirname, '..', '..', 'dist', 'public', 'locales')
);
return fs.readdirSync(path.join(__dirname, '..', '..', 'public', 'locales'));
}
const languages = config.l10n_dev ? allLangs() : availableLanguages;