feat(i18n): add @fusion/i18n package, catalogs, and i18next-cli tooling (U2)

Create the @fusion/i18n package as the authored source-of-truth: shared
i18next config (namespace split, script-aware zh-CN/zh-TW fallback, plural
setup), en base catalogs, and a generated CLI static-import map so the
terminal surface is drop-in for new locales. Add the i18next-cli workflow
(extract/sync/types/status/lint) wired as root i18n:* scripts, install the
i18next stack into dashboard + CLI, strip @fusion/i18n from the published CLI
manifest, gitignore the generated dashboard catalog tree, and add a changeset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-03 08:00:31 -07:00
parent b8045b6f2b
commit 9072d71306
36 changed files with 1419 additions and 31 deletions

View File

@@ -46,6 +46,12 @@
"test:coverage:dashboard": "pnpm --filter @fusion/dashboard exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:slow-cli": "pnpm --filter @runfusion/fusion test:slow-cli",
"typecheck": "pnpm -r --filter=!@fusion/desktop --filter=!@fusion/mobile typecheck",
"i18n:extract": "i18next-cli extract",
"i18n:sync": "i18next-cli sync",
"i18n:types": "i18next-cli types",
"i18n:status": "i18next-cli status",
"i18n:lint": "i18next-cli lint",
"i18n:gen-cli": "pnpm --filter @fusion/i18n gen:cli-catalogs",
"changeset": "changeset",
"version": "changeset version",
"release": "node scripts/release.mjs",
@@ -76,6 +82,7 @@
"@eslint/js": "^9.0.0",
"eslint": "^9.0.0",
"fast-glob": "^3.3.3",
"i18next-cli": "^1.59.1",
"react-devtools-core": "^7.0.1",
"tsx": "^4.19.0",
"typescript": "^5.7.0",