Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions mcpapps/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@
state_pending:"pending",state_in_progress:"in progress",state_completed:"completed",state_blocked:"blocked",state_active:"active",state_running:"running",state_success:"success",state_error:"error",state_failed:"failed",state_online:"online",state_offline:"offline",state_unavailable:"unavailable",state_enabled:"enabled",state_disabled:"disabled",state_ready:"ready",state_configured:"configured",state_exited:"exited",state_killed:"killed",state_timeout:"timeout",state_live:"live"
},
"zh-CN":{
waiting:"等待工具输出…",item:"项目",step:"步骤",status:"状态",moreItems:"还有 {count} 项",
noRecallMatches:"没有匹配的 Recall 内容。",noMatches:"没有匹配结果",recallEntry:"Recall 条目",recallCard:"Recall 卡片",
noChanges:"无变更",previewOnly:"仅预览",written:"已写入",completed:"已完成",recallUpdated:"Recall 已更新",
items:"{count} 项",workflowMatch:"工作流匹配",score:"分数 {score}",candidates:"{count} 个候选",candidate:"候选项",noWorkflowMatches:"没有匹配的工作流。",
result:"结果",content:"内容",mcpTool:"MCP 工具",externalMcp:"外部 MCP",server:"服务",tool:"工具",contentCount:"{count} 项内容",externalMcpVia:"通过 {server} 调用外部 MCP",externalMcpInvoked:"已调用外部 MCP 工具",
artifact:"产物",file:"文件",temporaryLink:"临时链接",type:"类型",size:"大小",dimensions:"尺寸",artifactId:"产物 ID",expires:"过期时间",signedUrl:"签名 URL",published:"已发布",updated:"更新时间",state:"状态",statusLabel:"状态",path:"路径",
agentDockSkills:"AgentDock Skills",commonSkills:"Common Skills",workflow:"工作流",recall:"Recall",capabilities:"能力",devices:"设备",online:"在线",on:"开启",off:"关闭",
unavailable:"不可用",contextUnavailable:"上下文暂不可用",nodeOffline:"AgentDock 节点当前离线",nodeUnavailable:"{name} 当前不可用",
tasks:"{count} 个任务",noTasks:"暂无任务。",steps:"{done} / {total} 步",review:"评审 {status}",sessions:"{count} 个会话",noAcpSessions:"暂无 ACP 会话。",session:"会话",authenticated:"已认证",deleted:"已删除",noMessages:"当前 AgentDock 进程中没有用户或助手消息。",
dryRun:"试运行",noChange:"无变更",previewTruncated:"预览已截断",noChangeSentence:"无变更。",fileChange:"文件变更",unableInitialize:"无法初始化 MCP App。",
action_search:"搜索",action_write:"写入",action_match:"匹配",action_call:"调用",action_publish:"发布",action_context:"上下文",action_list:"列表",action_task:"任务",action_change:"变更",action_move:"移动",action_status:"状态",
state_pending:"待处理",state_in_progress:"进行中",state_completed:"已完成",state_blocked:"已阻塞",state_active:"活动",state_running:"运行中",state_success:"成功",state_error:"错误",state_failed:"失败",state_online:"在线",state_offline:"离线",state_unavailable:"不可用",state_enabled:"已启用",state_disabled:"已停用",state_ready:"就绪",state_configured:"已配置",state_exited:"已退出",state_killed:"已终止",state_timeout:"超时",state_live:"活动"
waiting:"Waiting for tool output…",item:"Item",step:"Step",status:"STATUS",moreItems:"还有 {count} 项",
noRecallMatches:"No Recall matches.",noMatches:"No matches",recallEntry:"Recall entry",recallCard:"Recall card",
noChanges:"No changes",previewOnly:"Preview only",written:"Written",completed:"Completed",recallUpdated:"Recall updated",
items:"{count} items",workflowMatch:"Workflow match",score:"score {score}",candidates:"{count} candidates",candidate:"Candidate",noWorkflowMatches:"No workflow matches.",
result:"Result",content:"Content",mcpTool:"MCP tool",externalMcp:"external MCP",server:"Server",tool:"Tool",contentCount:"{count} content",externalMcpVia:"External MCP via {server}",externalMcpInvoked:"External MCP tool invoked",
artifact:"Artifact",file:"file",temporaryLink:"temporary link",type:"Type",size:"Size",dimensions:"Dimensions",artifactId:"Artifact ID",expires:"Expires",signedUrl:"Signed URL",published:"published",updated:"Updated",state:"State",statusLabel:"Status",path:"Path",
agentDockSkills:"AgentDock Skills",commonSkills:"Common Skills",workflow:"Workflow",recall:"Recall",capabilities:"Capabilities",devices:"Devices",online:"在线",on:"ON",off:"OFF",
unavailable:"不可用",contextUnavailable:"Context 暂不可用",nodeOffline:"AgentDock 节点当前离线",nodeUnavailable:"{name} 当前不可用",
tasks:"{count} tasks",noTasks:"No tasks.",steps:"{done} / {total} steps",review:"review {status}",sessions:"{count} sessions",noAcpSessions:"No ACP sessions.",session:"Session",authenticated:"authenticated",deleted:"deleted",noMessages:"No user or assistant messages in this AgentDock process.",
dryRun:"dry run",noChange:"no change",previewTruncated:"preview truncated",noChangeSentence:"No change.",fileChange:"File change",unableInitialize:"Unable to initialize MCP App.",
action_search:"SEARCH",action_write:"WRITE",action_match:"MATCH",action_call:"CALL",action_publish:"PUBLISH",action_context:"CONTEXT",action_list:"LIST",action_task:"TASK",action_change:"CHANGE",action_move:"MOVE",action_status:"STATUS",
state_pending:"pending",state_in_progress:"in progress",state_completed:"completed",state_blocked:"blocked",state_active:"active",state_running:"running",state_success:"success",state_error:"error",state_failed:"failed",state_online:"online",state_offline:"离线",state_unavailable:"unavailable",state_enabled:"enabled",state_disabled:"disabled",state_ready:"ready",state_configured:"configured",state_exited:"exited",state_killed:"killed",state_timeout:"timeout",state_live:"live"
}
};
const matchLocale=value=>{
Expand Down
42 changes: 42 additions & 0 deletions mcpapps/apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,45 @@ func TestHTMLLocalizesFromBrowserAndHostLocale(t *testing.T) {
}
}
}

