This is an automated email from the ASF dual-hosted git repository.
potiuk 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 7a2d29e6260 Refactor: Use i18n keys for UI hardcoded placeholders
(#59655)
7a2d29e6260 is described below
commit 7a2d29e62603260e4579631205006a12554c6628
Author: Yeonguk Choo <[email protected]>
AuthorDate: Sat Dec 20 23:00:05 2025 +0900
Refactor: Use i18n keys for UI hardcoded placeholders (#59655)
---
airflow-core/src/airflow/ui/public/i18n/locales/en/components.json | 2 ++
airflow-core/src/airflow/ui/public/i18n/locales/en/dashboard.json | 3 ++-
airflow-core/src/airflow/ui/src/components/Assets/AssetEvents.tsx | 2 +-
airflow-core/src/airflow/ui/src/components/DagVersionSelect.tsx | 2 +-
airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx | 2 +-
5 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/en/components.json
b/airflow-core/src/airflow/ui/public/i18n/locales/en/components.json
index 13e637f981b..6668a88c1b4 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/en/components.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/en/components.json
@@ -110,6 +110,7 @@
"sortedDescending": "sorted descending",
"sortedUnsorted": "unsorted",
"taskTries": "Task Tries",
+ "taskTryPlaceholder": "Task Try",
"toggleCardView": "Show card view",
"toggleTableView": "Show table view",
"triggerDag": {
@@ -149,6 +150,7 @@
"versionId": "Version ID"
},
"versionSelect": {
+ "allVersions": "All Versions",
"dagVersion": "Dag Version",
"versionCode": "v{{versionCode}}"
}
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/en/dashboard.json
b/airflow-core/src/airflow/ui/public/i18n/locales/en/dashboard.json
index 1d90ff0b777..4504856227f 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/en/dashboard.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/en/dashboard.json
@@ -29,7 +29,8 @@
"poolSlots": "Pool Slots",
"sortBy": {
"newestFirst": "Newest First",
- "oldestFirst": "Oldest First"
+ "oldestFirst": "Oldest First",
+ "placeholder": "Sort by"
},
"source": "Source",
"stats": {
diff --git a/airflow-core/src/airflow/ui/src/components/Assets/AssetEvents.tsx
b/airflow-core/src/airflow/ui/src/components/Assets/AssetEvents.tsx
index 2ac242f297f..c5b5c5adf8c 100644
--- a/airflow-core/src/airflow/ui/src/components/Assets/AssetEvents.tsx
+++ b/airflow-core/src/airflow/ui/src/components/Assets/AssetEvents.tsx
@@ -91,7 +91,7 @@ export const AssetEvents = ({
width={130}
>
<Select.Trigger>
- <Select.ValueText placeholder="Sort by" />
+ <Select.ValueText
placeholder={translate("dashboard:sortBy.placeholder")} />
</Select.Trigger>
<Select.Content>
diff --git a/airflow-core/src/airflow/ui/src/components/DagVersionSelect.tsx
b/airflow-core/src/airflow/ui/src/components/DagVersionSelect.tsx
index 5e386a7c484..abc692da890 100644
--- a/airflow-core/src/airflow/ui/src/components/DagVersionSelect.tsx
+++ b/airflow-core/src/airflow/ui/src/components/DagVersionSelect.tsx
@@ -72,7 +72,7 @@ export const DagVersionSelect = ({ showLabel = true }: {
readonly showLabel?: bo
) : undefined}
<Select.Control>
<Select.Trigger>
- <Select.ValueText placeholder="All Versions">
+ <Select.ValueText
placeholder={translate("versionSelect.allVersions")}>
{selectedVersion === undefined ? undefined : (
<Flex justifyContent="space-between" width="175px">
<Text>
diff --git a/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
b/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
index bfb9f48c1ce..d2163f2d05b 100644
--- a/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
+++ b/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
@@ -100,7 +100,7 @@ export const TaskTrySelect = ({ onSelectTryNumber,
selectedTryNumber, taskInstan
width="200px"
>
<Select.Trigger>
- <Select.ValueText placeholder="Task Try">
+ <Select.ValueText placeholder={translate("taskTryPlaceholder")}>
{(
items: Array<{
task_instance: TaskInstanceHistoryResponse;