diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 55dff385a818ea4d6a7392f34d31daf76179dac5..68b105002512ccd3eaa2961714b1dfe7ffa44137 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -67,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', }, plugin_center: { plugin_name: 'Plugin Name', @@ -118,6 +132,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", @@ -132,6 +185,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', @@ -142,6 +197,7 @@ export default { 'Ask me anything about openEuler. Press Shift+Enter to start a new line.', you_might_want_to_know: 'You might want to know:', close: 'Close', + confirm: 'Confirm', email1: 'Email:', email2: 'contact@openeuler.io', opinions: @@ -185,6 +241,7 @@ export default { myApp: 'My Apps', }, feedback: { + noCopyMessage: 'No information to copy', feedbackSuccesful: 'Feedback succeeded.', regenerate: 'Regenerate', // 这里我保留了原样,因为通常键名不加双引号 try_ask_me: 'Try ask me:', @@ -315,12 +372,25 @@ export default { witChainD_id: 'id', describe_the_witChainD: 'Please enter witChainD id', find_witChainD: 'Please enter witChainD name/id', + knowledge: 'Knowledge', + fiveKnowledge: 'You can select up to 5 knowledge bases', }, flow: { flow_start: 'Workflow in progress', 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 c242968396628642179bbf506ce8b44be90efc07..5ad6e702c1b113b2aaf74d3d848f53e471181140 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -76,6 +76,15 @@ export default { submit: '确定', edit: '编辑', analyze: '解析', + pleaseEnter: '请输入', + save: '保存', + publish_condition: '需要当前应用中所有工作流调试成功才能发布应用', + icon:'图标', + baseMessage: '基本信息', + preview: '预览', + publish: '发布', + copyFailed: '复制失败', + checkFormat: '请检查格式', }, plugin_center: { plugin_name: '插件名称', @@ -123,6 +132,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: '你好,我是', @@ -137,15 +185,18 @@ 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: '关闭', + confirm: '确定', email1: '联系邮箱', email2: 'contact@openeuler.io', opinions: '所有内容均由人工智能输出,仅供参考,不代表我们的态度和观点', @@ -187,6 +238,7 @@ export default { myApp: '我的应用', }, feedback: { + noCopyMessage:'无可复制的信息', feedbackSuccesful: '反馈成功', regenerate: '重新生成', try_ask_me: '你可以继续问我:', @@ -311,12 +363,24 @@ export default { witChainD_id: '资产库 ID', describe_the_witChainD: '请输入', find_witChainD: '请输入知识库名称/ID', + fiveKnowledge: '最多只能选择5个知识库', }, flow: { flow_start: '工作流进行中', 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/createapp/components/AssetLibraryDrawer.vue b/src/views/createapp/components/AssetLibraryDrawer.vue index e2937ba50cb983950500ad801f60af64aa08f667..efc05adf1f1b8cf4dcede31f17a26b12d145807e 100644 --- a/src/views/createapp/components/AssetLibraryDrawer.vue +++ b/src/views/createapp/components/AssetLibraryDrawer.vue @@ -44,7 +44,7 @@ function onConfirm() { .flatMap((item) => item.kbList) .filter((item) => item.isChecked); if (checkedKbList.length > 5) { - ElMessage.error('最多只能选择5个知识库'); + ElMessage.error(i18n.global.t('witChainD.fiveKnowledge')); return; } emits('confirm', checkedKbList); @@ -58,7 +58,7 @@ onMounted(() => {
@@ -67,7 +67,7 @@ onMounted(() => {
@@ -109,8 +109,8 @@ onMounted(() => { diff --git a/src/views/createapp/components/PermissionControl.vue b/src/views/createapp/components/PermissionControl.vue index 2af773f64bef8d7ea166b5c1dd47f09924bdd301..349f2fdff01767d3f28706509694c3101885659a 100644 --- a/src/views/createapp/components/PermissionControl.vue +++ b/src/views/createapp/components/PermissionControl.vue @@ -1,7 +1,7 @@