Skip to content

Commit

Permalink
feat: Replace translation + adapt FiledPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikola LEGAY authored and Nikola LEGAY committed Jul 24, 2024
1 parent 0e2e972 commit 2cc90a3
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/components/Form/FieldPassword/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const FieldPassword = <
>(
props: FieldPasswordProps<TFieldValues, TName>
) => {
const { t } = useTranslation();
const { t } = useTranslation(['common', 'components']);
const [showPassword, setShowPassword] = useState(false);
return (
<Controller
Expand All @@ -60,8 +60,8 @@ export const FieldPassword = <
onClick={() => setShowPassword((x) => !x)}
aria-label={
showPassword
? t('password.hide', 'Hide password')
: t('password.show', 'Show password')
? t('components:fieldPassword.passwordHide')
: t('components:fieldPassword.passwordShow')
}
display="flex"
size="xs"
Expand Down
4 changes: 0 additions & 4 deletions src/locales/ar/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@
},
"description": "لقد أرسلنا رمزًا مكونًا من 6 أحرف إلى <b>{{email}}</b> وتنتهي صلاحية الرمز قريبًا ({{expiration}} دقيقة).",
"title": "تحقق من صندوق الوارد الخاص بك للحصول على الرمز"
},
"password": {
"show": "عرض كلمة المرور",
"hide": "إخفاء كلمة المرور"
}
}
4 changes: 4 additions & 0 deletions src/locales/ar/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,9 @@
},
"formField": {
"optional": "خياري"
},
"fieldPassword": {
"passwordShow": "عرض كلمة المرور",
"passwordHide": "إخفاء كلمة المرور"
}
}
4 changes: 0 additions & 4 deletions src/locales/en/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@
"language": {
"label": "Language"
}
},
"password": {
"show": "Show password",
"hide": "Hide password"
}
}
4 changes: 4 additions & 0 deletions src/locales/en/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,9 @@
"november": "November",
"december": "December"
}
},
"fieldPassword": {
"passwordShow": "Show password",
"passwordHide": "Hide password"
}
}
4 changes: 0 additions & 4 deletions src/locales/fr/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@
},
"description": "Nous avons envoyé un code à 6 caractères à <b>{{email}}</b> Le code expire sous peu ({{expiration}} minutes).",
"title": "Vérifiez votre boîte de réception pour le code"
},
"password": {
"show": "Afficher le mot de passe",
"hide": "Masquer le mot de passe"
}
}
4 changes: 4 additions & 0 deletions src/locales/fr/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,9 @@
},
"formField": {
"optional": "Facultatif"
},
"fieldPassword": {
"passwordShow": "Afficher le mot de passe",
"passwordHide": "Masquer le mot de passe"
}
}
4 changes: 0 additions & 4 deletions src/locales/sw/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@
},
"description": "Tumetuma msimbo wa herufi 6 kwa <b>{{email}}</b> Nambari hii itaisha muda mfupi (dakika {{expiration}}).",
"title": "Angalia kisanduku pokezi chako kwa msimbo"
},
"password": {
"show": "Onyesha nenosiri",
"hide": "Ficha nenosiri"
}
}
4 changes: 4 additions & 0 deletions src/locales/sw/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,9 @@
},
"formField": {
"optional": "Hiari"
},
"fieldPassword": {
"passwordShow": "Onyesha nenosiri",
"passwordHide": "Ficha nenosiri"
}
}

0 comments on commit 2cc90a3

Please sign in to comment.