Merge pull request #475 from YunoHost/fix-locales

fix: wait for locales to be loaded before mounting the app
This commit is contained in:
Alexandre Aubin 2022-10-10 16:07:08 +02:00 committed by GitHub
commit 907ae94b6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View file

@ -80,7 +80,7 @@ function initDefaultLocales () {
store.dispatch('UPDATE_LOCALE', locale)
store.dispatch('UPDATE_FALLBACKLOCALE', fallbackLocale || 'en')
loadLocaleMessages('en')
return loadLocaleMessages('en')
}
export {

View file

@ -55,13 +55,13 @@ requireComponent.keys().forEach((fileName) => {
registerGlobalErrorHandlers()
// Load default locales translations files and setup store data
initDefaultLocales()
initDefaultLocales().then(() => {
const app = new Vue({
store,
router,
i18n,
render: h => h(App)
})
const app = new Vue({
store,
router,
i18n,
render: h => h(App)
app.$mount('#app')
})
app.$mount('#app')