Oops, include file extension in language list

This commit is contained in:
David Baker 2017-05-26 17:11:11 +01:00
parent 4fcaccbc7f
commit d3875ec794
1 changed files with 2 additions and 2 deletions

View File

@ -160,9 +160,9 @@ function genLangList() {
const normalizedLanguage = lang.toLowerCase().replace("_", "-"); const normalizedLanguage = lang.toLowerCase().replace("_", "-");
const languageParts = normalizedLanguage.split('-'); const languageParts = normalizedLanguage.split('-');
if (languageParts.length == 2 && languageParts[0] == languageParts[1]) { if (languageParts.length == 2 && languageParts[0] == languageParts[1]) {
languages[languageParts[0]] = lang; languages[languageParts[0]] = lang + '.json';
} else { } else {
languages[normalizedLanguage] = lang; languages[normalizedLanguage] = lang + '.json';
} }
}); });
fs.writeFile('webapp/i18n/languages.json', JSON.stringify(languages, null, 4)); fs.writeFile('webapp/i18n/languages.json', JSON.stringify(languages, null, 4));