cherry-studio/i18next.config.ts
icarus 3e990dddb5 feat(i18n): enhance i18next configuration and vscode settings
- Add new i18next config options including defaultValue, primaryLanguage, and types generation
- Update vscode settings for better i18n-ally integration and namespace support
- Reorder search exclude patterns for consistency
2025-10-23 21:50:21 +08:00

20 lines
595 B
TypeScript

import { defineConfig } from 'i18next-cli'
/** @see https://github.com/i18next/i18next-cli */
export default defineConfig({
locales: ['en-us', 'zh-cn', 'zh-tw'],
extract: {
input: 'src/renderer/src/**/*.{ts,tsx}',
output: 'src/renderer/src/i18n/locales/{{language}}.json',
defaultValue: '__MISSING_KEY__',
primaryLanguage: 'en-us',
removeUnusedKeys: false
},
types: {
input: ['src/renderer/src/i18n/locales/en-us.json'],
output: 'src/renderer/src/i18n/i18next.d.ts',
resourcesFile: 'src/renderer/src/i18n/resources.d.ts',
enableSelector: true
}
})