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

jscheffl 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 ecf2efae7e2 Translate Task Instance totals label for Mapped Task 
Header (#55318)
ecf2efae7e2 is described below

commit ecf2efae7e2d7f01e6a45cfdd775fe9586939a94
Author: Jens Scheffler <95105677+jsche...@users.noreply.github.com>
AuthorDate: Sat Sep 6 20:16:20 2025 +0200

    Translate Task Instance totals label for Mapped Task Header (#55318)
    
    * Translate Task Instance totals label for Mapped Task Header
    
    * Fix key matching w/o const and more elegant with lowercase
---
 airflow-core/src/airflow/ui/src/pages/GroupTaskInstance/Header.tsx | 7 +++++--
 .../src/airflow/ui/src/pages/MappedTaskInstance/Header.tsx         | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/airflow-core/src/airflow/ui/src/pages/GroupTaskInstance/Header.tsx 
b/airflow-core/src/airflow/ui/src/pages/GroupTaskInstance/Header.tsx
index ec72c12cbb9..9fc14c76f5d 100644
--- a/airflow-core/src/airflow/ui/src/pages/GroupTaskInstance/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/GroupTaskInstance/Header.tsx
@@ -37,8 +37,11 @@ export const Header = ({
   const { t: translate } = useTranslation();
   const entries: Array<{ label: string; value: number | ReactNode | string }> 
= [];
 
-  Object.entries(taskInstance.child_states ?? {}).forEach(([state, count]) => {
-    entries.push({ label: translate("total", { state }), value: count });
+  Object.entries(taskInstance.child_states ?? {}).forEach(([taskState, count]) 
=> {
+    entries.push({
+      label: translate("total", { state: 
translate(`states.${taskState.toLowerCase()}`) }),
+      value: count,
+    });
   });
   const stats = [
     ...entries,
diff --git 
a/airflow-core/src/airflow/ui/src/pages/MappedTaskInstance/Header.tsx 
b/airflow-core/src/airflow/ui/src/pages/MappedTaskInstance/Header.tsx
index dd00399a8ed..c62e8fed0e5 100644
--- a/airflow-core/src/airflow/ui/src/pages/MappedTaskInstance/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/MappedTaskInstance/Header.tsx
@@ -37,8 +37,11 @@ export const Header = ({
   const entries: Array<{ label: string; value: number | ReactNode | string }> 
= [];
   let taskCount: number = 0;
 
-  Object.entries(taskInstance.child_states ?? {}).forEach(([state, count]) => {
-    entries.push({ label: translate("total", { state }), value: count });
+  Object.entries(taskInstance.child_states ?? {}).forEach(([taskState, count]) 
=> {
+    entries.push({
+      label: translate("total", { state: 
translate(`states.${taskState.toLowerCase()}`) }),
+      value: count,
+    });
     taskCount += count;
   });
   const stats = [

Reply via email to