fix(i18n): translations
- Added translation support using react-i18next in WafConfig and CrowdSecConfig components. - Updated UI elements to use translation keys instead of hardcoded strings. - Enhanced test coverage for i18n integration, including mocks for translation in tests. - Fixed various test cases to align with new translation structure. - Created a QA report for i18n implementation, noting validation of translation files and areas for improvement.
This commit is contained in:
@@ -9,16 +9,7 @@ import * as featureFlagsApi from '../../api/featureFlags'
|
||||
import client from '../../api/client'
|
||||
import { LanguageProvider } from '../../context/LanguageContext'
|
||||
|
||||
// Mock i18next
|
||||
vi.mock('react-i18next', () => ({
|
||||
useTranslation: () => ({
|
||||
t: (key: string) => key,
|
||||
i18n: {
|
||||
changeLanguage: vi.fn(),
|
||||
language: 'en',
|
||||
},
|
||||
}),
|
||||
}))
|
||||
// Note: react-i18next mock is provided globally by src/test/setup.ts
|
||||
|
||||
// Mock API modules
|
||||
vi.mock('../../api/settings', () => ({
|
||||
|
||||
Reference in New Issue
Block a user