-
Notifications
You must be signed in to change notification settings - Fork 69
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
[BD-46] feat: add i18n support for ProductTour Checkpoint sr-only message #2758
[BD-46] feat: add i18n support for ProductTour Checkpoint sr-only message #2758
Conversation
✅ Deploy Preview for paragon-openedx ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for the pull request, @khudym! When this pull request is ready, tag your edX technical lead. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2758 +/- ##
=======================================
Coverage 92.82% 92.83%
=======================================
Files 235 235
Lines 4237 4240 +3
Branches 1029 1029
=======================================
+ Hits 3933 3936 +3
Misses 300 300
Partials 4 4
☔ View full report in Codecov by Sentry. |
src/ProductTour/Checkpoint.jsx
Outdated
<FormattedMessage | ||
id="pgn.checkpoint.sr-only.message" | ||
defaultMessage={`Top of step ${index + 1}`} | ||
description="Screen-reader message to indicate the user's position in a sequence of checkpoints." | ||
/> |
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 not the right way to translate messages with variables in it, the correct syntax is as follows (see docs):
<FormattedMessage
id="pgn.ProductTour.Checkpoint.position-text" // should change the id as well, we try to follow <component>.<subComponent> pattern in our ids
defaultMessage="Top of step {step}"
value={{ step: index + 1 }}
description="Screen-reader message to indicate the user's position in a sequence of checkpoints."
/>
src/ProductTour/Checkpoint.jsx
Outdated
<span className="sr-only"> | ||
<FormattedMessage | ||
id="pgn.checkpoint.sr-only.message" | ||
defaultMessage={`Top of step ${index + 1}`} |
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.
Do I need to add keys for this translation to the i18n folder?
@khudym 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
🎉 This PR is included in version 21.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 22.0.0-alpha.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Add i18n support for ProductTour Checkpoint sr-only message
Issue
Deploy Preview
Include a direct link to your changes in this PR's deploy preview here (e.g., a specific component page).
Merge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist