mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
sanitize system language
This commit is contained in:
@@ -12,7 +12,9 @@ export class I18nService implements I18nServiceAbstraction {
|
|||||||
protected localeMessages: any = {};
|
protected localeMessages: any = {};
|
||||||
|
|
||||||
constructor(protected systemLanguage: string, protected localesDirectory: string,
|
constructor(protected systemLanguage: string, protected localesDirectory: string,
|
||||||
protected getLocalesJson: (formattedLocale: string) => Promise<any>) { }
|
protected getLocalesJson: (formattedLocale: string) => Promise<any>) {
|
||||||
|
this.systemLanguage = systemLanguage.replace('_', '-');
|
||||||
|
}
|
||||||
|
|
||||||
async init(locale?: string) {
|
async init(locale?: string) {
|
||||||
if (this.inited) {
|
if (this.inited) {
|
||||||
|
|||||||
Reference in New Issue
Block a user