Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Add Catalan translation #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Note: If you get an error similar to this `Custom element doesn't exist` you wil
| timeFormat | `'12h'`/`'24h'` | Displayed time format | Locale based on Home assistant language |
| title | `string` | Card title | Doesn't display a title by default | |

(<sup>1</sup>) Supported languages: `da`, `de`, `en`, `es`, `et`, `fi`, `fr`, `hu`, `it`, `nl`, `pl`, `pt-BR`, `ru`, `sl`, `sv`
(<sup>1</sup>) Supported languages: `ca`, `da`, `de`, `en`, `es`, `et`, `fi`, `fr`, `hu`, `it`, `nl`, `pl`, `pt-BR`, `ru`, `sl`, `sv`

## Known issues
- Home assistant seems to provide next events instead today's one
- Home assistant seems to provide next events instead today's one
12 changes: 12 additions & 0 deletions src/assets/localization/languages/ca.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Azimuth": "Azimut",
"Dawn": "Alba",
"Dusk": "Capvespre",
"Elevation": "Elevació",
"Noon": "Migdia solar",
"Sunrise": "Sortida del sol",
"Sunset": "Posta del sol",
"errors": {
"SunIntegrationNotFound": "Sun integration not found."
}
}
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ca from './assets/localization/languages/ca.json'
import da from './assets/localization/languages/da.json'
import de from './assets/localization/languages/de.json'
import en from './assets/localization/languages/en.json'
Expand Down Expand Up @@ -33,7 +34,7 @@ export class Constants {

static readonly HORIZON_Y = 108
static readonly LOCALIZATION_LANGUAGES: Record<string, TSunCardTexts> = {
da, de, en, es, et, fi, fr, hu, it, nl, pl, 'pt-BR': ptBR, ru, sl, sv
ca, da, de, en, es, et, fi, fr, hu, it, nl, pl, 'pt-BR': ptBR, ru, sl, sv
}
static readonly SUN_RADIUS = 17
}