fix(preset): en 下 PTC 预设仍显示中文——展示层按 code 键桥接 ptc - #762
Conversation
`/preset` 选择器与补全在 en 下对 PTC 预设回退中文:官方预设 code→ptc 改名 (0.1.2 线),但 i18n 字典键仍用旧 id(`preset-name-code` / `preset-desc-code`)。 `listPresets` 按名册实际 id 拼键,0.1.2 下拼出 `preset-name-ptc` 查不到, `tOr` 回退名册中文文案;standard/minimal/cordis/liangshen 因 id 未改正常切英文。 - `preset-resolution.ts` 新增 `presetDisplayId`:`ptc` 桥回 `code`,其余 id 透传; 旧线 `code` 直接命中字典键,新线 `ptc` 桥接回旧键,双线兼容 - `channel.ts` `listPresets` 拼字典键改用 `presetDisplayId(preset.id)` - `verify-minimal-preset-tools` 增加 en 下 ptc/standard/minimal 显示回归 - `verify-i18n` 同步动态键拼接点注释 验证:全量 tsc 编译、verify-minimal-preset-tools、verify-i18n、verify:boundary 通过。
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change adds compatibility mapping for the renamed ChangesPreset display localization
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change restores English display text for the PTC preset without changing preset identities or selection behavior. No current merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |

/preset选择器与补全在 en 下对 PTC 预设回退中文:官方预设 code→ptc 改名 (0.1.2 线),但 i18n 字典键仍用旧 id(preset-name-code/preset-desc-code)。listPresets按名册实际 id 拼键,0.1.2 下拼出preset-name-ptc查不到,tOr回退名册中文文案;standard/minimal/cordis/liangshen 因 id 未改正常切英文。preset-resolution.ts新增presetDisplayId:ptc桥回code,其余 id 透传; 旧线code直接命中字典键,新线ptc桥接回旧键,双线兼容channel.tslistPresets拼字典键改用presetDisplayId(preset.id)verify-minimal-preset-tools增加 en 下 ptc/standard/minimal 显示回归verify-i18n同步动态键拼接点注释验证:全量 tsc 编译、verify-minimal-preset-tools、verify-i18n、verify:boundary 通过。
变更摘要 / Summary
关联 / Related
变更类型 / Type
验证 / Verification
pnpm build(compile + 全部构建门禁)自查 / Checklist
src/,没有手改或提交lib/下的生成产物@deepseek-ai/*的 import 仍只出现在src/dsh-adapter/内README.md与README_EN.md双语同步cordis.patch.yml的话,patch-surface.snapshot.json已同步git add ./git add -ASummary by CodeRabbit
Bug Fixes
ptcpreset.ptcpresets.Tests