-
Notifications
You must be signed in to change notification settings - Fork 21
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 spanish 450 #457
I18n spanish 450 #457
Conversation
Deploy request for upswyng accepted. Accepted with commit 3a82fc2 https://app.netlify.com/sites/upswyng/deploys/6060afbd7f55d900073d1e60 |
@@ -287,6 +289,7 @@ const Map = ({ address, name, latitude, longitude }: Props) => { | |||
<IconButton | |||
onClick={() => handleDirectionButtonClick("TRANSIT")} | |||
color={travelMode === "TRANSIT" ? "primary" : "default"} | |||
title={t("directionsByBus")} |
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.
Def good call on adding these!
<PhoneIcon titleAccess={t("phoneNumber")} /> | ||
</ListItemIcon> | ||
<ListItemText> | ||
<Typography component="h2" variant="srOnly"> | ||
Phone | ||
{t("phoneNumber")} |
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 like your thinking here, but in this case I don't think we need to have the title on the icon. The srOnly
variant of the following heading sets this as hidden text that is available to screen readers.
Adding a title to the icon as well means a SR would read "phone number" twice.
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.
Good point! f4948d9
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.
After removing those titles from the icons, this is good to go!
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 work!! I think this is good to go and I just approved your preview so all tests should pass soon and you are good to merge whenevs!
This PR closes #450
What does this PR do?
Adds Spanish translations for the individual resource page.
Remarks:
-I added the
titleAccess
prop for the icons even though there'ssrOnly
text for them, because I think that's what's recommended by the material-ui docs and what I read elsewhere. I really need to educate myself on a11y issues better 😞-For the schedule section, I was able to provide translations for resources that display a
WeeklySchedule
, but theMonthlySchedule
is more problematic. Therrule
library's support for i18n is pretty basic, only allowing you to provide word-for-word translations and not accounting for eg word order differences between languages. I'm not sure what a good solution would be here.How does this PR make you feel? 🔗
🇨🇴