Files
everything-is-suitable/docs/superpowers/plans/2026-04-28-uniapp-i18n/index.json
T
张翔 a39b4388f3 chore: 添加文档、资源与测试输出
- assets/ 静态资源
- docs/superpowers/ 技能文档
- dogfood-output/ 测试验证输出
2026-04-29 21:17:10 +08:00

92 lines
3.2 KiB
JSON

{
"plan": {
"id": "uniapp-i18n",
"name": "UniApp 主应用国际化(i18n)实现计划",
"version": "1.0.0",
"date": "2026-04-29",
"designDoc": "docs/superpowers/specs/2026-04-28-uniapp-i18n-design.md",
"goal": "为 UniApp 主应用引入 vue-i18n 国际化体系,支持 9 种语言,将所有硬编码中文 UI 文本替换为 $t() / t() 调用",
"architecture": "集中式翻译文件方案,所有翻译键值对按语言分文件存放于 src/locales/,通过 vue-i18n 实例注入 Vue 应用。领域术语保留中文原词不纳入翻译体系",
"techStack": [
"vue-i18n@9",
"Vue 3 Composition API",
"UniApp",
"Vitest"
],
"executionMode": "sequential",
"phases": [
{
"id": "phase-1",
"name": "基础设施 — 安装 vue-i18n + 创建核心模块",
"file": "phase-1-infrastructure.json",
"status": "pending"
},
{
"id": "phase-2",
"name": "翻译文件 — 创建 8 种非中文翻译",
"file": "phase-2-translation-files.json",
"status": "pending"
},
{
"id": "phase-3",
"name": "页面改造 — 3 个页面 + pages.json",
"file": "phase-3-page-migration.json",
"status": "pending"
},
{
"id": "phase-4",
"name": "组件改造 — 10 个组件",
"file": "phase-4-component-migration.json",
"status": "pending"
},
{
"id": "phase-5",
"name": "测试与验证",
"file": "phase-5-testing-and-verification.json",
"status": "pending"
}
],
"fileStructure": {
"create": [
"src/locales/index.ts",
"src/locales/zh-CN.ts",
"src/locales/zh-TW.ts",
"src/locales/en.ts",
"src/locales/ja.ts",
"src/locales/ko.ts",
"src/locales/de.ts",
"src/locales/fr.ts",
"src/locales/es.ts",
"src/locales/pt.ts",
"src/locales/__tests__/completeness.test.ts",
"src/locales/__tests__/interpolation.test.ts"
],
"modify": [
"package.json",
"src/main.ts",
"src/pages/almanac-search/index.vue",
"src/pages/ziwei/index.vue",
"src/pages/fortune/index.vue",
"src/components/BottomNavigation/BottomNavigation.vue",
"src/components/EmptyState/index.vue",
"src/components/SearchConditionPanel/index.vue",
"src/components/SearchConditionItem/index.vue",
"src/components/SearchResultList/index.vue",
"src/components/SearchResultCard/index.vue",
"src/components/SortSwitcher/index.vue",
"src/components/ExportPanel/index.vue",
"src/components/SearchHistoryPanel/index.vue",
"src/components/TemplatePanel/index.vue"
],
"delete": []
},
"qualityGates": {
"translationKeyConsistency": "所有 9 种语言翻译键与 zh-CN 完全一致",
"interpolationConsistency": "所有语言的插值变量名一致",
"buildSuccess": "vite build 无错误",
"allTestsPass": "npx vitest run 全部通过",
"noHardcodedChinese": "页面和组件中无硬编码中文 UI 文本(领域术语除外)"
}
}
}