Skip to content

Commit

Permalink
feat: Add zh-TW localization (denysdovhan#68)
Browse files Browse the repository at this point in the history
* add zh-TW localization and move file name for zh-CN

* Update README.md for zh-TW translation

* en translation: tiny typo fix

Co-authored-by: Denys Dovhan <[email protected]>
  • Loading branch information
petercpg and denysdovhan authored Sep 25, 2021
1 parent 5e37257 commit f712ed4
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ This card supports translations. Please, help to add more translations and impro
- Català (Catalan)
- Русский (Russian)
- Italiano (Italian)
- 繁體中文 (Traditional Chinese)
- [_Your language?_][add-translation]

## Supported models
Expand Down
6 changes: 4 additions & 2 deletions src/localize.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import * as fr from './translations/fr.json';
import * as nb from './translations/nb.json';
import * as pl from './translations/pl.json';
import * as bg from './translations/bg.json';
import * as zh from './translations/zh.json';
import * as zh_CN from './translations/zh-CN.json';
import * as zh_TW from './translations/zh-TW.json';
import * as de from './translations/de.json';
import * as ca from './translations/ca.json';
import * as ru from './translations/ru.json';
Expand All @@ -22,7 +23,8 @@ var languages = {
nb,
pl,
bg,
zh,
zh_CN,
zh_TW,
de,
ca,
ru,
Expand Down
2 changes: 1 addition & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"common": {
"name": "Purifier Card",
"description": "Purifier card allows you to control your smart purifier.",
"not_available": "Entity is not avaialable",
"not_available": "Entity is not available",
"toggle_power": "Turn on/off"
},
"state": {
Expand Down
File renamed without changes.
38 changes: 38 additions & 0 deletions src/translations/zh-TW.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"common": {
"name": "Purifier Card",
"description": "讓您用更輕鬆的方式控制智慧空氣清淨機的卡片。",
"not_available": "實體無法使用",
"toggle_power": "開關"
},
"state": {
"on": "",
"off": ""
},
"speed": {
"Auto": "自動",
"Silent": "靜音",
"Favorite": "最愛",
"Fan": "送風"
},
"error": {
"missing_entity": "必須指定實體名稱!",
"xiaomi_miio_level_without_speed": "設定 xiaomi_miio_favorite_level 屬性時必須包含 speed 屬性!"
},
"editor": {
"entity": "實體名稱(必填)",
"compact_view": "精簡卡片",
"compact_view_aria_label_on": "開啟精簡卡片",
"compact_view_aria_label_off": "關閉精簡卡片",
"show_name": "顯示裝置名稱",
"show_name_aria_label_on": "顯示裝置名稱",
"show_name_aria_label_off": "隱藏裝置名稱",
"show_state": "顯示裝置狀態",
"show_state_aria_label_on": "顯示裝置狀態",
"show_state_aria_label_off": "隱藏裝置狀態",
"show_toolbar": "顯示工具列",
"show_toolbar_aria_label_on": "顯示工具列",
"show_toolbar_aria_label_off": "隱藏工具列",
"code_only_note": "註:必須使用編碼編輯器編輯 actions 與 stats 選項。"
}
}

0 comments on commit f712ed4

Please sign in to comment.