mirror of
https://github.com/bitwarden/browser
synced 2025-01-14 19:37:18 +01:00
sanitize system language
This commit is contained in:
parent
2930d7daf7
commit
94ca579168
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user