Skip to content

Commit 6204490

Browse files
Fortytwookaxil
andauthored
Fix (internationalization): Simplified Chinese fills in gaps and removes extra content, optimizes description (#55564)
* feat(i18n): Add Chinese (zh-CN) internationalization support This commit adds Simplified Chinese (zh-CN) internationalization support to Airflow UI. The changes include: - Added complete Simplified Chinese translation files - Updated i18n configuration to include zh-CN locale - Updated translation completeness check script - Updated CODEOWNERS for zh-CN translations - Optimized translations for better user experience - Unified terminology for consistency (e.g. backfill, login) - Updated DAG/DAGs capitalization according to #55099 Co-authored-by: @gyli * Apply suggestions from code review * fixup! Apply suggestions from code review --------- Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
1 parent f9400cc commit 6204490

File tree

6 files changed

+32
-15
lines changed

6 files changed

+32
-15
lines changed

airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"columns": {
1717
"connectionId": "连接 ID",
1818
"connectionType": "连接类型",
19-
"host": "主机",
19+
"host": "主机地址",
2020
"port": "端口"
2121
},
2222
"connection_one": "连接",
@@ -53,7 +53,7 @@
5353
"error": "获取连接类型元数据失败",
5454
"standardFields": {
5555
"description": "描述",
56-
"host": "主机",
56+
"host": "主机地址",
5757
"login": "登录",
5858
"password": "密码",
5959
"port": "端口",
@@ -143,15 +143,15 @@
143143
"options": {
144144
"fail": {
145145
"description": "如果检测到任何已存在的变量,则导入失败。",
146-
"title": "失败"
146+
"title": "严格模式"
147147
},
148148
"overwrite": {
149149
"description": "发生冲突时覆盖变量。",
150-
"title": "覆盖"
150+
"title": "覆盖模式"
151151
},
152152
"skip": {
153153
"description": "忽略导入已存在的变量。",
154-
"title": "跳过"
154+
"title": "非严格模式"
155155
}
156156
},
157157
"title": "导入变量",

airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
"Variables": "变量"
99
},
1010
"allOperators": "全部操作器",
11+
"appearance": {
12+
"appearance": "外观",
13+
"darkMode": "深色模式",
14+
"lightMode": "浅色模式",
15+
"systemMode": "跟随系统设置"
16+
},
1117
"asset_one": "资源",
1218
"asset_other": "资源",
1319
"assetEvent_one": "资源事件",
@@ -33,6 +39,7 @@
3339
"fileLocation": "文件位置",
3440
"hasTaskConcurrencyLimits": "有任务并发数限制",
3541
"lastExpired": "最后过期时间",
42+
"lastParseDuration": "最后解析耗时",
3643
"lastParsed": "最后解析时间",
3744
"latestDagVersion": "最新 Dag 版本",
3845
"latestRun": "上次 Dag 执行",
@@ -93,6 +100,12 @@
93100
"or": ""
94101
},
95102
"filter": "筛选",
103+
"filters": {
104+
"logicalDateFrom": "逻辑日期起始",
105+
"logicalDateTo": "逻辑结束日期",
106+
"runAfterFrom": "执行时间起始",
107+
"runAfterTo": "执行时间结束"
108+
},
96109
"logicalDate": "逻辑日期",
97110
"logout": "退出登录",
98111
"logoutConfirmation": "确定要退出登录吗?",
@@ -184,24 +197,22 @@
184197
"up_for_retry": "等待重试",
185198
"upstream_failed": "上游任务失败"
186199
},
187-
"switchToDarkMode": "切换到深色模式",
188-
"switchToLightMode": "切换到浅色模式",
189200
"table": {
190201
"completedAt": "完成时间",
191202
"createdAt": "创建时间",
192203
"filterByTag": "按标签筛选 Dags",
193204
"filterColumns": "筛选表格列",
194205
"filterReset_one": "重置筛选",
195206
"filterReset_other": "重置筛选",
196-
"from": "",
207+
"from": "开始时间",
197208
"maxActiveRuns": "最大活跃执行数",
198209
"noTagsFound": "找不到标签",
199210
"tagMode": {
200211
"all": "全部",
201212
"any": "任何"
202213
},
203214
"tagPlaceholder": "按标签筛选",
204-
"to": ""
215+
"to": "结束时间"
205216
},
206217
"task": {
207218
"documentation": "任务文档",

airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"code": {
3636
"bundleUrl": "套件包链接",
3737
"noCode": "找不到代码",
38+
"parseDuration": "解析耗时:",
3839
"parsedAt": "解析时间:"
3940
},
4041
"extraLinks": "额外链接",
@@ -84,6 +85,8 @@
8485
"assetEvent_other": "已创建资源事件"
8586
},
8687
"failedLogs": {
88+
"hideLogs": "隐藏日志",
89+
"showLogs": "显示日志",
8790
"title": "最近失败任务的日志",
8891
"viewFullLogs": "查看完整日志"
8992
}

airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"unfavorite": "未加入收藏"
1717
},
1818
"paused": {
19-
"active": "启用中",
19+
"active": "已启用",
2020
"all": "全部",
2121
"paused": "暂停"
2222
},

airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
},
3434
"source": "来源",
3535
"stats": {
36-
"activeDags": "启用中的 Dags",
36+
"activeDags": "已启用的 Dags",
3737
"failedDags": "失败的 Dags",
3838
"queuedDags": "排队的 Dags",
39-
"requiredActions": "待响应的任务实例",
39+
"requiredActions": "待操作的任务实例",
4040
"runningDags": "执行中的 Dags",
4141
"stats": "统计"
4242
},

airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
"received": "已响应"
77
}
88
},
9-
"requiredAction_one": "待响应的任务实例",
10-
"requiredAction_other": "待响应的任务实例",
11-
"requiredActionState": "待响应的任务实例状态",
9+
"requiredAction_one": "待操作的任务实例",
10+
"requiredAction_other": "待操作的任务实例",
11+
"requiredActionCount_one": "待操作的任务实例 ({{count}})",
12+
"requiredActionCount_other": "待操作的任务实例 ({{count}})",
13+
"requiredActionState": "待操作的任务实例状态",
1214
"response": {
1315
"error": "响应失败",
1416
"optionsDescription": "请为此任务实例选择一个选项",
@@ -23,6 +25,7 @@
2325
"approvalRequired": "需要批准",
2426
"choiceReceived": "已选择",
2527
"choiceRequired": "需要选择",
28+
"noResponseReceived": "未收到响应",
2629
"rejectionReceived": "已拒绝",
2730
"responseReceived": "已响应",
2831
"responseRequired": "需要响应"

0 commit comments

Comments
 (0)