func TestHTMLZhCNPreservesHistoricalMixedTerminology(t *testing.T) {
html := HTML("agentdock_context", "Context")
start := strings.Index(html, `"zh-CN":{`)
end := strings.Index(html, `const matchLocale=value=>`)
if start < 0 || end <= start {
t.Fatal("shared MCP App zh-CN message dictionary is missing")
}
zhCN := html[start:end]

// zh-CN 保持 i18n 前已经成熟的中英混排;协议、产品和结构字段不做机械中文化。
for _, marker := range []string{
`status:"STATUS"`,
`workflow:"Workflow"`,
`capabilities:"Capabilities"`,
`devices:"Devices"`,
`artifact:"Artifact"`,
`type:"Type"`,
`action_task:"TASK"`,
`state_pending:"pending"`,
`moreItems:"还有 {count} 项"`,
`online:"在线"`,
`unavailable:"不可用"`,
`contextUnavailable:"Context 暂不可用"`,
} {
if !strings.Contains(zhCN, marker) {
t.Fatalf("shared MCP App zh-CN copy drifted from historical UI: missing %q", marker)
}
}

for _, forbidden := range []string{
`status:"状态"`,
`workflow:"工作流"`,
`capabilities:"能力"`,
`artifact:"产物"`,
`action_task:"任务"`,
} {
if strings.Contains(zhCN, forbidden) {
t.Fatalf("shared MCP App zh-CN copy is over-translated: %q", forbidden)
}
}
}
Loading