mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 19:37:34 -07:00
Always fetch locales when initiating client
This commit is contained in:
parent
f793b9ecd7
commit
e875bfc5d7
1 changed files with 22 additions and 27 deletions
|
@ -22,13 +22,9 @@
|
|||
renderError('SOMETHING_HAPPENED_IN_PROMISE', e);
|
||||
};
|
||||
|
||||
//#region Detect language & fetch translations
|
||||
const v = localStorage.getItem('v') || VERSION;
|
||||
|
||||
//#region Detect language & fetch translations
|
||||
const localeVersion = localStorage.getItem('localeVersion');
|
||||
const localeOutdated = (localeVersion == null || localeVersion !== v);
|
||||
|
||||
if (!localStorage.hasOwnProperty('locale') || localeOutdated) {
|
||||
const supportedLangs = LANGS;
|
||||
let lang = localStorage.getItem('lang');
|
||||
if (lang == null || !supportedLangs.includes(lang)) {
|
||||
|
@ -52,7 +48,6 @@
|
|||
renderError('LOCALE_FETCH');
|
||||
return;
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Script
|
||||
|
|
Loading…
Reference in a new issue