Merge pull request #1001 from MTRNord/patch-4

Fix tests
This commit is contained in:
Matthew Hodgson 2017-06-01 20:18:55 +01:00 committed by GitHub
commit 54ae92e9fb
2 changed files with 7 additions and 3 deletions

View file

@ -130,7 +130,9 @@ export function setLanguage(preferredLangs) {
}
}
if (!langToUse) {
throw new Error("Unable to find an appropriate language");
// Fallback to en_EN if none is found
langToUse = 'en'
console.error("Unable to find an appropriate language");
}
return getLanguage(i18nFolder + availLangs[langToUse].fileName);

View file

@ -1,4 +1,6 @@
{
"fileName": "en_EN.json",
"label": "English"
"en": {
"fileName": "en_EN.json",
"label": "English"
}
}