This is an automated email from the ASF dual-hosted git repository.
weilee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 709955f1d16 Refactor(i18n): Modify filter reset key & update zh-TW
files (#51363)
709955f1d16 is described below
commit 709955f1d16c2522e346466b3be4fa811abeed8a
Author: LI,JHE-CHEN <[email protected]>
AuthorDate: Thu Jun 5 12:59:30 2025 +0800
Refactor(i18n): Modify filter reset key & update zh-TW files (#51363)
* Refactor(i18n): Modify filter reset key & update zh-TW files
* i18n: update dashboard.json for zh-TW
* modify zh-TW translations
---
airflow-core/src/airflow/ui/src/i18n/config.ts | 4 +
.../src/airflow/ui/src/i18n/locales/de/common.json | 7 +-
.../src/airflow/ui/src/i18n/locales/en/common.json | 7 +-
.../src/airflow/ui/src/i18n/locales/pl/common.json | 7 +-
.../airflow/ui/src/i18n/locales/zh-TW/common.json | 27 +++-
.../ui/src/i18n/locales/zh-TW/connections.json | 4 +
.../airflow/ui/src/i18n/locales/zh-TW/dags.json | 147 +++++++++++++++++++++
.../ui/src/i18n/locales/zh-TW/dashboard.json | 12 +-
.../src/pages/DagsList/DagsFilters/ResetButton.tsx | 4 +-
9 files changed, 200 insertions(+), 19 deletions(-)
diff --git a/airflow-core/src/airflow/ui/src/i18n/config.ts
b/airflow-core/src/airflow/ui/src/i18n/config.ts
index 84ebeee2372..b346a07b779 100644
--- a/airflow-core/src/airflow/ui/src/i18n/config.ts
+++ b/airflow-core/src/airflow/ui/src/i18n/config.ts
@@ -39,6 +39,8 @@ import plConnections from "./locales/pl/connections.json";
import plDags from "./locales/pl/dags.json";
import plDashboard from "./locales/pl/dashboard.json";
import zhTWCommon from "./locales/zh-TW/common.json";
+import zhTWConnections from "./locales/zh-TW/connections.json";
+import zhTWDags from "./locales/zh-TW/dags.json";
import zhTWDashboard from "./locales/zh-TW/dashboard.json";
// TODO: Dynamically load translation files
@@ -87,6 +89,8 @@ const resources = {
},
"zh-TW": {
common: zhTWCommon,
+ connections: zhTWConnections,
+ dags: zhTWDags,
dashboard: zhTWDashboard,
},
};
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json
b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json
index 00b837bef5d..864ee3d436d 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json
@@ -101,11 +101,8 @@
"table": {
"filterByTag": "Dags nach Markierung filtern",
"filterColumns": "Tabellenspalten filtern",
- "filters": {
- "filter_one": "Filter",
- "filter_other": "Filter",
- "reset": "Zurücksetzen"
- },
+ "filterReset_one": "Filter zurücksetzen",
+ "filterReset_other": "Filter zurücksetzen",
"noTagsFound": "Keine Markierungen gefunden",
"tagMode": {
"all": "Alle",
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/en/common.json
b/airflow-core/src/airflow/ui/src/i18n/locales/en/common.json
index bc02439a525..06cc0db232f 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/en/common.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/en/common.json
@@ -101,11 +101,8 @@
"table": {
"filterByTag": "Filter Dags by tag",
"filterColumns": "Filter table columns",
- "filters": {
- "filter_one": "filter",
- "filter_other": "filters",
- "reset": "Reset"
- },
+ "filterReset_one": "Reset filter",
+ "filterReset_other": "Reset filters",
"noTagsFound": "No tags found",
"tagMode": {
"all": "All",
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/pl/common.json
b/airflow-core/src/airflow/ui/src/i18n/locales/pl/common.json
index 6257e4df248..1928a5011a2 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/pl/common.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/pl/common.json
@@ -89,11 +89,8 @@
"table": {
"filterByTag": "Filtruj Dagi według tagu",
"filterColumns": "Filtruj kolumny tabeli",
- "filters": {
- "filter_one": "Filtr",
- "filter_other": "Filtry",
- "reset": "Resetuj"
- },
+ "filterReset_one": "Resetuj filtr",
+ "filterReset_other": "Resetuj filtry",
"noTagsFound": "Nie znaleziono etykiet",
"tagMode": {
"all": "Wszystkie",
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/common.json
b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/common.json
index 7a64f0e0ea2..ca0a6c5a548 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/common.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/common.json
@@ -13,6 +13,8 @@
"auditLog": "審計日誌",
"xcoms": "XComs"
},
+ "dag_one": "Dag",
+ "dag_other": "Dags",
"dagRun_one": "Dag 執行",
"dagRun_other": "Dag 執行",
"defaultToGraphView": "預設使用圖形視圖",
@@ -26,7 +28,11 @@
"logoutConfirmation": "確定要登出嗎?",
"modal": {
"cancel": "取消",
- "confirm": "確認"
+ "confirm": "確認",
+ "delete": {
+ "button": "刪除",
+ "confirmation": "確定要刪除 {{resourceName}} 嗎?此操作無法還原。"
+ }
},
"nav": {
"admin": "管理者",
@@ -48,6 +54,12 @@
"running": "執行中",
"scheduled": "已排程"
},
+ "runTypes": {
+ "asset_triggered": "資源觸發",
+ "backfill": "回填",
+ "manual": "手動觸發",
+ "scheduled": "已排程"
+ },
"security": {
"actions": "操作",
"permissions": "權限",
@@ -60,6 +72,7 @@
"deferred": "已延後",
"failed": "失敗",
"no_status": "無狀態",
+ "none": "無狀態",
"queued": "排隊中",
"removed": "已移除",
"restarting": "重啟中",
@@ -73,6 +86,18 @@
},
"switchToDarkMode": "切換到深色模式",
"switchToLightMode": "切換到淺色模式",
+ "table": {
+ "filterByTag": "依標籤篩選 Dags",
+ "filterColumns": "篩選表格欄位",
+ "filterReset_one": "重置篩選",
+ "filterReset_other": "重置篩選",
+ "noTagsFound": "找不到標籤",
+ "tagMode": {
+ "all": "全部",
+ "any": "任何"
+ },
+ "tagPlaceholder": "依標籤篩選"
+ },
"taskInstance_one": "任務實例",
"taskInstance_other": "任務實例",
"timeRange": {
diff --git
a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/connections.json
b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/connections.json
new file mode 100644
index 00000000000..1a1c49b9ba5
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/connections.json
@@ -0,0 +1,4 @@
+{
+ "test": "測試連線",
+ "testDisabled": "測試連線功能已停用。請聯繫管理員以啟用。"
+}
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/dags.json
b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/dags.json
new file mode 100644
index 00000000000..f16d44472ec
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/dags.json
@@ -0,0 +1,147 @@
+{
+ "assetSchedule": "{{count}} / {{total}} 個資源事件已更新",
+ "dagActions": {
+ "delete": {
+ "button": "刪除 Dag",
+ "warning": "這將會刪除所有與此 Dag 相關的系統資料,包括 Dag 執行與任務。"
+ },
+ "trigger": {
+ "button": "觸發",
+ "triggerDag": "觸發 Dag"
+ }
+ },
+ "filters": {
+ "paused": {
+ "active": "啟用中",
+ "all": "全部",
+ "paused": "暫停"
+ }
+ },
+ "list": {
+ "advancedSearch": "進階搜尋",
+ "clearSearch": "清除搜尋",
+ "columns": {
+ "dagId": "Dag ID",
+ "lastDagRun": "上次 Dag 執行",
+ "nextDagRun": "下次 Dag 執行",
+ "schedule": "排程",
+ "tags": "標籤"
+ },
+ "ownerLink": "擁有者 {{owner}} 的連結",
+ "searchPlaceholder": "搜尋 Dags"
+ },
+ "runAndTaskActions": {
+ "clear": {
+ "button": "清除 {{type}}",
+ "buttonTooltip": "按下 shift+c 清除",
+ "dialog": {
+ "affectedTasks": {
+ "columns": {
+ "mapIndex": "映射索引",
+ "runId": "執行 ID",
+ "state": "狀態",
+ "taskId": "任務 ID"
+ },
+ "noItemsFound": "找不到任務。",
+ "title": "受影響的任務: {{count}}"
+ },
+ "confirm": "確認",
+ "note": {
+ "placeholder": "新增備註...",
+ "title": "備註"
+ },
+ "options": {
+ "downstream": "下游",
+ "existingTasks": "清除現有任務",
+ "future": "未來",
+ "onlyFailed": "清除失敗任務",
+ "past": "過去",
+ "queueNew": "排隊新任務",
+ "upstream": "上游"
+ },
+ "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 標記為成功"
+ },
+ "dialog": {
+ "confirm": "確認",
+ "options": {
+ "downstream": "下游",
+ "future": "未來",
+ "past": "過去",
+ "upstream": "上游"
+ },
+ "title": "標記為{{type}}為{{state}}"
+ }
+ }
+ },
+ "runs": {
+ "allRunTypes": "全部執行類型",
+ "allStates": "全部狀態",
+ "columns": {
+ "dagId": "Dag ID",
+ "dagVersions": "Dag 版本",
+ "duration": "持續時間",
+ "endDate": "結束日期",
+ "runAfter": "最早可執行時間",
+ "runType": "執行類型",
+ "startDate": "開始日期",
+ "state": "狀態"
+ }
+ },
+ "sort": {
+ "displayName": {
+ "asc": "依顯示名稱排序 (A-Z)",
+ "desc": "依顯示名稱排序 (Z-A)"
+ },
+ "lastRunStartDate": {
+ "asc": "依上次開始執行日期排序 (從新到舊)",
+ "desc": "依上次開始執行日期排序 (從新到舊)"
+ },
+ "lastRunState": {
+ "asc": "依上次執行狀態排序 (A-Z)",
+ "desc": "依上次執行狀態排序 (Z-A)"
+ },
+ "nextDagRun": {
+ "asc": "依下次執行時間排序 (由近而遠)",
+ "desc": "依下次執行時間排序 (由遠而近)"
+ },
+ "placeholder": "排序方式"
+ },
+ "taskInstances": {
+ "allStates": "全部狀態",
+ "columns": {
+ "dagId": "Dag ID",
+ "dagRun": "Dag 執行",
+ "dagVersion": "Dag 版本",
+ "duration": "持續時間",
+ "endDate": "結束日期",
+ "mapIndex": "映射索引",
+ "operator": "運算子",
+ "pool": "資源池",
+ "startDate": "開始日期",
+ "state": "狀態",
+ "taskId": "任務 ID",
+ "tryNumber": "嘗試次數"
+ },
+ "searchPlaceholder": "搜尋任務"
+ }
+}
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/dashboard.json
b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/dashboard.json
index 05e83e40b64..2f01d45d0d2 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/dashboard.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/dashboard.json
@@ -3,11 +3,21 @@
"health": {
"dagProcessor": "Dag 處理器",
"health": "健康狀態",
+ "healthy": "健康",
+ "lastHeartbeat": "最後心跳",
"metaDatabase": "系統資料庫",
"scheduler": "排程器",
- "triggerer": "觸發器"
+ "status": "狀態",
+ "triggerer": "觸發器",
+ "unhealthy": "健康狀態異常"
},
"history": "歷史記錄",
+ "importErrors": {
+ "dagImportError_one": "Dag 匯入錯誤",
+ "dagImportError_other": "Dag 匯入錯誤",
+ "searchByFile": "依檔案搜尋",
+ "timestamp": "時間戳記"
+ },
"managePools": "管理資源池",
"noAssetEvents": "未找到資源事件",
"poolSlots": "資源池配額",
diff --git
a/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/ResetButton.tsx
b/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/ResetButton.tsx
index 32905fc9fcf..0c71d1a496c 100644
--- a/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/ResetButton.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/ResetButton.tsx
@@ -34,8 +34,8 @@ export const ResetButton = ({ filterCount, onClearFilters }:
Props) => {
return (
<Button onClick={onClearFilters} size="sm" variant="outline">
- <LuX /> {translate("table.filters.reset")}{" "}
- {filterCount === 1 ? translate("table.filters.filter_one") :
translate("table.filters.filter_other")}
+ <LuX />
+ {translate("table.filterReset", { count: filterCount })}
</Button>
);
};