Skip to content

i18n: Replaced hard-coded "no {modelName} found" message in DataTable #51209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 29, 2025

Conversation

RoyLee1224
Copy link
Contributor

Why introduce noItemsFound as an improved default fallback

For pages that currently lack a customized noRowsMessage, DataTable will now display a fully translated message.

For example, instead of an erroneous "No 任務實例 found" (a mix of English and Chinese), the UI will correctly render a message like "找不到任務實例".

Why is the noRowsMessage prop still crucial

Relying solely on this generic template with modelName interpolation is insufficient due to complex grammatical rules in some languages. For example:

  • Korean: Grammatical object markers (을/를) change based on whether the modelName ends in a vowel or a consonant.
  • German (and other languages with complex plurals/noun forms): The plural of modelName in German might be entirely different, we cannot simply add 's' after modelName in "common:noItemsFound", like English.

Therefore, the long-term goal is to increasingly utilize the noRowsMessage prop to provide fully tailored messages.

Additional information

For more information on such practices, please refer to:

i18n Best Practices for Front-End Developers


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label May 29, 2025
Copy link
Contributor

@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.

Nice! 讚ㄛ!

@bbovenzi bbovenzi added this to the Airflow 3.1.0 milestone May 29, 2025
@bbovenzi
Copy link
Contributor

i18n changes are happening so fast! we already have merge conflicts

@bbovenzi bbovenzi merged commit 54d6ef1 into apache:main May 29, 2025
43 checks passed
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

Late to the party but thanks @RoyLee1224 ! One nitpick, I'll send a PR for it

"docs": "文件",
"home": "首頁",
"plugins": "插件"
"plugins": "插件",
Copy link
Member

Choose a reason for hiding this comment

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

This looks wrong. Missed this one. Let me send a new PR for it 🤔

@RoyLee1224 RoyLee1224 deleted the UI/DataTable-noItemsFound_message branch June 4, 2025 23:22
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
…apache#51209)

* fix:replace hard-coded noRowMessage in DataTable

* fix:remove unnecessary count

* add back noRowMessage
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants