From 8fc1d1e20b5bbd8c612197949fd86a88def92c6b Mon Sep 17 00:00:00 2001 From: Hu Gang <18768366022@163.com> Date: Tue, 27 May 2025 17:11:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BA=86=E4=BB=A3=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en.ts | 52 ++++++++------- src/i18n/lang/zh-cn.ts | 45 ++++++------- .../createapp/components/AgentAppConfig.vue | 65 ++++++++++++------- src/views/createapp/components/McpDrawer.vue | 20 ++++-- src/views/createapp/index.vue | 23 ++++--- 5 files changed, 119 insertions(+), 86 deletions(-) diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 416af8b1..287e7397 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -51,6 +51,7 @@ export default { }, semantic: { semantic_interface: 'Semantic Interface', + max_select_mcp_server: 'Choose up to {num} mcp services', mcp_service: 'MCP Service', create_plugin: 'Create Plugin', semantic_interface_center: 'Semantic interface center', @@ -82,8 +83,9 @@ export default { save: 'Save', preview: 'Preview', publish: 'Publish', - publish_condition: 'Need to debug all workflows in the application successfully before publishing the application', - icon:'Icon', + publish_condition: + 'Need to debug all workflows in the application successfully before publishing the application', + icon: 'Icon', baseMessage: 'Base Message', copyFailed: 'Copy failed', checkFormat: 'Please check the format', @@ -142,33 +144,34 @@ export default { app_published: 'Published', app_config: 'App Config', agent_app: 'Agent App', - mcp_app:'MCP App', + mcp_app: 'MCP App', create_or_edit_workflow_first: 'Please create/edit a workflow first', ui_preview: 'UI Preview', - appName:'Agent Name', - appName_input:'Please enter the agent name', - appDescription:'Agent Description', - appDescription_input:'Please enter the agent description', - modelSelected:'Model Selection', - modelSelected_input:'Please select a model', + appName: 'Agent Name', + appName_input: 'Please enter the agent name', + appDescription: 'Agent Description', + appDescription_input: 'Please enter the agent description', + modelSelected: 'Model Selection', + modelSelected_input: 'Please select a model', multi_Dialogue: 'Multi-turn Dialogue', multi_Dialogue_select: 'select the number of turns', - ability_Configuration:'Ability Configuration', - MCPService:'MCP Service', - MCPService_add:'Add the MCP service', - permissionConfiguration:'Permission Configuration', - permission:'Permission', - permission_public:'Public (visible to everyone)', - permission_private:'Private (visible only to you)', - somePeople:'Visible to some people', - updateSuccessfully:'Update successfully', - pleasemodifyTheName: 'The workflow name already exists under the current application, please modify the name and try again', + ability_Configuration: 'Ability Configuration', + MCPService: 'MCP Service', + MCPService_add: 'Add the MCP service', + permissionConfiguration: 'Permission Configuration', + permission: 'Permission', + permission_public: 'Public (visible to everyone)', + permission_private: 'Private (visible only to you)', + somePeople: 'Visible to some people', + updateSuccessfully: 'Update successfully', + pleasemodifyTheName: + 'The workflow name already exists under the current application, please modify the name and try again', deleteWorkflowSuccessfully: 'Delete workflow successfully', createSuccessfully: 'Create successfully', successfully: 'Successfully', failed: 'Failed', - inputContent:"Input content", - outputContent:"Output content", + inputContent: 'Input content', + outputContent: 'Output content', link: 'Related links', addLink: 'Add link', addFiveLinks: 'Up to 5 links can be added', @@ -245,7 +248,7 @@ export default { myApp: 'My Apps', }, feedback: { - noCopyMessage: 'No information to copy', + noCopyMessage: 'No information to copy', feedbackSuccesful: 'Feedback succeeded.', regenerate: 'Regenerate', // 这里我保留了原样,因为通常键名不加双引号 try_ask_me: 'Try ask me:', @@ -390,9 +393,10 @@ export default { flow_description: 'Workflow description', create_flow: 'Create workflow', step_configuration: 'Step configuration', - debug_after_connection: 'Debugging can only be performed after node connection is complete', + debug_after_connection: + 'Debugging can only be performed after node connection is complete', no_flow: 'No workflow', - choose_flow:"Please choose a workflow", + choose_flow: 'Please choose a workflow', debug: 'Debug', enterWorkflowName: 'Please enter workflow name', }, diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index cc138129..d480cd8c 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -51,6 +51,7 @@ export default { }, semantic: { semantic_interface: '语义接口', + max_select_mcp_server: '最多可选择 {num} 个MCP服务', mcp_service: 'MCP服务', create_plugin: '创建插件', semantic_interface_center: '语义接口中心', @@ -81,7 +82,7 @@ export default { pleaseEnter: '请输入', save: '保存', publish_condition: '需要当前应用中所有工作流调试成功才能发布应用', - icon:'图标', + icon: '图标', baseMessage: '基本信息', preview: '预览', publish: '发布', @@ -142,33 +143,33 @@ export default { app_published: '已发布', app_config: '界面配置', agent_app: '创建智能体应用', - mcp_app:'创建工作流应用', + mcp_app: '创建工作流应用', create_or_edit_workflow_first: '请先创建/编辑工作流', ui_preview: '界面预览', - appName:'智能体名称', - appName_input:'请输入智能体名称', - appDescription:'智能体描述', - appDescription_input:'请输入智能体描述', - modelSelected:'模型选择', - modelSelected_input:'请选择模型', + appName: '智能体名称', + appName_input: '请输入智能体名称', + appDescription: '智能体描述', + appDescription_input: '请输入智能体描述', + modelSelected: '模型选择', + modelSelected_input: '请选择模型', multi_Dialogue: '多轮对话', - multi_Dialogue_select: '请选择多轮对话', - ability_Configuration:'能力配置', - MCPService:'MCP服务', - MCPService_add:'添加MCP服务', - permissionConfiguration:'权限配置', - permission:'权限', - permission_public:'公开(所有人可见)', - permission_private:'私密(仅自己可见)', - somePeople:'部分人可见', + multi_Dialogue_select: '请选择对话轮次', + ability_Configuration: '能力配置', + MCPService: 'MCP服务', + MCPService_add: '添加MCP服务', + permissionConfiguration: '权限配置', + permission: '权限', + permission_public: '公开(所有人可见)', + permission_private: '私密(仅自己可见)', + somePeople: '部分人可见', updateSuccessfully: '更新成功', - pleasemodifyTheName:'当前应用下已有该工作流名称,请修改名称', + pleasemodifyTheName: '当前应用下已有该工作流名称,请修改名称', deleteWorkflowSuccessfully: '删除工作流成功', createSuccessfully: '创建成功', successfully: '成功', failed: '失败', - inputContent:"输入内容", - outputContent:"输出内容", + inputContent: '输入内容', + outputContent: '输出内容', link: '相关链接', addLink: '添加链接', addFiveLinks: '最多添加5个链接', @@ -242,7 +243,7 @@ export default { myApp: '我的应用', }, feedback: { - noCopyMessage:'无可复制的信息', + noCopyMessage: '无可复制的信息', feedbackSuccesful: '反馈成功', regenerate: '重新生成', try_ask_me: '你可以继续问我:', @@ -382,7 +383,7 @@ export default { step_configuration: '步骤配置', debug_after_connection: '节点连接完成才能进行调试', no_flow: '暂无工作流', - choose_flow:"请选择工作流", + choose_flow: '请选择工作流', debug: '调试', enterWorkflowName: '请输入工作流名称', }, diff --git a/src/views/createapp/components/AgentAppConfig.vue b/src/views/createapp/components/AgentAppConfig.vue index d5b47fc1..5f6d5e2f 100644 --- a/src/views/createapp/components/AgentAppConfig.vue +++ b/src/views/createapp/components/AgentAppConfig.vue @@ -11,7 +11,9 @@ import type { AddedModalList } from '@/apis/paths/type'; import PermissionControl from './PermissionControl.vue'; import type { Mcp } from './McpDrawer.vue'; import CustomLoading from '../../customLoading/index.vue'; +import i18n from '@/i18n'; +const { t } = i18n.global; const route = useRoute(); interface AgentConfig { @@ -72,15 +74,21 @@ const selectedMcpService = computed(() => ); const rules = reactive>({ - name: [{ required: true, message: '请输入智能体名称', trigger: 'blur' }], + name: [{ required: true, message: t('app.appName_input'), trigger: 'blur' }], description: [ - { required: true, message: '请输入智能体简介', trigger: 'blur' }, + { required: true, message: t('app.appDescription_input'), trigger: 'blur' }, + ], + model: [ + { required: true, message: t('app.modelSelected_input'), trigger: 'blur' }, ], - model: [{ required: true, message: '请选择模型', trigger: 'blur' }], dialogRounds: [ - { required: true, message: '请选择对话轮次', trigger: 'blur' }, + { + required: true, + message: t('app.multi_Dialogue_select'), + trigger: 'blur', + }, ], - permission: [{ required: true, message: '请选择对话轮次', trigger: 'blur' }], + permission: [{ required: true }], }); const isMcpDrawerVisible = ref(false); @@ -224,7 +232,7 @@ onMounted(async () => {
- 基本信息 + {{ t('semantic.baseMessage') }} - +
{
- 上传图标 + {{ t('plugin_center.upload_icon') }}
- + - + - + {