mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-24 11:55:50 +01:00
register locale id
This commit is contained in:
parent
74d11d32b7
commit
ebca594ba9
@ -52,6 +52,69 @@ import { PasswordHistoryComponent } from './vault/password-history.component';
|
|||||||
import { VaultComponent } from './vault/vault.component';
|
import { VaultComponent } from './vault/vault.component';
|
||||||
import { ViewComponent } from './vault/view.component';
|
import { ViewComponent } from './vault/view.component';
|
||||||
|
|
||||||
|
import { registerLocaleData } from '@angular/common';
|
||||||
|
import localeBg from '@angular/common/locales/bg';
|
||||||
|
import localeCs from '@angular/common/locales/cs';
|
||||||
|
import localeDa from '@angular/common/locales/da';
|
||||||
|
import localeDe from '@angular/common/locales/de';
|
||||||
|
import localeEs from '@angular/common/locales/es';
|
||||||
|
import localeEt from '@angular/common/locales/et';
|
||||||
|
import localeFa from '@angular/common/locales/fa';
|
||||||
|
import localeFi from '@angular/common/locales/fi';
|
||||||
|
import localeFr from '@angular/common/locales/fr';
|
||||||
|
import localeHr from '@angular/common/locales/hr';
|
||||||
|
import localeHu from '@angular/common/locales/hu';
|
||||||
|
import localeId from '@angular/common/locales/id';
|
||||||
|
import localeIt from '@angular/common/locales/it';
|
||||||
|
import localeJa from '@angular/common/locales/ja';
|
||||||
|
import localeKo from '@angular/common/locales/ko';
|
||||||
|
import localeNb from '@angular/common/locales/nb';
|
||||||
|
import localeNl from '@angular/common/locales/nl';
|
||||||
|
import localePl from '@angular/common/locales/pl';
|
||||||
|
import localePtBr from '@angular/common/locales/pt';
|
||||||
|
import localePtPt from '@angular/common/locales/pt-PT';
|
||||||
|
import localeRo from '@angular/common/locales/ro';
|
||||||
|
import localeRu from '@angular/common/locales/ru';
|
||||||
|
import localeSk from '@angular/common/locales/sk';
|
||||||
|
import localeSv from '@angular/common/locales/sv';
|
||||||
|
import localeTh from '@angular/common/locales/th';
|
||||||
|
import localeTr from '@angular/common/locales/tr';
|
||||||
|
import localeUk from '@angular/common/locales/uk';
|
||||||
|
import localeVi from '@angular/common/locales/vi';
|
||||||
|
import localeZhCn from '@angular/common/locales/zh-Hans';
|
||||||
|
import localeZhTw from '@angular/common/locales/zh-Hant';
|
||||||
|
|
||||||
|
registerLocaleData(localeBg, 'bg');
|
||||||
|
registerLocaleData(localeCs, 'cs');
|
||||||
|
registerLocaleData(localeDa, 'da');
|
||||||
|
registerLocaleData(localeDe, 'de');
|
||||||
|
registerLocaleData(localeEs, 'es');
|
||||||
|
registerLocaleData(localeEt, 'et');
|
||||||
|
registerLocaleData(localeFa, 'fa');
|
||||||
|
registerLocaleData(localeFi, 'fi');
|
||||||
|
registerLocaleData(localeFr, 'fr');
|
||||||
|
registerLocaleData(localeHr, 'hr');
|
||||||
|
registerLocaleData(localeHu, 'hu');
|
||||||
|
registerLocaleData(localeId, 'id');
|
||||||
|
registerLocaleData(localeIt, 'it');
|
||||||
|
registerLocaleData(localeJa, 'ja');
|
||||||
|
registerLocaleData(localeKo, 'ko');
|
||||||
|
registerLocaleData(localeNb, 'nb');
|
||||||
|
registerLocaleData(localeNl, 'nl');
|
||||||
|
registerLocaleData(localePl, 'pl');
|
||||||
|
registerLocaleData(localePtBr, 'pt-BR');
|
||||||
|
registerLocaleData(localePtPt, 'pt-PT');
|
||||||
|
registerLocaleData(localeRo, 'ro');
|
||||||
|
registerLocaleData(localeRu, 'ru');
|
||||||
|
registerLocaleData(localeSk, 'sk');
|
||||||
|
registerLocaleData(localeSv, 'sv');
|
||||||
|
registerLocaleData(localeTh, 'th');
|
||||||
|
registerLocaleData(localeTr, 'tr');
|
||||||
|
registerLocaleData(localeUk, 'uk');
|
||||||
|
registerLocaleData(localeVi, 'vi');
|
||||||
|
registerLocaleData(localeZhCn, 'zh-CN');
|
||||||
|
registerLocaleData(localeZhTw, 'zh-TW');
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
@ -2,6 +2,7 @@ import { remote } from 'electron';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
APP_INITIALIZER,
|
APP_INITIALIZER,
|
||||||
|
LOCALE_ID,
|
||||||
NgModule,
|
NgModule,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
@ -186,6 +187,11 @@ export function initFactory(): Function {
|
|||||||
deps: [],
|
deps: [],
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provide: LOCALE_ID,
|
||||||
|
useFactory: () => i18nService.translationLocale,
|
||||||
|
deps: [],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class ServicesModule {
|
export class ServicesModule {
|
||||||
|
Loading…
Reference in New Issue
Block a user