2.8 KiB
2.8 KiB
Implementation Plan
-
1. Backfill English-only values in
locales/zh.jsonwith the natural Chinese translations from the design's Translation Contract- Edit
step3.waitingForActions→等待智能体执行动作... - Edit
step4.waitingForReportAgent→等待报告智能体... - Edit
step5.interactiveTools→交互工具 - Edit
step5.agentsAvailable→{count} 个智能体可用(placeholder{count}preserved exactly once) - Edit
step5.reportAgentChat→报告智能体 - 对话 - Edit
graph.panelTitle→图谱关系可视化 - Edit
graph.nodeDetails→节点详情 - Edit
graph.relationship→关系 - Edit
log.prepareTaskId→└─ 任务 ID: {taskId}(preserves the two-space indent, the└─glyph, and the{taskId}placeholder verbatim) - Leave
home.heroDescBrandas the literal stringMiroFish(brand) - Use the
Edittool only (do not run anyjqwrite-back); do not add, remove, or reorder any keys - Observable completion:
git diff --statshows exactly one file changed (locales/zh.json);git diff locales/zh.jsonshows only value changes for the listed keys (no key adds/removes/reorders) - Requirements: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.2, 3.2, 3.3, 4.1, 4.2, 4.3
- Edit
-
2. Validate JSON parseability, key alignment, and placeholder preservation after the backfill
- Run
jq empty locales/zh.jsonand confirm exit code 0 (file is valid JSON) - Run
diff <(jq -r 'paths(scalars) | join(".")' locales/en.json | sort) <(jq -r 'paths(scalars) | join(".")' locales/zh.json | sort)and confirm output is empty (key sets identical) - Run
jq -r '<key>'for each of the ten keys and confirm the value matches the design's Translation Contract row (orMiroFishforhome.heroDescBrand) - Confirm
{count}appears exactly once inside the new value ofstep5.agentsAvailable, and{taskId}appears exactly once inside the new value oflog.prepareTaskId - Observable completion: all five checks above pass; if any fails, return to task 1 and revise the offending edit before re-running validation
- Requirements: 3.1, 3.3, 3.4, 3.5
- Run
-
3. Capture the
log.prepareTaskIddecision and any English-by-design exceptions for the PR description- Record in a short note (in
.kiro/specs/i18n-backfill-zh-json/HANDOFF.mdif needed, or directly in the PR body at /done time) that: (a)home.heroDescBrandis intentionally kept asMiroFishbecause it is a brand; (b)log.prepareTaskIdwas translated to└─ 任务 ID: {taskId}because it is rendered into the user-visible log panel byStep2EnvSetup.vue:801and surroundinglog.*keys are translated. - Observable completion: the rationale text is ready for inclusion in the PR description so reviewers can see the decisions at a glance
- Requirements: 2.1, 2.3
- Record in a short note (in