This is an automated email from the ASF dual-hosted git repository.

bbovenzi 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 2bd66b5842a feat(i18n): Modify log info translation and fix imports 
(#51790)
2bd66b5842a is described below

commit 2bd66b5842a92b539e028eb084e70a2b3edbdb13
Author: LI,JHE-CHEN <[email protected]>
AuthorDate: Tue Jun 17 22:43:41 2025 +0800

    feat(i18n): Modify log info translation and fix imports (#51790)
---
 .../src/components/Clear/TaskInstance/ClearTaskInstanceButton.tsx   | 2 +-
 airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx  | 2 +-
 airflow-core/src/airflow/ui/src/i18n/locales/de/components.json     | 3 +--
 airflow-core/src/airflow/ui/src/i18n/locales/en/components.json     | 3 +--
 airflow-core/src/airflow/ui/src/i18n/locales/pl/components.json     | 3 +--
 airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/common.json      | 2 +-
 airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/components.json  | 3 +--
 airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx             | 6 +++++-
 airflow-core/src/airflow/ui/src/pages/Dag/Overview/FailedLogs.tsx   | 2 +-
 9 files changed, 13 insertions(+), 13 deletions(-)

diff --git 
a/airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceButton.tsx
 
b/airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceButton.tsx
index d72e536240d..5ce1edf0f3d 100644
--- 
a/airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceButton.tsx
+++ 
b/airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceButton.tsx
@@ -48,7 +48,7 @@ const ClearTaskInstanceButton = ({ isHotkeyEnabled = false, 
taskInstance, withTe
   return (
     <Tooltip
       closeDelay={100}
-      content={translate("runAndTaskActions.clear.buttonTooltip")}
+      content={translate("dags:runAndTaskActions.clear.buttonTooltip")}
       disabled={!isHotkeyEnabled}
       openDelay={100}
     >
diff --git a/airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx 
b/airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx
index 6abae7a0a08..fba126dfcd1 100644
--- a/airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx
+++ b/airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx
@@ -155,7 +155,7 @@ export const renderStructuredLog = ({
         <chakra.p 
key={`frame-${frame.name}-${frame.filename}-${frame.lineno}`}>
           {translate("components:logs.file")}{" "}
           <chakra.span 
color="fg.info">{JSON.stringify(frame.filename)}</chakra.span>,{" "}
-          {translate("components:logs.line")} {frame.lineno} 
{translate("components:logs.in")} {frame.name}
+          {translate("components:logs.location", { line: frame.lineno, name: 
frame.name })}
         </chakra.p>
       ));
 
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/components.json 
b/airflow-core/src/airflow/ui/src/i18n/locales/de/components.json
index 845a7a62d27..69d440275b3 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/de/components.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/components.json
@@ -76,8 +76,7 @@
   "limitedList": "+{{count}} mehr",
   "logs": {
     "file": "Datei",
-    "in": "in",
-    "line": "Zeile"
+    "location": "Zeile {{line}} in {{name}}"
   },
   "reparseDag": "Dag neu parsen",
   "sortedAscending": "aufsteigend sortier",
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/en/components.json 
b/airflow-core/src/airflow/ui/src/i18n/locales/en/components.json
index 1e48b630632..1db16d00dca 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/en/components.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/en/components.json
@@ -87,8 +87,7 @@
   "limitedList": "+{{count}} more",
   "logs": {
     "file": "File",
-    "in": "in",
-    "line": "line"
+    "location": "line {{line}} in {{name}}"
   },
   "reparseDag": "Reparse Dag",
   "sortedAscending": "sorted ascending",
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/pl/components.json 
b/airflow-core/src/airflow/ui/src/i18n/locales/pl/components.json
index fc5e55cf5ed..4698308ee00 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/pl/components.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/pl/components.json
@@ -75,8 +75,7 @@
   "limitedList": "+{{count}} więcej",
   "logs": {
     "file": "Plik",
-    "in": "w",
-    "line": "linia"
+    "location": "linia {{line}} w {{name}}"
   },
   "reparseDag": "Ponowne parsowanie Daga",
   "sortedAscending": "posortowane rosnąco",
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 32ddb70af65..1b94813361e 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
@@ -179,7 +179,7 @@
   "task": {
     "documentation": "任務文件",
     "lastInstance": "最後實例",
-    "operator": "operator",
+    "operator": "任務操作器",
     "triggerRule": "觸發規則"
   },
   "task_one": "任務",
diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/components.json 
b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/components.json
index c9d85802651..caabf62a72f 100644
--- a/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/components.json
+++ b/airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/components.json
@@ -87,8 +87,7 @@
   "limitedList": "+ 其他 {{count}} 項",
   "logs": {
     "file": "檔案",
-    "in": "在",
-    "line": "行"
+    "location": "第 {{line}} 行,位於 {{name}}"
   },
   "reparseDag": "重新解析 Dag",
   "sortedAscending": "遞增排序",
diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx 
b/airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx
index 47ce1ad8629..6ddf1d26048 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx
@@ -129,7 +129,11 @@ export const Code = () => {
           <ClipboardRoot value={code?.content ?? ""}>
             <ClipboardButton />
           </ClipboardRoot>
-          <Tooltip closeDelay={100} content={translate("common:wrap.tooltip")} 
openDelay={100}>
+          <Tooltip
+            closeDelay={100}
+            content={translate("common:wrap.tooltip", { hotkey: "w" })}
+            openDelay={100}
+          >
             <Button
               aria-label={translate(`common:wrap.${wrap ? "un" : ""}wrap`)}
               bg="bg.panel"
diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Overview/FailedLogs.tsx 
b/airflow-core/src/airflow/ui/src/pages/Dag/Overview/FailedLogs.tsx
index d3b4be87560..c5ad102bbdc 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Overview/FailedLogs.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Overview/FailedLogs.tsx
@@ -50,7 +50,7 @@ const FailedLogs = ({
     <Flex flexDirection="column" gap={3}>
       <Flex alignItems="center" justifyContent="space-between">
         <Heading size="md">{translate("overview.failedLogs.title")}</Heading>
-        <Tooltip closeDelay={100} content={translate("common:wrap.tooltip")} 
openDelay={100}>
+        <Tooltip closeDelay={100} content={translate("common:wrap.tooltip", { 
hotkey: "w" })} openDelay={100}>
           <Button
             aria-label={translate(`common:wrap.${wrap ? "un" : ""}wrap`)}
             bg="bg.panel"

Reply via email to