mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-01 10:11:50 +02:00
♻️ Disable escaped characters in emails (#1369)
This commit is contained in:
parent
5b96ad8778
commit
d550f53b72
6 changed files with 6 additions and 20 deletions
|
@ -1,3 +1,4 @@
|
|||
import type { InitOptions } from "i18next";
|
||||
import { createInstance } from "i18next";
|
||||
import resourcesToBackend from "i18next-resources-to-backend";
|
||||
import { initReactI18next } from "react-i18next/initReactI18next";
|
||||
|
@ -13,12 +14,15 @@ i18nInstance
|
|||
),
|
||||
);
|
||||
|
||||
const i18nDefaultConfig = {
|
||||
const i18nDefaultConfig: InitOptions = {
|
||||
lng: "en",
|
||||
fallbackLng: "en",
|
||||
ns: ["emails"],
|
||||
fallbackNS: "emails",
|
||||
defaultNS: "emails",
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export type I18nInstance = typeof i18nInstance;
|
||||
|
|
|
@ -39,6 +39,7 @@ const FinalizeHostEmail = ({
|
|||
ns: "emails",
|
||||
defaultValue:
|
||||
"Final date booked! We've notified participants and sent them calendar invites.",
|
||||
title,
|
||||
})}
|
||||
>
|
||||
<Heading>
|
||||
|
@ -54,7 +55,6 @@ const FinalizeHostEmail = ({
|
|||
i18nKey="finalizeHost_content"
|
||||
ns="emails"
|
||||
values={{ title }}
|
||||
shouldUnescape={true}
|
||||
components={{
|
||||
b: <strong />,
|
||||
}}
|
||||
|
@ -126,9 +126,6 @@ FinalizeHostEmail.getSubject = (
|
|||
defaultValue: "Date booked for {{title}}",
|
||||
title: props.title,
|
||||
ns: "emails",
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ const FinalizeParticipantEmail = ({
|
|||
ns="emails"
|
||||
defaults="<b>{{hostName}}</b> has booked <b>{{title}}</b> for the following date:"
|
||||
values={{ hostName, title }}
|
||||
shouldUnescape={true}
|
||||
components={{
|
||||
b: <strong />,
|
||||
}}
|
||||
|
@ -118,9 +117,6 @@ FinalizeParticipantEmail.getSubject = (
|
|||
defaultValue: "Date booked for {{title}}",
|
||||
title: props.title,
|
||||
ns: "emails",
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ const NewCommentEmail = ({
|
|||
ns="emails"
|
||||
i18nKey="newComment_content"
|
||||
defaults="<b>{{authorName}}</b> has commented on <b>{{title}}</b>."
|
||||
shouldUnescape={true}
|
||||
components={{
|
||||
b: <strong />,
|
||||
}}
|
||||
|
@ -65,9 +64,6 @@ NewCommentEmail.getSubject = (
|
|||
defaultValue: "{{authorName}} has commented on {{title}}",
|
||||
authorName: props.authorName,
|
||||
title: props.title,
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -69,9 +69,6 @@ NewParticipantEmail.getSubject = (
|
|||
name: props.participantName,
|
||||
title: props.title,
|
||||
ns: "emails",
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ export const NewPollEmail = ({
|
|||
i18nKey="newPoll_content"
|
||||
ns="emails"
|
||||
values={{ title }}
|
||||
shouldUnescape={true}
|
||||
components={{
|
||||
b: <strong />,
|
||||
}}
|
||||
|
@ -72,9 +71,6 @@ NewPollEmail.getSubject = (props: NewPollEmailProps, ctx: EmailContext) => {
|
|||
return ctx.t("newPoll_subject", {
|
||||
defaultValue: "Let's find a date for {{title}}!",
|
||||
title: props.title,
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
ns: "emails",
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue