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)} ); })}