-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
yeeharn
commented
May 29, 2024
- I have followed (at least) the PR section of the contributing guide.
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 your contribution! 🙏
@@ -65,7 +65,7 @@ const zhHKPickers: Partial<PickersLocaleText<any>> = { | |||
value !== null && utils.isValid(value) | |||
? `選擇時間,已選擇${utils.format(value, 'fullTime')}` | |||
: '選擇時間', | |||
// fieldClearLabel: 'Clear value', | |||
fieldClearLabel: '清除', |
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? 🤔
fieldClearLabel: '清除', | |
fieldClearLabel: '明确的价值', |
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:
fieldClearLabel: '清除', |
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
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 an aria
relationship with the "Field" label to have something like Clear 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.
This is the discussion regarding this decision: #9095 (comment)
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.
Interesting, but why is the clear button reachable with Tab? I would expect the same as in the autocomplete: mui/material-ui#30815
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). 🙈
https://react-spectrum.adobe.com/react-aria/ComboBox.html#state uses "Clear" only. https://react-select.com/home makes it unreachable.
So does the clearable date picker. 👍
However, they don't even provide a title
. In this regard I do not agree, I feel that title
is a superior attribute to aria-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.
Why would we hide it?
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:
- I tab into it. In both cases, everything is selected, so pressing delete once empties the field.
- I have just selected a value. In both cases, I select all + press delete
- I have just selected a value. I spam the delete key, the autocomplete usually has more characters to remove, so is a bit slower.
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.
- Tab discussion moved to [pickers] Remove clear button in tab sequence #14587
- Label PR merged [pickers][fields] Improve clear action label #14243 (maybe a bit too early, I missed "If we go with only Clear, I'd say that we need to explore adding an aria relationship with the "Field" label to have something like Clear Birth date, button on screen readers. 💡 🤔")
Localization writing tips ✍️Seems you are updating localization 🌍 files. Thank you for contributing to the localization! 🎉 To make your PR perfect, here is a list of elements to check: ✔️
Deploy preview: https://deploy-preview-13289--material-ui-x.netlify.app/ |
Signed-off-by: yeeharn <[email protected]>
866245c
to
2560cae
Compare