-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
i18n: Replaced hard-coded "no {modelName} found" message in DataTable #51209
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 讚ㄛ!
i18n changes are happening so fast! we already have merge conflicts |
There was a problem hiding this 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": "插件", |
There was a problem hiding this comment.
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 🤔
…apache#51209) * fix:replace hard-coded noRowMessage in DataTable * fix:remove unnecessary count * add back noRowMessage
Why introduce
noItemsFound
as an improved default fallbackFor 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 crucialRelying solely on this generic template with modelName interpolation is insufficient due to complex grammatical rules in some languages. For example:
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.