feat(localization): add i18next configuration and CLI commands for localization management
This commit is contained in:
@@ -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
|
||||
},
|
||||
});
|
||||
Generated
+1620
-33
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
+437
-569
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user