Added translations for the mail types
This commit is contained in:
parent
2f06dbcb58
commit
e936870ebc
6
public/locales/en/mailTypes.json
Normal file
6
public/locales/en/mailTypes.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"ConfirmEmailAddress": "Confirm Email Address",
|
||||||
|
"DisableAuthenticator": "Disable Two Factor Authentication",
|
||||||
|
"PasswordReset": "Password Reset",
|
||||||
|
"PasswordResetCompleted": "Confirmation password reset"
|
||||||
|
}
|
||||||
6
public/locales/fr/mailTypes.json
Normal file
6
public/locales/fr/mailTypes.json
Normal file
@ -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"
|
||||||
|
}
|
||||||
@ -6,6 +6,7 @@ import { determineInitialLocale } from "../modules/frame/services/lanugageServic
|
|||||||
|
|
||||||
export const Namespaces = {
|
export const Namespaces = {
|
||||||
Common: "common",
|
Common: "common",
|
||||||
|
MailTypes: "mailTypes",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type Namespace = (typeof Namespaces)[keyof typeof Namespaces];
|
export type Namespace = (typeof Namespaces)[keyof typeof Namespaces];
|
||||||
|
|||||||
@ -3,6 +3,8 @@ import { useParams } from "react-router-dom";
|
|||||||
import mailTemplatesService from "../serrvices/mailTemplatesService";
|
import mailTemplatesService from "../serrvices/mailTemplatesService";
|
||||||
import HOCEmailTemplateEditor from "./EmailTemplateEditor";
|
import HOCEmailTemplateEditor from "./EmailTemplateEditor";
|
||||||
import Loading from "../../../../components/common/Loading";
|
import Loading from "../../../../components/common/Loading";
|
||||||
|
import { Namespaces } from "../../../../i18n/i18n";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface MailType {
|
interface MailType {
|
||||||
mailType: string;
|
mailType: string;
|
||||||
@ -10,6 +12,7 @@ interface MailType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MailTemplatesTab: React.FC = () => {
|
const MailTemplatesTab: React.FC = () => {
|
||||||
|
const { t: tMail } = useTranslation<typeof Namespaces.MailTypes>();
|
||||||
const [loaded, setLoaded] = useState(true);
|
const [loaded, setLoaded] = useState(true);
|
||||||
const [currentMailType, setCurrentMailType] = useState("");
|
const [currentMailType, setCurrentMailType] = useState("");
|
||||||
const [types, setTypes] = useState<MailType[]>([]);
|
const [types, setTypes] = useState<MailType[]>([]);
|
||||||
@ -62,7 +65,7 @@ const MailTemplatesTab: React.FC = () => {
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className={currentMailType === x.mailType ? "selected" : ""}
|
className={currentMailType === x.mailType ? "selected" : ""}
|
||||||
>
|
>
|
||||||
{x.description}
|
{tMail(x.mailType)}
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user