[PS-1282] Enable Arabic language support for desktop, browser, web (#3333)

* Register Arabic language with native name

* Register Arabic language for web vault

* Register Arabic language for browser

* Register Arabic language for desktop
This commit is contained in:
Daniel James Smith 2022-09-05 21:18:18 +02:00 committed by GitHub
parent b1f48aa065
commit 57d60e2114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import { LayoutModule } from "@angular/cdk/layout";
import { OverlayModule } from "@angular/cdk/overlay"; import { OverlayModule } from "@angular/cdk/overlay";
import { ScrollingModule } from "@angular/cdk/scrolling"; import { ScrollingModule } from "@angular/cdk/scrolling";
import { CurrencyPipe, DatePipe, registerLocaleData } from "@angular/common"; import { CurrencyPipe, DatePipe, registerLocaleData } from "@angular/common";
import localeAr from "@angular/common/locales/ar";
import localeAz from "@angular/common/locales/az"; import localeAz from "@angular/common/locales/az";
import localeBe from "@angular/common/locales/be"; import localeBe from "@angular/common/locales/be";
import localeBg from "@angular/common/locales/bg"; import localeBg from "@angular/common/locales/bg";
@ -116,6 +117,7 @@ import { VaultSelectComponent } from "./vault/vault-select.component";
import { ViewCustomFieldsComponent } from "./vault/view-custom-fields.component"; import { ViewCustomFieldsComponent } from "./vault/view-custom-fields.component";
import { ViewComponent } from "./vault/view.component"; import { ViewComponent } from "./vault/view.component";
registerLocaleData(localeAr, "ar");
registerLocaleData(localeAz, "az"); registerLocaleData(localeAz, "az");
registerLocaleData(localeBe, "be"); registerLocaleData(localeBe, "be");
registerLocaleData(localeBg, "bg"); registerLocaleData(localeBg, "bg");

View File

@ -11,6 +11,7 @@ export default class I18nService extends BaseI18nService {
// Please leave 'en' where it is, as it's our fallback language in case no translation can be found // Please leave 'en' where it is, as it's our fallback language in case no translation can be found
this.supportedTranslationLocales = [ this.supportedTranslationLocales = [
"en", "en",
"ar",
"az", "az",
"be", "be",
"bg", "bg",

View File

@ -2,6 +2,7 @@ import "zone.js/dist/zone";
import { registerLocaleData } from "@angular/common"; import { registerLocaleData } from "@angular/common";
import localeAf from "@angular/common/locales/af"; import localeAf from "@angular/common/locales/af";
import localeAr from "@angular/common/locales/ar";
import localeAz from "@angular/common/locales/az"; import localeAz from "@angular/common/locales/az";
import localeBe from "@angular/common/locales/be"; import localeBe from "@angular/common/locales/be";
import localeBg from "@angular/common/locales/bg"; import localeBg from "@angular/common/locales/bg";
@ -103,6 +104,7 @@ import { ViewCustomFieldsComponent } from "./vault/view-custom-fields.component"
import { ViewComponent } from "./vault/view.component"; import { ViewComponent } from "./vault/view.component";
registerLocaleData(localeAf, "af"); registerLocaleData(localeAf, "af");
registerLocaleData(localeAr, "ar");
registerLocaleData(localeAz, "az"); registerLocaleData(localeAz, "az");
registerLocaleData(localeBe, "be"); registerLocaleData(localeBe, "be");
registerLocaleData(localeBg, "bg"); registerLocaleData(localeBg, "bg");

View File

@ -19,6 +19,7 @@ export class I18nService extends BaseI18nService {
this.supportedTranslationLocales = [ this.supportedTranslationLocales = [
"en", "en",
"af", "af",
"ar",
"az", "az",
"be", "be",
"bg", "bg",

View File

@ -18,6 +18,7 @@ export class I18nService extends BaseI18nService {
this.supportedTranslationLocales = [ this.supportedTranslationLocales = [
"en", "en",
"af", "af",
"ar",
"az", "az",
"be", "be",
"bg", "bg",

View File

@ -1,5 +1,6 @@
import { registerLocaleData } from "@angular/common"; import { registerLocaleData } from "@angular/common";
import localeAf from "@angular/common/locales/af"; import localeAf from "@angular/common/locales/af";
import localeAr from "@angular/common/locales/ar";
import localeAz from "@angular/common/locales/az"; import localeAz from "@angular/common/locales/az";
import localeBe from "@angular/common/locales/be"; import localeBe from "@angular/common/locales/be";
import localeBg from "@angular/common/locales/bg"; import localeBg from "@angular/common/locales/bg";
@ -52,6 +53,7 @@ import localeZhCn from "@angular/common/locales/zh-Hans";
import localeZhTw from "@angular/common/locales/zh-Hant"; import localeZhTw from "@angular/common/locales/zh-Hant";
registerLocaleData(localeAf, "af"); registerLocaleData(localeAf, "af");
registerLocaleData(localeAr, "ar");
registerLocaleData(localeAz, "az"); registerLocaleData(localeAz, "az");
registerLocaleData(localeBe, "be"); registerLocaleData(localeBe, "be");
registerLocaleData(localeBg, "bg"); registerLocaleData(localeBg, "bg");

View File

@ -11,6 +11,7 @@ export class I18nService implements I18nServiceAbstraction {
collator: Intl.Collator; collator: Intl.Collator;
localeNames = new Map<string, string>([ localeNames = new Map<string, string>([
["af", "Afrikaans"], ["af", "Afrikaans"],
["ar", "العربية الفصحى"],
["az", "Azərbaycanca"], ["az", "Azərbaycanca"],
["be", "Беларуская"], ["be", "Беларуская"],
["bg", "български"], ["bg", "български"],