diff --git a/src/components/deeplink/McpConfirmation.tsx b/src/components/deeplink/McpConfirmation.tsx index 00da52e89..c2fb9074b 100644 --- a/src/components/deeplink/McpConfirmation.tsx +++ b/src/components/deeplink/McpConfirmation.tsx @@ -1,4 +1,5 @@ import { useMemo } from "react"; +import { useTranslation } from "react-i18next"; import { DeepLinkImportRequest } from "../../lib/api/deeplink"; import { decodeBase64Utf8 } from "../../lib/utils/base64"; @@ -7,6 +8,8 @@ export function McpConfirmation({ }: { request: DeepLinkImportRequest; }) { + const { t } = useTranslation(); + const mcpServers = useMemo(() => { if (!request.config) return null; try { @@ -20,14 +23,15 @@ export function McpConfirmation({ }, [request.config]); const targetApps = request.apps?.split(",") || []; + const serverCount = Object.keys(mcpServers || {}).length; return (
-

批量导入 MCP Servers

+

{t("deeplink.mcp.title")}

{targetApps.map((app) => ( @@ -43,7 +47,7 @@ export function McpConfirmation({
{mcpServers && @@ -63,7 +67,7 @@ export function McpConfirmation({ {request.enabled && (
⚠️ - 导入后将立即写入所有指定应用的配置文件 + {t("deeplink.mcp.enabledWarning")}
)}
diff --git a/src/components/deeplink/PromptConfirmation.tsx b/src/components/deeplink/PromptConfirmation.tsx index 8570763b3..3efd72b85 100644 --- a/src/components/deeplink/PromptConfirmation.tsx +++ b/src/components/deeplink/PromptConfirmation.tsx @@ -1,4 +1,5 @@ import { useMemo } from "react"; +import { useTranslation } from "react-i18next"; import { DeepLinkImportRequest } from "../../lib/api/deeplink"; import { decodeBase64Utf8 } from "../../lib/utils/base64"; @@ -7,6 +8,8 @@ export function PromptConfirmation({ }: { request: DeepLinkImportRequest; }) { + const { t } = useTranslation(); + const decodedContent = useMemo(() => { if (!request.content) return ""; return decodeBase64Utf8(request.content); @@ -14,18 +17,18 @@ export function PromptConfirmation({ return (
-

导入系统提示词

+

{t("deeplink.prompt.title")}

{request.app}
{request.name}
@@ -33,7 +36,7 @@ export function PromptConfirmation({ {request.description && (
{request.description}
@@ -41,7 +44,7 @@ export function PromptConfirmation({
           {decodedContent.substring(0, 500)}
@@ -52,7 +55,7 @@ export function PromptConfirmation({
       {request.enabled && (
         
⚠️ - 导入后将立即启用此提示词,其他提示词将被禁用 + {t("deeplink.prompt.enabledWarning")}
)}
diff --git a/src/components/deeplink/SkillConfirmation.tsx b/src/components/deeplink/SkillConfirmation.tsx index 7594538fd..265379c8f 100644 --- a/src/components/deeplink/SkillConfirmation.tsx +++ b/src/components/deeplink/SkillConfirmation.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from "react-i18next"; import { DeepLinkImportRequest } from "../../lib/api/deeplink"; export function SkillConfirmation({ @@ -5,13 +6,15 @@ export function SkillConfirmation({ }: { request: DeepLinkImportRequest; }) { + const { t } = useTranslation(); + return (
-

添加 Claude Skill 仓库

+

{t("deeplink.skill.title")}

{request.repo} @@ -20,7 +23,7 @@ export function SkillConfirmation({
{request.directory} @@ -30,7 +33,7 @@ export function SkillConfirmation({
{request.branch || "main"}
@@ -38,7 +41,7 @@ export function SkillConfirmation({ {request.skillsPath && (
{request.skillsPath}
@@ -46,10 +49,8 @@ export function SkillConfirmation({
-

ℹ️ 此操作将添加 Skill 仓库到列表。

-

- 添加后,您可以在 Skills 管理界面中选择安装具体的 Skill。 -

+

ℹ️ {t("deeplink.skill.hint")}

+

{t("deeplink.skill.hintDetail")}

); diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 7859dd16e..57f251608 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -787,7 +787,30 @@ "configRemote": "Remote Config", "configDetails": "Config Details", "configUrl": "Config File URL", - "configMergeError": "Failed to merge configuration file" + "configMergeError": "Failed to merge configuration file", + "mcp": { + "title": "Batch Import MCP Servers", + "targetApps": "Target Apps", + "serverCount": "MCP Servers ({{count}})", + "enabledWarning": "After import, configurations will be written to all specified apps immediately" + }, + "prompt": { + "title": "Import System Prompt", + "app": "App", + "name": "Name", + "description": "Description", + "contentPreview": "Content Preview", + "enabledWarning": "After import, this prompt will be enabled immediately and other prompts will be disabled" + }, + "skill": { + "title": "Add Claude Skill Repository", + "repo": "GitHub Repository", + "directory": "Target Directory", + "branch": "Branch", + "skillsPath": "Skills Path", + "hint": "This will add the Skill repository to the list.", + "hintDetail": "After adding, you can install specific Skills from the Skills management page." + } }, "iconPicker": { "search": "Search Icons", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index 734d352e6..d11e8eb52 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -787,7 +787,30 @@ "configRemote": "远程配置", "configDetails": "配置详情", "configUrl": "配置文件 URL", - "configMergeError": "合并配置文件失败" + "configMergeError": "合并配置文件失败", + "mcp": { + "title": "批量导入 MCP Servers", + "targetApps": "目标应用", + "serverCount": "MCP Servers ({{count}} 个)", + "enabledWarning": "导入后将立即写入所有指定应用的配置文件" + }, + "prompt": { + "title": "导入系统提示词", + "app": "应用", + "name": "名称", + "description": "描述", + "contentPreview": "内容预览", + "enabledWarning": "导入后将立即启用此提示词,其他提示词将被禁用" + }, + "skill": { + "title": "添加 Claude Skill 仓库", + "repo": "GitHub 仓库", + "directory": "目标目录", + "branch": "分支", + "skillsPath": "Skills 路径", + "hint": "此操作将添加 Skill 仓库到列表。", + "hintDetail": "添加后,您可以在 Skills 管理界面中选择安装具体的 Skill。" + } }, "iconPicker": { "search": "搜索图标",