summaryrefslogtreecommitdiff
path: root/app/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/ui.js')
-rw-r--r--app/ui.js18
1 files changed, 3 insertions, 15 deletions
diff --git a/app/ui.js b/app/ui.js
index c1f6776..85695ca 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1763,20 +1763,8 @@ const UI = {
// Set up translations
const LINGUAS = ["cs", "de", "el", "es", "fr", "it", "ja", "ko", "nl", "pl", "pt_BR", "ru", "sv", "tr", "zh_CN", "zh_TW"];
-l10n.setup(LINGUAS);
-if (l10n.language === "en" || l10n.dictionary !== undefined) {
- UI.prime();
-} else {
- fetch('app/locale/' + l10n.language + '.json')
- .then((response) => {
- if (!response.ok) {
- throw Error("" + response.status + " " + response.statusText);
- }
- return response.json();
- })
- .then((translations) => { l10n.dictionary = translations; })
- .catch(err => Log.Error("Failed to load translations: " + err))
- .then(UI.prime);
-}
+l10n.setup(LINGUAS, "app/locale/")
+ .catch(err => Log.Error("Failed to load translations: " + err))
+ .then(UI.prime);
export default UI;