Add locale switcher component and integrate internationalization improvements
- Introduced `LocaleSwitcher` component for language selection with support for locale-aware dropdown and ARIA accessibility. - Updated layouts (`Header`, `Breadcrumbs`, `Home`) to include the new locale switcher. - Expanded localization files (`en.json`, `it.json`) with new keys for language switching. - Adjusted i18n configuration to enhance routing and message imports. - Updated Jest module mappings to mock new i18n components and utilities.
This commit is contained in:
@@ -10,8 +10,10 @@ const customJestConfig = {
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
moduleNameMapper: {
|
||||
'^next-intl$': '<rootDir>/tests/__mocks__/next-intl.tsx',
|
||||
'^next-intl/routing$': '<rootDir>/tests/__mocks__/next-intl-routing.tsx',
|
||||
'^next-intl/navigation$': '<rootDir>/tests/__mocks__/next-intl-navigation.tsx',
|
||||
'^@/components/i18n$': '<rootDir>/tests/__mocks__/components-i18n.tsx',
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
},
|
||||
testMatch: ['<rootDir>/tests/**/*.test.ts', '<rootDir>/tests/**/*.test.tsx'],
|
||||
|
||||
Reference in New Issue
Block a user