Skip to content

Added Chinese Support #143

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

Open
wants to merge 1 commit 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
62 changes: 62 additions & 0 deletions src/localize/languages/cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"common": {
"version": "v",
"invalid_configuration": "无效配置",
"show_warning": "显示警告",
"show_error": "显示错误"
},
"tabs": {
"general": {
"title": "通用",
"entity": "实体 (必须)",
"name": "名称 (可选)",
"show_name": "显示名称?",
"show_state": "显示状态?",
"compact": "紧凑模式?"
},
"icon": {
"title": "图标",
"icon": "图标 (可选)",
"show_icon": "显示图标?",
"use_state_color": "使用状态颜色?",
"tap_action": "点击操作"
},
"slider": {
"title": "滑块",
"direction": "方向",
"background": "背景",
"use_brightness": "使用亮度?",
"show_track": "显示轨迹?",
"toggle_on_click": "作为开关 (禁用滑动)",
"force_square": "强制为正方形?"
},
"action_button": {
"title": "操作按钮",
"mode": "模式",
"icon": "图标",
"show_button": "显示按钮?",
"show_spinner": "显示指示器?",
"tap_action": "点击操作"
}
},
"state": {
"off": "关",
"on": "开"
},
"direction": {
"left-right": "从左到右",
"top-bottom": "从上到下",
"bottom-top": "从下到上"
},
"background": {
"striped": "条纹",
"gradient": "渐变",
"solid": "纯色",
"triangle": "三角",
"custom": "自定义"
},
"mode": {
"toggle": "开关",
"custom": "自定义"
}
}
2 changes: 2 additions & 0 deletions src/localize/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import * as pl from './languages/pl.json';
import * as pt from './languages/pt.json';
import * as ru from './languages/ru.json';
import * as ko from './languages/ko.json';
import * as cn from './languages/cn.json';



// eslint-disable-next-line @typescript-eslint/no-explicit-any
const languages: any = {
en: en,
cn: cn,
de: de,
fr: fr,
he: he,
Expand Down