From 7df1ccf1f67079aa39e92fe8cd2a2e3c3b9d3d27 Mon Sep 17 00:00:00 2001 From: JzoNg Date: Mon, 26 May 2025 10:48:56 +0800 Subject: [PATCH] add i18n for MCP server card & modal --- web/app/components/tools/mcp/mcp-service-card.tsx | 2 -- web/i18n/en-US/tools.ts | 15 +++++++++++++++ web/i18n/zh-Hans/tools.ts | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/web/app/components/tools/mcp/mcp-service-card.tsx b/web/app/components/tools/mcp/mcp-service-card.tsx index 2454e90e62..2f86893873 100644 --- a/web/app/components/tools/mcp/mcp-service-card.tsx +++ b/web/app/components/tools/mcp/mcp-service-card.tsx @@ -12,7 +12,6 @@ import Switch from '@/app/components/base/switch' import Divider from '@/app/components/base/divider' import CopyFeedback from '@/app/components/base/copy-feedback' import Confirm from '@/app/components/base/confirm' -import ShareQRCode from '@/app/components/base/qrcode' import type { AppDetailResponse } from '@/models/app' import { useAppContext } from '@/context/app-context' import type { AppSSO } from '@/types/app' @@ -88,7 +87,6 @@ function MCPServiceCard({ content={appUrl} className={'!size-6'} /> - {/* button copy link/ button regenerate */} {showConfirmDelete && ( diff --git a/web/i18n/en-US/tools.ts b/web/i18n/en-US/tools.ts index 8c4306e86f..fb6901d2e7 100644 --- a/web/i18n/en-US/tools.ts +++ b/web/i18n/en-US/tools.ts @@ -190,6 +190,21 @@ const translation = { getTools: 'Get tools', toolsNum: '{{count}} tools included', onlyTool: '1 tool included', + server: { + title: 'MCP Server', + url: 'Server URL', + addDescription: 'Add description', + edit: 'Edit description', + modal: { + addTitle: 'Add description to enable MCP server', + editTitle: 'Edit description', + descriptionPlaceholder: 'Explain what this tool does and how it should be used by the LLM', + parameters: 'Parameters', + parametersTip: 'Add descriptions for each parameter to help the LLM understand their purpose and constraints.', + parametersPlaceholder: 'Parameter purpose and constraints', + confirm: 'Enable MCP Server', + }, + }, }, } diff --git a/web/i18n/zh-Hans/tools.ts b/web/i18n/zh-Hans/tools.ts index 2c746766ab..52a6bf36f1 100644 --- a/web/i18n/zh-Hans/tools.ts +++ b/web/i18n/zh-Hans/tools.ts @@ -190,6 +190,21 @@ const translation = { getTools: '获取工具', toolsNum: '包含 {{count}} 个工具', onlyTool: '包含 1 个工具', + server: { + title: 'MCP 服务', + url: '服务端点 URL', + addDescription: '添加描述', + edit: '编辑描述', + modal: { + addTitle: '添加描述以启用 MCP 服务', + editTitle: '编辑 MCP 服务描述', + descriptionPlaceholder: '解释此工具的功能以及 LLM 应如何使用它', + parameters: '参数', + parametersTip: '为每个参数添加描述,以帮助 LLM 理解其目的和约束条件。', + parametersPlaceholder: '参数的用途和约束条件', + confirm: '启用 MCP 服务', + }, + }, }, }