From 66175ae8b4b9307105fb3b3f9a77800e5d35518f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 13 Dec 2021 17:06:44 +0100 Subject: Support nn and nb locales --- client/angular.json | 8 ++++++++ scripts/build/client.sh | 2 ++ scripts/i18n/update.sh | 2 +- shared/core-utils/i18n/i18n.ts | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/client/angular.json b/client/angular.json index 455c9fbde..6434c30cc 100644 --- a/client/angular.json +++ b/client/angular.json @@ -124,6 +124,14 @@ "kab": { "translation": "src/locale/angular.kab.xlf", "baseHref": "/client/kab/" + }, + "nb": { + "translation": "src/locale/angular.nb-NO.xlf", + "baseHref": "/client/nb-NO/" + }, + "nn": { + "translation": "src/locale/angular.nn.xlf", + "baseHref": "/client/nn/" } } }, diff --git a/scripts/build/client.sh b/scripts/build/client.sh index e891b217c..bae91a2b6 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh @@ -35,6 +35,8 @@ languages=( ["de"]="de-DE" ["it"]="it-IT" ["sq"]="sq" + ["nn"]="nn" + ["nb"]="nb-NO" ["kab"]="kab" ) diff --git a/scripts/i18n/update.sh b/scripts/i18n/update.sh index 0524c9e5d..4cf0d65b7 100755 --- a/scripts/i18n/update.sh +++ b/scripts/i18n/update.sh @@ -8,7 +8,7 @@ cd client npm run ng -- extract-i18n --out-file src/locale/angular.xlf # Merge new translations in other language files -node ./node_modules/.bin/xliffmerge -p ./.xliffmerge.json "ar" "ca-ES" "gl-ES" "cs-CZ" "da-DK" "de-DE" "el-GR" "en-GB" "en-US" "eo" "es-ES" "eu-ES" "fa-IR" "fi-FI" "fr-FR" "gd" "gl-ES" "hu-HU" "it-IT" "ja-JP" "jbo" "kab" "ko-KR" "lt-LT" "nb-NO" "nl-NL" "oc" "pl-PL" "pt-BR" "pt-PT" "ru-RU" "sk-SK" "sl-SI" "sv-SE" "ta" "th-TH" "tr-TR" "uk-UA" "vi-VN" "zh-Hans-CN" "zh-Hant-TW" +node ./node_modules/.bin/xliffmerge -p ./.xliffmerge.json "ar" "ca-ES" "gl-ES" "cs-CZ" "da-DK" "de-DE" "el-GR" "en-GB" "en-US" "eo" "es-ES" "eu-ES" "fa-IR" "fi-FI" "fr-FR" "gd" "gl-ES" "hu-HU" "it-IT" "ja-JP" "jbo" "kab" "ko-KR" "lt-LT" "nb-NO" "nl-NL" "oc" "pl-PL" "pt-BR" "pt-PT" "ru-RU" "sk-SK" "sl-SI" "sv-SE" "ta" "th-TH" "tr-TR" "uk-UA" "vi-VN" "zh-Hans-CN" "zh-Hant-TW" "nn" "nb-NO" # Add our strings too cd ../ diff --git a/shared/core-utils/i18n/i18n.ts b/shared/core-utils/i18n/i18n.ts index f27de20f1..ae6af8192 100644 --- a/shared/core-utils/i18n/i18n.ts +++ b/shared/core-utils/i18n/i18n.ts @@ -28,6 +28,8 @@ export const I18N_LOCALES = { 'ru-RU': 'русский', 'sq': 'Shqip', 'sv-SE': 'Svenska', + 'nn': 'norsk nynorsk', + 'nb-NO': 'norsk bokmål', 'th-TH': 'ไทย', 'vi-VN': 'Tiếng Việt', 'zh-Hans-CN': '简体中文(中国)', @@ -52,6 +54,7 @@ const I18N_LOCALE_ALIAS = { 'nl': 'nl-NL', 'pl': 'pl-PL', 'pt': 'pt-BR', + 'nb': 'nb-NO', 'ru': 'ru-RU', 'sv': 'sv-SE', 'th': 'th-TH', -- cgit v1.2.3