feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass

This commit is contained in:
Michael Zetterberg
2025-02-07 06:51:36 +01:00
parent e22fc1f3c8
commit 440e1f92df
393 changed files with 4839 additions and 1554 deletions

View File

@@ -76,13 +76,16 @@ export default function SurprisesNotification({
<>
{intl.formatMessage(
{
id: "{amount, plural, one {Gift} other {Gifts}} added to your benefits",
defaultMessage:
"{amount, plural, one {Gift} other {Gifts}} added to your benefits",
},
{ amount: surprises.length }
)}
<br />
<Link href={benefitPageUrl} variant="underscored" color="burgundy">
{intl.formatMessage({ id: "Go to My Benefits" })}
{intl.formatMessage({
defaultMessage: "Go to My Benefits",
})}
</Link>
</>
)
@@ -93,7 +96,8 @@ export default function SurprisesNotification({
<>
{intl.formatMessage(
{
id: "Oops! Something went wrong while showing your surprise. Please refresh the page or try again later. If the issue persists, <link>contact the support.</link>",
defaultMessage:
"Oops! Something went wrong while showing your surprise. Please refresh the page or try again later. If the issue persists, <link>contact the support.</link>",
},
{
link: (str) => (
@@ -168,7 +172,9 @@ export default function SurprisesNotification({
onAnimationComplete={confetti}
>
<Dialog
aria-label={intl.formatMessage({ id: "Surprises" })}
aria-label={intl.formatMessage({
defaultMessage: "Surprises",
})}
className={styles.dialog}
>
{({ close }) => {
@@ -183,7 +189,9 @@ export default function SurprisesNotification({
{showSurprises && totalSurprises > 1 && (
<Caption type="label" uppercase>
{intl.formatMessage(
{ id: "{amount} out of {total}" },
{
defaultMessage: "{amount} out of {total}",
},
{
amount: selectedSurprise + 1,
total: totalSurprises,