Refactor i18n integration and update tests for improved localization
- Updated test components (`PasswordResetConfirmForm`, `PasswordChangeForm`) to use i18n keys directly, ensuring accurate validation messages. - Refined translations in `it.json` to standardize format and content. - Replaced text-based labels with localized strings in `PasswordResetRequestForm` and `RegisterForm`. - Introduced `generateLocalizedMetadata` utility and updated layout metadata generation for locale-aware SEO. - Enhanced e2e tests with locale-prefixed routes and updated assertions for consistency. - Added comprehensive i18n documentation (`I18N.md`) for usage, architecture, and testing.
This commit is contained in:
@@ -31,7 +31,7 @@ export function Breadcrumbs() {
|
||||
const breadcrumbs: BreadcrumbItem[] = [];
|
||||
|
||||
let currentPath = '';
|
||||
segments.forEach((segment) => {
|
||||
segments.forEach((segment: string) => {
|
||||
currentPath += `/${segment}`;
|
||||
const label = pathLabels[segment] || segment;
|
||||
breadcrumbs.push({
|
||||
|
||||
@@ -30,7 +30,7 @@ const createLoginSchema = (t: (key: string) => string) =>
|
||||
password: z
|
||||
.string()
|
||||
.min(1, t('validation.required'))
|
||||
.min(8, t('validation.minLength').replace('{count}', '8'))
|
||||
.min(8, t('validation.minLength'))
|
||||
.regex(/[0-9]/, t('errors.validation.passwordWeak'))
|
||||
.regex(/[A-Z]/, t('errors.validation.passwordWeak')),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user