diff --git a/src/main/main.ts b/src/main/main.ts index effc7a92e..a6290297a 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -17,7 +17,7 @@ const runtimeProperties: RuntimeGlobalProperties = { roomIds: [], file: commandLineOptions.file || '', appName: 'entry', - language: app.getLocale() + language: '' }; global.sharedObject = Object.assign({}, runtimeProperties, configurations, commandLineOptions); @@ -45,6 +45,7 @@ if (!app.requestSingleInstanceLock()) { mainWindow = new MainWindowManager(commandLineOptions); const hardwareWindow = new HardwareWindowManager(); const aboutWindow = new AboutWindowManager(mainWindow.window); + global.sharedObject.language = app.getLocale(); app.on('second-instance', (event, commandLine, workingDirectory) => { // 어플리케이션을 중복 실행했습니다. 주 어플리케이션 인스턴스를 활성화 합니다. diff --git a/src/renderer/components/header.tsx b/src/renderer/components/header.tsx index 03d6b4d25..6f1605130 100644 --- a/src/renderer/components/header.tsx +++ b/src/renderer/components/header.tsx @@ -129,6 +129,7 @@ class Header extends Component { } getLangValue() { + this.props.persist.lang = window.getSharedObject().language == 'uz' ? 'uz' : 'ko'; const lang = this.props.persist.lang; return _get(Lang, lang); } diff --git a/src/renderer/helper/importToggleHelper.ts b/src/renderer/helper/importToggleHelper.ts index 9799d595f..9cc064e09 100644 --- a/src/renderer/helper/importToggleHelper.ts +++ b/src/renderer/helper/importToggleHelper.ts @@ -29,7 +29,7 @@ export default class { */ static async changeLang(lang: string) { window.Lang = await import(`../resources/lang/${lang}.json`); - window.getSharedObject().language = window.Lang.type; + window.getSharedObject().language = lang; window.initNativeMenu(); } } diff --git a/src/renderer/initEntry.ts b/src/renderer/initEntry.ts index 85013fe6a..6ebaf7762 100644 --- a/src/renderer/initEntry.ts +++ b/src/renderer/initEntry.ts @@ -3,7 +3,7 @@ import StorageManager from './helper/storageManager'; import ImportToggleHelper from './helper/importToggleHelper'; // Lang, EntryStatic -const lastLang = StorageManager.getPersistLangType() || 'uz'; // 'ko'; // Changed for uz version +const lastLang = StorageManager.getPersistLangType() || (window.getSharedObject().language == 'ru' ? 'uz' : 'ko'); const lastWSMode = StorageManager.getPersistWorkspaceMode(); (async() => { diff --git a/src/renderer/store/modules/persist.ts b/src/renderer/store/modules/persist.ts index 89e7e1dc8..4134ab426 100644 --- a/src/renderer/store/modules/persist.ts +++ b/src/renderer/store/modules/persist.ts @@ -21,8 +21,7 @@ export interface IPersistState { } const defaultState: IPersistState = { - // Changed for uz version - lang: 'uz', // 'ko', + lang: 'ko', mode: 'workspace', // undefined, };