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

Add Simplified Chinese translation #115

Open
wants to merge 2 commits 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
12 changes: 12 additions & 0 deletions src/assets/localization/languages/cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Azimuth": "方位角",
"Dawn": "黎明",
"Dusk": "黄昏",
"Elevation": "海拔",
"Noon": "太阳正午",
"Sunrise": "日出",
"Sunset": "日落",
"errors": {
"SunIntegrationNotFound": "Sun 集成未启用"
}
}
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ptBR from './assets/localization/languages/pt-BR.json'
import ru from './assets/localization/languages/ru.json'
import sl from './assets/localization/languages/sl.json'
import sv from './assets/localization/languages/sv.json'
import cn from './assets/localization/languages/cn.json'
import { TSunCardConfig, TSunCardTexts } from './types'

export class Constants {
Expand All @@ -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
da, de, en, es, et, fi, fr, hu, it, nl, pl, 'pt-BR': ptBR, ru, sl, sv, cn

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zh-hans should be better. If we have traditional Chinese lang.

}
static readonly SUN_RADIUS = 17
}