1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-24 11:55:50 +01:00

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:
Oscar Hinton 2018-02-28 16:52:59 +01:00 committed by Kyle Spearrin
parent 0d837b8bc8
commit 06a543c913
3 changed files with 3 additions and 8 deletions

View File

@ -223,7 +223,6 @@
"electron-updater": "2.20.1",
"keytar": "4.1.0",
"node-forge": "0.7.1",
"os-locale": "2.1.0",
"rxjs": "5.5.6",
"zone.js": "0.8.19"
}

View File

@ -12,9 +12,6 @@ import { PowerMonitorMain } from './main/powerMonitor.main';
import { UpdaterMain } from './main/updater.main';
import { WindowMain } from './main/window.main';
// tslint:disable-next-line
const osLocale = require('os-locale');
export class Main {
logService: LogService;
i18nService: I18nService;
@ -65,8 +62,8 @@ export class Main {
bootstrap() {
this.windowMain.init().then(async () => {
const locale = await osLocale();
await this.i18nService.init(locale.replace('_', '-'));
const locale = app.getLocale();
await this.i18nService.init(locale);
this.messagingMain.init();
this.menuMain.init();
this.powerMonitorMain.init();

View File

@ -16,7 +16,6 @@
"electron-log": "2.2.14",
"electron-store": "1.3.0",
"electron-updater": "2.20.1",
"keytar": "4.1.0",
"os-locale": "2.1.0"
"keytar": "4.1.0"
}
}