diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 011d83f72815f0290e1f4e34ed46a57ae28f267e..ff313e566720f0d436161d714e6438a70981ad09 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -31,10 +31,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', @@ -58,6 +72,40 @@ 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", + }, main: { describe1: "Hi! I'm", @@ -125,6 +173,7 @@ export default { myApp: 'My Apps', }, feedback: { + noCopyMessage: 'No information to copy', feedbackSuccesful: 'Feedback succeeded.', regenerate: 'Regenerate', // 这里我保留了原样,因为通常键名不加双引号 try_ask_me: 'Try ask me:', @@ -259,6 +308,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 4738b2cdbe51cb0b41976855da20135af7602a6b..585997cc42b22d0bcc1734f8575366e9b0f7a886 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -40,6 +40,16 @@ export default { submit: '确定', edit: '编辑', analyze: '解析', + pleaseEnter: '请输入', + save: '保存', + publish_condition: '需要当前应用中所有工作流调试成功才能发布应用', + icon:'图标', + baseMessage: '基本信息', + preview: '预览', + publish: '发布', + copyFailed: '复制失败', + checkFormat: '请检查格式', + }, app: { app_center: '应用中心', @@ -63,6 +73,39 @@ 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:"输出内容", }, main: { describe1: '你好,我是', @@ -83,7 +126,7 @@ export default { refresh: '换一换', query_interpretation: '请选择识别方式', Automatic: '自动识别', - ask_me_anything: '在此输入您想了解的内容,输入Shift+Enter换行', + ask_me_anything: '在此输入您想了解的内容,输入Shift+Enter换行', you_might_want_to_know: '你可能想问', close: '关闭', email1: '联系邮箱', @@ -127,6 +170,7 @@ export default { myApp: '我的应用', }, feedback: { + noCopyMessage:'无可复制的信息', feedbackSuccesful: '反馈成功', regenerate: '重新生成', try_ask_me: '你可以继续问我:', @@ -254,6 +298,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 af58040213f2a8a40ef14a003a9a81e6a3997289..7fa62c814f5c2f881dbcbaefe7fada53daa6b653 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -69,7 +69,7 @@ export const writeText = (text: string): void => { textArea.focus(); textArea.select(); new Promise((res, rej) => { - document.execCommand('copy') ? res() : rej(new Error('复制失败')); + document.execCommand('copy') ? res() : rej(new Error(i18n.global.t('semantic.copyFailed'))); textArea.remove(); }); } diff --git a/src/views/createapp/components/PermissionControl.vue b/src/views/createapp/components/PermissionControl.vue new file mode 100644 index 0000000000000000000000000000000000000000..5fa798574d43c933f6fc9241737f3d34a07f2b80 --- /dev/null +++ b/src/views/createapp/components/PermissionControl.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue index fced29591be0cd0a50c6dc0583f093f7ffd919ce..405fe9282bcbc7be2dc1e33f055d4f675fcd900e 100644 --- a/src/views/createapp/components/appConfig.vue +++ b/src/views/createapp/components/appConfig.vue @@ -296,7 +296,7 @@ defineExpose({
- 基本信息 + {{ $t('semantic.baseMessage') }} @@ -316,7 +316,7 @@ defineExpose({ > - +
- 上传图标 + {{ $t('semantic.interface_upload')}}
@@ -352,7 +352,7 @@ defineExpose({ maxlength="20" v-model="createAppForm.name" clearable - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" > @@ -363,7 +363,7 @@ defineExpose({ place clearable type="textarea" - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" @keydown.enter="handleTextareaEnter" > @@ -385,7 +385,7 @@ defineExpose({ maxlength="200" :class="{ validUrl: checkUrl(createAppForm.links[index]) }" v-model="createAppForm.links[index]" - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" clearable > @@ -417,7 +417,7 @@ defineExpose({ class="w320" maxlength="30" v-model="createAppForm.recommendedQuestions[index]" - placeholder="请输入" + :placeholder="$t('semantic.pleaseEnter')" clearable > @@ -534,7 +534,7 @@ defineExpose({
-
界面预览
+
{{ $t("app.ui_preview") }}
diff --git a/src/views/createapp/components/codeMirror/nodeMirrorText.vue b/src/views/createapp/components/codeMirror/nodeMirrorText.vue index c5b5adc62a80fdb21e7c7a11efeebfe3a2a2ae7c..5177f0e9b1d6f5a6e59d2d8c26a99fcfb20875c3 100644 --- a/src/views/createapp/components/codeMirror/nodeMirrorText.vue +++ b/src/views/createapp/components/codeMirror/nodeMirrorText.vue @@ -120,11 +120,11 @@ watch( const handleCopy = (code) => { // 判断是否有值 if (!code) { - errorMsg('无可复制的信息'); + errorMsg($t('feedback.noCopyMessage')); return; } writeText(yaml.dump(code)); - successMsg('复制成功'); + successMsg($t('feedback.copied_successfully')); };