From a1926a30b2d422571bce33f30a2118afb6e00f5f Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Wed, 9 Jul 2025 15:59:26 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Use=20single=20curly=20braces=20?= =?UTF-8?q?for=20i18n=20string=20vars=20(#1805)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/public/locales/it/app.json | 2 +- .../settings/billing/components/subscription-price.tsx | 4 ++-- packages/emails/src/components/email-layout.tsx | 2 +- packages/emails/src/components/notification-email.tsx | 2 +- packages/emails/src/templates/abandoned-checkout.tsx | 8 ++++---- packages/emails/src/templates/change-email-request.tsx | 2 +- packages/emails/src/templates/finalized-host.tsx | 2 +- packages/emails/src/templates/login.tsx | 6 +++--- packages/emails/src/templates/new-comment.tsx | 4 ++-- .../emails/src/templates/new-participant-confirmation.tsx | 6 +++--- packages/emails/src/templates/new-participant.tsx | 4 ++-- packages/emails/src/templates/new-poll.tsx | 4 ++-- packages/emails/src/templates/register.tsx | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/apps/web/public/locales/it/app.json b/apps/web/public/locales/it/app.json index 40fa491d7..7530ecfd5 100644 --- a/apps/web/public/locales/it/app.json +++ b/apps/web/public/locales/it/app.json @@ -92,7 +92,7 @@ "polls": "Sondaggi", "timeZoneSelect__noOption": "Nessuna opzione trovata", "timeZoneSelect__inputPlaceholder": "Ricerca…", - "poweredByRallly": "Powered by {{name}}", + "poweredByRallly": "Powered by {name}", "participants": "Partecipanti", "language": "Lingua", "languageDescription": "Cambia la tua lingua preferita", diff --git a/apps/web/src/app/[locale]/(space)/settings/billing/components/subscription-price.tsx b/apps/web/src/app/[locale]/(space)/settings/billing/components/subscription-price.tsx index ed456ad16..f83665c19 100644 --- a/apps/web/src/app/[locale]/(space)/settings/billing/components/subscription-price.tsx +++ b/apps/web/src/app/[locale]/(space)/settings/billing/components/subscription-price.tsx @@ -26,13 +26,13 @@ export function SubscriptionPrice({ {interval === "month" ? ( ) : ( )} diff --git a/packages/emails/src/components/email-layout.tsx b/packages/emails/src/components/email-layout.tsx index e8c6708ef..391bbf991 100644 --- a/packages/emails/src/components/email-layout.tsx +++ b/packages/emails/src/components/email-layout.tsx @@ -58,7 +58,7 @@ export const EmailLayout = ({ t={ctx.t} i18nKey="common_poweredBy" ns="emails" - defaults="Powered by {{domain}}" + defaults="Powered by {domain}" values={{ domain: "rallly.co" }} components={{ a: ( diff --git a/packages/emails/src/components/notification-email.tsx b/packages/emails/src/components/notification-email.tsx index 726473bc3..1f84e4e79 100644 --- a/packages/emails/src/components/notification-email.tsx +++ b/packages/emails/src/components/notification-email.tsx @@ -31,7 +31,7 @@ export const NotificationEmail = ({ diff --git a/packages/emails/src/templates/abandoned-checkout.tsx b/packages/emails/src/templates/abandoned-checkout.tsx index aebc92083..8d5addd5d 100644 --- a/packages/emails/src/templates/abandoned-checkout.tsx +++ b/packages/emails/src/templates/abandoned-checkout.tsx @@ -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 {{discount}}% off your first year with Rallly Pro. Simply use this code during checkout:" + defaults="To help you get started, I'd like to offer you {discount}% off your first year 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", })}`; diff --git a/packages/emails/src/templates/change-email-request.tsx b/packages/emails/src/templates/change-email-request.tsx index 8bfe368dc..dceb86e2e 100644 --- a/packages/emails/src/templates/change-email-request.tsx +++ b/packages/emails/src/templates/change-email-request.tsx @@ -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 {{fromEmail}} to {{toEmail}}." + defaults="We've received a request to change the email address for your account from {fromEmail} to {toEmail}." values={{ fromEmail, toEmail }} components={{ b: }} /> diff --git a/packages/emails/src/templates/finalized-host.tsx b/packages/emails/src/templates/finalized-host.tsx index dccb30aea..759e07f6b 100644 --- a/packages/emails/src/templates/finalized-host.tsx +++ b/packages/emails/src/templates/finalized-host.tsx @@ -58,7 +58,7 @@ const FinalizeHostEmail = ({ components={{ b: , }} - defaults="{{title}} has been booked for:" + defaults="{title} has been booked for:" />
diff --git a/packages/emails/src/templates/login.tsx b/packages/emails/src/templates/login.tsx index b7ced0a64..54e2b2f54 100644 --- a/packages/emails/src/templates/login.tsx +++ b/packages/emails/src/templates/login.tsx @@ -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 . If this wasn't you contact {{supportEmail}}." + defaults="You're receiving this email because a request was made to login to . If this wasn't you contact {supportEmail}." values={{ supportEmail: ctx.supportEmail }} components={{ domain: , @@ -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", }); diff --git a/packages/emails/src/templates/new-comment.tsx b/packages/emails/src/templates/new-comment.tsx index cfa7107e2..62d8d46b1 100644 --- a/packages/emails/src/templates/new-comment.tsx +++ b/packages/emails/src/templates/new-comment.tsx @@ -40,7 +40,7 @@ const NewCommentEmail = ({ i18n={ctx.i18n} ns="emails" i18nKey="newComment_content" - defaults="{{authorName}} has commented on {{title}}." + defaults="{authorName} has commented on {title}." components={{ b: , }} @@ -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, }); diff --git a/packages/emails/src/templates/new-participant-confirmation.tsx b/packages/emails/src/templates/new-participant-confirmation.tsx index 1aa27c4ab..f294a61d5 100644 --- a/packages/emails/src/templates/new-participant-confirmation.tsx +++ b/packages/emails/src/templates/new-participant-confirmation.tsx @@ -41,7 +41,7 @@ const NewParticipantConfirmationEmail = ({ i18n={ctx.i18n} t={ctx.t} i18nKey="newParticipantConfirmation_content" - defaults="Your response to {{title}} has been submitted." + defaults="Your response to {title} has been submitted." components={{ b: , }} @@ -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", }); diff --git a/packages/emails/src/templates/new-participant.tsx b/packages/emails/src/templates/new-participant.tsx index b0efa9a48..0b9f98409 100644 --- a/packages/emails/src/templates/new-participant.tsx +++ b/packages/emails/src/templates/new-participant.tsx @@ -39,7 +39,7 @@ const NewParticipantEmail = ({ t={ctx.t} i18nKey="newParticipant_content" ns="emails" - defaults="{{name}} has responded to {{title}}." + defaults="{name} has responded to {title}." components={{ b: , }} @@ -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", diff --git a/packages/emails/src/templates/new-poll.tsx b/packages/emails/src/templates/new-poll.tsx index de43f6a6d..a1d6055da 100644 --- a/packages/emails/src/templates/new-poll.tsx +++ b/packages/emails/src/templates/new-poll.tsx @@ -49,7 +49,7 @@ export const NewPollEmail = ({ components={{ b: , }} - defaults="Your meeting poll titled {{title}} is ready! Share it using the link below:" + defaults="Your meeting poll titled {title} is ready! Share it using the link below:" /> @@ -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", }); diff --git a/packages/emails/src/templates/register.tsx b/packages/emails/src/templates/register.tsx index 2b247c554..13a99f85e 100644 --- a/packages/emails/src/templates/register.tsx +++ b/packages/emails/src/templates/register.tsx @@ -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, })} >