Skip to content

Commit

Permalink
[fix]:init language
Browse files Browse the repository at this point in the history
  • Loading branch information
akashi2333 committed Jul 7, 2021
1 parent c73cb72 commit 0d90d5c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src-electron/main-process/electron-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ function createWindow () {
nodeIntegration: process.env.QUASAR_NODE_INTEGRATION,
nodeIntegrationInWorker: process.env.QUASAR_NODE_INTEGRATION,
webSecurity: false,
experimentalFeatures: false
experimentalFeatures: false,
enableRemoteModule: true

// More info: /quasar-cli/developing-electron-apps/electron-preload-script
// preload: path.resolve(__dirname, 'electron-preload.js')
Expand Down
2 changes: 1 addition & 1 deletion src/ApiHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
icon: icon,
actions: [
{
label: 'open_in_new',
icon: 'open_in_new',
textColor: 'white',
handler: () => {
shell.showItemInFolder(filePath)
Expand Down
3 changes: 2 additions & 1 deletion src/boot/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import Vue from 'vue'
import VueI18n from 'vue-i18n'
import messages from 'src/i18n'
import ClientFileStorage from 'src/utils/storage/ClientFileStorage'
const local = ClientFileStorage.getItemFromStore('language') || 'en-us'
const { app } = require('electron').remote
const local = ClientFileStorage.getItemFromStore('language') || app.getLocale().toLocaleLowerCase()
Vue.use(VueI18n)

const i18n = new VueI18n({
Expand Down
3 changes: 2 additions & 1 deletion src/store/client/state.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { app } = require('electron').remote
export default function () {
return {
language: 'en-us',
language: app.getLocale().toLocaleLowerCase(),
autoLogin: false,
rememberPassword: true,
darkMode: false,
Expand Down

0 comments on commit 0d90d5c

Please sign in to comment.