This is an automated email from the ASF dual-hosted git repository.
Lee-W pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-4-test by this push:
new 0e50a946b3f [v3-4-test] Add missing zh-TW translations and fix spacing
(#77624, #77644) (#77785)
0e50a946b3f is described below
commit 0e50a946b3fa8a934f389063840cec225d8647bc
Author: Jean <[email protected]>
AuthorDate: Tue Dec 1 02:31:38 2026 +0800
[v3-4-test] Add missing zh-TW translations and fix spacing (#77624, #77644)
(#77785)
* [v3-4-test] Add missing zh-TW UI translations (#77624)
Only the keys that exist in the v3-4-test en locale are translated.
* [v3-4-test] Fix zh-TW spacing around placeholders and nested keys (#77644)
Backport of d900cf21c2 from main.
---
.../skills/airflow-translations/locales/zh-TW.md | 37 ++++++++++++++++++++++
.../ui/public/i18n/locales/zh-TW/admin.json | 2 +-
.../ui/public/i18n/locales/zh-TW/assets.json | 9 ++++++
.../ui/public/i18n/locales/zh-TW/common.json | 26 ++++++++-------
.../airflow/ui/public/i18n/locales/zh-TW/dag.json | 6 ++--
.../airflow/ui/public/i18n/locales/zh-TW/dags.json | 2 +-
.../ui/public/i18n/locales/zh-TW/dashboard.json | 1 +
7 files changed, 66 insertions(+), 17 deletions(-)
diff --git a/.agents/skills/airflow-translations/locales/zh-TW.md
b/.agents/skills/airflow-translations/locales/zh-TW.md
index 5f5d5d0dbad..3731d01e871 100644
--- a/.agents/skills/airflow-translations/locales/zh-TW.md
+++ b/.agents/skills/airflow-translations/locales/zh-TW.md
@@ -96,6 +96,43 @@ English words, numbers, or symbols:
"最近12小時" // missing space around numbers
```
+### Spacing Around `{{variable}}` and `$t(key)`
+
+Decide the space by the **rendered text** next to a placeholder, not by the
placeholder itself. Check the start and the end separately. If the start or the
end can be English for some values and Chinese for others, keep the space there.
+
+To find the rendered text:
+
+- `$t(key)` renders another translation key in the locale files, so its value
is fixed. `$t(common:mapIndex)` is `mapIndex` in `common.json`; a key without a
prefix is usually in the same file.
+- `{{variable}}` is filled in by the UI code. Check the value at every call
site (see step 2 of the [Translation Workflow](#translation-workflow)). Some
call sites set a `defaultValue`, which shows as is, often in English, when no
translation is found.
+
+**Correct** — no space next to Chinese:
+
+```jsonc
+"標記$t(task_one)為失敗" // renders "標記任務為失敗"
+```
+
+**Correct** — space only next to English or a number:
+
+```jsonc
+"標記 $t(dagRun_one)為失敗" // renders "標記 Dag 執行為失敗"
+"逾期 {{duration}}完成" // renders "逾期 34.4 秒完成"
+```
+
+**Correct** — keep the space when the code can pass English or Chinese:
+
+```jsonc
+"清除 {{type}}" // renders "清除 Dag 執行" or "清除 任務實例"
+```
+
+> **Note:** This leaves an extra space in "清除 任務實例", but removing it would
render "清除Dag 執行". Keep the space as a trade-off.
+
+**Incorrect** — space between Chinese characters:
+
+```jsonc
+"標記 $t(task_one) 為失敗" // renders "標記 任務 為失敗"
+"逾期 {{duration}} 完成" // renders "逾期 34.4 秒 完成"
+```
+
## Punctuation
- Use **full-width** punctuation for Chinese sentences: `,` `。` `:` `?` `!`
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/admin.json
b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/admin.json
index 08c92f26b38..6c5185ef011 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/admin.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/admin.json
@@ -30,7 +30,7 @@
"firstConfirmMessage_other": "您即將刪除以下連線:",
"title": "刪除連線"
},
- "duplicate": "複製 $t(connections.connection_one)",
+ "duplicate": "複製$t(connections.connection_one)",
"edit": "編輯連線",
"form": {
"connectionIdRequired": "連線 ID 是必填的",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/assets.json
b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/assets.json
index 6cba61cb020..a623da2ed14 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/assets.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/assets.json
@@ -55,6 +55,15 @@
"group": "群組",
"lastAssetEvent": "最後資源事件",
"name": "名稱",
+ "partitions": {
+ "consumerRuns": "消費者 Dag 執行",
+ "consumerRunsHelp": "已消費此分區最後一個資源事件的 Dag 執行",
+ "lastProducerRun": "最後生產者 Dag 執行",
+ "status": {
+ "in_progress": "進行中",
+ "materialized": "已實體化"
+ }
+ },
"producingTasks": "生產者任務",
"scheduledDags": "已排程的 Dags",
"scheduling": "排程",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/common.json
b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/common.json
index 9fb95006cb5..01554c001c0 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/common.json
@@ -196,6 +196,7 @@
},
"save": "儲存"
},
+ "moreTabs": "更多",
"nav": {
"admin": "管理者",
"assets": "資源",
@@ -259,6 +260,7 @@
"asset_triggered": "資源觸發",
"backfill": "回填",
"manual": "手動觸發",
+ "operator_triggered": "任務操作器觸發",
"scheduled": "已排程"
},
"scroll": {
@@ -343,7 +345,7 @@
},
"search": {
"matchAnywhere": {
- "helper": "$t(search.advanced.description) 各搜尋列的個別選擇與分享連結仍具有較高優先權。",
+ "helper": "$t(search.advanced.description)各搜尋列的個別選擇與分享連結仍具有較高優先權。",
"label": "預設比對任意位置"
},
"title": "搜尋"
@@ -370,28 +372,28 @@
},
"descriptions": {
"clearRun": "清除 $t(dagRun_one)",
- "clearTaskInstance": "清除 $t(taskInstance_one)",
+ "clearTaskInstance": "清除$t(taskInstance_one)",
"downloadLogs": "下載日誌",
"focusFilterSearch": "聚焦篩選搜尋",
"focusLogSearch": "搜尋日誌",
"focusSearch": "聚焦搜尋",
- "markRunFailed": "標記 $t(dagRun_one) 為失敗",
- "markRunSuccess": "標記 $t(dagRun_one) 為成功",
- "markTaskFailed": "標記 $t(task_one) 為失敗",
- "markTaskGroupFailed": "標記 $t(taskGroup_one) 為失敗",
- "markTaskGroupSuccess": "標記 $t(taskGroup_one) 為成功",
- "markTaskSuccess": "標記 $t(task_one) 為成功",
+ "markRunFailed": "標記 $t(dagRun_one)為失敗",
+ "markRunSuccess": "標記 $t(dagRun_one)為成功",
+ "markTaskFailed": "標記$t(task_one)為失敗",
+ "markTaskGroupFailed": "標記$t(taskGroup_one)為失敗",
+ "markTaskGroupSuccess": "標記$t(taskGroup_one)為成功",
+ "markTaskSuccess": "標記$t(task_one)為成功",
"navigateTasks": "導覽$t(task_other)",
"openGraphFilters": "開啟圖形篩選條件",
"scrollBottom": "捲動至最下方",
"scrollTop": "捲動至最上方",
"searchDags": "搜尋 $t(dag_other)",
- "selectGridCellRange": "選取範圍 $t(taskInstance_other) 或
$t(taskGroup_other)",
+ "selectGridCellRange": "選取範圍$t(taskInstance_other)或$t(taskGroup_other)",
"showHelp": "顯示$t(shortcuts.title)",
"toggleExpand": "展開或收合所有群組",
"toggleFullscreen": "切換全螢幕",
"toggleGraphGrid": "切換圖形/網格檢視",
- "toggleGridCellSelection": "選取或取消選取 $t(taskInstance_one) 或
$t(taskGroup_one)",
+ "toggleGridCellSelection":
"選取或取消選取$t(taskInstance_one)或$t(taskGroup_one)",
"toggleLogLevel": "切換日誌層級",
"toggleSource": "切換來源",
"toggleTaskGroup": "展開或收合$t(taskGroup_one)",
@@ -437,7 +439,7 @@
},
"switchDag": "切換 $t(dag_one)",
"switchDagRun": "切換 $t(dagRun_one)",
- "switchMapIndex": "切換 $t(mapIndex)",
+ "switchMapIndex": "切換$t(mapIndex)",
"table": {
"completedAt": "完成時間",
"createdAt": "建立時間",
@@ -607,7 +609,7 @@
"tokenGenerated": "您的權杖已產生。",
"tokenShownOnce": "此權杖僅會顯示一次,請立即複製。"
},
- "total": "總計 {{state}}",
+ "total": "總計{{state}}",
"triggered": "已觸發",
"tryNumber": "嘗試次數",
"unpause": "取消暫停",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dag.json
b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dag.json
index 7e15c4d969a..54a473baea0 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dag.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dag.json
@@ -58,7 +58,7 @@
"parsedAt": "解析時間:"
},
"deadlineAlerts": {
- "completionRule": "必須在 {{reference}}後 {{interval}} 內完成",
+ "completionRule": "必須在 {{reference}}後 {{interval}}內完成",
"completionRuleDynamic": "必須在 {{reference}}後的一段變動期間內完成",
"count_one": "1 個期限",
"count_other": "{{count, number}} 個期限",
@@ -71,8 +71,8 @@
"deadlineStatus": {
"actual": "實際",
"expected": "預期",
- "finishedEarly": "提前 {{duration}} 達成期限",
- "finishedLate": "逾期 {{duration}} 完成",
+ "finishedEarly": "提前 {{duration}}達成期限",
+ "finishedLate": "逾期 {{duration}}完成",
"label": "期限",
"met": "已達成",
"missed": "已逾期",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dags.json
b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dags.json
index 13b5f8b3347..2e5651ea442 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dags.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dags.json
@@ -130,7 +130,7 @@
"dagRuns": "搜尋 $t(common:dagRun_other)",
"dags": "搜尋 Dags",
"hotkey": "+K",
- "mapIndexes": "搜尋 $t(common:mapIndex)",
+ "mapIndexes": "搜尋$t(common:mapIndex)",
"tasks": "搜尋任務"
},
"sort": {
diff --git
a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dashboard.json
b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dashboard.json
index 6ddc289cd06..f586a9003e6 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dashboard.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/dashboard.json
@@ -55,6 +55,7 @@
"history": "歷史記錄",
"importErrors": {
"bundle": "套件包",
+ "copyStackTrace": "複製堆疊追蹤",
"dagImportError_one": "Dag 匯入錯誤",
"dagImportError_other": "Dag 匯入錯誤",
"searchByFile": "依檔案搜尋",