mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
[PM-6511] New i18n for angular (#8122)
* Use state provider to store preferred language * migrate preferred language * Use new i18n provider to get LOCAL_ID * Fix preloaded english i18n This is a mock service that forces english translations, it doesn't need the i18n interface that allows changing of locales. * PR improvements * Fixup merge
This commit is contained in:
@@ -231,7 +231,6 @@ export class Main {
|
||||
p = path.join(process.env.HOME, ".config/Bitwarden CLI");
|
||||
}
|
||||
|
||||
this.i18nService = new I18nService("en", "./locales");
|
||||
this.platformUtilsService = new CliPlatformUtilsService(ClientType.Cli, packageJson);
|
||||
this.logService = new ConsoleLogService(
|
||||
this.platformUtilsService.isDev(),
|
||||
@@ -270,6 +269,8 @@ export class Main {
|
||||
storageServiceProvider,
|
||||
);
|
||||
|
||||
this.i18nService = new I18nService("en", "./locales", this.globalStateProvider);
|
||||
|
||||
this.singleUserStateProvider = new DefaultSingleUserStateProvider(
|
||||
storageServiceProvider,
|
||||
stateEventRegistrarService,
|
||||
@@ -665,8 +666,7 @@ export class Main {
|
||||
await this.stateService.init();
|
||||
this.containerService.attachToGlobal(global);
|
||||
await this.environmentService.setUrlsFromStorage();
|
||||
const locale = await this.stateService.getLocale();
|
||||
await this.i18nService.init(locale);
|
||||
await this.i18nService.init();
|
||||
this.twoFactorService.init();
|
||||
this.configService.init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user