diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 7263ce45ac862e471408ebb62d8c8cb05f7a6998..dc152fa9814af5e8a5f1d5fb2e1b2499a623f9f3 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -1,3 +1,5 @@ +import { link } from "fs"; + export default { common: { confirm: 'Confirm', @@ -65,10 +67,24 @@ export default { upload_semantic_interface: 'Upload Interface', edit_semantic_interface: 'Edit Interface', view_semantic_interface: 'View Interface', + choose_file: 'Choose File', + tip1: 'Drag file here or', + tip2: 'Format: YAML, Size < 2M', cancel: 'Cancel', submit: 'Submit', edit: 'Edit', analyze: 'Analyze', + interface_path: 'Interface path', + interface_description: 'Interface description', + pleaseEnter: 'Please enter', + save: 'Save', + preview: 'Preview', + publish: 'Publish', + 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', }, app: { app_center: 'App Center', @@ -92,6 +108,45 @@ export default { edit: 'Edit', analyze: 'Analyze', unpublished: 'Unpublished', + publishSuccess: 'Publish successfully', + publishFailed: 'Publish failed', + create_app: 'Create App', + app_published: 'Published', + app_config: 'App Config', + agent_app: 'Agent 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', + 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', + deleteWorkflowSuccessfully: 'Delete workflow successfully', + createSuccessfully: 'Create successfully', + successfully: 'Successfully', + failed: 'Failed', + inputContent:"Input content", + outputContent:"Output content", + link: 'Related links', + addLink: 'Add link', + addFiveLinks: 'Up to 5 links can be added', + optional: 'Optional', + searchUser: 'Search user', + selected: 'Selected', }, main: { describe1: "Hi! I'm", @@ -106,6 +161,8 @@ export default { openEuler_use_cases: 'AI容器栈智能助手', openEuler_use_cases_describe: 'AI容器栈', question: 'Recommendation qustions', + addQuestion: 'Add question', + addFiveQuestions: 'Up to 5 questions can be added', smart_shell_describe: 'Experience the future of OSs with our smart shell! Use natural language to diagnose and optimize your system.', try_app: 'Enter the App Center', @@ -159,6 +216,7 @@ export default { myApp: 'My Apps', }, feedback: { + noCopyMessage: 'No information to copy', feedbackSuccesful: 'Feedback succeeded.', regenerate: 'Regenerate', // 这里我保留了原样,因为通常键名不加双引号 try_ask_me: 'Try ask me:', @@ -295,6 +353,17 @@ export default { flow_end: 'Workflow completed', flow_params_error: 'Missing parameters', flow_pause: 'Workflow paused', + edit_flow: 'Edit workflow', + edit_workflow: 'Edit workflow', + flow_name: 'Workflow name', + 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', + no_flow: 'No workflow', + choose_flow:"Please choose a workflow", + debug: 'Debug', + enterWorkflowName: 'Please enter workflow name', }, pagination: { prev: 'Previous', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 8243536d12a19fd4eef5ea3a3d973ba1dee35ac0..48aefad556646102c2b3d93fb663fd195a35e4d1 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -74,6 +74,16 @@ export default { submit: '确定', edit: '编辑', analyze: '解析', + pleaseEnter: '请输入', + save: '保存', + publish_condition: '需要当前应用中所有工作流调试成功才能发布应用', + icon:'图标', + baseMessage: '基本信息', + preview: '预览', + publish: '发布', + copyFailed: '复制失败', + checkFormat: '请检查格式', + }, app: { app_center: '应用中心', @@ -97,6 +107,45 @@ export default { edit: '编辑', analyze: '解析', unpublished: '未发布', + publishSuccess: '发布成功', + publishFailed: '发布失败', + create_app: '创建应用', + app_published: '已发布', + app_config: '界面配置', + agent_app: '创建智能体应用', + mcp_app:'创建工作流应用', + create_or_edit_workflow_first: '请先创建/编辑工作流', + ui_preview: '界面预览', + 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:'部分人可见', + updateSuccessfully: '更新成功', + pleasemodifyTheName:'当前应用下已有该工作流名称,请修改名称', + deleteWorkflowSuccessfully: '删除工作流成功', + createSuccessfully: '创建成功', + successfully: '成功', + failed: '失败', + inputContent:"输入内容", + outputContent:"输出内容", + link: '相关链接', + addLink: '添加链接', + addFiveLinks: '最多添加5个链接', + optional: '可选', + searchUser: '搜索用户', + selected: '已选', }, main: { describe1: '你好,我是', @@ -111,13 +160,15 @@ export default { openEuler_use_cases: 'AI容器栈智能助手', openEuler_use_cases_describe: 'AI容器栈', question: '推荐问题', + addQuestion: '添加问题', + addFiveQuestions: '最多添加5个问题', smart_shell_describe: '欢迎探索首款自然语言交互的智能操作系统:一句话,即享智能诊断与优化', try_app: '进入应用中心', refresh: '换一换', query_interpretation: '请选择识别方式', Automatic: '自动识别', - ask_me_anything: '在此输入您想了解的内容,输入 Shift+Enter 换行', + ask_me_anything: '在此输入您想了解的内容,输入Shift+Enter换行', you_might_want_to_know: '你可能想问', close: '关闭', email1: '联系邮箱', @@ -161,6 +212,7 @@ export default { myApp: '我的应用', }, feedback: { + noCopyMessage:'无可复制的信息', feedbackSuccesful: '反馈成功', regenerate: '重新生成', try_ask_me: '你可以继续问我:', @@ -291,6 +343,17 @@ export default { flow_end: '工作流结束', flow_params_error: '缺少参数', flow_pause: '工作流暂停', + edit_flow: '编辑工作流', + edit_workflow: '工作流编排', + flow_name: '工作流名称', + flow_description: '工作流描述', + create_flow: '创建工作流', + step_configuration: '步骤配置', + debug_after_connection: '节点连接完成才能进行调试', + no_flow: '暂无工作流', + choose_flow:"请选择工作流", + debug: '调试', + enterWorkflowName: '请输入工作流名称', }, pagination: { prev: 'Previous', diff --git a/src/utils/tools.ts b/src/utils/tools.ts index 9e5dad15659e3aae48b05ba886a8acfad020fe0c..d4c830b867888c41ba0e7bbd0a75435b65f29a3e 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -69,11 +69,7 @@ export const writeText = (text: string): void => { textArea.focus(); textArea.select(); new Promise((res, rej) => { - if (document.execCommand('copy')) { - res(); - } else { - rej(new Error('复制失败')); - } + document.execCommand('copy') ? res() : rej(new Error(i18n.global.t('semantic.copyFailed'))); textArea.remove(); }); } diff --git a/src/views/api/components/McpDrawer.vue b/src/views/api/components/McpDrawer.vue index 6009ad28d521d18cea348bce81d9327b41279211..133815117e88fe9b2296c9ec95c6290a7b8509c0 100644 --- a/src/views/api/components/McpDrawer.vue +++ b/src/views/api/components/McpDrawer.vue @@ -136,7 +136,7 @@ watch( :model="form" :rules="rules" > - +
- 上传图标 + {{ $t('semantic.interface_upload') }}
diff --git a/src/views/createapp/components/AgentAppConfig.vue b/src/views/createapp/components/AgentAppConfig.vue index 9ae5694dedca077702a34dfa6720c3b3c8894a98..251f096b5190f11b749070eb4579b7741ab4dbc7 100644 --- a/src/views/createapp/components/AgentAppConfig.vue +++ b/src/views/createapp/components/AgentAppConfig.vue @@ -247,7 +247,7 @@ onMounted(async () => {
- 基本信息 + {{ $t('semantic.baseMessage') }} - +
{
- 上传图标 + {{ $t('semantic.interface_upload') }}
- + - + - + {