From d9182373279daf68e045d97163510560628997e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Sat, 10 Oct 2026 00:27:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20i18n=20=E8=A3=B8=20@=20?= =?UTF-8?q?=E8=87=B4=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 905 将 @ 改为裸 @,而 vue-i18n 的 @ 是 linked-message 语法字符,未转义只在 prod runtime 抛 Invalid linked format(dev 宽松回退/vue-tsc 捕获不到) - zh/en aiChat 8 处(placeholderDefault/mentionHint/searchFilesBlocked/projectLabel)按规范转义为 {'@'} - 输入框 placeholder 消息编译抛错→ChatInput 渲染失败→输入框消失,即本次生产回归根因 - 验证: 全库 462 个含 @/{/| 的 i18n 值经 message-compiler 编译 0 失败 + vue-tsc EXIT 0 --- src/i18n/en/aiChat.ts | 8 ++++---- src/i18n/zh-CN/aiChat.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/i18n/en/aiChat.ts b/src/i18n/en/aiChat.ts index 3fabbc5..4807a69 100644 --- a/src/i18n/en/aiChat.ts +++ b/src/i18n/en/aiChat.ts @@ -137,12 +137,12 @@ export default { clearSkill: 'Clear skill', skillBadgeTip: 'Injected full skill playbook: {name}', placeholderWithSkill: 'Skill selected. Type arguments and press Enter', - placeholderDefault: "Type a message... (/ for skills, @ to mention)", + placeholderDefault: "Type a message... (/ for skills, {'@'} to mention)", skillNoMatch: 'No matching skill', skillNotLoaded: 'No local skills loaded', // ── @ entity mention (@ opens popover, select inserts [Type:Name] token) ── - mentionHint: "@ to mention project/task", + mentionHint: "{'@'} to mention project/task", mentionGroupProject: 'Projects', mentionGroupTask: 'Tasks', mentionGroupIdea: 'Ideas', @@ -233,7 +233,7 @@ export default { // ── Input Augmentation layer: mention/skill injection feedback ── // search_files blind search denied by whitelist fallback (no auth dialog; prompt user to use @mention or absolute path) - searchFilesBlocked: "search_files only works inside authorized dirs. Use @[project] to reference or provide an absolute path.", + searchFilesBlocked: "search_files only works inside authorized dirs. Use {'@'}[project] to reference or provide an absolute path.", // /skill hot reload (ai_reload_skills IPC) success toast skillReloaded: 'Skills reloaded', // @mention entity resolve failed (id points to a project/task/idea/skill that was deleted or unavailable) @@ -327,7 +327,7 @@ export default { // ── TopBar goal/project context labels ── goalsCount: 'Goals ({n})', none: 'None', - projectLabel: "@Projects", + projectLabel: "{'@'}Projects", // ── 3c UX batch addition (I5 classified send-failure messages): friendly text by // error kind; {msg} keeps the raw error string for troubleshooting ── diff --git a/src/i18n/zh-CN/aiChat.ts b/src/i18n/zh-CN/aiChat.ts index 514c126..ec90288 100644 --- a/src/i18n/zh-CN/aiChat.ts +++ b/src/i18n/zh-CN/aiChat.ts @@ -137,12 +137,12 @@ export default { clearSkill: '取消技能', skillBadgeTip: '已注入技能「{name}」的完整规程', placeholderWithSkill: '已选技能,输入参数后回车', - placeholderDefault: "输入消息...(/ 触发技能,@ 引用实体)", + placeholderDefault: "输入消息...(/ 触发技能,{'@'} 引用实体)", skillNoMatch: '无匹配技能', skillNotLoaded: '未读取到本机技能', // ── @ 实体引用(@ 触发 popover,选中插入 [类型:名] 标记) ── - mentionHint: "@ 引用项目/任务", + mentionHint: "{'@'} 引用项目/任务", mentionGroupProject: '项目', mentionGroupTask: '任务', mentionGroupIdea: '灵感', @@ -234,7 +234,7 @@ export default { // ── Input Augmentation 层: mention/skill 注入反馈 ── // search_files 盲搜被白名单兜底拒绝(不应弹授权窗,直接友好提示用户改用 @引用或绝对路径) - searchFilesBlocked: "search_files 仅在已授权目录可用,请用 @[项目] 引用或提供绝对路径", + searchFilesBlocked: "search_files 仅在已授权目录可用,请用 {'@'}[项目] 引用或提供绝对路径", // /技能 热重载(ai_reload_skills IPC)成功后提示 skillReloaded: '技能已重新加载', // @引用 实体 resolve 失败(id 指向的项目/任务/灵感/技能已被删除或不可用) @@ -328,7 +328,7 @@ export default { // ── TopBar 目标/项目上下文标签 ── goalsCount: '目标({n})', none: '无', - projectLabel: "@项目", + projectLabel: "{'@'}项目", // ── 3c UX 批追加(I5 发送失败错误分类文案):按错误内容映射友好提示, // {msg} 保留原始错误串供排查,不丢线索 ──