Skip to content

UI: durations and relative times render in English in all non-English locales (dayjs.locale() is never set) #72307

Description

@baha-bouali

Under which category would you file this issue?

Airflow Core

Apache Airflow version

3.2.0

What happened and how to reproduce it?

The Dag deadline tooltip is only half translated. The sentence template and the
reference point come out in the selected language, but the interval stays in
English "2 hours" in the middle of an otherwise translated sentence.

Same tooltip, same deadline, four languages:

English (correct)

Image

Arabic

Image

French

Image

German

Image

How to reproduce

  1. Define a Dag with a deadline alert, e.g. a DagRunQueuedAtDeadline with a
    2-hour interval.
  2. Switch the UI language to Arabic, French, or any non-English language.
  3. Open the Dag page and hover the deadline badge in the header.

What you think should happen instead?

No response

Operating System

Ubuntu 24.04.4 LTS

Deployment

None

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

No response

Official Helm Chart version

Not Applicable

Kubernetes Version

No response

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

This is not a missing translation key, which is why the translation-completeness
checks never flagged it. The sentence is assembled from two separate catalogues:
the template and reference come from i18next, but the interval comes from dayjs's
own locale data. The UI never calls dayjs.locale(), so dayjs stays on its
built-in English regardless of the selected language.

The same root cause affects every relative time in the UI, e.g. the "Next Run"
value on the Dags list.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions