Skip to content

Commit 640ea98

Browse files
committed
fix(i18n): add translation for tooltip states
1 parent 9393ad5 commit 640ea98

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

airflow-core/src/airflow/ui/src/components/DagRunInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const DagRunInfo = ({ endDate, logicalDate, runAfter, startDate, state }: Props)
4242
<VStack align="left" gap={0}>
4343
{state === undefined ? undefined : (
4444
<Text>
45-
{translate("state")}: {state}
45+
{translate("state")}: {translate(`common:states.${state}`)}
4646
</Text>
4747
)}
4848
{Boolean(logicalDate) ? (

airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ const TaskInstanceTooltip = ({ children, positioning, taskInstance, ...rest }: P
4343
content={
4444
<Box>
4545
<Text>
46-
{translate("state")}: {taskInstance.state}
46+
{translate("state")}:{" "}
47+
{taskInstance.state
48+
? translate(`common:states.${taskInstance.state}`)
49+
: translate("common:states.no_status")}
4750
</Text>
4851
{"dag_run_id" in taskInstance ? (
4952
<Text>

airflow-core/src/airflow/ui/src/layouts/Details/Grid/GridButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export const GridButton = ({
5050
<>
5151
{label}
5252
<br />
53-
{translate("state")}: {state}
53+
{translate("state")}:{" "}
54+
{state ? translate(`common:states.${state}`) : translate("common:states.no_status")}
5455
</>
5556
);
5657

airflow-core/src/airflow/ui/src/layouts/Details/Grid/GridTI.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ const Instance = ({ dagId, instance, isGroup, isMapped, onClick, runId, taskId }
114114
<>
115115
{translate("taskId")}: {taskId}
116116
<br />
117-
{translate("state")}: {instance.state}
117+
{translate("state")}:{" "}
118+
{instance.state
119+
? translate(`common:states.${instance.state}`)
120+
: translate("common:states.no_status")}
118121
{instance.min_start_date !== null && (
119122
<>
120123
<br />

0 commit comments

Comments
 (0)