Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n spanish 450 #457

Merged
merged 7 commits into from Mar 31, 2021
Merged

Conversation

paspheeris
Copy link
Contributor

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's srOnly 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 the MonthlySchedule is more problematic. The rrule 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? 馃敆

馃嚚馃嚧

@netlify
Copy link

netlify bot commented Mar 10, 2021

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")}
Copy link
Member

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!

Comment on lines 132 to 136
<PhoneIcon titleAccess={t("phoneNumber")} />
</ListItemIcon>
<ListItemText>
<Typography component="h2" variant="srOnly">
Phone
{t("phoneNumber")}
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! f4948d9

Copy link
Member

@jacobvenable jacobvenable left a 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!

Copy link
Member

@jollyjerr jollyjerr left a 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!

@jacobvenable jacobvenable merged commit a5a8882 into CodeForBoulder:master Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

localize individual resource page
3 participants