diff --git a/scripts/devRunner.js b/scripts/devRunner.js index cbd24241..a981080c 100644 --- a/scripts/devRunner.js +++ b/scripts/devRunner.js @@ -1,5 +1,6 @@ process.env.NODE_ENV = 'development'; // process.env.ELECTRON_ENABLE_LOGGING = true +process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = false; const chalk = require('chalk'); const electron = require('electron'); diff --git a/src/renderer/i18n/index.js b/src/renderer/i18n/index.js index 19441c4d..b532bef1 100644 --- a/src/renderer/i18n/index.js +++ b/src/renderer/i18n/index.js @@ -1,7 +1,7 @@ -import { createI18n } from 'vue-i18n/dist/vue-i18n.esm-bundler.js';// NOTES: temporary fix to compile error +import { createI18n } from 'vue-i18n/dist/vue-i18n.esm-bundler'; -const i18n = locale => createI18n({ - locale, +const i18n = createI18n({ + fallbackLocale: 'en-US', messages: { 'en-US': require('./en-US'), 'it-IT': require('./it-IT'), diff --git a/src/renderer/index.js b/src/renderer/index.js index ff7b2184..f4f234b1 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -9,7 +9,9 @@ import App from '@/App.vue'; import { store } from '@/store'; import i18n from '@/i18n'; +i18n.global.locale = store.state.settings.locale; + const app = createApp(App); app.use(store); -app.use(i18n(store.state.settings.locale)); +app.use(i18n); app.mount('#app'); diff --git a/src/renderer/store/index.js b/src/renderer/store/index.js index 264b5dfa..6cfaa62c 100644 --- a/src/renderer/store/index.js +++ b/src/renderer/store/index.js @@ -1,7 +1,5 @@ 'use strict'; import { createStore } from 'vuex/dist/vuex.esm-bundler'; -// import Vue from 'vue'; -// import Vuex from 'vuex'; import application from './modules/application.store'; import settings from './modules/settings.store'; diff --git a/src/renderer/store/modules/settings.store.js b/src/renderer/store/modules/settings.store.js index 8dc29298..5fbf2280 100644 --- a/src/renderer/store/modules/settings.store.js +++ b/src/renderer/store/modules/settings.store.js @@ -40,7 +40,7 @@ export default { mutations: { SET_LOCALE (state, locale) { state.locale = locale; - i18n.locale = locale; + i18n.global.locale = locale; persistentStore.set('locale', state.locale); }, SET_DATA_TAB_LIMIT (state, limit) { diff --git a/webpack.renderer.config.js b/webpack.renderer.config.js index 18cb9a68..c6756216 100644 --- a/webpack.renderer.config.js +++ b/webpack.renderer.config.js @@ -69,6 +69,11 @@ const config = { }), new VueLoaderPlugin(), new webpack.DefinePlugin({ + __VUE_OPTIONS_API__: true, + __VUE_PROD_DEVTOOLS__: isDevMode, + __VUE_I18N_LEGACY_API__: true, + __VUE_I18N_FULL_INSTALL__: true, + __INTLIFY_PROD_DEVTOOLS__: isDevMode, 'process.env': { PACKAGE_VERSION: `"${version}"`, APP_CONTRIBUTORS: `"${parsedContributors}"`