Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zh-TW localization #68

Merged
merged 4 commits into from
Sep 25, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ compact_view: false

Here is what every option means:

| Name | Type | Default | Description |
| ----------------- | :-------: | ------------ | ------------------------------------------------ |
| `type` | `string` | **Required** | `custom:purifier-card` |
| `entity` | `string` | **Required** | An entity_id within the `fan` domain. |
| `show_name` | `boolean` | `true` | Show friendly name of the purifier. |
| `show_status` | `boolean` | `true` | Show status of the purifier. |
| `show_speed` | `boolean` | `false` | Show speed of the purifier in the header. |
| `show_preset_mode`| `boolean` | `true` | Show preset mode of the purifier in the header. |
| `show_toolbar` | `boolean` | `true` | Show toolbar with actions. |
| `compact_view` | `boolean` | `false` | Compact view without image. |
| `aqi` | `object` | Optional | Custom entity or attribute for AQI value. |
| `stats` | `object` | Optional | Custom per state stats for your purifier cleaner |
| `actions` | `object` | Optional | Custom actions for your purifier cleaner. |
| Name | Type | Default | Description |
| ------------------ | :-------: | ------------ | ------------------------------------------------ |
| `type` | `string` | **Required** | `custom:purifier-card` |
| `entity` | `string` | **Required** | An entity_id within the `fan` domain. |
| `show_name` | `boolean` | `true` | Show friendly name of the purifier. |
| `show_status` | `boolean` | `true` | Show status of the purifier. |
| `show_speed` | `boolean` | `false` | Show speed of the purifier in the header. |
| `show_preset_mode` | `boolean` | `true` | Show preset mode of the purifier in the header. |
| `show_toolbar` | `boolean` | `true` | Show toolbar with actions. |
| `compact_view` | `boolean` | `false` | Compact view without image. |
| `aqi` | `object` | Optional | Custom entity or attribute for AQI value. |
| `stats` | `object` | Optional | Custom per state stats for your purifier cleaner |
| `actions` | `object` | Optional | Custom actions for your purifier cleaner. |

### `aqi` object

Expand Down Expand Up @@ -189,6 +189,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 All @@ -203,7 +204,7 @@ If this card works with your air purifier, please open a PR and your model to th
- Coway Airmega 300S/400S ([using IoCare custom component](https://github.com/sarahhenkens/home-assistant-iocare))
- Dyson Pure Humidify+Cool ([using Dyson integration](https://www.home-assistant.io/integrations/dyson/))
- Winix AM90 Wi-Fi Air Purifier
- Philips AirPurifier AC3858/50 (partially)
- Philips AirPurifier AC3858/50 (partially)
- [_Your purifier?_][edit-readme]
- SmartMI Air Purifier

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 選項。"
}
}