fix(i18n): load language files before doing anything else
continuous-integration/drone/pr Build is failing Details

Resolves #3214
This commit is contained in:
kolaente 2023-03-09 13:12:59 +01:00
parent 194fef0dab
commit ee2e313ed8
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 3 deletions

View File

@ -39,6 +39,10 @@ if (window.API_URL.slice(window.API_URL.length - 1, window.API_URL.length) === '
window.API_URL = window.API_URL.slice(0, window.API_URL.length - 1)
}
// We're loading the language before creating the app so that it won't fail to load when the user's
// language file is not yet loaded.
await setLanguage()
const app = createApp(App)
app.use(Notifications)
@ -107,6 +111,4 @@ app.use(pinia)
app.use(router)
app.use(i18n)
setLanguage().then(() => {
app.mount('#app')
})
app.mount('#app')