-
Notifications
You must be signed in to change notification settings - Fork 91
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
Added i18n translations to tile components #4936
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.
Shoudl we add a webdriver test here in a different language to ensure the language replacement happens? I can imagine a couple ways how we could regress that unintentionally
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! thanks for adding these strings
static/js/i18n/strings/en/place.json
Outdated
}, | ||
"chart-title-with-two-variables-and-location": { | ||
"defaultMessage": "{variable1} Vs. {variable2} in {placeType} of {place}", | ||
"description": "Chart title for a chart comparing two different variables, for places of a specific type within a place. For example, this could be Obesity Rate Vs. Income in States of USA, or Housing vs Poverty in Countries of Europe." |
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.
would be good to clarify the example title with quotes.
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.
Done
static/js/i18n/strings/en/place.json
Outdated
"header-overview": { | ||
"defaultMessage": "Overview", | ||
"description": "Text for header or subheader of Overview charts on place pages." | ||
}, | ||
"key_demographics": { | ||
"defaultMessage": "Key Demographics", |
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.
Should this be sentence case (along with some of these other titles below)
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.
Updated
static/js/i18n/strings/en/place.json
Outdated
}, | ||
"viaGoogle": { | ||
"defaultMessage": "via Google", | ||
"description": "Indicator displayed when chart data comes from Google" |
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.
an example string where this is used would be helpful
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.
Done
Added a basic test, and added a TODO to update some of the assertions once we have actual translations in place |
intl. formatMessage
calls to hardcoded strings in tile components/api/place/displayname
calls. (Still todo: Add locale param support to /api/place/name)