Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

Commit

Permalink
os-locale in src package
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Feb 22, 2018
1 parent 2343840 commit 839f7e4
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { PowerMonitorMain } from './main/powerMonitor.main';
import { UpdaterMain } from './main/updater.main';
import { WindowMain } from './main/window.main';

const osLocale = require('os-locale');

export class Main {
i18nService: I18nService;
storageService: DesktopStorageService;
Expand Down Expand Up @@ -57,7 +59,7 @@ export class Main {

bootstrap() {
this.windowMain.init().then(async () => {
const locale = await require('os-locale')();
const locale = await osLocale();
await this.i18nService.init(locale.replace('_', '-'));
this.messagingMain.init();
this.menuMain.init();
Expand Down
138 changes: 138 additions & 0 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"desktop-idle": "1.1.1",
"electron-updater": "2.20.1",
"electron-store": "1.3.0",
"keytar": "4.1.0"
"keytar": "4.1.0",
"os-locale": "2.1.0"
}
}

0 comments on commit 839f7e4

Please sign in to comment.