mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
feat(i18n): add i18next config and update extract commands
Add configuration file for i18next-cli with supported locales and extraction settings Update package.json scripts to use i18next-cli commands for status and extraction
This commit is contained in:
parent
43fcfa6c95
commit
3677a34ceb
13
i18next.config.ts
Normal file
13
i18next.config.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { defineConfig } from '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"
|
||||
}
|
||||
});
|
||||
@ -57,7 +57,8 @@
|
||||
"i18n:check": "dotenv -e .env -- tsx scripts/check-i18n.ts",
|
||||
"i18n:sync": "dotenv -e .env -- tsx scripts/sync-i18n.ts",
|
||||
"i18n:auto": "dotenv -e .env -- tsx scripts/auto-translate-i18n.ts",
|
||||
"i18n:scan": "i18next-scanner && yarn format",
|
||||
"i18n:status": "i18next-cli status",
|
||||
"i18n:extract": "i18next-cli extract",
|
||||
"update:languages": "tsx scripts/update-languages.ts",
|
||||
"test": "vitest run --silent",
|
||||
"test:main": "vitest run --project main",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user