From 6788ff4e6480f4bd93d146d7a406935aced5a518 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Mon, 26 May 2025 16:19:51 +0800 Subject: [PATCH 01/13] i18n --- src/i18n/lang/en.ts | 3 +++ src/i18n/lang/zh-cn.ts | 21 ++++++++++++++++ src/views/createapp/components/appConfig.vue | 8 +++---- .../components/codeMirror/nodeMirrorText.vue | 4 ++-- src/views/createapp/components/workFlow.vue | 14 +++++------ .../components/workFlowConfig/BranchNode.vue | 4 ++-- .../components/workFlowConfig/CustomNode.vue | 6 ++--- .../workFlowConfig/CustomSaENode.vue | 4 ++-- .../workFlowConfig/editFlowName.vue | 14 +++++------ .../workFlowConfig/workFlowDialog.vue | 14 +++++------ .../workFlowConfig/yamlEditDrawer.vue | 4 ++-- .../createapp/components/workFlowDebug.vue | 2 +- src/views/createapp/index.vue | 24 +++++++++---------- .../dialogue/components/InterPreview.vue | 4 ++-- 14 files changed, 75 insertions(+), 51 deletions(-) diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 011d83f..fab099f 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -31,6 +31,9 @@ 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', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 4738b2c..a314f02 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -40,6 +40,11 @@ export default { submit: '确定', edit: '编辑', analyze: '解析', + pleaseEnter: '请输入', + save: '保存', + preview: '预览', + publish: '发布', + publish_condition: '需要当前应用中所有工作流调试成功才能发布应用' }, app: { app_center: '应用中心', @@ -63,6 +68,11 @@ export default { edit: '编辑', analyze: '解析', unpublished: '未发布', + publishSuccess: '发布成功', + publishFailed: '发布失败', + create_app: '创建应用', + app_published: '已发布', + app_config: '界面配置', }, main: { describe1: '你好,我是', @@ -127,6 +137,7 @@ export default { myApp: '我的应用', }, feedback: { + noCopyMessage:'无可复制的信息', feedbackSuccesful: '反馈成功', regenerate: '重新生成', try_ask_me: '你可以继续问我:', @@ -254,6 +265,16 @@ 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: '调试', }, pagination: { prev: 'Previous', diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue index fced295..46ecded 100644 --- a/src/views/createapp/components/appConfig.vue +++ b/src/views/createapp/components/appConfig.vue @@ -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 > diff --git a/src/views/createapp/components/codeMirror/nodeMirrorText.vue b/src/views/createapp/components/codeMirror/nodeMirrorText.vue index c5b5adc..5177f0e 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')); }; diff --git a/src/views/createapp/index.vue b/src/views/createapp/index.vue index bf0bdf8..b5bab71 100644 --- a/src/views/createapp/index.vue +++ b/src/views/createapp/index.vue @@ -162,7 +162,6 @@ const handleJumperAppCenter = () => { @click="handleJumperAppCenter" > {{ $t('menu.app_center') }} - {{ $t('menu.app_center') }} / {{ $t('app.create_app') }} @@ -172,7 +171,6 @@ const handleJumperAppCenter = () => { :class="{ debugSuccess: publishStatus === '已发布' }" > {{ $t('app.app_published') }} - {{ $t('app.app_published') }}
@@ -196,7 +194,6 @@ const handleJumperAppCenter = () => { :class="{ createAppBtnActive: createAppType !== 'appConfig' }" @click="handleChangeAppType('workFlow')" > -
{{ $t('flow.edit_workflow') }}
{{ $t('flow.edit_workflow') }}
-- Gitee From 90c39c5ad60f5c7140706b9edab8911bc5d2abad Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Mon, 26 May 2025 19:51:03 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=20=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/createapp/index.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/views/createapp/index.vue b/src/views/createapp/index.vue index b5bab71..5c8ee48 100644 --- a/src/views/createapp/index.vue +++ b/src/views/createapp/index.vue @@ -180,8 +180,6 @@ const handleJumperAppCenter = () => { @click="handleChangeAppType('appConfig')" >
{{ $t('app.app_config') }}
-
{{ $t('app.app_config') }}
- -- Gitee From d013e696163bff6f61daa2494b55b8d6b56919b8 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Mon, 26 May 2025 19:57:54 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en.ts | 4 ++-- src/i18n/lang/zh-cn.ts | 1 + src/views/createapp/components/workFlowConfig/BranchNode.vue | 4 ++-- src/views/createapp/components/workFlowConfig/CustomNode.vue | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index e71435e..c8dd732 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -94,8 +94,8 @@ export default { MCPService_add:'Add the MCP service', permissionConfiguration:'Permission Configuration', permission:'Permission', - public:'Public (visible to everyone)', - private:'Private (visible only to you)', + 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', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index f2ff6eb..e1c7dfb 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -14,6 +14,7 @@ export default { app_center: '应用中心', sql: '知识库', }, + semantic: { semantic_interface_center: '语义接口中心', all_select: '全部', diff --git a/src/views/createapp/components/workFlowConfig/BranchNode.vue b/src/views/createapp/components/workFlowConfig/BranchNode.vue index 6db12fb..76695c6 100644 --- a/src/views/createapp/components/workFlowConfig/BranchNode.vue +++ b/src/views/createapp/components/workFlowConfig/BranchNode.vue @@ -119,10 +119,10 @@ const editYaml = (nodeName, nodeDesc, yamlCode) => { ) " > - {{ $t(semantic.edit) }} + {{ $t('semantic.edit') }} - {{ $t(semantic.interface_delete) }} + {{ $t('semantic.interface_delete') }}
diff --git a/src/views/createapp/components/workFlowConfig/CustomNode.vue b/src/views/createapp/components/workFlowConfig/CustomNode.vue index f206372..6c000a0 100644 --- a/src/views/createapp/components/workFlowConfig/CustomNode.vue +++ b/src/views/createapp/components/workFlowConfig/CustomNode.vue @@ -176,10 +176,10 @@ const handleCopyTextToclipboard = (text) => { ) " > - {{ $t(semantic.edit) }} + {{ $t('semantic.edit') }} - {{ $t(semantic.interface_delete) }} + {{ $t('semantic.interface_delete') }} -- Gitee From 6e5c7227183c929f652f7d603c154c5a766c4fb2 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Mon, 26 May 2025 20:06:46 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/zh-cn.ts | 2 +- src/views/createapp/components/appConfig.vue | 10 ---------- src/views/createapp/index.vue | 3 ++- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index e1c7dfb..35c0862 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -124,7 +124,7 @@ export default { refresh: '换一换', query_interpretation: '请选择识别方式', Automatic: '自动识别', - ask_me_anything: '在此输入您想了解的内容,输入Shift+Enter换行', + ask_me_anything: '在此输入您想了解的内容,输入Shift+Enter换行', you_might_want_to_know: '你可能想问', close: '关闭', email1: '联系邮箱', diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue index 9d12b04..405fe92 100644 --- a/src/views/createapp/components/appConfig.vue +++ b/src/views/createapp/components/appConfig.vue @@ -295,16 +295,6 @@ defineExpose({
-
- {{ $t('semantic.baseMessage') }} -
{{ $t('semantic.baseMessage') }} diff --git a/src/views/createapp/index.vue b/src/views/createapp/index.vue index 5c8ee48..ece38db 100644 --- a/src/views/createapp/index.vue +++ b/src/views/createapp/index.vue @@ -8,6 +8,7 @@ import { useRouter, useRoute } from 'vue-router'; import { api } from 'src/apis'; import { ElMessage } from 'element-plus'; import { IconSuccess, IconRemind } from '@computing/opendesign-icons'; +import i18n from 'src/i18n'; const router = useRouter(); const route = useRoute(); const publishStatus = ref('未发布'); @@ -134,7 +135,7 @@ const saveConfigOrFlow = async () => { await workFlowRef.value.saveFlow(); ElMessage({ showClose: true, - message: $t{app.updateSuccessfully}, + message: i18n.global.t('app.updateSuccessfully'), icon: IconSuccess, customClass: 'o-message--success', duration: 2000, -- Gitee From f0eb7b250f69293b9fe1bf591a3e88aee8786a44 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Mon, 26 May 2025 20:06:46 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en.ts | 4 ++++ src/i18n/lang/zh-cn.ts | 15 ++++----------- .../workFlowConfig/yamlEditDrawer.vue | 18 +++++++++--------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index c8dd732..ff313e5 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -103,6 +103,9 @@ export default { createSuccessfully: 'Create successfully', successfully: 'Successfully', failed: 'Failed', + inputContent:"Input content", + outputContent:"Output content", + }, main: { describe1: "Hi! I'm", @@ -315,6 +318,7 @@ export default { 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 35c0862..585997c 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -14,7 +14,6 @@ export default { app_center: '应用中心', sql: '知识库', }, - semantic: { semantic_interface_center: '语义接口中心', all_select: '全部', @@ -50,6 +49,7 @@ export default { publish: '发布', copyFailed: '复制失败', checkFormat: '请检查格式', + }, app: { app_center: '应用中心', @@ -104,6 +104,8 @@ export default { createSuccessfully: '创建成功', successfully: '成功', failed: '失败', + inputContent:"输入内容", + outputContent:"输出内容", }, main: { describe1: '你好,我是', @@ -306,16 +308,7 @@ export default { no_flow: '暂无工作流', choose_flow:"请选择工作流", debug: '调试', - 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/views/createapp/components/workFlowConfig/yamlEditDrawer.vue b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue index 6f39d38..23e4f50 100644 --- a/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue +++ b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue @@ -9,7 +9,7 @@ :before-close="closeDrawer" >
- + - + @@ -116,19 +116,19 @@ const yamlNodeName = ref(); const infoDisabled = ref(true); const yamlExpress = ref([ { - title: $t('semantic.baseMessage'), + title:'semantic.baseMessage', type: '', name: '', description: '', }, { - title: '输入内容', + title: 'app.inputContent', type: 'yamlEdit', yamlCode: '', disabled: false, }, { - title: '输出内容', + title: 'app.outputContent', type: 'yamlEdit', yamlCode: '', disabled: true, -- Gitee From 6ad1afdd834d502ed1aee75131481db4a9f5c3d2 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Tue, 27 May 2025 09:23:47 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=20private?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/createapp/components/PermissionControl.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/createapp/components/PermissionControl.vue b/src/views/createapp/components/PermissionControl.vue index ef4288e..5fa7985 100644 --- a/src/views/createapp/components/PermissionControl.vue +++ b/src/views/createapp/components/PermissionControl.vue @@ -24,7 +24,7 @@ const permissionTypeList = [ value: 'public', }, { - label: 'app.permission_public', + label: 'app.permission_private', value: 'private', }, { -- Gitee