Skip to content

Commit

Permalink
Fix i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamahl19 committed Feb 1, 2024
1 parent c3a718c commit 5b6e3ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/features/auth/pages/ResetPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Success from '../components/Success';
import { useResetPasswordValidation, type ResetPasswordFields } from '../validations';

const ResetPassword = () => {
const { t } = useTranslation('auth');
const { t } = useTranslation(['global', 'auth']);

const [success, setSuccess] = useState(false);

Expand Down Expand Up @@ -58,14 +58,14 @@ const ResetPassword = () => {
if (success) {
return (
<Success
title={t('resetPassword.success.title')}
description={t('resetPassword.success.subTitle')}
title={t('auth:resetPassword.success.title')}
description={t('auth:resetPassword.success.subTitle')}
/>
);
}

return (
<FormWrapper title={t('resetPassword.title')}>
<FormWrapper title={t('auth:resetPassword.title')}>
<Form form={form} onSubmit={onSubmit} id="auth-form">
{{
formFields: (
Expand All @@ -74,7 +74,7 @@ const ResetPassword = () => {
name="email"
render={({ field }) => (
<FormItem>
<FormLabel>{t('resetPassword.email')}</FormLabel>
<FormLabel>{t('auth:resetPassword.email')}</FormLabel>
<FormControl>
<Input type="email" {...field} />
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type NoteProps = {
};

const Note = ({ bookId, initialNote }: NoteProps) => {
const { t } = useTranslation('bookshelf');
const { t } = useTranslation(['global', 'bookshelf']);

const { userId } = useAuth();

Expand All @@ -102,7 +102,7 @@ const Note = ({ bookId, initialNote }: NoteProps) => {
name="note"
render={({ field }) => (
<FormItem>
<FormLabel>{t('note')}</FormLabel>
<FormLabel>{t('bookshelf:note')}</FormLabel>
<FormControl>
<Textarea rows={10} {...field} />
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Separator } from '@/common/components/ui/separator';
import { useChangePasswordValidation, type ChangePasswordFields } from '../validations';

const ChangePassword = () => {
const { t } = useTranslation('profile');
const { t } = useTranslation(['global', 'profile']);

const { userId } = useAuth();

Expand All @@ -44,7 +44,7 @@ const ChangePassword = () => {
{
onSuccess: () => {
form.reset();
toast.success(t('changePassword.success'));
toast.success(t('profile:changePassword.success'));
},
onError,
},
Expand All @@ -54,7 +54,7 @@ const ChangePassword = () => {

return (
<>
<Typography variant="h4">{t('changePassword.title')}</Typography>
<Typography variant="h4">{t('profile:changePassword.title')}</Typography>

<Separator className="my-4" />

Expand All @@ -66,7 +66,7 @@ const ChangePassword = () => {
name="password"
render={({ field }) => (
<FormItem>
<FormLabel>{t('changePassword.password')}</FormLabel>
<FormLabel>{t('profile:changePassword.password')}</FormLabel>
<FormControl>
<Input type="password" {...field} />
</FormControl>
Expand Down

0 comments on commit 5b6e3ca

Please sign in to comment.