Browse Source

fix: Fixed i18n fallback locale not loading issue

pull/6758/head
Muhammed Mustafa 1 year ago
parent
commit
7b7e53988f
  1. 3
      packages/nc-gui/plugins/state.ts

3
packages/nc-gui/plugins/state.ts

@ -24,8 +24,7 @@ const statePlugin = async (_nuxtApp) => {
if (![...Object.keys(Language), ...Object.keys(LanguageAlias)].includes(currentLang)) state.lang.value = currentLang = 'en' if (![...Object.keys(Language), ...Object.keys(LanguageAlias)].includes(currentLang)) state.lang.value = currentLang = 'en'
/** force load initial locale messages */ /** force load initial locale messages */
await loadLocaleMessages(currentLang) await Promise.all([loadLocaleMessages(currentLang), loadLocaleMessages('en')])
await loadLocaleMessages('en')
/** set i18n locale to stored language */ /** set i18n locale to stored language */
await setI18nLanguage(currentLang) await setI18nLanguage(currentLang)

Loading…
Cancel
Save