fix(i18n): prepare for Lokalise
This commit is contained in:
@@ -42,7 +42,9 @@ export default function SurprisesNotification({
|
||||
toast.success(
|
||||
<>
|
||||
{intl.formatMessage(
|
||||
{ id: "Gift(s) added to your benefits" },
|
||||
{
|
||||
id: "{amount, plural, one {Gift} other {Gifts}} added to your benefits",
|
||||
},
|
||||
{ amount: surprises.length }
|
||||
)}
|
||||
<br />
|
||||
@@ -117,7 +119,10 @@ export default function SurprisesNotification({
|
||||
}}
|
||||
onAnimationComplete={confetti}
|
||||
>
|
||||
<Dialog aria-label="Surprises" className={styles.dialog}>
|
||||
<Dialog
|
||||
aria-label={intl.formatMessage({ id: "Surprises" })}
|
||||
className={styles.dialog}
|
||||
>
|
||||
{({ close }) => {
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -18,7 +18,7 @@ export default function Initial({ totalSurprises, onOpen }: InitialProps) {
|
||||
<>
|
||||
{intl.formatMessage<React.ReactNode>(
|
||||
{
|
||||
id: "You have <b>#</b> gifts waiting for you!",
|
||||
id: "You have <b>{amount}</b> gifts waiting for you!",
|
||||
},
|
||||
{
|
||||
amount: totalSurprises,
|
||||
@@ -52,7 +52,7 @@ export default function Initial({ totalSurprises, onOpen }: InitialProps) {
|
||||
>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "Open gift(s)",
|
||||
id: "Open {amount, plural, one {gift} other {gifts}}",
|
||||
},
|
||||
{ amount: totalSurprises }
|
||||
)}
|
||||
|
||||
@@ -23,25 +23,30 @@ export default function Slide({ surprise, membershipNumber }: SlideProps) {
|
||||
},
|
||||
dt()
|
||||
)
|
||||
|
||||
return (
|
||||
<Card title={surprise.label}>
|
||||
<Body textAlign="center">{surprise.description}</Body>
|
||||
<div className={styles.badge}>
|
||||
<Caption>
|
||||
{intl.formatMessage(
|
||||
{ id: "Expires at the earliest" },
|
||||
{ id: "Expires at the earliest {expirationDate}" },
|
||||
{
|
||||
date: dt(earliestExpirationDate)
|
||||
expirationDate: dt(earliestExpirationDate)
|
||||
.locale(lang)
|
||||
.format("D MMM YYYY"),
|
||||
}
|
||||
)}
|
||||
</Caption>
|
||||
<Caption>
|
||||
{intl.formatMessage({
|
||||
id: "Membership ID",
|
||||
})}{" "}
|
||||
{membershipNumber}
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "Membership ID {id}",
|
||||
},
|
||||
{
|
||||
id: membershipNumber,
|
||||
}
|
||||
)}
|
||||
</Caption>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user