diff --git a/README.md b/README.md index d5a989a..4f2ecee 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/localize.js b/src/localize.js index 540e072..80acc88 100644 --- a/src/localize.js +++ b/src/localize.js @@ -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'; @@ -22,7 +23,8 @@ var languages = { nb, pl, bg, - zh, + zh_CN, + zh_TW, de, ca, ru, diff --git a/src/translations/en.json b/src/translations/en.json index f65e563..be30531 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -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": { diff --git a/src/translations/zh.json b/src/translations/zh-CN.json similarity index 100% rename from src/translations/zh.json rename to src/translations/zh-CN.json diff --git a/src/translations/zh-TW.json b/src/translations/zh-TW.json new file mode 100644 index 0000000..fefc446 --- /dev/null +++ b/src/translations/zh-TW.json @@ -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 選項。" + } +}