This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch v3-1-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit ab828974e95339ea2392f2f64b88bb439ef3a081 Author: Fortytwo <[email protected]> AuthorDate: Wed Sep 10 03:27:26 2025 +0800 [I18N] Add Simplified Chinese (zh-CN) UI Translation (#55122) * feat(i18n): add Chinese simplified support * Feat (i18n): Added Simplified Chinese support * Restore the latest pyproject.toml * Updated Simplified Chinese translation, added calendar-related translation and operator translation, and fixed some existing translation content. * Update the CODEOWNERS file to add ownership claims for the Simplified Chinese translation directory. * 1.Update the international configuration order for Simplified and Traditional Chinese. 2.Fixed Simplified Chinese language code owner information to be empty. * Adjust the location of the owner description of the Chinese Simplified and Traditional translation file to optimize the description * Update airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/assets.json Co-authored-by: Guangyang Li <[email protected]> * Update airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/assets.json Co-authored-by: Guangyang Li <[email protected]> * Update the Chinese localization file, fix the translation of "Add new task to queue", and optimize the sentence structure of "DAG not yet in collection". * Update the simplified Chinese translations of DAG to Dag and DAGs to Dags according to https://github.com/apache/airflow/pull/55099. Update some hard-to-understand translations. * Update the Simplified Chinese translation to optimize the translation related to "login" and "backfill" to make it more in line with user habits. * Updated the code owner of the Simplified Chinese translation, adding @gyli as a collaborator for the zh-CN language. * Optimize the Simplified Chinese translation and unify the terms related to "data backfill" to "backfill" to improve user understanding and experience. * Apply suggestion from @potiuk --------- Co-authored-by: fortytwo <[email protected]> Co-authored-by: Guangyang Li <[email protected]> Co-authored-by: Jarek Potiuk <[email protected]> --- .github/CODEOWNERS | 2 + .github/boring-cyborg.yml | 5 + .../ui/public/i18n/locales/zh-CN/admin.json | 167 +++++++++++ .../ui/public/i18n/locales/zh-CN/assets.json | 30 ++ .../ui/public/i18n/locales/zh-CN/browse.json | 26 ++ .../ui/public/i18n/locales/zh-CN/common.json | 315 +++++++++++++++++++++ .../ui/public/i18n/locales/zh-CN/components.json | 134 +++++++++ .../airflow/ui/public/i18n/locales/zh-CN/dag.json | 149 ++++++++++ .../airflow/ui/public/i18n/locales/zh-CN/dags.json | 97 +++++++ .../ui/public/i18n/locales/zh-CN/dashboard.json | 45 +++ .../airflow/ui/public/i18n/locales/zh-CN/hitl.json | 31 ++ .../ui/public/i18n/locales/zh-CN/tasks.json | 10 + airflow-core/src/airflow/ui/src/i18n/config.ts | 3 +- dev/i18n/check_translations_completeness.py | 1 + 14 files changed, 1014 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5f3b5a3effa..6da73091d64 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -50,8 +50,10 @@ airflow-core/src/airflow/ui/public/i18n/locales/ko/ @jscheffl @potiuk # + @choo1 airflow-core/src/airflow/ui/public/i18n/locales/nl/ @BasPH # + @DjVinnii airflow-core/src/airflow/ui/public/i18n/locales/pl/ @potiuk @mobuchowski # + @kacpermuda airflow-core/src/airflow/ui/public/i18n/locales/tr/ @bugraoz93 # +@hasancatalgol +airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/ @potiuk # + @Fortytwoo @gyli airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/ @Lee-W @jason810496 # + @RoyLee1224 @guan404ming + # Security/Permissions /airflow-core/src/airflow/security/permissions.py @vincbeck diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml index f4671d9e534..88d8f95927e 100644 --- a/.github/boring-cyborg.yml +++ b/.github/boring-cyborg.yml @@ -408,9 +408,14 @@ labelPRBasedOnFilePath: translation:tr: - airflow-core/src/airflow/ui/public/i18n/locales/tr/* + translation:zh-CN: + - airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/* + translation:zh-TW: - airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/* + + area:CLI: - airflow-core/src/airflow/cli/**/*.py - airflow-core/tests/unit/cli/**/*.py diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json new file mode 100644 index 00000000000..eb21ffa133f --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json @@ -0,0 +1,167 @@ +{ + "columns": { + "description": "描述", + "key": "键", + "name": "名称", + "value": "值" + }, + "config": { + "columns": { + "section": "段落" + }, + "title": "Airflow 配置" + }, + "connections": { + "add": "添加连接", + "columns": { + "connectionId": "连接 ID", + "connectionType": "连接类型", + "host": "主机", + "port": "端口" + }, + "connection_one": "连接", + "connection_other": "连接", + "delete": { + "deleteConnection_one": "删除 1 个连接", + "deleteConnection_other": "删除 {{count}} 个连接", + "firstConfirmMessage_one": "您即将删除以下连接:", + "firstConfirmMessage_other": "您即将删除以下连接:", + "title": "删除连接" + }, + "edit": "编辑连接", + "form": { + "connectionIdRequired": "连接 ID 是必填的", + "connectionIdRequirement": "连接 ID 不能只包含空格", + "connectionTypeRequired": "连接类型是必填的", + "extraFields": "额外字段", + "extraFieldsJson": "额外字段 JSON", + "helperText": "找不到连接类型?请确保您已安装对应的 Airflow Providers 套件。", + "helperTextForRedactedFields": "已遮蔽的字段 ('***') 若未修改,将保持不变。", + "selectConnectionType": "选择连接类型", + "standardFields": "标准字段" + }, + "nothingFound": { + "description": "通过环境变量或密钥管理器定义的连接不会列在此处。", + "documentationLink": "在 Airflow 文件中了解更多。", + "learnMore": "这些连接会在执行时解析,不会在 UI 显示。", + "title": "找不到连接" + }, + "searchPlaceholder": "搜索连接", + "test": "测试连接", + "testDisabled": "测试连接功能已停用。请联系管理员以启用。", + "typeMeta": { + "error": "获取连接类型元数据失败", + "standardFields": { + "description": "描述", + "host": "主机", + "login": "登录", + "password": "密码", + "port": "端口", + "url_schema": "Schema" + } + } + }, + "deleteActions": { + "button": "删除", + "modal": { + "confirmButton": "确定删除", + "secondConfirmMessage": "此操作无法恢复。", + "thirdConfirmMessage": "您确定要继续吗?" + }, + "selected": "已选择", + "tooltip": "删除所选连接" + }, + "formActions": { + "reset": "重置", + "save": "保存" + }, + "plugins": { + "columns": { + "source": "来源" + }, + "importError_one": "插件导入错误", + "importError_other": "插件导入错误", + "searchPlaceholder": "搜索文件" + }, + "pools": { + "add": "新增资源池", + "deferredSlotsIncluded": "包含延迟任务", + "delete": { + "title": "删除资源池", + "warning": "这将删除所有与此资源池相关的系统数据,可能会影响使用此资源池的任务。" + }, + "edit": "编辑资源池", + "form": { + "checkbox": "计算可用资源池配额时,将包含延迟的任务", + "description": "描述", + "includeDeferred": "包含延迟任务", + "nameMaxLength": "名称最多只能包含 256 个字符", + "nameRequired": "名称是必填的", + "slots": "配额" + }, + "noPoolsFound": "找不到资源池", + "pool_one": "资源池", + "pool_other": "资源池", + "searchPlaceholder": "搜索资源池", + "sort": { + "asc": "名称 (A-Z)", + "desc": "名称 (Z-A)", + "placeholder": "排序方式" + } + }, + "providers": { + "columns": { + "packageName": "插件名称", + "version": "版本" + } + }, + "variables": { + "add": "新增变量", + "columns": { + "isEncrypted": "是否加密" + }, + "delete": { + "deleteVariable_one": "删除 1 个变量", + "deleteVariable_other": "删除 {{count}} 个变量", + "firstConfirmMessage_one": "您即将删除以下变量:", + "firstConfirmMessage_other": "您即将删除以下变量:", + "title": "删除变量", + "tooltip": "删除所选变量" + }, + "edit": "编辑变量", + "export": "导出", + "exportTooltip": "导出所选变量", + "form": { + "invalidJson": "无效的 JSON", + "keyMaxLength": "键最多只能包含 250 个字符", + "keyRequired": "键是必填的", + "valueRequired": "值是必填的" + }, + "import": { + "button": "导入", + "conflictResolution": "选择变量冲突解决方式", + "errorParsingJsonFile": "解析 JSON 文件时发生错误:请上传包含变量的 JSON 文件 (例如:{\"key\": \"value\", ...})。", + "options": { + "fail": { + "description": "如果检测到任何已存在的变量,则导入失败。", + "title": "失败" + }, + "overwrite": { + "description": "发生冲突时覆盖变量。", + "title": "覆盖" + }, + "skip": { + "description": "忽略导入已存在的变量。", + "title": "跳过" + } + }, + "title": "导入变量", + "upload": "上传 JSON 文件", + "uploadPlaceholder": "上传包含变量的 JSON 文件 (例如:{\"key\": \"value\", ...})" + }, + "noRowsMessage": "找不到变量", + "searchPlaceholder": "搜索键", + "variable_one": "变量", + "variable_other": "变量" + } +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/assets.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/assets.json new file mode 100644 index 00000000000..059726de65f --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/assets.json @@ -0,0 +1,30 @@ +{ + "consumingDags": "消费者 Dags", + "createEvent": { + "button": "创建事件", + "manual": { + "description": "手动创建资源事件", + "extra": "资源事件额外信息", + "label": "手动" + }, + "materialize": { + "description": "触发此资源上游的 Dag", + "descriptionWithDag": "触发此资源上游的 Dag: {{dagName}}", + "label": "物化", + "unpauseDag": "触发时取消暂停 {{dagName}}" + }, + "success": { + "manualDescription": "已成功手动创建资源事件。", + "manualTitle": "已创建资源事件", + "materializeDescription": "已成功触发上游 Dag {{dagId}}。", + "materializeTitle": "正在物化资源" + }, + "title": "为 {{name}} 创建资源事件" + }, + "group": "分组", + "lastAssetEvent": "最后资源事件", + "name": "名称", + "producingTasks": "生产任务", + "scheduledDags": "已调度的 Dags", + "searchPlaceholder": "搜索资源" +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/browse.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/browse.json new file mode 100644 index 00000000000..8c9a21b4817 --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/browse.json @@ -0,0 +1,26 @@ +{ + "auditLog": { + "actions": { + "collapseAllExtra": "收起所有额外 JSON", + "expandAllExtra": "展开所有额外 JSON" + }, + "columns": { + "event": "事件", + "extra": "额外信息", + "user": "用户", + "when": "时间" + }, + "filters": { + "eventType": "事件类型" + }, + "title": "审计日志" + }, + "xcom": { + "columns": { + "dag": "Dag", + "key": "键", + "value": "值" + }, + "title": "XCom" + } +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json new file mode 100644 index 00000000000..7872f0efb94 --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json @@ -0,0 +1,315 @@ +{ + "admin": { + "Config": "配置", + "Connections": "连接", + "Plugins": "插件", + "Pools": "资源池", + "Providers": "Providers", + "Variables": "变量" + }, + "allOperators": "全部操作器", + "asset_one": "资源", + "asset_other": "资源", + "assetEvent_one": "资源事件", + "assetEvent_other": "资源事件", + "backfill_one": "回填", + "backfill_other": "回填", + "browse": { + "auditLog": "审计日志", + "requiredActions": "待响应的任务实例", + "xcoms": "XComs" + }, + "collapseDetailsPanel": "收起详细信息", + "createdAssetEvent_one": "已创建资源事件", + "createdAssetEvent_other": "已创建资源事件", + "dag_one": "Dag", + "dag_other": "Dags", + "dagDetails": { + "catchup": "自动回填", + "dagRunTimeout": "Dag 执行超时", + "defaultArgs": "默认参数", + "description": "描述", + "documentation": "Dag 文档", + "fileLocation": "文件位置", + "hasTaskConcurrencyLimits": "有任务并发数限制", + "lastExpired": "最后过期时间", + "lastParsed": "最后解析时间", + "latestDagVersion": "最新 Dag 版本", + "latestRun": "上次 Dag 执行", + "maxActiveRuns": "活跃执行数上限", + "maxActiveTasks": "活跃任务数上限", + "maxConsecutiveFailedDagRuns": "连续失败执行数上限", + "nextRun": "下次 Dag 执行", + "owner": "拥有者", + "params": "参数", + "schedule": "调度", + "tags": "标签" + }, + "dagId": "Dag ID", + "dagRun": { + "conf": "配置", + "dagVersions": "Dag 版本", + "dataIntervalEnd": "数据区间结束", + "dataIntervalStart": "数据区间起始", + "lastSchedulingDecision": "最后调度决策", + "queuedAt": "开始排队时间", + "runAfter": "最早可执行时间", + "runType": "执行类型", + "sourceAssetEvent": "来源资源事件", + "triggeredBy": "触发者", + "triggeringUser": "触发用户名称" + }, + "dagRun_one": "Dag 执行", + "dagRun_other": "Dag 执行", + "dagRunId": "Dag 执行 ID", + "dagWarnings": "Dag 警告 / 错误", + "defaultToGraphView": "默认使用图形视图", + "defaultToGridView": "默认使用网格视图", + "direction": "书写方向", + "docs": { + "documentation": "文档", + "githubRepo": "GitHub 仓库", + "restApiReference": "REST API 参考" + }, + "duration": "执行时间", + "endDate": "结束日期", + "error": { + "back": "返回", + "defaultMessage": "发生未预期的错误", + "home": "首页", + "notFound": "找不到页面", + "title": "错误" + }, + "expand": { + "collapse": "收起", + "expand": "展开", + "hotkey": "e", + "tooltip": "按下 {{hotkey}} 切换展开" + }, + "expression": { + "all": "全部", + "and": "且", + "any": "任何", + "or": "或" + }, + "filters": { + "dagDisplayNamePlaceholder": "按 Dag 名称筛选", + "keyPlaceholder": "按 XCom 键筛选", + "logicalDateFromPlaceholder": "逻辑日期起始", + "logicalDateToPlaceholder": "逻辑日期结束", + "mapIndexPlaceholder": "按映射索引筛选", + "runAfterFromPlaceholder": "执行时间起始", + "runAfterToPlaceholder": "执行时间结束", + "runIdPlaceholder": "按执行 ID 筛选", + "taskIdPlaceholder": "按任务 ID 筛选" + }, + "logicalDate": "逻辑日期", + "logout": "退出登录", + "logoutConfirmation": "确定要退出登录吗?", + "mapIndex": "映射索引", + "modal": { + "cancel": "取消", + "confirm": "确认", + "delete": { + "button": "删除", + "confirmation": "确定要删除 {{resourceName}} 吗?此操作无法还原。" + } + }, + "nav": { + "admin": "管理", + "assets": "资源", + "browse": "浏览", + "dags": "Dags", + "docs": "文档", + "home": "首页", + "legacyFabViews": "旧版视图", + "plugins": "插件", + "security": "安全" + }, + "noItemsFound": "找不到 {{modelName}}", + "note": { + "add": "添加笔记", + "dagRun": "Dag 执行笔记", + "label": "笔记", + "placeholder": "添加笔记...", + "taskInstance": "任务实例笔记" + }, + "pools": { + "deferred": "已延后", + "open": "开放", + "pools_one": "资源池", + "pools_other": "资源池", + "queued": "排队中", + "running": "执行中", + "scheduled": "已调度" + }, + "runId": "执行 ID", + "runTypes": { + "asset_triggered": "资源触发", + "backfill": "回填", + "manual": "手动触发", + "scheduled": "已调度" + }, + "scroll": { + "direction": { + "bottom": "最下方", + "top": "最上方" + }, + "tooltip": "按 {{hotkey}} 滚动到{{direction}}" + }, + "seconds": "{{count}} 秒", + "security": { + "actions": "操作", + "permissions": "权限", + "resources": "资源", + "roles": "角色", + "users": "用户" + }, + "selectLanguage": "选择语言", + "showDetailsPanel": "显示详细信息", + "source": { + "hide": "隐藏来源", + "hotkey": "s", + "show": "显示来源" + }, + "sourceAssetEvent_one": "来源资源事件", + "sourceAssetEvent_other": "来源资源事件", + "startDate": "开始日期", + "state": "状态", + "states": { + "deferred": "已延后", + "failed": "失败", + "no_status": "无状态", + "none": "无状态", + "planned": "已计划", + "queued": "排队中", + "removed": "已移除", + "restarting": "重启中", + "running": "执行中", + "scheduled": "已调度", + "skipped": "已跳过", + "success": "成功", + "up_for_reschedule": "等待重新调度", + "up_for_retry": "等待重试", + "upstream_failed": "上游任务失败" + }, + "switchToDarkMode": "切换到深色模式", + "switchToLightMode": "切换到浅色模式", + "table": { + "completedAt": "完成时间", + "createdAt": "创建时间", + "filterByTag": "按标签筛选 Dags", + "filterColumns": "筛选表格列", + "filterReset_one": "重置筛选", + "filterReset_other": "重置筛选", + "from": "从", + "maxActiveRuns": "最大活跃执行数", + "noTagsFound": "找不到标签", + "tagMode": { + "all": "全部", + "any": "任何" + }, + "tagPlaceholder": "按标签筛选", + "to": "到" + }, + "task": { + "documentation": "任务文档", + "lastInstance": "最后实例", + "operator": "任务操作器", + "triggerRule": "触发规则" + }, + "task_one": "任务", + "task_other": "任务", + "taskGroup": "任务分组", + "taskId": "任务 ID", + "taskInstance": { + "dagVersion": "Dag 版本", + "executor": "执行器", + "executorConfig": "执行器配置", + "hostname": "主机名称", + "maxTries": "最大尝试次数", + "pid": "PID", + "pool": "资源池", + "poolSlots": "资源池配额", + "priorityWeight": "优先级权重", + "queue": "排队", + "queuedWhen": "开始排队时间", + "scheduledWhen": "开始调度时间", + "triggerer": { + "assigned": "指派的触发器", + "class": "触发器类别", + "createdAt": "触发器创建时间", + "id": "触发器 ID", + "latestHeartbeat": "最新触发器心跳时间", + "title": "触发器信息" + }, + "unixname": "Unix 名称" + }, + "taskInstance_one": "任务实例", + "taskInstance_other": "任务实例", + "timeRange": { + "last12Hours": "最近 12 小时", + "last24Hours": "最近 24 小时", + "lastHour": "最近 1 小时", + "pastWeek": "过去一周" + }, + "timestamp": { + "hide": "隐藏时间戳", + "hotkey": "t", + "show": "显示时间戳" + }, + "timezone": "时区", + "timezoneModal": { + "current-timezone": "当前时区", + "placeholder": "搜索时区", + "title": "选择时区", + "utc": "UTC" + }, + "toaster": { + "bulkDelete": { + "error": "批量删除 {{resourceName}} 请求失败", + "success": { + "description": "已成功删除 {{count}} 个 {{resourceName}}。键:{{keys}}", + "title": "已提交批量删除 {{resourceName}} 请求" + } + }, + "create": { + "error": "创建 {{resourceName}} 请求失败", + "success": { + "description": "{{resourceName}} 已成功创建。", + "title": "已提交创建 {{resourceName}} 请求" + } + }, + "delete": { + "error": "删除 {{resourceName}} 请求失败", + "success": { + "description": "{{resourceName}} 已成功删除。", + "title": "已提交删除 {{resourceName}} 请求" + } + }, + "import": { + "error": "导入 {{resourceName}} 请求失败", + "success": { + "description": "已成功导入 {{count}} 个 {{resourceName}}。", + "title": "已提交导入 {{resourceName}} 请求" + } + }, + "update": { + "error": "更新 {{resourceName}} 请求失败", + "success": { + "description": "{{resourceName}} 已成功更新。", + "title": "已提交更新 {{resourceName}} 请求" + } + } + }, + "total": "总计 {{state}}", + "triggered": "已触发", + "tryNumber": "尝试次数", + "user": "用户", + "wrap": { + "hotkey": "w", + "tooltip": "按 {{hotkey}} 切换换行", + "unwrap": "不换行", + "wrap": "换行" + } +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/components.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/components.json new file mode 100644 index 00000000000..dc98948f485 --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/components.json @@ -0,0 +1,134 @@ +{ + "backfill": { + "affected_one": "将会触发 1 次执行。", + "affected_other": "将会触发 {{count}} 次执行。", + "affectedNone": "没有符合条件的执行。", + "allRuns": "所有执行", + "backwards": "反向执行", + "dateRange": "日期范围", + "dateRangeFrom": "从", + "dateRangeTo": "到", + "errorStartDateBeforeEndDate": "开始日期必须早于结束日期。", + "maxRuns": "活跃执行数上限", + "missingAndErroredRuns": "遗漏和错误的执行", + "missingRuns": "遗漏的执行", + "reprocessBehavior": "重新处理行为", + "run": "执行回填", + "selectDescription": "为指定的日期范围补上 Dag 执行", + "selectLabel": "回填", + "title": "执行回填", + "toaster": { + "success": { + "description": "已成功触发回填作业。", + "title": "已触发 Dag 执行" + } + }, + "tooltip": "回填功能需要 Dag 具有调度", + "unpause": "触发时取消暂停 {{dag_display_name}}", + "validation": { + "datesRequired": "必须提供数据区间的开始与结束日期。", + "startBeforeEnd": "数据区间起始日期必须早于或等于结束日期。" + } + }, + "banner": { + "backfillInProgress": "回填正在进行中", + "cancel": "取消回填", + "pause": "暂停回填", + "unpause": "取消暂停回填" + }, + "clipboard": { + "copy": "复制" + }, + "close": "关闭", + "configForm": { + "advancedOptions": "高级选项", + "configJson": "配置 JSON", + "invalidJson": "无效的 JSON 格式: {{errorMessage}}" + }, + "dagWarnings": { + "error_one": "1 个错误", + "errorAndWarning": "1 个错误与 {{warningText}}", + "warning_one": "1 个警告", + "warning_other": "{{count}} 个警告" + }, + "durationChart": { + "duration": "持续时间 (秒)", + "lastDagRun_one": "最近 1 次 Dag 执行", + "lastDagRun_other": "最近 {{count}} 次 Dag 执行", + "lastTaskInstance_one": "最近 1 次任务实例", + "lastTaskInstance_other": "最近 {{count}} 次任务实例", + "queuedDuration": "排队等候时间", + "runAfter": "最早可执行时间", + "runDuration": "执行持续时间" + }, + "fileUpload": { + "files_other": "{{count}} 个文件" + }, + "flexibleForm": { + "placeholder": "请选择一个值", + "placeholderArray": "请逐行输入,每行输入一个字符串", + "placeholderExamples": "开始输入以查看选项", + "placeholderMulti": "可选择单一或多个值", + "validationErrorArrayNotArray": "值必须是数组格式。", + "validationErrorArrayNotNumbers": "数组中的所有元素都必须是数字。", + "validationErrorArrayNotObject": "数组中的所有元素都必须是对象。", + "validationErrorRequired": "此为必填字段" + }, + "graph": { + "directionDown": "由上到下", + "directionLeft": "由右到左", + "directionRight": "由左到右", + "directionUp": "由下到上", + "downloadImage": "下载图表图片", + "downloadImageError": "下载图表图片失败。", + "downloadImageErrorTitle": "下载失败", + "otherDagRuns": "+ 其他 Dag 执行", + "taskCount_one": "1 个任务", + "taskCount_other": "{{count}} 个任务", + "taskGroup": "任务分组" + }, + "limitedList": "+ 其他 {{count}} 项", + "logs": { + "file": "文件", + "location": "第 {{line}} 行,位于 {{name}}" + }, + "reparseDag": "重新解析 Dag", + "sortedAscending": "递增排序", + "sortedDescending": "递减排序", + "sortedUnsorted": "未排序", + "taskTries": "任务尝试次数", + "toggleCardView": "显示卡片视图", + "toggleTableView": "显示表格视图", + "triggerDag": { + "button": "触发", + "loading": "正在加载 Dag 信息...", + "loadingFailed": "加载 Dag 信息失败,请重试。", + "runIdHelp": "选填 - 若未提供将会自动生成", + "selectDescription": "触发此 Dag 单次执行", + "selectLabel": "单次执行", + "title": "触发 Dag", + "toaster": { + "success": { + "description": "已成功触发 Dag 执行。", + "title": "已触发 Dag 执行" + } + }, + "unpause": "触发时取消暂停 {{dagDisplayName}}" + }, + "trimText": { + "details": "详细信息", + "empty": "空值", + "noContent": "无可用内容。" + }, + "versionDetails": { + "bundleLink": "套件包链接", + "bundleName": "套件包名称", + "bundleVersion": "套件包版本", + "createdAt": "创建时间", + "versionId": "版本 ID" + }, + "versionSelect": { + "dagVersion": "Dag 版本", + "versionCode": "v{{versionCode}}" + } +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json new file mode 100644 index 00000000000..100cdc41be5 --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json @@ -0,0 +1,149 @@ +{ + "allRuns": "所有执行", + "blockingDeps": { + "dependency": "依赖 ", + "reason": "原因", + "title": "依赖阻碍任务调度" + }, + "calendar": { + "daily": "每日", + "hourly": "每小时", + "legend": { + "less": "更少", + "more": "更多" + }, + "navigation": { + "nextMonth": "下个月", + "nextYear": "下一年", + "previousMonth": "上个月", + "previousYear": "上一年" + }, + "noData": "无数据", + "noRuns": "未执行", + "totalRuns": "总执行次数", + "week": "第 {{weekNumber}} 周", + "weekdays": { + "friday": "周五", + "monday": "周一", + "saturday": "周六", + "sunday": "周日", + "thursday": "周四", + "tuesday": "周二", + "wednesday": "周三" + } + }, + "code": { + "bundleUrl": "套件包链接", + "noCode": "找不到代码", + "parsedAt": "解析时间:" + }, + "extraLinks": "额外链接", + "grid": { + "buttons": { + "resetToLatest": "重置为最新", + "toggleGroup": "切换分组状态" + } + }, + "header": { + "buttons": { + "advanced": "高级功能", + "dagDocs": "Dag 文档" + } + }, + "logs": { + "allLevels": "所有日志等级", + "allSources": "所有来源", + "critical": "CRITICAL", + "debug": "DEBUG", + "error": "ERROR", + "fullscreen": { + "button": "全屏", + "tooltip": "按下 {{hotkey}} 进入全屏" + }, + "info": "INFO", + "noTryNumber": "没有重试次数", + "settings": "日志设置", + "viewInExternal": "在 {{name}} 中查看日志(重试 {{attempt}})", + "warning": "WARNING" + }, + "navigation": { + "navigation": "导航: {{arrow}}", + "toggleGroup": "展开/收起分组: 空格键" + }, + "overview": { + "buttons": { + "failedRun_one": "失败的执行", + "failedRun_other": "失败的执行", + "failedTask_one": "失败的任务", + "failedTask_other": "失败的任务", + "failedTaskInstance_one": "失败的任务实例", + "failedTaskInstance_other": "失败的任务实例" + }, + "charts": { + "assetEvent_one": "已创建资源事件", + "assetEvent_other": "已创建资源事件" + }, + "failedLogs": { + "title": "最近失败任务的日志", + "viewFullLogs": "查看完整日志" + } + }, + "panel": { + "buttons": { + "options": "选项", + "showGantt": "显示甘特图", + "showGraphShortcut": "显示图表(按 g)", + "showGridShortcut": "显示网格(按 g)" + }, + "dagRuns": { + "label": "Dag 执行次数" + }, + "dependencies": { + "label": "依赖项", + "options": { + "allDagDependencies": "所有 Dag 依赖项", + "externalConditions": "外部条件", + "onlyTasks": "仅限任务" + }, + "placeholder": "依赖项" + }, + "graphDirection": { + "label": "图表方向" + } + }, + "paramsFailed": "加载参数失败", + "parse": { + "toaster": { + "error": { + "description": "Dag 解析请求失败。可能还有待处理的解析请求。", + "title": "Dag 重新解析失败" + }, + "success": { + "description": "Dag 即将重新解析。", + "title": "已成功提交重新解析请求" + } + } + }, + "tabs": { + "assetEvents": "资源事件", + "auditLog": "审计日志", + "backfills": "回填", + "calendar": "日历", + "code": "代码", + "details": "详细信息", + "logs": "日志", + "mappedTaskInstances_one": "任务实例 [{{count}}]", + "mappedTaskInstances_other": "任务实例 [{{count}}]", + "overview": "总览", + "renderedTemplates": "渲染后的模板", + "requiredActions": "待响应的任务实例", + "runs": "执行记录", + "taskInstances": "任务实例", + "tasks": "任务", + "xcom": "XCom" + }, + "taskGroups": { + "collapseAll": "收起所有任务分组", + "expandAll": "展开所有任务分组" + } +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json new file mode 100644 index 00000000000..b4537e28e69 --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json @@ -0,0 +1,97 @@ +{ + "assetSchedule": "{{count}} / {{total}} 个资源事件已更新", + "dagActions": { + "delete": { + "button": "删除 Dag", + "warning": "这将会删除所有与此 Dag 相关的系统数据,包括 Dag 执行与任务。" + } + }, + "favoriteDag": "将 Dag 加入收藏", + "filters": { + "allRunTypes": "全部执行类型", + "allStates": "全部状态", + "favorite": { + "all": "全部", + "favorite": "已加入收藏", + "unfavorite": "未加入收藏" + }, + "paused": { + "active": "启用中", + "all": "全部", + "paused": "暂停" + }, + "runIdPatternFilter": "搜索 Dag 执行", + "triggeringUserNameFilter": "搜索触发用户名称" + }, + "ownerLink": "拥有者 {{owner}} 的地址", + "runAndTaskActions": { + "affectedTasks": { + "noItemsFound": "找不到任务。", + "title": "受影响的任务: {{count}}" + }, + "clear": { + "button": "清除 {{type}}", + "buttonTooltip": "按下 shift+c 清除", + "error": "清除 {{type}} 时发生错误", + "title": "清除 {{type}}" + }, + "delete": { + "button": "删除 {{type}}", + "dialog": { + "resourceName": "{{type}} {{id}}", + "title": "删除 {{type}}", + "warning": "这将会删除所有与此 {{type}} 相关的系统数据。" + }, + "error": "删除 {{type}} 时发生错误", + "success": { + "description": "{{type}} 删除请求成功。", + "title": "{{type}} 删除成功" + } + }, + "markAs": { + "button": "标记 {{type}} 为...", + "buttonTooltip": { + "failed": "按下 shift+f 标记为失败", + "success": "按下 shift+s 标记为成功" + }, + "title": "标记为 {{type}} 为 {{state}}" + }, + "options": { + "downstream": "下游", + "existingTasks": "清除现有任务", + "future": "未来", + "onlyFailed": "只清除失败任务", + "past": "过去", + "queueNew": "加入新任务到队列", + "runOnLatestVersion": "执行最新套件包版本", + "upstream": "上游" + } + }, + "search": { + "advanced": "高级搜索", + "clear": "清除搜索", + "dags": "搜索 Dags", + "hotkey": "+K", + "tasks": "搜索任务" + }, + "sort": { + "displayName": { + "asc": "按显示名称排序 (A-Z)", + "desc": "按显示名称排序 (Z-A)" + }, + "lastRunStartDate": { + "asc": "按上次开始执行日期排序 (从新到旧)", + "desc": "按上次开始执行日期排序 (从新到旧)" + }, + "lastRunState": { + "asc": "按上次执行状态排序 (A-Z)", + "desc": "按上次执行状态排序 (Z-A)" + }, + "nextDagRun": { + "asc": "按下次执行时间排序 (由近而远)", + "desc": "按下次执行时间排序 (由远而近)" + }, + "placeholder": "排序方式" + }, + "unfavoriteDag": "将 Dag 移出收藏" +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json new file mode 100644 index 00000000000..cf811012353 --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json @@ -0,0 +1,45 @@ +{ + "favorite": { + "favoriteDags_one": "第 {{ count }} 个收藏的 Dag", + "favoriteDags_other": "前 {{ count }} 个收藏的 Dag", + "noDagRuns": "此 Dag 尚未被触发过。", + "noFavoriteDags": "尚无收藏的 Dag。请点击 Dag 列表旁的星号图示,将 Dag 加入收藏。" + }, + "group": "分组", + "health": { + "dagProcessor": "Dag 处理器", + "health": "健康状态", + "healthy": "健康", + "lastHeartbeat": "最后心跳", + "metaDatabase": "系统数据库", + "scheduler": "调度器", + "status": "状态", + "triggerer": "触发器", + "unhealthy": "健康状态异常" + }, + "history": "历史记录", + "importErrors": { + "dagImportError_one": "Dag 导入错误", + "dagImportError_other": "Dag 导入错误", + "searchByFile": "依文件搜索", + "timestamp": "时间戳" + }, + "managePools": "管理资源池", + "noAssetEvents": "未找到资源事件", + "poolSlots": "资源池配额", + "sortBy": { + "newestFirst": "由新到旧", + "oldestFirst": "由旧到新" + }, + "source": "来源", + "stats": { + "activeDags": "启用中的 Dags", + "failedDags": "失败的 Dags", + "queuedDags": "排队的 Dags", + "requiredActions": "待响应的任务实例", + "runningDags": "执行中的 Dags", + "stats": "统计" + }, + "uri": "Uri", + "welcome": "欢迎" +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json new file mode 100644 index 00000000000..ef0d75ecba8 --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json @@ -0,0 +1,31 @@ +{ + "filters": { + "response": { + "all": "全部", + "pending": "待响应", + "received": "已响应" + } + }, + "requiredAction_one": "待响应的任务实例", + "requiredAction_other": "待响应的任务实例", + "requiredActionState": "待响应的任务实例状态", + "response": { + "error": "响应失败", + "optionsDescription": "请为此任务实例选择一个选项", + "optionsLabel": "选项", + "received": "收到响应的时间:", + "respond": "发送响应", + "success": "任务 {{taskId}} 响应成功", + "title": "人类参与流程任务实例 - {{taskId}}" + }, + "state": { + "approvalReceived": "已批准", + "approvalRequired": "需要批准", + "choiceReceived": "已选择", + "choiceRequired": "需要选择", + "rejectionReceived": "已拒绝", + "responseReceived": "已响应", + "responseRequired": "需要响应" + }, + "subject": "标题" +} diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/tasks.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/tasks.json new file mode 100644 index 00000000000..2ba125e591a --- /dev/null +++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/tasks.json @@ -0,0 +1,10 @@ +{ + "mapped": "已映射", + "notMapped": "未映射", + "retries": "重试", + "searchTasks": "搜索任务", + "selectMapped": "选择已映射", + "selectOperator": "选择操作器", + "selectRetryValues": "选择重试值", + "selectTriggerRules": "选择触发规则" +} diff --git a/airflow-core/src/airflow/ui/src/i18n/config.ts b/airflow-core/src/airflow/ui/src/i18n/config.ts index 87e235b1b7f..c65790ce4c1 100644 --- a/airflow-core/src/airflow/ui/src/i18n/config.ts +++ b/airflow-core/src/airflow/ui/src/i18n/config.ts @@ -34,8 +34,9 @@ export const supportedLanguages = [ { code: "ko", name: "한국어" }, { code: "nl", name: "Nederlands" }, { code: "pl", name: "Polski" }, - { code: "zh-TW", name: "繁體中文" }, { code: "tr", name: "Türkçe" }, + { code: "zh-CN", name: "简体中文" }, + { code: "zh-TW", name: "繁體中文" }, ] as const; export const defaultLanguage = "en"; diff --git a/dev/i18n/check_translations_completeness.py b/dev/i18n/check_translations_completeness.py index ff99e514196..69b853c1367 100755 --- a/dev/i18n/check_translations_completeness.py +++ b/dev/i18n/check_translations_completeness.py @@ -63,6 +63,7 @@ PLURAL_SUFFIXES = { "nl": MOST_COMMON_PLURAL_SUFFIXES, "pl": ["_one", "_few", "_many", "_other"], "tr": MOST_COMMON_PLURAL_SUFFIXES, + "zh-CN": ["_other"], "zh-TW": ["_other"], }
