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:
GitHub Actions
2025-12-19 05:35:02 +00:00
parent 03518145c0
commit 8511d98160
48 changed files with 9038 additions and 1772 deletions
@@ -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', () => ({