From c8b25cf9119a0819bff53f1e57ce1072f089b7ff Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 18 Jan 2022 10:26:49 +0100 Subject: [PATCH] locale updates --- tabby-core/src/services/locale.service.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tabby-core/src/services/locale.service.ts b/tabby-core/src/services/locale.service.ts index 5aca2eb2..ecbb920c 100644 --- a/tabby-core/src/services/locale.service.ts +++ b/tabby-core/src/services/locale.service.ts @@ -2,10 +2,11 @@ import { Injectable } from '@angular/core' import { registerLocaleData } from '@angular/common' import { TranslateService } from '@ngx-translate/core' -import localeEN from '@angular/common/locales/en-GB' +import localeEN from '@angular/common/locales/en' import localeDE from '@angular/common/locales/de' import localeFR from '@angular/common/locales/fr' import localeHR from '@angular/common/locales/hr' +import localeRU from '@angular/common/locales/ru' import localeZH from '@angular/common/locales/zh' import { Observable, Subject } from 'rxjs' import { distinctUntilChanged } from 'rxjs/operators' @@ -16,6 +17,7 @@ registerLocaleData(localeEN) registerLocaleData(localeDE) registerLocaleData(localeFR) registerLocaleData(localeHR) +registerLocaleData(localeRU) registerLocaleData(localeZH) @Injectable({ providedIn: 'root' }) @@ -31,7 +33,7 @@ export class TranslateServiceWrapper extends TranslateService { export class LocaleService { private logger: Logger - static readonly allLocales = ['en-US', 'de-DE', 'fr-FR', 'hr-HR', 'zh-CN'] + static readonly allLocales = ['en-US', 'de-DE', 'fr-FR', 'hr-HR', 'ru-RU', 'zh-CN'] readonly allLanguages: { code: string, name: string }[] get localeChanged$ (): Observable { @@ -75,6 +77,10 @@ export class LocaleService { code: 'fr-FR', name: translate.instant('French'), }, + { + code: 'ru-EU', + name: translate.instant('Russian'), + }, ] this.translate.setTranslation('en-US', {})