From c1eac96db1427a54dff8c8ec78c9331f2895bee7 Mon Sep 17 00:00:00 2001 From: kicer Date: Fri, 4 Sep 2026 12:55:42 +0800 Subject: [PATCH] i18n(image-gen): translate remaining AI-facing response text to English Translate the four remaining content.text strings in the tool callback: - 'no URL returned' error - success summary (Model / Prompt / Image N) - generation failure error - error detail label Style follows the short-sentence convention from baa04d9 (no extra explanatory notes added). --- mcp/image-gen/src/mcp-server.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mcp/image-gen/src/mcp-server.js b/mcp/image-gen/src/mcp-server.js index 2fa19d3..3af0655 100644 --- a/mcp/image-gen/src/mcp-server.js +++ b/mcp/image-gen/src/mcp-server.js @@ -163,19 +163,19 @@ function buildServer() { content: [ { type: "text", - text: `调用成功但未返回图片 URL:${JSON.stringify(data)}`, + text: `The Zhipu API call succeeded but returned no image URL. Raw response: ${JSON.stringify(data)}`, }, ], }; } const summary = urls - .map((u, i) => `图片 ${i + 1}: ${u}`) + .map((u, i) => `Image ${i + 1}: ${u}`) .join("\n"); return { content: [ { type: "text", - text: `模型: ${model}\n提示词: ${args.prompt}\n${summary}`, + text: `Model: ${model}\nPrompt: ${args.prompt}\n${summary}`, }, ...urls.map((u) => ({ type: "text", text: u })), ], @@ -186,8 +186,8 @@ function buildServer() { content: [ { type: "text", - text: `生成图片失败: ${e.message}${ - e.detail ? `\n详情: ${JSON.stringify(e.detail)}` : "" + text: `Failed to generate image: ${e.message}${ + e.detail ? `\nDetails: ${JSON.stringify(e.detail)}` : "" }`, }, ],