Skip to content

Fix missing translation keys for blocking dependencies in UI (#61314)#61366

Merged
guan404ming merged 4 commits intoapache:mainfrom
SakshamSinghal20:block
Feb 8, 2026
Merged

Fix missing translation keys for blocking dependencies in UI (#61314)#61366
guan404ming merged 4 commits intoapache:mainfrom
SakshamSinghal20:block

Conversation

@SakshamSinghal20
Copy link
Contributor

This PR resolves an issue where translation keys for "Blocking Dependencies" in the Task Instance Details panel were missing (e.g., dag.blockingDeps.title, dag.blockingDeps.dependency), displaying raw keys instead of the localized text.

The dag and tasks translation files existed in the locales directory but were not registered in the i18n configuration (config.ts), preventing them from being loaded. This change adds both namespaces to the configuration to ensure the translations are applied correctly.

closes: #61314


Was generative AI tooling used to co-author this PR?

No

Copy link
Contributor

@RoyLee1224 RoyLee1224 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! However, I think the current changes do not seem to address the root cause.

The issue is that the BlockingDeps component needs to load the dag namespace to access the keys in airflow-core/src/airflow/ui/public/i18n/locales/en/dag.json.

To fix this, please revert the changes in this PR and instead modify BlockingDeps.tsx as follows:

  1. Update the hook to load the namespace:
const { t: translate } = useTranslation("dag");
  1. Remove the dag. prefix from the keys (since we are already in the dag namespace):
// Change this:
{translate("dag.blockingDeps.title")}
// To this:
{translate("blockingDeps.title")}

(Please apply this pattern to dependency and reason headers as well.)

@SakshamSinghal20
Copy link
Contributor Author

Thank you so much for letting me know I will fix this ASAP.

- Revert changes to global i18n config
- Load 'dag' namespace specifically in BlockingDeps component
- Update translation keys to match namespace context
@SakshamSinghal20
Copy link
Contributor Author

@RoyLee1224 I hope The following commit will solve this issue

Copy link
Member

@guan404ming guan404ming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question left, otherwise looks good.

@SakshamSinghal20
Copy link
Contributor Author

@guan404ming I have change its state to true and i hope this solves the current issue.
Thanks,

@guan404ming guan404ming added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Feb 8, 2026
@guan404ming guan404ming added this to the Airflow 3.1.8 milestone Feb 8, 2026
@guan404ming
Copy link
Member

Thanks!

@guan404ming guan404ming merged commit 6dbb6a8 into apache:main Feb 8, 2026
78 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 8, 2026

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

github-actions bot pushed a commit that referenced this pull request Feb 8, 2026
… UI (#61314) (#61366)

* Fix missing translation keys for task Scheduling Blocking Dependency

* Fix i18n namespace usage in BlockingDeps
- Revert changes to global i18n config
- Load 'dag' namespace specifically in BlockingDeps component
- Update translation keys to match namespace context

* fix: defaults preventRunningTask to true

* Update i18n config
(cherry picked from commit 6dbb6a8)

Co-authored-by: Saksham Singhal <sakshamsinghal2020@gmail.com>
@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

jscheffl pushed a commit that referenced this pull request Feb 8, 2026
… UI (#61314) (#61366) (#61638)

* Fix missing translation keys for task Scheduling Blocking Dependency

* Fix i18n namespace usage in BlockingDeps
- Revert changes to global i18n config
- Load 'dag' namespace specifically in BlockingDeps component
- Update translation keys to match namespace context

* fix: defaults preventRunningTask to true

* Update i18n config
(cherry picked from commit 6dbb6a8)

Co-authored-by: Saksham Singhal <sakshamsinghal2020@gmail.com>
jhgoebbert pushed a commit to jhgoebbert/airflow_Owen-CH-Leung that referenced this pull request Feb 8, 2026
…61314) (apache#61366)

* Fix missing translation keys for task Scheduling Blocking Dependency

* Fix i18n namespace usage in BlockingDeps
- Revert changes to global i18n config
- Load 'dag' namespace specifically in BlockingDeps component
- Update translation keys to match namespace context

* fix: defaults preventRunningTask to true

* Update i18n config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task Scheduling Blocking Depdendency Reason missing translation keys

3 participants