Skip to content

Commit

Permalink
fix trans (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
younes200 authored Nov 20, 2023
1 parent 50dc5f6 commit aa27e7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
14 changes: 6 additions & 8 deletions apps/frontend/src/components/settings/EditProfileTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export default function EditProfileTabForm({
return (
<SettingsTabPanel value={value} index={index}>
<form onSubmit={formik.handleSubmit}>
<Typography variant="h5">
<Trans i18nKey="profile.update.title">Modifier le profil</Trans>
</Typography>
<Typography variant="h5">{t("profile.update.title")}</Typography>

{formik.errors.error ? (
<Alert severity="error" sx={{ borderRadius: 0, mt: 0 }}>
Expand Down Expand Up @@ -121,7 +119,7 @@ export default function EditProfileTabForm({
id="username"
name="username"
value={formik.values.username}
placeholder={t("profile.update.username") || ""}
placeholder={t("profile.update.username")}
onChange={formik.handleChange}
disabled={formik.isSubmitting}
inputProps={{
Expand All @@ -139,7 +137,7 @@ export default function EditProfileTabForm({
id="firstname"
name="firstname"
value={formik.values.firstname}
placeholder={t("profile.update.firstname") || ""}
placeholder={t("profile.update.firstname")}
onChange={formik.handleChange}
disabled={formik.isSubmitting}
inputProps={{
Expand All @@ -157,7 +155,7 @@ export default function EditProfileTabForm({
id="lastname"
name="lastname"
value={formik.values.lastname}
placeholder={t("profile.update.lastname") || ""}
placeholder={t("profile.update.lastname")}
onChange={formik.handleChange}
disabled={formik.isSubmitting}
inputProps={{
Expand All @@ -175,7 +173,7 @@ export default function EditProfileTabForm({
id="bio"
name="bio"
value={formik.values.bio}
placeholder={t("profile.update.bio") || ""}
placeholder={t("profile.update.bio")}
onChange={formik.handleChange}
disabled={formik.isSubmitting}
inputProps={{
Expand All @@ -202,7 +200,7 @@ export default function EditProfileTabForm({
disabled={mutation.isLoading}
sx={{ textTransform: "uppercase" }}
>
<Trans i18nKey={"profile.update.submit"}>Enregistrer</Trans>
{t("profile.update.submit")}
</LoadingButton>
</form>
</SettingsTabPanel>
Expand Down
10 changes: 3 additions & 7 deletions apps/frontend/src/components/settings/SecurityTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function SecurityTabForm({
console.log(e.message);
formik.setFieldError(
"error",
t("profile.security.password-incorrect", "Mot de passe incorrect")
t("profile.security.password-incorrect")
);
} else {
formik.setFieldError("error", e.message);
Expand All @@ -87,9 +87,7 @@ export default function SecurityTabForm({
<SettingsTabPanel value={value} index={index}>
<form onSubmit={formik.handleSubmit}>
<Typography variant="h5">
<Trans i18nKey="profile.security.change-password.title">
Changement de mot de passe
</Trans>
{t("profile.security.change-password.title")}
</Typography>

{formik.errors.error ? (
Expand Down Expand Up @@ -186,9 +184,7 @@ export default function SecurityTabForm({
loading={mutation.isLoading}
disabled={mutation.isLoading}
>
<Trans i18nKey="profile.security.change-password.button">
Changer le mot de passe
</Trans>
{t("profile.security.change-password.button")}
</LoadingButton>
</form>
</SettingsTabPanel>
Expand Down
Loading

0 comments on commit aa27e7f

Please sign in to comment.