chore: update i18n sync command and vscode settings

- Replace custom i18n sync script with i18next-cli sync command
- Update json sorting setting to use biome formatter
- Format i18n-ally config arrays for better readability
This commit is contained in:
icarus 2025-10-23 15:39:17 +08:00
parent 534459dd13
commit 66e48dbba9
2 changed files with 18 additions and 6 deletions

22
.vscode/settings.json vendored
View File

@ -28,7 +28,7 @@
"source.fixAll.eslint": "explicit",
"source.fixAll.oxc": "explicit",
"source.organizeImports": "never",
"source.sort.json": "always"
"source.sort.json.biome": "always"
},
"editor.formatOnSave": true,
"files.associations": {
@ -38,14 +38,26 @@
"files.eol": "\n",
"i18n-ally.defaultNamespace": "translation",
// "i18n-ally.displayLanguage": "zh-cn", //
"i18n-ally.enabledFrameworks": ["react-i18next", "i18next"],
"i18n-ally.enabledParsers": ["ts", "js", "json"], //
"i18n-ally.enabledFrameworks": [
"react-i18next",
"i18next"
],
"i18n-ally.enabledParsers": [
"ts",
"js",
"json"
], //
"i18n-ally.fullReloadOnChanged": true,
"i18n-ally.keystyle": "nested", //
"i18n-ally.localesPaths": ["src/renderer/src/i18n/locales"],
"i18n-ally.localesPaths": [
"src/renderer/src/i18n/locales"
],
"i18n-ally.namespace": true, //
"i18n-ally.sourceLanguage": "zh-cn", //
"i18n-ally.usage.derivedKeyRules": ["{key}_one", "{key}_other"], //
"i18n-ally.usage.derivedKeyRules": [
"{key}_one",
"{key}_other"
], //
"search.exclude": {
".yarn/releases/**": true,
"**/dist/**": true

View File

@ -55,7 +55,7 @@
"typecheck:web": "tsgo --noEmit -p tsconfig.web.json --composite false",
"typecheck:ui": "cd packages/ui && npm run type-check",
"i18n:check": "dotenv -e .env -- tsx scripts/check-i18n.ts",
"i18n:sync": "dotenv -e .env -- tsx scripts/sync-i18n.ts",
"i18n:sync": "i18next-cli sync",
"i18n:auto": "dotenv -e .env -- tsx scripts/auto-translate-i18n.ts",
"i18n:status": "i18next-cli status",
"i18n:extract": "i18next-cli extract",