From b7949d2e69d70b50d35f102d9a851b5be5e3c7d8 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 31 Mar 2022 19:42:08 -0700 Subject: [PATCH] Add Belarusian localization --- 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 aff567ded..0bdd84de4 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -16,6 +16,7 @@ "i18n": { "sourceLocale": "en-US", "locales": { + "be-BY": "src/locale/messages.be_BY.xlf", "cs-CZ": "src/locale/messages.cs_CZ.xlf", "da-DK": "src/locale/messages.da_DK.xlf", "de-DE": "src/locale/messages.de_DE.xlf", diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index db45170e6..0d132800c 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -69,6 +69,7 @@ import { ColorSliderModule } from 'ngx-color/slider' import { ColorComponent } from './components/common/input/color/color.component' import { DocumentAsnComponent } from './components/document-asn/document-asn.component' +import localeBe from '@angular/common/locales/be' import localeCs from '@angular/common/locales/cs' import localeDa from '@angular/common/locales/da' import localeDe from '@angular/common/locales/de' @@ -88,6 +89,7 @@ import localeSv from '@angular/common/locales/sv' import localeTr from '@angular/common/locales/tr' import localeZh from '@angular/common/locales/zh' +registerLocaleData(localeBe) registerLocaleData(localeCs) registerLocaleData(localeDa) registerLocaleData(localeDe) diff --git a/src-ui/src/app/services/settings.service.ts b/src-ui/src/app/services/settings.service.ts index f82132af8..b3447ee26 100644 --- a/src-ui/src/app/services/settings.service.ts +++ b/src-ui/src/app/services/settings.service.ts @@ -168,6 +168,12 @@ export class SettingsService { englishName: 'English (US)', dateInputFormat: 'mm/dd/yyyy', }, + { + code: 'be-by', + name: $localize`Belarusian`, + englishName: 'Belarusian', + dateInputFormat: 'dd.mm.yyyy', + }, { code: 'cs-cz', name: $localize`Czech`, diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 0f9559831..d485c5a50 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -299,6 +299,7 @@ LANGUAGE_CODE = "en-us" LANGUAGES = [ ("en-us", _("English (US)")), # needs to be first to act as fallback language + ("be-by", _("Belarusian")), ("cs-cz", _("Czech")), ("da-dk", _("Danish")), ("de-de", _("German")),