Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

refactor(auth, i18n): extracted hard coded text for i18n (#205)

Corentin Thomassetd4462f942be0
diff --git a/apps/papra-client/src/locales/en.yml b/apps/papra-client/src/locales/en.yml
index 7471424c..71f827fa 100644
--- a/apps/papra-client/src/locales/en.yml
+++ b/apps/papra-client/src/locales/en.yml
@@ -1,10 +1,87 @@
auth:
+ request-password-reset:
+ title: Reset your password
+ description: Enter your email to reset your password.
+ requested: If an account exists for this email, we've sent you an email to reset your password.
+ back-to-login: Back to login
+ form:
+ email:
+ label: Email
+ placeholder: 'Example: [email protected]'
+ required: Please enter your email address
+ invalid: This email address is invalid
+ submit: Request password reset
+
+ reset-password:
+ title: Reset your password
+ description: Enter your new password to reset your password.
+ reset: Your password has been reset.
+ back-to-login: Back to login
+ form:
+ new-password:
+ label: New password
+ placeholder: 'Example: **********'
+ required: Please enter your new password
+ min-length: Password must be at least {{ minLength }} characters
+ max-length: Password must be less than {{ maxLength }} characters
+ submit: Reset password
+
+ email-provider:
+ open: Open {{ provider }}
+
login:
title: Login to Papra
description: Enter your email or use social login to access your Papra account.
login-with-provider: Login with {{ provider }}
no-account: Don't have an account?
register: Register
+ form:
+ email:
+ label: Email
+ placeholder: 'Example: [email protected]'
+ required: Please enter your email address
+ invalid: This email address is invalid
+ password:
+ label: Password
+ placeholder: Set a password
+ required: Please enter your password
+ remember-me:
+ label: Remember me
+ forgot-password:
+ label: Forgot password?
+ submit: Login
+
+ register:
+ title: Register to Papra
+ description: Enter your email or use social login to access your Papra account.
+ register-with-email: Register with email
+ register-with-provider: Register with {{ provider }}
+ providers:
+ google: Google
+ github: GitHub
+ have-account: Already have an account?
+ login: Login
+ registration-disabled:
+ title: Registration is disabled
+ description: The creation of new accounts is currently disabled on this instance of Papra. Only users with existing accounts can log in. If you think this is a mistake, please contact the administrator of this instance.
+ form:
+ email:
+ label: Email
+ placeholder: 'Example: [email protected]'
+ required: Please enter your email address
+ invalid: This email address is invalid
+ password:
+ label: Password
+ placeholder: Set a password
+ required: Please enter your password
+ min-length: Password must be at least {{ minLength }} characters
+ max-length: Password must be less than {{ maxLength }} characters
+ name:
+ label: Name
+ placeholder: 'Example: Ada Lovelace'
+ required: Please enter your name
+ max-length: Name must be less than {{ maxLength }} characters
+ submit: Register
email-validation-required:
title: Verify your email
description: A verification email has been sent to your email address. Please verify your email address by clicking the link in the email.
diff --git a/apps/papra-client/src/modules/auth/components/open-email-provider.component.tsx b/apps/papra-client/src/modules/auth/components/open-email-provider.component.tsx
index 0c95532d..4629dc0d 100644
--- a/apps/papra-client/src/modules/auth/components/open-email-provider.component.tsx
+++ b/apps/papra-client/src/modules/auth/components/open-email-provider.component.tsx
@@ -1,3 +1,4 @@
+import { useI18n } from '@/modules/i18n/i18n.provider';
import { cn } from '@/modules/shared/style/cn';
import { Button } from '@/modules/ui/components/button';
import { type Component, type ComponentProps, splitProps } from 'solid-js';
@@ -246,6 +247,7 @@ export function getEmailProvider({ email }: { email?: string }) {
export const OpenEmailProvider: Component<{ email?: string } & ComponentProps<typeof Button>> = (props) => {
const [local, rest] = splitProps(props, ['email', 'class']);
+ const { t } = useI18n();
const { provider } = getEmailProvider({ email: local.email });
@@ -256,9 +258,7 @@ export const OpenEmailProvider: Component<{ email?: string } & ComponentProps<ty
return (
<Button as="a" href={provider.url} target="_blank" rel="noopener noreferrer" class={cn('w-full', local.class)} {...rest}>
<div class="i-tabler-external-link mr-2 size-4" />
- Open
- {' '}
- {provider.name}
+ {t('auth.email-provider.open', { provider: provider.name })}
</Button>
);
};
diff --git a/apps/papra-client/src/modules/auth/pages/login.page.tsx b/apps/papra-client/src/modules/auth/pages/login.page.tsx
index 6ce98a6b..4de8411e 100644
--- a/apps/papra-client/src/modules/auth/pages/login.page.tsx
+++ b/apps/papra-client/src/modules/auth/pages/login.page.tsx
@@ -18,6 +18,7 @@ import { SsoProviderButton } from '../components/sso-provider-button.component';
export const EmailLoginForm: Component = () => {
const navigate = useNavigate();
const { config } = useConfig();
+ const { t } = useI18n();
const { form, Form, Field } = createForm({
onSubmit: async ({ email, password, rememberMe }) => {
@@ -35,12 +36,12 @@ export const EmailLoginForm: Component = () => {
email: v.pipe(
v.string(),
v.trim(),
- v.nonEmpty('Please enter your email address'),
- v.email('This is not a valid email address'),
+ v.nonEmpty(t('auth.login.form.email.required')),
+ v.email(t('auth.login.form.email.invalid')),
),
password: v.pipe(
- v.string('Password is required'),
- v.nonEmpty('Please enter your password'),
+ v.string(t('auth.login.form.password.required')),
+ v.nonEmpty(t('auth.login.form.password.required')),
),
rememberMe: v.boolean(),
}),
@@ -54,8 +55,8 @@ export const EmailLoginForm: Component = () => {
<Field name="email">
{(field, inputProps) => (
<TextFieldRoot class="flex flex-col gap-1 mb-4">
- <TextFieldLabel for="email">Email</TextFieldLabel>
- <TextField type="email" id="email" placeholder="Eg. [email protected]" {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
+ <TextFieldLabel for="email">{t('auth.login.form.email.label')}</TextFieldLabel>
+ <TextField type="email" id="email" placeholder={t('auth.login.form.email.placeholder')} {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
{field.error && <div class="text-red-500 text-sm">{field.error}</div>}
</TextFieldRoot>
)}
@@ -64,9 +65,9 @@ export const EmailLoginForm: Component = () => {
<Field name="password">
{(field, inputProps) => (
<TextFieldRoot class="flex flex-col gap-1 mb-4">
- <TextFieldLabel for="password">Password</TextFieldLabel>
+ <TextFieldLabel for="password">{t('auth.login.form.password.label')}</TextFieldLabel>
- <TextField type="password" id="password" placeholder="Your password" {...inputProps} value={field.value} aria-invalid={Boolean(field.error)} />
+ <TextField type="password" id="password" placeholder={t('auth.login.form.password.placeholder')} {...inputProps} value={field.value} aria-invalid={Boolean(field.error)} />
{field.error && <div class="text-red-500 text-sm">{field.error}</div>}
</TextFieldRoot>
)}
@@ -78,18 +79,18 @@ export const EmailLoginForm: Component = () => {
<Checkbox class="flex items-center gap-2" defaultChecked={field.value}>
<CheckboxControl inputProps={inputProps} />
<CheckboxLabel class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
- Remember me
+ {t('auth.login.form.remember-me.label')}
</CheckboxLabel>
</Checkbox>
)}
</Field>
<Button variant="link" as={A} class="inline p-0! h-auto" href="/request-password-reset">
- Forgot password?
+ {t('auth.login.form.forgot-password.label')}
</Button>
</div>
- <Button type="submit" class="w-full">Login</Button>
+ <Button type="submit" class="w-full">{t('auth.login.form.submit')}</Button>
<div class="text-red-500 text-sm mt-4">{form.response.message}</div>
diff --git a/apps/papra-client/src/modules/auth/pages/register.page.tsx b/apps/papra-client/src/modules/auth/pages/register.page.tsx
index 4275ca9e..7067a3b5 100644
--- a/apps/papra-client/src/modules/auth/pages/register.page.tsx
+++ b/apps/papra-client/src/modules/auth/pages/register.page.tsx
@@ -1,5 +1,6 @@
import type { ssoProviders } from '../auth.constants';
import { useConfig } from '@/modules/config/config.provider';
+import { useI18n } from '@/modules/i18n/i18n.provider';
import { createForm } from '@/modules/shared/form/form';
import { Button } from '@/modules/ui/components/button';
import { Separator } from '@/modules/ui/components/separator';
@@ -16,7 +17,7 @@ import { SsoProviderButton } from '../components/sso-provider-button.component';
export const EmailRegisterForm: Component = () => {
const { config } = useConfig();
const navigate = useNavigate();
-
+ const { t } = useI18n();
const { form, Form, Field } = createForm({
onSubmit: async ({ email, password, name }) => {
const { error } = await signUp.email({
@@ -41,19 +42,19 @@ export const EmailRegisterForm: Component = () => {
email: v.pipe(
v.string(),
v.trim(),
- v.nonEmpty('Please enter an email address'),
- v.email('This is not a valid email address'),
+ v.nonEmpty(t('auth.register.form.email.required')),
+ v.email(t('auth.register.form.email.invalid')),
),
password: v.pipe(
- v.string('Password is required'),
- v.nonEmpty('Please enter a password'),
- v.minLength(8, 'Password must be at least 8 characters'),
- v.maxLength(128, 'Password must be at most 128 characters'),
+ v.string(),
+ v.nonEmpty(t('auth.register.form.password.required')),
+ v.minLength(8, t('auth.register.form.password.min-length', { minLength: 8 })),
+ v.maxLength(128, t('auth.register.form.password.max-length', { maxLength: 128 })),
),
name: v.pipe(
- v.string('Name is required'),
- v.nonEmpty('Please enter a name'),
- v.maxLength(64, 'Name must be at most 64 characters'),
+ v.string(t('auth.register.form.name.label')),
+ v.nonEmpty(t('auth.register.form.name.required')),
+ v.maxLength(64, t('auth.register.form.name.max-length', { maxLength: 64 })),
),
}),
});
@@ -63,8 +64,8 @@ export const EmailRegisterForm: Component = () => {
<Field name="email">
{(field, inputProps) => (
<TextFieldRoot class="flex flex-col gap-1 mb-4">
- <TextFieldLabel for="email">Email</TextFieldLabel>
- <TextField type="email" id="email" placeholder="Eg. [email protected]" {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
+ <TextFieldLabel for="email">{t('auth.register.form.email.label')}</TextFieldLabel>
+ <TextField type="email" id="email" placeholder={t('auth.register.form.email.placeholder')} {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
{field.error && <div class="text-red-500 text-sm">{field.error}</div>}
</TextFieldRoot>
)}
@@ -73,8 +74,8 @@ export const EmailRegisterForm: Component = () => {
<Field name="name">
{(field, inputProps) => (
<TextFieldRoot class="flex flex-col gap-1 mb-4">
- <TextFieldLabel for="name">Your full name</TextFieldLabel>
- <TextField type="text" id="name" placeholder="Eg. Ada Lovelace" {...inputProps} value={field.value} aria-invalid={Boolean(field.error)} />
+ <TextFieldLabel for="name">{t('auth.register.form.name.label')}</TextFieldLabel>
+ <TextField type="text" id="name" placeholder={t('auth.register.form.name.placeholder')} {...inputProps} value={field.value} aria-invalid={Boolean(field.error)} />
{field.error && <div class="text-red-500 text-sm">{field.error}</div>}
</TextFieldRoot>
)}
@@ -83,15 +84,15 @@ export const EmailRegisterForm: Component = () => {
<Field name="password">
{(field, inputProps) => (
<TextFieldRoot class="flex flex-col gap-1 mb-4">
- <TextFieldLabel for="password">Password</TextFieldLabel>
+ <TextFieldLabel for="password">{t('auth.register.form.password.label')}</TextFieldLabel>
- <TextField type="password" id="password" placeholder="Your password" {...inputProps} value={field.value} aria-invalid={Boolean(field.error)} />
+ <TextField type="password" id="password" placeholder={t('auth.register.form.password.placeholder')} {...inputProps} value={field.value} aria-invalid={Boolean(field.error)} />
{field.error && <div class="text-red-500 text-sm">{field.error}</div>}
</TextFieldRoot>
)}
</Field>
- <Button type="submit" class="w-full">Register</Button>
+ <Button type="submit" class="w-full">{t('auth.register.form.submit')}</Button>
<div class="text-red-500 text-sm mt-4">{form.response.message}</div>
@@ -101,6 +102,7 @@ export const EmailRegisterForm: Component = () => {
export const RegisterPage: Component = () => {
const { config } = useConfig();
+ const { t } = useI18n();
if (!config.auth.isRegistrationEnabled) {
return (
@@ -108,17 +110,17 @@ export const RegisterPage: Component = () => {
<div class="flex items-center justify-center h-full p-6 sm:pb-32">
<div class="max-w-sm w-full">
<h1 class="text-xl font-bold">
- Registration is disabled
+ {t('auth.register.registration-disabled.title')}
</h1>
<p class="text-muted-foreground mt-1 mb-4">
- The creation of new accounts is currently disabled on this instance of Papra. Only users with existing accounts can log in. If you think this is a mistake, please contact the administrator of this instance.
+ {t('auth.register.registration-disabled.description')}
</p>
<p class="text-muted-foreground mt-4">
- Already have an account?
+ {t('auth.register.have-account')}
{' '}
<Button variant="link" as={A} class="inline px-0" href="/login">
- Login
+ {t('auth.register.login')}
</Button>
</p>
@@ -141,10 +143,10 @@ export const RegisterPage: Component = () => {
<div class="flex items-center justify-center h-full p-6 sm:pb-32">
<div class="max-w-sm w-full">
<h1 class="text-xl font-bold">
- Register to Papra
+ {t('auth.register.title')}
</h1>
<p class="text-muted-foreground mt-1 mb-4">
- Enter your email or use social login to create your Papra account.
+ {t('auth.register.description')}
</p>
{getShowEmailRegister() || !getHasSsoProviders()
@@ -152,7 +154,7 @@ export const RegisterPage: Component = () => {
: (
<Button onClick={() => setShowEmailRegister(true)} class="w-full">
<div class="i-tabler-mail mr-2 size-4.5" />
- Register with email
+ {t('auth.register.register-with-email')}
</Button>
)}
@@ -162,17 +164,22 @@ export const RegisterPage: Component = () => {
<div class="flex flex-col gap-2">
<For each={getEnabledSsoProviderConfigs({ config })}>
{provider => (
- <SsoProviderButton name={provider.name} icon={provider.icon} onClick={() => registerWithProvider(provider)} label={`Register with ${provider.name}`} />
+ <SsoProviderButton
+ name={provider.name}
+ icon={provider.icon}
+ onClick={() => registerWithProvider(provider)}
+ label={t('auth.register.register-with-provider', { provider: t(`auth.register.providers.${provider.key}`) })}
+ />
)}
</For>
</div>
</Show>
<p class="text-muted-foreground mt-4">
- Already have an account?
+ {t('auth.register.have-account')}
{' '}
<Button variant="link" as={A} class="inline px-0" href="/login">
- Login
+ {t('auth.register.login')}
</Button>
</p>
diff --git a/apps/papra-client/src/modules/auth/pages/request-password-reset.page.tsx b/apps/papra-client/src/modules/auth/pages/request-password-reset.page.tsx
index c0a0e5d3..5d87d027 100644
--- a/apps/papra-client/src/modules/auth/pages/request-password-reset.page.tsx
+++ b/apps/papra-client/src/modules/auth/pages/request-password-reset.page.tsx
@@ -1,4 +1,5 @@
import { useConfig } from '@/modules/config/config.provider';
+import { useI18n } from '@/modules/i18n/i18n.provider';
import { createForm } from '@/modules/shared/form/form';
import { Button } from '@/modules/ui/components/button';
import { TextField, TextFieldLabel, TextFieldRoot } from '@/modules/ui/components/textfield';
@@ -11,14 +12,16 @@ import { forgetPassword } from '../auth.services';
import { OpenEmailProvider } from '../components/open-email-provider.component';
export const ResetPasswordForm: Component<{ onSubmit: (args: { email: string }) => Promise<void> }> = (props) => {
+ const { t } = useI18n();
+
const { form, Form, Field } = createForm({
onSubmit: props.onSubmit,
schema: v.object({
email: v.pipe(
v.string(),
v.trim(),
- v.nonEmpty('Please enter your email address'),
- v.email('This is not a valid email address'),
+ v.nonEmpty(t('auth.request-password-reset.form.email.required')),
+ v.email(t('auth.request-password-reset.form.email.invalid')),
),
}),
});
@@ -28,15 +31,15 @@ export const ResetPasswordForm: Component<{ onSubmit: (args: { email: string })
<Field name="email">
{(field, inputProps) => (
<TextFieldRoot class="flex flex-col gap-1 mb-4">
- <TextFieldLabel for="email">Email</TextFieldLabel>
- <TextField type="email" id="email" placeholder="Eg. [email protected]" {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
+ <TextFieldLabel for="email">{t('auth.request-password-reset.form.email.label')}</TextFieldLabel>
+ <TextField type="email" id="email" placeholder={t('auth.request-password-reset.form.email.placeholder')} {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
{field.error && <div class="text-red-500 text-sm">{field.error}</div>}
</TextFieldRoot>
)}
</Field>
<Button type="submit" class="w-full">
- Request password reset
+ {t('auth.request-password-reset.form.submit')}
</Button>
<div class="text-red-500 text-sm mt-2">{form.response.message}</div>
@@ -49,6 +52,7 @@ export const RequestPasswordResetPage: Component = () => {
const [getHasPasswordResetBeenRequested, setHasPasswordResetBeenRequested] = createSignal(false);
const [getEmail, setEmail] = createSignal<string | undefined>(undefined);
+ const { t } = useI18n();
const { config } = useConfig();
const navigate = useNavigate();
@@ -80,14 +84,14 @@ export const RequestPasswordResetPage: Component = () => {
<div class="flex items-center justify-center p-6 sm:pb-32">
<div class="max-w-sm w-full">
<h1 class="text-xl font-bold">
- Reset your password
+ {t('auth.request-password-reset.title')}
</h1>
{getHasPasswordResetBeenRequested()
? (
<>
<div class="text-muted-foreground mt-1 mb-4">
- If an account exists for this email, we've sent you an email to reset your password.
+ {t('auth.request-password-reset.requested')}
</div>
<OpenEmailProvider email={getEmail()} variant="secondary" class="w-full mb-4" />
@@ -96,7 +100,7 @@ export const RequestPasswordResetPage: Component = () => {
: (
<>
<p class="text-muted-foreground mt-1 mb-4">
- Enter your email to reset your password.
+ {t('auth.request-password-reset.description')}
</p>
<ResetPasswordForm onSubmit={onPasswordResetRequested} />
@@ -105,7 +109,7 @@ export const RequestPasswordResetPage: Component = () => {
<Button as={A} href="/login" class="w-full" variant={getHasPasswordResetBeenRequested() ? 'default' : 'ghost'}>
<div class="i-tabler-arrow-left mr-2 size-4" />
- Back to login
+ {t('auth.request-password-reset.back-to-login')}
</Button>
</div>
</div>
diff --git a/apps/papra-client/src/modules/auth/pages/reset-password.page.tsx b/apps/papra-client/src/modules/auth/pages/reset-password.page.tsx
index 713a8a60..4c51768b 100644
--- a/apps/papra-client/src/modules/auth/pages/reset-password.page.tsx
+++ b/apps/papra-client/src/modules/auth/pages/reset-password.page.tsx
@@ -1,4 +1,5 @@
import { useConfig } from '@/modules/config/config.provider';
+import { useI18n } from '@/modules/i18n/i18n.provider';
import { createForm } from '@/modules/shared/form/form';
import { Button } from '@/modules/ui/components/button';
import { TextField, TextFieldLabel, TextFieldRoot } from '@/modules/ui/components/textfield';
@@ -10,14 +11,16 @@ import { AuthLayout } from '../../ui/layouts/auth-layout.component';
import { resetPassword } from '../auth.services';
export const ResetPasswordForm: Component<{ onSubmit: (args: { newPassword: string }) => Promise<void> }> = (props) => {
+ const { t } = useI18n();
+
const { form, Form, Field } = createForm({
onSubmit: props.onSubmit,
schema: v.object({
newPassword: v.pipe(
v.string(),
- v.nonEmpty('Please enter your new password'),
- v.minLength(8, 'Password must be at least 8 characters long'),
- v.maxLength(128, 'Password must be at most 128 characters long'),
+ v.nonEmpty(t('auth.reset-password.form.new-password.required')),
+ v.minLength(8, t('auth.reset-password.form.new-password.min-length', { minLength: 8 })),
+ v.maxLength(128, t('auth.reset-password.form.new-password.max-length', { maxLength: 128 })),
),
}),
});
@@ -27,15 +30,15 @@ export const ResetPasswordForm: Component<{ onSubmit: (args: { newPassword: stri
<Field name="newPassword">
{(field, inputProps) => (
<TextFieldRoot class="flex flex-col gap-1 mb-4">
- <TextFieldLabel for="newPassword">New password</TextFieldLabel>
- <TextField type="password" id="newPassword" placeholder="Your new password" {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
+ <TextFieldLabel for="newPassword">{t('auth.reset-password.form.new-password.label')}</TextFieldLabel>
+ <TextField type="password" id="newPassword" placeholder={t('auth.reset-password.form.new-password.placeholder')} {...inputProps} autoFocus value={field.value} aria-invalid={Boolean(field.error)} />
{field.error && <div class="text-red-500 text-sm">{field.error}</div>}
</TextFieldRoot>
)}
</Field>
<Button type="submit" class="w-full">
- Reset password
+ {t('auth.reset-password.form.submit')}
</Button>
<div class="text-red-500 text-sm mt-2">{form.response.message}</div>
@@ -49,6 +52,8 @@ export const ResetPasswordPage: Component = () => {
const [searchParams] = useSearchParams();
const token = searchParams.token;
+ const { t } = useI18n();
+
if (!token || typeof token !== 'string') {
return <Navigate href="/login" />;
}
@@ -80,18 +85,18 @@ export const ResetPasswordPage: Component = () => {
<div class="flex items-center justify-center p-6 sm:pb-32">
<div class="max-w-sm w-full">
<h1 class="text-xl font-bold">
- Reset your password
+ {t('auth.reset-password.title')}
</h1>
{getHasPasswordBeenReset()
? (
<>
<div class="text-muted-foreground mt-1 mb-4">
- Your password has been reset.
+ {t('auth.reset-password.reset')}
</div>
<Button as={A} href="/login" class="w-full">
- Go to login
+ {t('auth.reset-password.back-to-login')}
<div class="i-tabler-login-2 ml-2 size-4" />
</Button>
</>
@@ -99,7 +104,7 @@ export const ResetPasswordPage: Component = () => {
: (
<>
<p class="text-muted-foreground mt-1 mb-4">
- Enter your new password.
+ {t('auth.reset-password.description')}
</p>
<ResetPasswordForm onSubmit={onPasswordResetRequested} />
diff --git a/apps/papra-client/src/modules/i18n/i18n.models.ts b/apps/papra-client/src/modules/i18n/i18n.models.ts
index d7a44539..f925616b 100644
--- a/apps/papra-client/src/modules/i18n/i18n.models.ts
+++ b/apps/papra-client/src/modules/i18n/i18n.models.ts
@@ -30,7 +30,13 @@ export function findMatchingLocale({
export function createTranslator<Dict extends Record<string, string>>({ getDictionary }: { getDictionary: () => Dict }) {
return (key: keyof Dict, args?: Record<string, string | number>) => {
- let translation: string = getDictionary()[key] ?? key;
+ const translationFromDictionary = getDictionary()[key];
+
+ if (!translationFromDictionary && import.meta.env.DEV) {
+ console.warn(`Translation not found for key: ${String(key)}`);
+ }
+
+ let translation: string = translationFromDictionary ?? key;
if (args) {
for (const [key, value] of Object.entries(args)) {
diff --git a/apps/papra-client/src/modules/i18n/locales.types.ts b/apps/papra-client/src/modules/i18n/locales.types.ts
index bd2eef13..7e6e8218 100644
--- a/apps/papra-client/src/modules/i18n/locales.types.ts
+++ b/apps/papra-client/src/modules/i18n/locales.types.ts
@@ -1,2 +1,2 @@
// Dynamically generated file. Use "pnpm script:generate-i18n-types" to update.
-export type LocaleKeys = 'auth.login.title' | 'auth.login.description' | 'auth.login.login-with-provider' | 'auth.login.no-account' | 'auth.login.register' | 'auth.email-validation-required.title' | 'auth.email-validation-required.description' | 'auth.legal-links.description' | 'auth.legal-links.terms' | 'auth.legal-links.privacy' | 'tags.no-tags.title' | 'tags.no-tags.description' | 'tags.no-tags.create-tag' | 'layout.menu.home' | 'layout.menu.documents' | 'layout.menu.tags' | 'layout.menu.tagging-rules' | 'layout.menu.integrations' | 'layout.menu.deleted-documents' | 'layout.menu.organization-settings' | 'tagging-rules.field.name' | 'tagging-rules.field.content' | 'tagging-rules.operator.equals' | 'tagging-rules.operator.not-equals' | 'tagging-rules.operator.contains' | 'tagging-rules.operator.not-contains' | 'tagging-rules.operator.starts-with' | 'tagging-rules.operator.ends-with' | 'tagging-rules.list.title' | 'tagging-rules.list.description' | 'tagging-rules.list.demo-warning' | 'tagging-rules.list.no-tagging-rules.title' | 'tagging-rules.list.no-tagging-rules.description' | 'tagging-rules.list.no-tagging-rules.create-tagging-rule' | 'tagging-rules.list.card.no-conditions' | 'tagging-rules.list.card.one-condition' | 'tagging-rules.list.card.conditions' | 'tagging-rules.list.card.delete' | 'tagging-rules.list.card.edit' | 'tagging-rules.create.title' | 'tagging-rules.create.success' | 'tagging-rules.create.error' | 'tagging-rules.create.submit' | 'tagging-rules.form.name.label' | 'tagging-rules.form.name.placeholder' | 'tagging-rules.form.name.min-length' | 'tagging-rules.form.name.max-length' | 'tagging-rules.form.description.label' | 'tagging-rules.form.description.placeholder' | 'tagging-rules.form.description.max-length' | 'tagging-rules.form.conditions.label' | 'tagging-rules.form.conditions.description' | 'tagging-rules.form.conditions.add-condition' | 'tagging-rules.form.conditions.no-conditions.title' | 'tagging-rules.form.conditions.no-conditions.description' | 'tagging-rules.form.conditions.no-conditions.confirm' | 'tagging-rules.form.conditions.no-conditions.cancel' | 'tagging-rules.form.conditions.field.label' | 'tagging-rules.form.conditions.operator.label' | 'tagging-rules.form.conditions.value.label' | 'tagging-rules.form.conditions.value.placeholder' | 'tagging-rules.form.conditions.value.min-length' | 'tagging-rules.form.tags.label' | 'tagging-rules.form.tags.description' | 'tagging-rules.form.tags.min-length' | 'tagging-rules.form.tags.add-tag' | 'tagging-rules.form.submit' | 'tagging-rules.update.title' | 'tagging-rules.update.success' | 'tagging-rules.update.error' | 'tagging-rules.update.submit' | 'tagging-rules.update.cancel' | 'demo.popup.description' | 'demo.popup.discord' | 'demo.popup.discord-link-label' | 'demo.popup.reset' | 'demo.popup.hide';
+export type LocaleKeys = 'auth.request-password-reset.title' | 'auth.request-password-reset.description' | 'auth.request-password-reset.requested' | 'auth.request-password-reset.back-to-login' | 'auth.request-password-reset.form.email.label' | 'auth.request-password-reset.form.email.placeholder' | 'auth.request-password-reset.form.email.required' | 'auth.request-password-reset.form.email.invalid' | 'auth.request-password-reset.form.submit' | 'auth.reset-password.title' | 'auth.reset-password.description' | 'auth.reset-password.reset' | 'auth.reset-password.back-to-login' | 'auth.reset-password.form.new-password.label' | 'auth.reset-password.form.new-password.placeholder' | 'auth.reset-password.form.new-password.required' | 'auth.reset-password.form.new-password.min-length' | 'auth.reset-password.form.new-password.max-length' | 'auth.reset-password.form.submit' | 'auth.email-provider.open' | 'auth.login.title' | 'auth.login.description' | 'auth.login.login-with-provider' | 'auth.login.no-account' | 'auth.login.register' | 'auth.login.form.email.label' | 'auth.login.form.email.placeholder' | 'auth.login.form.email.required' | 'auth.login.form.email.invalid' | 'auth.login.form.password.label' | 'auth.login.form.password.placeholder' | 'auth.login.form.password.required' | 'auth.login.form.remember-me.label' | 'auth.login.form.forgot-password.label' | 'auth.login.form.submit' | 'auth.register.title' | 'auth.register.description' | 'auth.register.register-with-email' | 'auth.register.register-with-provider' | 'auth.register.providers.google' | 'auth.register.providers.github' | 'auth.register.have-account' | 'auth.register.login' | 'auth.register.registration-disabled.title' | 'auth.register.registration-disabled.description' | 'auth.register.form.email.label' | 'auth.register.form.email.placeholder' | 'auth.register.form.email.required' | 'auth.register.form.email.invalid' | 'auth.register.form.password.label' | 'auth.register.form.password.placeholder' | 'auth.register.form.password.required' | 'auth.register.form.password.min-length' | 'auth.register.form.password.max-length' | 'auth.register.form.name.label' | 'auth.register.form.name.placeholder' | 'auth.register.form.name.required' | 'auth.register.form.name.max-length' | 'auth.register.form.submit' | 'auth.email-validation-required.title' | 'auth.email-validation-required.description' | 'auth.legal-links.description' | 'auth.legal-links.terms' | 'auth.legal-links.privacy' | 'tags.no-tags.title' | 'tags.no-tags.description' | 'tags.no-tags.create-tag' | 'layout.menu.home' | 'layout.menu.documents' | 'layout.menu.tags' | 'layout.menu.tagging-rules' | 'layout.menu.integrations' | 'layout.menu.deleted-documents' | 'layout.menu.organization-settings' | 'tagging-rules.field.name' | 'tagging-rules.field.content' | 'tagging-rules.operator.equals' | 'tagging-rules.operator.not-equals' | 'tagging-rules.operator.contains' | 'tagging-rules.operator.not-contains' | 'tagging-rules.operator.starts-with' | 'tagging-rules.operator.ends-with' | 'tagging-rules.list.title' | 'tagging-rules.list.description' | 'tagging-rules.list.demo-warning' | 'tagging-rules.list.no-tagging-rules.title' | 'tagging-rules.list.no-tagging-rules.description' | 'tagging-rules.list.no-tagging-rules.create-tagging-rule' | 'tagging-rules.list.card.no-conditions' | 'tagging-rules.list.card.one-condition' | 'tagging-rules.list.card.conditions' | 'tagging-rules.list.card.delete' | 'tagging-rules.list.card.edit' | 'tagging-rules.create.title' | 'tagging-rules.create.success' | 'tagging-rules.create.error' | 'tagging-rules.create.submit' | 'tagging-rules.form.name.label' | 'tagging-rules.form.name.placeholder' | 'tagging-rules.form.name.min-length' | 'tagging-rules.form.name.max-length' | 'tagging-rules.form.description.label' | 'tagging-rules.form.description.placeholder' | 'tagging-rules.form.description.max-length' | 'tagging-rules.form.conditions.label' | 'tagging-rules.form.conditions.description' | 'tagging-rules.form.conditions.add-condition' | 'tagging-rules.form.conditions.no-conditions.title' | 'tagging-rules.form.conditions.no-conditions.description' | 'tagging-rules.form.conditions.no-conditions.confirm' | 'tagging-rules.form.conditions.no-conditions.cancel' | 'tagging-rules.form.conditions.field.label' | 'tagging-rules.form.conditions.operator.label' | 'tagging-rules.form.conditions.value.label' | 'tagging-rules.form.conditions.value.placeholder' | 'tagging-rules.form.conditions.value.min-length' | 'tagging-rules.form.tags.label' | 'tagging-rules.form.tags.description' | 'tagging-rules.form.tags.min-length' | 'tagging-rules.form.tags.add-tag' | 'tagging-rules.form.submit' | 'tagging-rules.update.title' | 'tagging-rules.update.success' | 'tagging-rules.update.error' | 'tagging-rules.update.submit' | 'tagging-rules.update.cancel' | 'demo.popup.description' | 'demo.popup.discord' | 'demo.popup.discord-link-label' | 'demo.popup.reset' | 'demo.popup.hide';