🐛 Use single curly braces for i18n string vars (#1805)

This commit is contained in:
Luke Vella 2025-07-09 15:59:26 +03:00 committed by GitHub
parent 8efff1e659
commit a1926a30b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 24 additions and 24 deletions

View file

@ -92,7 +92,7 @@
"polls": "Sondaggi",
"timeZoneSelect__noOption": "Nessuna opzione trovata",
"timeZoneSelect__inputPlaceholder": "Ricerca…",
"poweredByRallly": "Powered by <a>{{name}}</a>",
"poweredByRallly": "Powered by <a>{name}</a>",
"participants": "Partecipanti",
"language": "Lingua",
"languageDescription": "Cambia la tua lingua preferita",

View file

@ -26,13 +26,13 @@ export function SubscriptionPrice({
{interval === "month" ? (
<Trans
i18nKey="subscriptionPriceMonthly"
defaults="{{price}} per month"
defaults="{price} per month"
values={{ price: formattedAmount }}
/>
) : (
<Trans
i18nKey="subscriptionPriceYearly"
defaults="{{price}} per year"
defaults="{price} per year"
values={{ price: formattedAmount }}
/>
)}

View file

@ -58,7 +58,7 @@ export const EmailLayout = ({
t={ctx.t}
i18nKey="common_poweredBy"
ns="emails"
defaults="Powered by <a>{{domain}}</a>"
defaults="Powered by <a>{domain}</a>"
values={{ domain: "rallly.co" }}
components={{
a: (

View file

@ -31,7 +31,7 @@ export const NotificationEmail = ({
<Button href={pollUrl}>
{ctx.t("common_viewOn", {
ns: "emails",
defaultValue: "View on {{domain}}",
defaultValue: "View on {domain}",
domain,
})}
</Button>

View file

@ -26,7 +26,7 @@ export const AbandonedCheckoutEmail = ({
poweredBy={false}
preview={ctx.t("abandoned_checkout_preview", {
defaultValue:
"Exclusive offer: Get {{discount}}% off your first year of Rallly Pro!",
"Exclusive offer: Get {discount}% off your first year of Rallly Pro!",
discount,
ns: "emails",
})}
@ -37,7 +37,7 @@ export const AbandonedCheckoutEmail = ({
t={ctx.t}
i18n={ctx.i18n}
i18nKey="abandoned_checkout_name"
defaults="Hey {{name}},"
defaults="Hey {name},"
values={{ name }}
ns="emails"
/>
@ -70,7 +70,7 @@ export const AbandonedCheckoutEmail = ({
t={ctx.t}
i18n={ctx.i18n}
i18nKey="abandoned_checkout_offer"
defaults="To help you get started, I'd like to offer you <b>{{discount}}% off your first year</b> with Rallly Pro. Simply use this code during checkout:"
defaults="To help you get started, I'd like to offer you <b>{discount}% off your first year</b> with Rallly Pro. Simply use this code during checkout:"
ns="emails"
values={{
discount,
@ -134,7 +134,7 @@ AbandonedCheckoutEmail.getSubject = (
ctx: EmailContext,
) => {
return `🎉 ${ctx.t("abandoned_checkout_subject", {
defaultValue: "Get {{discount}}% off your first year of Rallly Pro",
defaultValue: "Get {discount}% off your first year of Rallly Pro",
discount: props.discount,
ns: "emails",
})}`;

View file

@ -38,7 +38,7 @@ export const ChangeEmailRequest = ({
t={ctx.t}
i18nKey="changeEmailRequest_text1"
ns="emails"
defaults="We've received a request to change the email address for your account from <b>{{fromEmail}}</b> to <b>{{toEmail}}</b>."
defaults="We've received a request to change the email address for your account from <b>{fromEmail}</b> to <b>{toEmail}</b>."
values={{ fromEmail, toEmail }}
components={{ b: <b /> }}
/>

View file

@ -58,7 +58,7 @@ const FinalizeHostEmail = ({
components={{
b: <strong />,
}}
defaults="<b>{{title}}</b> has been booked for:"
defaults="<b>{title}</b> has been booked for:"
/>
</Text>
<Section>

View file

@ -62,7 +62,7 @@ export const LoginEmail = ({ code, magicLink, ctx }: LoginEmailProps) => {
i18n={ctx.i18n}
t={ctx.t}
i18nKey="login_button"
defaults="Log in to {{domain}}"
defaults="Log in to {domain}"
values={{ domain: ctx.domain }}
ns="emails"
/>
@ -73,7 +73,7 @@ export const LoginEmail = ({ code, magicLink, ctx }: LoginEmailProps) => {
i18n={ctx.i18n}
t={ctx.t}
i18nKey="login_content2"
defaults="You're receiving this email because a request was made to login to <domain />. If this wasn't you contact <a>{{supportEmail}}</a>."
defaults="You're receiving this email because a request was made to login to <domain />. If this wasn't you contact <a>{supportEmail}</a>."
values={{ supportEmail: ctx.supportEmail }}
components={{
domain: <Domain ctx={ctx} />,
@ -88,7 +88,7 @@ export const LoginEmail = ({ code, magicLink, ctx }: LoginEmailProps) => {
LoginEmail.getSubject = (props: LoginEmailProps, ctx: EmailContext) => {
return ctx.t("login_subject", {
defaultValue: "{{code}} is your 6-digit code",
defaultValue: "{code} is your 6-digit code",
code: props.code,
ns: "emails",
});

View file

@ -40,7 +40,7 @@ const NewCommentEmail = ({
i18n={ctx.i18n}
ns="emails"
i18nKey="newComment_content"
defaults="<b>{{authorName}}</b> has commented on <b>{{title}}</b>."
defaults="<b>{authorName}</b> has commented on <b>{title}</b>."
components={{
b: <strong />,
}}
@ -60,7 +60,7 @@ NewCommentEmail.getSubject = (
) => {
return ctx.t("newComment_subject", {
ns: "emails",
defaultValue: "{{authorName}} has commented on {{title}}",
defaultValue: "{authorName} has commented on {title}",
authorName: props.authorName,
title: props.title,
});

View file

@ -41,7 +41,7 @@ const NewParticipantConfirmationEmail = ({
i18n={ctx.i18n}
t={ctx.t}
i18nKey="newParticipantConfirmation_content"
defaults="Your response to <b>{{title}}</b> has been submitted."
defaults="Your response to <b>{title}</b> has been submitted."
components={{
b: <strong />,
}}
@ -64,7 +64,7 @@ const NewParticipantConfirmationEmail = ({
i18n={ctx.i18n}
t={ctx.t}
i18nKey="newParticipantConfirmation_button"
defaults="Review response on {{domain}}"
defaults="Review response on {domain}"
values={{ domain }}
ns="emails"
/>
@ -91,7 +91,7 @@ NewParticipantConfirmationEmail.getSubject = (
ctx: EmailContext,
) => {
return ctx.t("newParticipantConfirmation_subject", {
defaultValue: "Thanks for responding to {{title}}",
defaultValue: "Thanks for responding to {title}",
title: props.title,
ns: "emails",
});

View file

@ -39,7 +39,7 @@ const NewParticipantEmail = ({
t={ctx.t}
i18nKey="newParticipant_content"
ns="emails"
defaults="<b>{{name}}</b> has responded to <b>{{title}}</b>."
defaults="<b>{name}</b> has responded to <b>{title}</b>."
components={{
b: <strong />,
}}
@ -64,7 +64,7 @@ NewParticipantEmail.getSubject = (
ctx: EmailContext,
) => {
return ctx.t("newParticipant_subject", {
defaultValue: "{{name}} has responded to {{title}}",
defaultValue: "{name} has responded to {title}",
name: props.participantName,
title: props.title,
ns: "emails",

View file

@ -49,7 +49,7 @@ export const NewPollEmail = ({
components={{
b: <strong />,
}}
defaults="Your meeting poll titled <b>{{title}}</b> is ready! Share it using the link below:"
defaults="Your meeting poll titled <b>{title}</b> is ready! Share it using the link below:"
/>
</Text>
<Card style={{ textAlign: "center" }}>
@ -69,7 +69,7 @@ export const NewPollEmail = ({
NewPollEmail.getSubject = (props: NewPollEmailProps, ctx: EmailContext) => {
return ctx.t("newPoll_subject", {
defaultValue: "Let's find a date for {{title}}!",
defaultValue: "Let's find a date for {title}!",
title: props.title,
ns: "emails",
});

View file

@ -22,7 +22,7 @@ export const RegisterEmail = ({ code, ctx }: RegisterEmailProps) => {
ctx={ctx}
preview={ctx.t("register_preview", {
ns: "emails",
defaultValue: "Your 6-digit code is: {{code}}",
defaultValue: "Your 6-digit code is: {code}",
code,
})}
>