From e936870ebc20796b3c131e54a8583ef7d2a4c778 Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Mon, 2 Feb 2026 12:52:09 +0000 Subject: [PATCH] Added translations for the mail types --- public/locales/en/mailTypes.json | 6 ++++++ public/locales/fr/mailTypes.json | 6 ++++++ src/i18n/i18n.ts | 1 + src/modules/manager/domains/components/MailTemplatesTab.tsx | 5 ++++- 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 public/locales/en/mailTypes.json create mode 100644 public/locales/fr/mailTypes.json diff --git a/public/locales/en/mailTypes.json b/public/locales/en/mailTypes.json new file mode 100644 index 0000000..2cd2b8f --- /dev/null +++ b/public/locales/en/mailTypes.json @@ -0,0 +1,6 @@ +{ + "ConfirmEmailAddress": "Confirm Email Address", + "DisableAuthenticator": "Disable Two Factor Authentication", + "PasswordReset": "Password Reset", + "PasswordResetCompleted": "Confirmation password reset" +} diff --git a/public/locales/fr/mailTypes.json b/public/locales/fr/mailTypes.json new file mode 100644 index 0000000..a1625ca --- /dev/null +++ b/public/locales/fr/mailTypes.json @@ -0,0 +1,6 @@ +{ + "ConfirmEmailAddress": "Confirmer l’adresse e‑mail", + "DisableAuthenticator": "Désactiver l’authentification à deux facteurs", + "PasswordReset": "Réinitialisation du mot de passe", + "PasswordResetCompleted": "Confirmation de la réinitialisation du mot de passe" +} diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 2bf3363..c653c24 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -6,6 +6,7 @@ import { determineInitialLocale } from "../modules/frame/services/lanugageServic export const Namespaces = { Common: "common", + MailTypes: "mailTypes", } as const; export type Namespace = (typeof Namespaces)[keyof typeof Namespaces]; diff --git a/src/modules/manager/domains/components/MailTemplatesTab.tsx b/src/modules/manager/domains/components/MailTemplatesTab.tsx index a96c46c..74b4196 100644 --- a/src/modules/manager/domains/components/MailTemplatesTab.tsx +++ b/src/modules/manager/domains/components/MailTemplatesTab.tsx @@ -3,6 +3,8 @@ import { useParams } from "react-router-dom"; import mailTemplatesService from "../serrvices/mailTemplatesService"; import HOCEmailTemplateEditor from "./EmailTemplateEditor"; import Loading from "../../../../components/common/Loading"; +import { Namespaces } from "../../../../i18n/i18n"; +import { useTranslation } from "react-i18next"; interface MailType { mailType: string; @@ -10,6 +12,7 @@ interface MailType { } const MailTemplatesTab: React.FC = () => { + const { t: tMail } = useTranslation(); const [loaded, setLoaded] = useState(true); const [currentMailType, setCurrentMailType] = useState(""); const [types, setTypes] = useState([]); @@ -62,7 +65,7 @@ const MailTemplatesTab: React.FC = () => { onClick={onClick} className={currentMailType === x.mailType ? "selected" : ""} > - {x.description} + {tMail(x.mailType)} ); })}