Replace os-locale with native electron api, app.getLocale (#46)
* Replace os-locale with native electron api, app.getLocale. * Remove os-locale from the second package.json.
This commit is contained in:
parent
0d837b8bc8
commit
06a543c913
|
@ -223,7 +223,6 @@
|
||||||
"electron-updater": "2.20.1",
|
"electron-updater": "2.20.1",
|
||||||
"keytar": "4.1.0",
|
"keytar": "4.1.0",
|
||||||
"node-forge": "0.7.1",
|
"node-forge": "0.7.1",
|
||||||
"os-locale": "2.1.0",
|
|
||||||
"rxjs": "5.5.6",
|
"rxjs": "5.5.6",
|
||||||
"zone.js": "0.8.19"
|
"zone.js": "0.8.19"
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,6 @@ import { PowerMonitorMain } from './main/powerMonitor.main';
|
||||||
import { UpdaterMain } from './main/updater.main';
|
import { UpdaterMain } from './main/updater.main';
|
||||||
import { WindowMain } from './main/window.main';
|
import { WindowMain } from './main/window.main';
|
||||||
|
|
||||||
// tslint:disable-next-line
|
|
||||||
const osLocale = require('os-locale');
|
|
||||||
|
|
||||||
export class Main {
|
export class Main {
|
||||||
logService: LogService;
|
logService: LogService;
|
||||||
i18nService: I18nService;
|
i18nService: I18nService;
|
||||||
|
@ -65,8 +62,8 @@ export class Main {
|
||||||
|
|
||||||
bootstrap() {
|
bootstrap() {
|
||||||
this.windowMain.init().then(async () => {
|
this.windowMain.init().then(async () => {
|
||||||
const locale = await osLocale();
|
const locale = app.getLocale();
|
||||||
await this.i18nService.init(locale.replace('_', '-'));
|
await this.i18nService.init(locale);
|
||||||
this.messagingMain.init();
|
this.messagingMain.init();
|
||||||
this.menuMain.init();
|
this.menuMain.init();
|
||||||
this.powerMonitorMain.init();
|
this.powerMonitorMain.init();
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
"electron-log": "2.2.14",
|
"electron-log": "2.2.14",
|
||||||
"electron-store": "1.3.0",
|
"electron-store": "1.3.0",
|
||||||
"electron-updater": "2.20.1",
|
"electron-updater": "2.20.1",
|
||||||
"keytar": "4.1.0",
|
"keytar": "4.1.0"
|
||||||
"os-locale": "2.1.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue