Skip to content

Commit

Permalink
Merge pull request #6 from WoBBeLnl/master
Browse files Browse the repository at this point in the history
Add Dutch language
  • Loading branch information
t1gr0u authored May 8, 2023
2 parents e3cbfd7 + d337415 commit e341c8b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ entity: sensor.weather_station_uv

The following languages are supported:

| Language | Yaml Value | Supported Since | Translated by |
| --------- | ---------- | --------------- | ----------------------------------------------------------------------------------- |
| English | `en` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) |
| French | `fr` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) |
| German | `de` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) |
| Italian | `it` | v?.?.? | [@SiriosDev](https://github.com/SiriosDev) |
| Language | Yaml value | Supported | Translated by |
| --------- | ---------- | --------- | ----------------------------------------------------------------------------------- |
| Dutch | `nl` | v1.2.0 | [@WoBBeLNL](https://github.com/WoBBeLnl) |
| English | `en` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) |
| French | `fr` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) |
| German | `de` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) |
| Italian | `it` | v1.2.0 | [@SiriosDev](https://github.com/SiriosDev) |


## Thanks to
Expand Down
17 changes: 17 additions & 0 deletions src/localize/languages/nl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"common": {
"version": "Versie",
"invalid_configuration": "Ongeldige configuratie",
"show_warning": "Toon waarschuwing",
"show_error": "Toon foutmelding",
"uv_index": "UV index",
"uv_risk": "UV risico"
},
"uv_levels": {
"low": "Laag",
"moderate": "Matig",
"high": "Hoog",
"very_high": "Zeer hoog",
"extreme": "Extreem"
}
}
6 changes: 4 additions & 2 deletions src/localize/localize.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import * as de from './languages/de.json';
import * as en from './languages/en.json';
import * as fr from "./languages/fr.json";
import * as fr from './languages/fr.json';
import * as nl from './languages/nl.json';
import * as it from "./languages/it.json";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const languages: any = {
de: de,
en: en,
fr: fr,
it: it
nl: nl,
it: it,
};

export function localize(string: string, search = '', replace = ''): string {
Expand Down

0 comments on commit e341c8b

Please sign in to comment.