-
Notifications
You must be signed in to change notification settings - Fork 73
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,10 +98,10 @@ const Checkpoint = React.forwardRef(({ | |
> | ||
<span className="sr-only"> | ||
<FormattedMessage | ||
id="pgn.ProductTour.Checkpoint.position-text" | ||
id="pgn.ProductTour.Checkpoint.top-position-text" | ||
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 }} | ||
description="Screen-reader message to notify user that they are located at the bottom of the product tour step." | ||
/> | ||
</span> | ||
{(title || !isOnlyCheckpoint) && ( | ||
|
@@ -117,8 +117,14 @@ const Checkpoint = React.forwardRef(({ | |
{...props} | ||
/> | ||
<div id="pgn__checkpoint-arrow" data-popper-arrow /> | ||
{/* This text is not translated due to Paragon's lack of i18n support */} | ||
<span className="sr-only">Bottom of step {index + 1}</span> | ||
<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 commentThe 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 It may be worth considering this improvement in a separate task 🥇 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, sounds good, updated, thanks |
||
</div> | ||
); | ||
}); | ||
|
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.
The variables for the string were provided incorrectly which resulted in the following text being rendered

this fixes the text to be
