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’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

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

viktorrusakov
Copy link
Contributor

@viktorrusakov viktorrusakov commented Dec 3, 2023

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

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Does your change adhere to the documented style conventions?
  • Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
  • Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
  • Were your changes tested in the example app?
  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@openedx-webhooks openedx-webhooks added the blended PR is managed through 2U's blended developmnt program label Dec 3, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @viktorrusakov!

When this pull request is ready, tag your edX technical lead.

Copy link

netlify bot commented Dec 3, 2023

Deploy Preview for paragon-openedx ready!

Name Link
🔨 Latest commit 2f0da9a
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/65701fbd6145870008da19ab
😎 Deploy Preview https://deploy-preview-2886--paragon-openedx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The variables for the string were provided incorrectly which resulted in the following text being rendered
image

this fixes the text to be
image

Copy link

codecov bot commented Dec 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5af0a82) 92.83% compared to head (2f0da9a) 92.83%.
Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

Comment on lines 120 to 127
<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>
Copy link
Contributor

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 🥇

Copy link
Contributor

@PKulkoRaccoonGang PKulkoRaccoonGang Dec 4, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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

@adamstankiewicz adamstankiewicz merged commit bfe4b8d into master Dec 22, 2023
10 checks passed
@adamstankiewicz adamstankiewicz deleted the rusakov/fix-produc-tour-i18n branch December 22, 2023 13:45
@openedx-semantic-release-bot

🎉 This PR is included in version 21.12.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@openedx-semantic-release-bot

🎉 This PR is included in version 22.0.0-alpha.24 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blended PR is managed through 2U's blended developmnt program released on @alpha released
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants