From d86f8da36ebfc3e9a3411caf7310f9d349853039 Mon Sep 17 00:00:00 2001 From: oznu Date: Mon, 11 Jan 2021 22:09:59 +1100 Subject: [PATCH] configured Macedonian lang --- CHANGELOG.md | 7 +++++++ README.md | 2 +- config.schema.json | 6 ++++++ ui/src/app/app.component.ts | 2 +- ui/src/app/core/locales.ts | 3 +++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8137a479e..38bbbd780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/). +## NEXT + +### Notable Changes + +* **i18n:** Macedonian (mk) language added by [@dimovskidamjan](https://github.com/dimovskidamjan) ([#1011](https://github.com/oznu/homebridge-config-ui-x/pull/1011)) + * The Homebridge UI is now available in 24 different languages! + ## 4.36.0 (2020-12-07) ### Notable Changes diff --git a/README.md b/README.md index ad2ecddb8..2a233cd87 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Discord](https://img.shields.io/discord/432663330281226270?color=728ED5&logo=discord&label=discord)](https://discord.gg/C87Pvq3) [![Donate](https://badgen.net/badge/donate/paypal/yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZEW8TFQCU2MSJ&source=url) -Supported Languages: :gb: :de: :fr: :poland: :czech_republic: :ru: :cn: :hungary: :jp: :es: :netherlands: :tr: :it: :bulgaria: :sweden: :norway: :slovenia: :brazil: :portugal: :indonesia: :kr: +Supported Languages: :gb: :de: :fr: :poland: :czech_republic: :ru: :cn: :hungary: :jp: :es: :netherlands: :tr: :it: :bulgaria: :sweden: :norway: :slovenia: :brazil: :portugal: :indonesia: :kr: :macedonia: # Homebridge Config UI X diff --git a/config.schema.json b/config.schema.json index 99cfd69dd..1b1d14e9f 100644 --- a/config.schema.json +++ b/config.schema.json @@ -334,6 +334,12 @@ "nl" ] }, + { + "title": "Macedonian (mk)", + "enum": [ + "mk" + ] + }, { "title": "Norwegian (no)", "enum": [ diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 1987fb2df..aa463521b 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -15,7 +15,7 @@ export class AppComponent { private $auth: AuthService, ) { // this array needs to be updated each time a new translation is added - const languages = ['en', 'de', 'fr', 'pl', 'cs', 'ru', 'zh-CN', 'zh-TW', 'hu', 'ja', 'es', 'nl', 'tr', 'it', 'bg', 'sv', 'no', 'sl', 'pt-BR', 'pt', 'id', 'ca', 'ko']; + const languages = ['en', 'de', 'fr', 'pl', 'cs', 'ru', 'zh-CN', 'zh-TW', 'hu', 'ja', 'es', 'nl', 'tr', 'it', 'bg', 'sv', 'no', 'sl', 'pt-BR', 'pt', 'id', 'ca', 'ko', 'mk']; console.log('Browser Culture Lang:', translate.getBrowserCultureLang()); console.log('Browser Lang:', translate.getBrowserLang()); diff --git a/ui/src/app/core/locales.ts b/ui/src/app/core/locales.ts index 3259adf93..3fc2dcf8c 100644 --- a/ui/src/app/core/locales.ts +++ b/ui/src/app/core/locales.ts @@ -22,6 +22,7 @@ import localePt from '@angular/common/locales/pt'; import localeId from '@angular/common/locales/id'; import localeCa from '@angular/common/locales/ca'; import localeKo from '@angular/common/locales/ko'; +import localeMk from '@angular/common/locales/mk'; registerLocaleData(localeEn); registerLocaleData(localeDe); @@ -45,6 +46,7 @@ registerLocaleData(localePt); registerLocaleData(localeId); registerLocaleData(localeCa); registerLocaleData(localeKo); +registerLocaleData(localeMk); export const supportedLocales = { 'en': 'en', @@ -70,4 +72,5 @@ export const supportedLocales = { 'id': 'id', 'ca': 'ca', 'ko': 'ko', + 'mk': 'mk' };