Update 0BDFDB.plugin.js
This commit is contained in:
parent
da983217ac
commit
da3c89de10
|
@ -623,9 +623,9 @@ module.exports = (_ => {
|
||||||
if (typeof plugin.setLabelsByLanguage == "function") plugin.labels = plugin.setLabelsByLanguage();
|
if (typeof plugin.setLabelsByLanguage == "function") plugin.labels = plugin.setLabelsByLanguage();
|
||||||
if (typeof plugin.changeLanguageStrings == "function") plugin.changeLanguageStrings();
|
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 => {
|
else BDFDB.TimeUtils.interval(interval => {
|
||||||
if (LibraryModules.LanguageStore.chosenLocale) {
|
if (LibraryModules.LanguageStore.chosenLocale || LibraryModules.LanguageStore._chosenLocale || LibraryModules.SettingsStore.locale) {
|
||||||
BDFDB.TimeUtils.clear(interval);
|
BDFDB.TimeUtils.clear(interval);
|
||||||
translate();
|
translate();
|
||||||
}
|
}
|
||||||
|
@ -4421,7 +4421,7 @@ module.exports = (_ => {
|
||||||
BDFDB.LanguageUtils = {};
|
BDFDB.LanguageUtils = {};
|
||||||
BDFDB.LanguageUtils.languages = Object.assign({}, InternalData.Languages);
|
BDFDB.LanguageUtils.languages = Object.assign({}, InternalData.Languages);
|
||||||
BDFDB.LanguageUtils.getLanguage = function () {
|
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";
|
if (lang == "en-GB" || lang == "en-US") lang = "en";
|
||||||
let langIds = lang.split("-");
|
let langIds = lang.split("-");
|
||||||
let langId = langIds[0];
|
let langId = langIds[0];
|
||||||
|
@ -4520,7 +4520,7 @@ module.exports = (_ => {
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
BDFDB.TimeUtils.interval(interval => {
|
BDFDB.TimeUtils.interval(interval => {
|
||||||
if (LibraryModules.LanguageStore.chosenLocale) {
|
if (LibraryModules.LanguageStore.chosenLocale || LibraryModules.LanguageStore._chosenLocale || LibraryModules.SettingsStore.locale) {
|
||||||
BDFDB.TimeUtils.clear(interval);
|
BDFDB.TimeUtils.clear(interval);
|
||||||
let language = BDFDB.LanguageUtils.getLanguage();
|
let language = BDFDB.LanguageUtils.getLanguage();
|
||||||
if (language) BDFDB.LanguageUtils.languages.$discord = Object.assign({}, language, {name: `Discord (${language.name})`});
|
if (language) BDFDB.LanguageUtils.languages.$discord = Object.assign({}, language, {name: `Discord (${language.name})`});
|
||||||
|
|
Loading…
Reference in New Issue