mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
Move to libs
This commit is contained in:
19
libs/components/src/utils/i18n-mock.service.ts
Normal file
19
libs/components/src/utils/i18n-mock.service.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||
|
||||
export class I18nMockService implements I18nService {
|
||||
locale: string;
|
||||
supportedTranslationLocales: string[];
|
||||
translationLocale: string;
|
||||
collator: Intl.Collator;
|
||||
localeNames: Map<string, string>;
|
||||
|
||||
constructor(private lookupTable: Record<string, string>) {}
|
||||
|
||||
t(id: string, p1?: string, p2?: string, p3?: string) {
|
||||
return this.lookupTable[id];
|
||||
}
|
||||
|
||||
translate(id: string, p1?: string, p2?: string, p3?: string) {
|
||||
return this.t(id, p1, p2, p3);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user