feat(localization): add i18next configuration and CLI commands for localization management

This commit is contained in:
PiR1
2026-05-08 16:17:07 +02:00
parent a5db4bd46e
commit 74e87b968b
4 changed files with 2085 additions and 603 deletions
+23
View File
@@ -0,0 +1,23 @@
import { defineConfig } from 'i18next-cli';
export default defineConfig({
locales: ['en', 'de', 'nl', 'pt', 'ru', 'fr'],
extract: {
input: ['src/**/*.{ts,tsx,js,jsx}', '!src/**/*.{test,spec,d}.{ts,tsx}'],
output: 'src/i18n/locales/{{language}}.json',
defaultNS: false,
primaryLanguage: 'en',
removeUnusedKeys: true,
// Dynamic keys to preserve (e.g.: t(`errors.${code}`))
preservePatterns: [],
preserveContextVariants: true,
indentation: 2,
sort:false
},
});
+1620 -33
View File
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -9,7 +9,10 @@
"build:check": "tsc -b && node ./scripts/build.js",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest run src/components/admin/__tests__/ThemeCustomizerEnhanced.test.tsx"
"test": "vitest run src/components/admin/__tests__/ThemeCustomizerEnhanced.test.tsx",
"i18n:extract": "i18next-cli extract",
"i18n:status": "i18next-cli status",
"i18n:ci": "i18next-cli extract --ci --dry-run"
},
"dependencies": {
"@tanstack/react-query": "^5.0.0",
@@ -66,6 +69,7 @@
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.2.0",
"i18next-cli": "^1.56.11",
"jsdom": "^25.0.1",
"postcss": "^8.5.10",
"tailwindcss": "^3.3.0",
File diff suppressed because it is too large Load Diff