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

Add Swedish translation #33

Merged
merged 1 commit into from
May 18, 2021
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Note: If `Custom: Sun card` doesn't appear you will have to reload cleaning the
| 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: `de`, `en`, `es`, `fi`, `fr`, `hu`, `it`, `nl`, `pt-BR`
(<sup>1</sup>) Supported languages: `de`, `en`, `es`, `fi`, `fr`, `hu`, `it`, `nl`, `pt-BR`, `sv`

## Known issues
- Home assistant seems to provide next events instead today's one
9 changes: 9 additions & 0 deletions src/assets/localization/languages/sv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Azimuth": "Azimut",
"Dawn": "Gryning",
"Dusk": "Skymning",
"Elevation": "Elevation",
"Noon": "Middag",
"Sunrise": "Soluppgång",
"Sunset": "Solnedgång"
}
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import hu from './assets/localization/languages/hu.json'
import it from './assets/localization/languages/it.json'
import nl from './assets/localization/languages/nl.json'
import ptBR from './assets/localization/languages/pt-BR.json'
import sv from './assets/localization/languages/sv.json'
import { TSunCardConfig } from './types'

export class Constants {
Expand All @@ -26,6 +27,6 @@ export class Constants {
}

static readonly HORIZON_Y = 108
static readonly LOCALIZATION_LANGUAGES = { de, en, es, fi, fr, hu, it, nl, 'pt-BR': ptBR }
static readonly LOCALIZATION_LANGUAGES = { de, en, es, fi, fr, hu, it, nl, 'pt-BR': ptBR, sv }
static readonly SUN_RADIUS = 17
}