1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[CSA-27] Use new dependency-free locale service for WebAuthN translations (#4557)

This commit is contained in:
Matt Bishop
2023-02-04 09:23:42 -05:00
committed by GitHub
parent dc3a0b25cb
commit dcc7846138
8 changed files with 306 additions and 254 deletions

View File

@@ -1,11 +1,7 @@
import { Observable } from "rxjs";
export abstract class I18nService {
import { TranslationService } from "./translation.service";
export abstract class I18nService extends TranslationService {
locale$: Observable<string>;
supportedTranslationLocales: string[];
translationLocale: string;
collator: Intl.Collator;
localeNames: Map<string, string>;
t: (id: string, p1?: string | number, p2?: string | number, p3?: string | number) => string;
translate: (id: string, p1?: string, p2?: string, p3?: string) => string;
}

View File

@@ -0,0 +1,8 @@
export abstract class TranslationService {
supportedTranslationLocales: string[];
translationLocale: string;
collator: Intl.Collator;
localeNames: Map<string, string>;
t: (id: string, p1?: string | number, p2?: string | number, p3?: string | number) => string;
translate: (id: string, p1?: string, p2?: string, p3?: string) => string;
}