diff --git a/src/components/init.js b/src/components/init.js index eb1c3aa9..339aa9c7 100644 --- a/src/components/init.js +++ b/src/components/init.js @@ -15,22 +15,29 @@ const betaflightModel = { PortUsage, }; -if (process.env.NODE_ENV === 'development') { - console.log("Development mode enabled, installing Vue tools"); - Vue.config.devtools = true; -} +i18next.on('initialized', function() { + + console.log("i18n initialized, starting Vue framework"); + + if (process.env.NODE_ENV === 'development') { + console.log("Development mode enabled, installing Vue tools"); + Vue.config.devtools = true; + } + + const app = new Vue({ + i18n: vueI18n, + data: betaflightModel, + components: { + BatteryLegend, + BetaflightLogo, + StatusBar, + }, + el: '#main-wrapper', + }); -const app = new Vue({ - i18n: vueI18n, - data: betaflightModel, - components: { - BatteryLegend, - BetaflightLogo, - StatusBar, - }, - el: '#main-wrapper', }); + // Not strictly necessary here, but if needed // it's always possible to modify this model in // jquery land to trigger updates in vue