Skip to content

Commit

Permalink
fix: refine translation (#2165)
Browse files Browse the repository at this point in the history
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
  • Loading branch information
shaohuzhang1 and wangdan-fit2cloud authored Feb 8, 2025
1 parent d2cd48a commit 6c6821d
Show file tree
Hide file tree
Showing 36 changed files with 117 additions and 99 deletions.
26 changes: 11 additions & 15 deletions ui/src/components/ai-chat/ExecutionDetailDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
>
<div class="card-never border-r-4">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.paramInput') }}
{{ $t('common.param.inputParam') }}
</h5>
<div class="p-8-12 border-t-dashed lighter">
<div class="mb-8">
Expand Down Expand Up @@ -218,7 +218,7 @@
<h5 class="p-8-12">
{{
item.type == WorkflowType.Application
? $t('chat.executionDetails.paramOutput')
? $t('common.param.outputParam')
: $t('chat.executionDetails.answer')
}}
</h5>
Expand Down Expand Up @@ -260,9 +260,7 @@
<template v-if="item.type === WorkflowType.DocumentExtractNode">
<div class="card-never border-r-4">
<h5 class="p-8-12 flex align-center">
<span class="mr-4">{{
$t('chat.executionDetails.paramOutput')
}}</span>
<span class="mr-4">{{ $t('chat.executionDetails.paramOutput') }}</span>

<el-tooltip
effect="dark"
Expand Down Expand Up @@ -297,7 +295,7 @@
<template v-if="item.type === WorkflowType.SpeechToTextNode">
<div class="card-never border-r-4">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.paramInput') }}
{{ $t('common.param.inputParam') }}
</h5>
<div class="p-8-12 border-t-dashed lighter">
<div class="mb-8">
Expand All @@ -322,7 +320,7 @@
</div>
<div class="card-never border-r-4">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.paramOutput') }}
{{ $t('common.param.outputParam') }}
</h5>
<div class="p-8-12 border-t-dashed lighter">
<el-card
Expand All @@ -348,7 +346,7 @@
<template v-if="item.type === WorkflowType.TextToSpeechNode">
<div class="card-never border-r-4">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.paramInput') }}
{{ $t('common.param.inputParam') }}
</h5>
<div class="p-8-12 border-t-dashed lighter">
<div class="p-8-12 border-t-dashed lighter">
Expand All @@ -368,7 +366,7 @@
</div>
<div class="card-never border-r-4">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.paramOutput') }}
{{ $t('common.param.outputParam') }}
</h5>
<div class="p-8-12 border-t-dashed lighter">
<p class="mb-8 color-secondary">
Expand Down Expand Up @@ -475,11 +473,9 @@
<template v-if="item.type === WorkflowType.FormNode">
<div class="card-never border-r-4">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.paramOutput')
{{ $t('common.param.outputParam')
}}<span style="color: #f54a45">{{
item.is_submit
? ''
: `(${$t('chat.executionDetails.noSubmit')})`
item.is_submit ? '' : `(${$t('chat.executionDetails.noSubmit')})`
}}</span>
</h5>

Expand Down Expand Up @@ -572,7 +568,7 @@
<h5 class="p-8-12">
{{
item.type == WorkflowType.Application
? $t('chat.executionDetails.paramOutput')
? $t('common.param.outputParam')
: $t('chat.executionDetails.answer')
}}
</h5>
Expand Down Expand Up @@ -602,7 +598,7 @@
<h5 class="p-8-12">
{{
item.type == WorkflowType.Application
? $t('chat.executionDetails.paramOutput')
? $t('common.param.outputParam')
: $t('chat.executionDetails.answer')
}}
</h5>
Expand Down
2 changes: 0 additions & 2 deletions ui/src/locales/lang/en-US/ai-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export default {
},
executionDetails: {
title: 'Execution Details',
paramInput: 'Parameter Input',
paramOutput: 'Parameter Output',
paramOutputTooltip: 'Each document supports previewing up to 500 characters',
audioFile: 'Audio File',
searchContent: 'Search Query',
Expand Down
5 changes: 5 additions & 0 deletions ui/src/locales/lang/en-US/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export default {
enableSuccess: 'Successful',
disableSuccess: 'Successful'
},
param: {
outputParam: 'Output Parameters',
inputParam: 'Input Parameters'
},

inputPlaceholder: 'Please input',
title: 'Title',
content: 'Content'
Expand Down
15 changes: 11 additions & 4 deletions ui/src/locales/lang/en-US/views/application-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ export default {
currentTime: 'Current Time'
},
baseNode: {
label: 'Base Info',
label: 'Base Information',
appName: {
label: 'App Name',

},
appDescription: {
label: 'App Description',
},
fileUpload: {
label: 'File Upload',
tooltip: 'When enabled, the Q&A page will display a file upload button.'
Expand All @@ -100,7 +107,7 @@ export default {
aiChatNode: {
label: 'AI Chat',
text: 'Chat with an AI model',
answer: 'AI Answer Content',
answer: 'AI Content',
returnContent: {
label: 'Return Content',
tooltip: `If turned off, the content of this node will not be output to the user.
Expand Down Expand Up @@ -194,7 +201,7 @@ export default {
imageUnderstandNode: {
label: 'Image Understanding',
text: 'Analyze images to identify objects, scenes, and provide answers',
answer: 'AI Answer Content',
answer: 'AI Content',
model: {
label: 'Vision Model',
requiredMessage: 'Please select a vision model'
Expand All @@ -207,7 +214,7 @@ export default {
imageGenerateNode: {
label: 'Image Generation',
text: 'Generate images based on provided text content',
answer: 'AI Answer Content',
answer: 'AI Content',
model: {
label: 'Image Generation Model',
requiredMessage: 'Please select an image generation model'
Expand Down
2 changes: 0 additions & 2 deletions ui/src/locales/lang/en-US/views/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default {

applicationForm: {
title: {
info: 'APP Information',
appTest: 'Debug Preview',
copy: 'copy'
},
Expand Down Expand Up @@ -153,7 +152,6 @@ export default {
lark: 'Lark',
larkTip: 'Create Lark intelligent APP',
setting: 'Setting',
info: 'APP Information',
callback: 'Callback Address',
callbackTip: 'Please fill in the callback address',
wecomPlatform: 'WeCom Open Platform',
Expand Down
5 changes: 3 additions & 2 deletions ui/src/locales/lang/en-US/views/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export default {
migration: 'Move',
cancelGenerateQuestion: 'Cancel Generating Questions',
cancelVectorization: 'Cancel Vectorization',
cancelGenerate: 'Cancel Generation'
cancelGenerate: 'Cancel Generation',
export: 'Export to',
},
tip: {
saveMessage: 'Current changes have not been saved. Confirm exit?',
Expand Down Expand Up @@ -171,7 +172,7 @@ export default {
tip3: 'tags, and the system will automatically relate the questions within these tags;',
tip4: 'The generation effect depends on the selected model and prompt. Users can adjust to achieve the best effect.',
prompt1:
'Content: {data}\n \n Please summarize the above content and generate a summary based on the content 5 a question. \nAnswer requirements: \n - Please output only questions; \n - Please place each question in',
'Content: {data}\n \n Please summarize the above and generate 5 questions based on the summary. \nAnswer requirements: \n - Please output only questions; \n - Please place each question in',
prompt2: 'tag.'
}
}
10 changes: 3 additions & 7 deletions ui/src/locales/lang/en-US/views/function-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ export default {
label: 'Permissions',
requiredMessage: 'Please select'
},
inputParam: {
label: 'Input Parameters',
placeholder: 'Please enter parameter values',
requiredMessage: 'Please enter parameter values'
},
paramName: {
label: 'Parameter Name',
placeholder: 'Please enter the parameter name',
Expand All @@ -63,10 +58,11 @@ export default {
label: 'Required'
},
param: {
outputParam: 'Output Parameters',
paramInfo1: 'Displayed when using the function',
paramInfo2: 'Not displayed when using the function',
code: 'Content (Python)'
code: 'Content (Python)',
selectPlaceholder: 'Please select parameter',
inputPlaceholder: 'Please enter parameter values',
},
debug: {
run: 'Run',
Expand Down
5 changes: 3 additions & 2 deletions ui/src/locales/lang/en-US/views/paragraph.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default {
title: 'Segment',
paragraph_count: 'Segments',
editParagraph: 'Edit Segment',
addParagraph: 'Add Segment',
paragraphDetail: 'Segment Details',
Expand All @@ -18,11 +19,11 @@ export default {
},
form: {
paragraphTitle: {
label: 'Segment Title',
label: 'Title',
placeholder: 'Please enter the segment title'
},
content: {
label: 'Segment Content',
label: 'Content',
placeholder: 'Please enter the segment content',
requiredMessage1: 'Please enter the segment content',
requiredMessage2: 'Content must not exceed 100,000 words'
Expand Down
8 changes: 4 additions & 4 deletions ui/src/locales/lang/en-US/views/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default {
authEndpointPlaceholder: 'Please enter auth endpoint',
tokenEndpoint: 'Token Endpoint',
tokenEndpointPlaceholder: 'Please enter token endpoint',
userInfoEndpoint: 'User Info Endpoint',
userInfoEndpointPlaceholder: 'Please enter user info endpoint',
userInfoEndpoint: 'User Information Endpoint',
userInfoEndpointPlaceholder: 'Please enter user information endpoint',
clientId: 'Client ID',
clientIdPlaceholder: 'Please enter client ID',
clientSecret: 'Client Secret',
Expand All @@ -55,8 +55,8 @@ export default {
authEndpointPlaceholder: 'Please enter auth endpoint',
tokenEndpoint: 'Token Endpoint',
tokenEndpointPlaceholder: 'Please enter token endpoint',
userInfoEndpoint: 'User Info Endpoint',
userInfoEndpointPlaceholder: 'Please enter user info endpoint',
userInfoEndpoint: 'User Information Endpoint',
userInfoEndpointPlaceholder: 'Please enter user information endpoint',
scope: 'Scope',
scopePlaceholder: 'Please enter scope',
clientId: 'Client ID',
Expand Down
2 changes: 0 additions & 2 deletions ui/src/locales/lang/zh-CN/ai-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export default {
},
executionDetails: {
title: '执行详情',
paramInput: '参数输入',
paramOutput: '参数输出',
paramOutputTooltip: '每个文档仅支持预览500字',
audioFile: '语音文件',
searchContent: '检索内容',
Expand Down
7 changes: 5 additions & 2 deletions ui/src/locales/lang/zh-CN/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default {
createDate: '创建日期',
createTime: '创建时间',
operation: '操作',

character: '字符',
export: '导出',
exportSuccess: '导出成功',
Expand All @@ -53,5 +52,9 @@ export default {
},
inputPlaceholder: '请输入',
title: '标题',
content: '内容'
content: '内容',
param: {
outputParam: '输出参数',
inputParam:'输入参数'
}
}
7 changes: 7 additions & 0 deletions ui/src/locales/lang/zh-CN/views/application-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ export default {
},
baseNode: {
label: '基本信息',
appName: {
label: '应用名称',

},
appDescription: {
label: '应用描述',
},
fileUpload: {
label: '文件上传',
tooltip: '开启后,问答页面会显示上传文件的按钮。'
Expand Down
2 changes: 0 additions & 2 deletions ui/src/locales/lang/zh-CN/views/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default {
},
applicationForm: {
title: {
info: '应用信息',
appTest: '调试预览',
copy: '副本'
},
Expand Down Expand Up @@ -145,7 +144,6 @@ export default {
lark: '飞书应用',
larkTip: '打造飞书智能应用',
setting: '配置',
info: '应用信息',
callback: '回调地址',
callbackTip: '请输入回调地址',
wecomPlatform: '企业微信后台',
Expand Down
3 changes: 2 additions & 1 deletion ui/src/locales/lang/zh-CN/views/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export default {
migration: '迁移',
cancelGenerateQuestion: '取消生成问题',
cancelVectorization: '取消向量化',
cancelGenerate: '取消生成'
cancelGenerate: '取消生成',
export: '导出',
},
tip: {
saveMessage: '当前的更改尚未保存,确认退出吗?',
Expand Down
10 changes: 3 additions & 7 deletions ui/src/locales/lang/zh-CN/views/function-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ export default {
label: '权限',
requiredMessage: '请选择'
},
inputParam: {
label: '输入参数',
placeholder: '请选择参数',
requiredMessage: '请输入参数值'
},
paramName: {
label: '参数名',
placeholder: '请输入参数名',
Expand All @@ -61,10 +56,11 @@ export default {
label: '是否必填'
},
param: {
outputParam: '输出参数',
paramInfo1: '使用函数时显示',
paramInfo2: '使用函数时不显示',
code: '函数内容(Python)'
code: '函数内容(Python)',
selectPlaceholder: '请选择参数',
inputPlaceholder: '请输入参数值',
},
debug: {
run: '运行',
Expand Down
1 change: 1 addition & 0 deletions ui/src/locales/lang/zh-CN/views/paragraph.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default {
title: '段落',
paragraph_count: '段落',
editParagraph: '编辑分段',
addParagraph: '添加分段',
paragraphDetail: '分段详情',
Expand Down
2 changes: 0 additions & 2 deletions ui/src/locales/lang/zh-Hant/ai-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export default {
},
executionDetails: {
title: '執行詳細',
paramInput: '參數輸入',
paramOutput: '參數輸出',
paramOutputTooltip: '每個文件僅支持預覽 500 字',
audioFile: '語音文件',
searchContent: '檢索內容',
Expand Down
6 changes: 5 additions & 1 deletion ui/src/locales/lang/zh-Hant/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ export default {
},
inputPlaceholder: '請輸入',
title: '標題',
content: '内容'
content: '内容',
param: {
outputParam: '輸出參數',
inputParam:'輸入參數'
}
}
Loading

0 comments on commit 6c6821d

Please sign in to comment.