Skip to content

Commit

Permalink
configured Macedonian lang
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed Jan 11, 2021
1 parent dd635ff commit d86f8da
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@
"nl"
]
},
{
"title": "Macedonian (mk)",
"enum": [
"mk"
]
},
{
"title": "Norwegian (no)",
"enum": [
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
3 changes: 3 additions & 0 deletions ui/src/app/core/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -45,6 +46,7 @@ registerLocaleData(localePt);
registerLocaleData(localeId);
registerLocaleData(localeCa);
registerLocaleData(localeKo);
registerLocaleData(localeMk);

export const supportedLocales = {
'en': 'en',
Expand All @@ -70,4 +72,5 @@ export const supportedLocales = {
'id': 'id',
'ca': 'ca',
'ko': 'ko',
'mk': 'mk'
};

0 comments on commit d86f8da

Please sign in to comment.