From da3c89de108a4b50b2897bbf8102ec0d7456b045 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 13 Jul 2021 01:25:31 +0200 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index dcfb7b7a81..9ad5611064 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -623,9 +623,9 @@ module.exports = (_ => { if (typeof plugin.setLabelsByLanguage == "function") plugin.labels = plugin.setLabelsByLanguage(); if (typeof plugin.changeLanguageStrings == "function") plugin.changeLanguageStrings(); }; - if (LibraryModules.LanguageStore.chosenLocale) translate(); + if (LibraryModules.LanguageStore.chosenLocale || LibraryModules.LanguageStore._chosenLocale || LibraryModules.SettingsStore.locale) translate(); else BDFDB.TimeUtils.interval(interval => { - if (LibraryModules.LanguageStore.chosenLocale) { + if (LibraryModules.LanguageStore.chosenLocale || LibraryModules.LanguageStore._chosenLocale || LibraryModules.SettingsStore.locale) { BDFDB.TimeUtils.clear(interval); translate(); } @@ -4421,7 +4421,7 @@ module.exports = (_ => { BDFDB.LanguageUtils = {}; BDFDB.LanguageUtils.languages = Object.assign({}, InternalData.Languages); BDFDB.LanguageUtils.getLanguage = function () { - let lang = LibraryModules.LanguageStore.chosenLocale || LibraryModules.SettingsStore.locale || "en"; + let lang = LibraryModules.LanguageStore.chosenLocale || LibraryModules.LanguageStore._chosenLocale || LibraryModules.SettingsStore.locale || "en"; if (lang == "en-GB" || lang == "en-US") lang = "en"; let langIds = lang.split("-"); let langId = langIds[0]; @@ -4520,7 +4520,7 @@ module.exports = (_ => { return ""; }; BDFDB.TimeUtils.interval(interval => { - if (LibraryModules.LanguageStore.chosenLocale) { + if (LibraryModules.LanguageStore.chosenLocale || LibraryModules.LanguageStore._chosenLocale || LibraryModules.SettingsStore.locale) { BDFDB.TimeUtils.clear(interval); let language = BDFDB.LanguageUtils.getLanguage(); if (language) BDFDB.LanguageUtils.languages.$discord = Object.assign({}, language, {name: `Discord (${language.name})`});