From 906d5d0bab2dc4fee6e22e04da1eedcd0de627b8 Mon Sep 17 00:00:00 2001 From: Khaled Emad <39046027+KhaledEmad7@users.noreply.github.com> Date: Mon, 2 Jan 2023 10:07:18 +0200 Subject: [PATCH] Adding arabic language --- src-ui/angular.json | 1 + src-ui/src/app/app.module.ts | 2 ++ src-ui/src/app/services/settings.service.ts | 6 ++++++ src/paperless/settings.py | 1 + 4 files changed, 10 insertions(+) diff --git a/src-ui/angular.json b/src-ui/angular.json index 1fba4c429..9c06e8b92 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -16,6 +16,7 @@ "i18n": { "sourceLocale": "en-US", "locales": { + "ar-AR": "src/locale/messages.ar_AR.xlf", "be-BY": "src/locale/messages.be_BY.xlf", "cs-CZ": "src/locale/messages.cs_CZ.xlf", "da-DK": "src/locale/messages.da_DK.xlf", diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index 70939b928..581d788d5 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -80,6 +80,7 @@ import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' import { MailAccountEditDialogComponent } from './components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component' import { MailRuleEditDialogComponent } from './components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component' +import localeAr from '@angular/common/locales/ar' import localeBe from '@angular/common/locales/be' import localeCs from '@angular/common/locales/cs' import localeDa from '@angular/common/locales/da' @@ -100,6 +101,7 @@ import localeSv from '@angular/common/locales/sv' import localeTr from '@angular/common/locales/tr' import localeZh from '@angular/common/locales/zh' +registerLocaleData(localeAr) registerLocaleData(localeBe) registerLocaleData(localeCs) registerLocaleData(localeDa) diff --git a/src-ui/src/app/services/settings.service.ts b/src-ui/src/app/services/settings.service.ts index 24b2d67ce..d111acd76 100644 --- a/src-ui/src/app/services/settings.service.ts +++ b/src-ui/src/app/services/settings.service.ts @@ -146,6 +146,12 @@ export class SettingsService { englishName: 'English (US)', dateInputFormat: 'mm/dd/yyyy', }, + { + code: 'ar-ar', + name: $localize`Arabic`, + englishName: 'Arabic', + dateInputFormat: 'yyyy-mm-dd', + }, { code: 'be-by', name: $localize`Belarusian`, diff --git a/src/paperless/settings.py b/src/paperless/settings.py index e16662c5a..cc1b9e096 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -420,6 +420,7 @@ LANGUAGE_CODE = "en-us" LANGUAGES = [ ("en-us", _("English (US)")), # needs to be first to act as fallback language + ("ar-ar", _("Arabic")), ("be-by", _("Belarusian")), ("cs-cz", _("Czech")), ("da-dk", _("Danish")),