-
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] fix: correctly translate strings in Checkpoint
component
#2886
Conversation
Thanks for the pull request, @viktorrusakov! When this pull request is ready, tag your edX technical lead. |
✅ Deploy Preview for paragon-openedx ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
defaultMessage="Top of step {step}" | ||
value={{ step: index + 1 }} | ||
description="Screen-reader message to indicate the user's position in a sequence of checkpoints." | ||
values={{ 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2886 +/- ##
=======================================
Coverage 92.83% 92.83%
=======================================
Files 235 236 +1
Lines 4244 4245 +1
Branches 1031 1031
=======================================
+ Hits 3940 3941 +1
Misses 300 300
Partials 4 4 ☔ View full report in Codecov by Sentry. |
src/ProductTour/Checkpoint.jsx
Outdated
<span className="sr-only"> | ||
<FormattedMessage | ||
id="pgn.ProductTour.Checkpoint.bottom-position-text" | ||
defaultMessage="Bottom of step {step}" | ||
values={{ step: index + 1 }} | ||
description="Screen-reader message to notify user that they are located at the bottom of the product tour step." | ||
/> | ||
</span> |
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 propose to put everything related to translations (keys, descriptions, identifiers) into a separate messages.js
file. We already have an example of how we did this in the ChipCarousel component. This will simplify the component code and make it thinner.
It may be worth considering this improvement in a separate task 🥇
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.
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.
Yeah, sounds good, updated, thanks
🎉 This PR is included in version 21.12.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 22.0.0-alpha.24 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Fixes translations for
ProductTour
component and adds i18n support for additional missed hardcoded string.Deploy Preview
https://deploy-preview-2886--paragon-openedx.netlify.app/components/producttour/
Merge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist