diff --git a/src/main/main.ts b/src/main/main.ts index bfe966f42..3d0f3e608 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -17,6 +17,7 @@ const runtimeProperties: RuntimeGlobalProperties = { roomIds: [], file: commandLineOptions.file || '', appName: 'entry', + language: app.getLocale() }; global.sharedObject = Object.assign({}, runtimeProperties, configurations, commandLineOptions); diff --git a/src/main/views/hardwareWindowManager.ts b/src/main/views/hardwareWindowManager.ts index dbe6b50e1..3cc8d574a 100644 --- a/src/main/views/hardwareWindowManager.ts +++ b/src/main/views/hardwareWindowManager.ts @@ -37,8 +37,11 @@ export default class HardwareWindowManager { private createHardwareWindow() { let title; - if (app.getLocale() === 'ko') { + + if (global.sharedObject.language === 'ko') { title = '엔트리 하드웨어'; + } else if (global.sharedObject.language === 'uz') { + title = 'Entry Qurilma'; } else { title = 'Entry HardWare'; } diff --git a/src/renderer/helper/importToggleHelper.ts b/src/renderer/helper/importToggleHelper.ts index d3e675927..9799d595f 100644 --- a/src/renderer/helper/importToggleHelper.ts +++ b/src/renderer/helper/importToggleHelper.ts @@ -29,6 +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.initNativeMenu(); } } diff --git a/src/renderer/resources/lang/uz.json b/src/renderer/resources/lang/uz.json index 881932dec..7c0858bda 100644 --- a/src/renderer/resources/lang/uz.json +++ b/src/renderer/resources/lang/uz.json @@ -5953,7 +5953,7 @@ "arduino_get_port_number": "%1 ", "arduino_get_digital_toggle": "%1 ", "arduino_get_pwm_port_number": "%1 ", - "arduino_get_number_sensor_value": "Analog %1 Sensor value ", + "arduino_get_number_sensor_value": "Analog %1 Sensor qiymati ", "arduino_ext_get_analog_value": "Analog %1 Sensor value", "arduino_ext_get_analog_value_map": "Map Value %1 %2 ~ %3 to %4 ~ %5", "arduino_ext_get_ultrasonic_value": "Read ultrasonic sensor trig pin %1 echo pin %2", @@ -6003,7 +6003,7 @@ "nemoino_toggle_led": "Digital %1 Pin %2 %3", "sensorBoard_toggle_led": "Digital %1 Pin %2 %3", "CODEino_toggle_led": "Digital %1 Pin %2 %3", - "arduino_toggle_pwm": "Raqamli %1pini ni %2 ga solzash %3", + "arduino_toggle_pwm": "Raqamli %1pinini %2 ga solzash %3", "dplay_toggle_pwm": "Digital %1 Pin %2 %3", "nemoino_toggle_pwm": "Digital %1 Pin %2 %3", "sensorBoard_toggle_pwm": "Digital %1 Pin %2 %3", diff --git a/types/index.d.ts b/types/index.d.ts index 77ac0b6cc..969b9e973 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -43,6 +43,7 @@ declare type RuntimeGlobalProperties = { roomIds: string[]; // cloud pc 용. 사용처 불분명. entry-hw 와 사용처 비교 필요 file?: string; // 프로젝트의 savePath 담당 appName: 'entry'; // 아직 렌더러 프로세스에서 실행하는 하드웨어 업데이트 로직 실행방지용 + language?: string; // App's user lang } declare type GlobalConfigurations = CommandLineOptions & FileConfigurations & RuntimeGlobalProperties;