mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00: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:
committed by
Kyle Spearrin
parent
0d837b8bc8
commit
06a543c913
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user