-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[l10n] Improve Chinese (zh-HK) locale #13289
Merged
+2
−2
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The suggested translation seems to mean "Clear" in English.
Are you sure it is enough in this case or would it be better to use
明确的价值
instead? 🤔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.
I guess it's OK, it's what Simplified Chinese already uses:
mui-x/packages/x-date-pickers/src/locales/zhCN.ts
Line 68 in b4e8bf4
Actually, this label feels too specific in the original en-US version. I could see clear date, clear birthday, "value" feels too generic and unnecessary. It's implicit that it's a value. It's also inconsistent with the combobox. I think that we can fix this: #14243.
https://mui.com/material-ui/react-autocomplete/#combo-box
https://mui.com/x/react-date-pickers/date-picker/#clearing-the-value
https://www.google.com/
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.
Thank you for the insight. 👍
This is the discussion regarding this decision: #9095 (comment)
If we go with only
Clear
, I'd say that we need to explore adding anaria
relationship with the "Field" label to have something likeClear Birth date, button
on screen readers. 💡 🤔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.
Interesting, but why is the clear button reachable with Tab? I would expect the same as in the autocomplete: mui/material-ui#30815
https://react-spectrum.adobe.com/react-aria/ComboBox.html#state uses "Clear" only. https://react-select.com/home makes it unreachable.
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.
Why would we hide it? 🤔
It is a functional part of the component, I don't see a reason to forbid its usage on screen readers (or with a keyboard). 🙈
So does the clearable date picker. 👍
However, they don't even provide a
title
. In this regard I do not agree, I feel thattitle
is a superior attribute toaria-label
, which should be used when the title doesn't make sense.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.
The WAI-ARIA Authoring guide recommends it: mui/material-ui#30815 (comment). In mui/material-ui#30815 (comment) I tried to justify the rational behind why I built the Autocomplete this way.
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.
I feel like we are comparing different things—autocomplete/select has a different keyboard behavior to the Pickers/Field.
It is way easier to remove a value with a keyboard from the autocomplete as compared to a Pickers Field. 🤔
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.
I don't know, on a keyboard clearing a date picker feels slightly simpler than on autocomplete, either:
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.