fix: i18n
This commit is contained in:
parent
8ea896b261
commit
82f2d7e23f
@ -57,6 +57,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onBeforeMount } from 'vue'
|
import { computed, onBeforeMount } from 'vue'
|
||||||
|
import { t } from '@/locales'
|
||||||
const type_list = [
|
const type_list = [
|
||||||
{
|
{
|
||||||
label: t('components.dynamicsForm.DatePicker.year'),
|
label: t('components.dynamicsForm.DatePicker.year'),
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="$t('views.document.setting.generateQuestion.title')"
|
:title="$t('views.document.generateQuestion.title')"
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
width="650"
|
width="650"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
|||||||
@ -105,10 +105,7 @@ export default {
|
|||||||
tooltip: `If turned off, the content of this node will not be output to the user.
|
tooltip: `If turned off, the content of this node will not be output to the user.
|
||||||
If you want the user to see the output of this node, please turn on the switch.`
|
If you want the user to see the output of this node, please turn on the switch.`
|
||||||
},
|
},
|
||||||
defaultPrompt: `Known Information:
|
defaultPrompt: 'Known Information'
|
||||||
{{knowledgeBaseSearch.data}}
|
|
||||||
Question:
|
|
||||||
{{start.question}}`
|
|
||||||
},
|
},
|
||||||
searchDatasetNode: {
|
searchDatasetNode: {
|
||||||
label: 'Knowledge Base Search',
|
label: 'Knowledge Base Search',
|
||||||
@ -176,9 +173,8 @@ Please output an optimized question.`,
|
|||||||
formNode: {
|
formNode: {
|
||||||
label: 'Form Collection',
|
label: 'Form Collection',
|
||||||
text: 'Used to collect user information during Q&A process, subsequent processes can be executed based on collected form data',
|
text: 'Used to collect user information during Q&A process, subsequent processes can be executed based on collected form data',
|
||||||
form_content_format: `Hello, please fill out the form below:
|
form_content_format1: 'Hello, please fill out the form below:',
|
||||||
{{form}}
|
form_content_format2: 'Click the [Submit] button after filling it out.',
|
||||||
Click the [Submit] button after filling it out.`,
|
|
||||||
form_data: 'All Form Content',
|
form_data: 'All Form Content',
|
||||||
formContent: {
|
formContent: {
|
||||||
label: 'Form Output Content',
|
label: 'Form Output Content',
|
||||||
|
|||||||
@ -106,10 +106,7 @@ export default {
|
|||||||
tooltip: `关闭后该节点的内容则不输出给用户。
|
tooltip: `关闭后该节点的内容则不输出给用户。
|
||||||
如果你想让用户看到该节点的输出内容,请打开开关。`
|
如果你想让用户看到该节点的输出内容,请打开开关。`
|
||||||
},
|
},
|
||||||
defaultPrompt: `已知信息:
|
defaultPrompt: '已知信息'
|
||||||
{{知识库检索.data}}
|
|
||||||
问题:
|
|
||||||
{{开始.question}}`
|
|
||||||
},
|
},
|
||||||
searchDatasetNode: {
|
searchDatasetNode: {
|
||||||
label: '知识库检索',
|
label: '知识库检索',
|
||||||
@ -177,9 +174,8 @@ export default {
|
|||||||
formNode: {
|
formNode: {
|
||||||
label: '表单收集',
|
label: '表单收集',
|
||||||
text: '在问答过程中用于收集用户信息,可以根据收集到表单数据执行后续流程',
|
text: '在问答过程中用于收集用户信息,可以根据收集到表单数据执行后续流程',
|
||||||
form_content_format: `你好,请先填写下面表单内容:
|
form_content_format1: '你好,请先填写下面表单内容:',
|
||||||
{{form}}
|
form_content_format2: '填写后请点击【提交】按钮进行提交。',
|
||||||
填写后请点击【提交】按钮进行提交。`,
|
|
||||||
form_data: '表单全部内容',
|
form_data: '表单全部内容',
|
||||||
formContent: {
|
formContent: {
|
||||||
label: '表单输出内容',
|
label: '表单输出内容',
|
||||||
|
|||||||
@ -53,7 +53,8 @@ export default {
|
|||||||
permissionType: {
|
permissionType: {
|
||||||
label: '权限',
|
label: '权限',
|
||||||
privateDesc: '仅当前用户使用',
|
privateDesc: '仅当前用户使用',
|
||||||
publicDesc: '所有用户都可使用,不能编辑'
|
publicDesc: '所有用户都可使用,不能编辑',
|
||||||
|
requiredMessage: '权限不能为空'
|
||||||
},
|
},
|
||||||
model_type: {
|
model_type: {
|
||||||
label: '模型类型',
|
label: '模型类型',
|
||||||
|
|||||||
@ -106,10 +106,7 @@ export default {
|
|||||||
tooltip: `關閉後該節點的內容則不輸出給用戶。
|
tooltip: `關閉後該節點的內容則不輸出給用戶。
|
||||||
如果你想讓用戶看到該節點的輸出內容,請打開開關。`
|
如果你想讓用戶看到該節點的輸出內容,請打開開關。`
|
||||||
},
|
},
|
||||||
defaultPrompt: `已知信息:
|
defaultPrompt: '已知信息'
|
||||||
{{知識庫檢索.data}}
|
|
||||||
問題:
|
|
||||||
{{開始.question}}`
|
|
||||||
},
|
},
|
||||||
searchDatasetNode: {
|
searchDatasetNode: {
|
||||||
label: '知識庫檢索',
|
label: '知識庫檢索',
|
||||||
@ -177,9 +174,8 @@ export default {
|
|||||||
formNode: {
|
formNode: {
|
||||||
label: '表單收集',
|
label: '表單收集',
|
||||||
text: '在問答過程中用於收集用戶信息,可以根據收集到表單數據執行後續流程',
|
text: '在問答過程中用於收集用戶信息,可以根據收集到表單數據執行後續流程',
|
||||||
form_content_format: `你好,請先填寫下面表單內容:
|
form_content_format1: '你好,請先填寫下面表單內容:',
|
||||||
{{form}}
|
form_content_format2: '填寫後請點擊【提交】按鈕進行提交。',
|
||||||
填寫後請點擊【提交】按鈕進行提交。`,
|
|
||||||
form_data: '表單全部內容',
|
form_data: '表單全部內容',
|
||||||
formContent: {
|
formContent: {
|
||||||
label: '表單輸出內容',
|
label: '表單輸出內容',
|
||||||
|
|||||||
@ -72,7 +72,7 @@ const startedMap = {
|
|||||||
}
|
}
|
||||||
const taskTypeMap = {
|
const taskTypeMap = {
|
||||||
[TaskType.EMBEDDING]: t('views.dataset.setting.vectorization'),
|
[TaskType.EMBEDDING]: t('views.dataset.setting.vectorization'),
|
||||||
[TaskType.GENERATE_PROBLEM]: t('views.document.setting.generateQuestion.title'),
|
[TaskType.GENERATE_PROBLEM]: t('views.document.generateQuestion.title'),
|
||||||
[TaskType.SYNC]: t('views.dataset.setting.sync')
|
[TaskType.SYNC]: t('views.dataset.setting.sync')
|
||||||
}
|
}
|
||||||
const stateMap: any = {
|
const stateMap: any = {
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
{{ $t('views.dataset.setting.vectorization') }}
|
{{ $t('views.dataset.setting.vectorization') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="openGenerateDialog()" :disabled="multipleSelection.length === 0">
|
<el-button @click="openGenerateDialog()" :disabled="multipleSelection.length === 0">
|
||||||
{{ $t('views.document.setting.generateQuestion.title') }}
|
{{ $t('views.document.generateQuestion.title') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="openBatchEditDocument" :disabled="multipleSelection.length === 0">
|
<el-button @click="openBatchEditDocument" :disabled="multipleSelection.length === 0">
|
||||||
{{ $t('common.setting') }}
|
{{ $t('common.setting') }}
|
||||||
@ -314,7 +314,7 @@
|
|||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-else @click="openGenerateDialog(row)">
|
<el-dropdown-item v-else @click="openGenerateDialog(row)">
|
||||||
<el-icon><Connection /></el-icon>
|
<el-icon><Connection /></el-icon>
|
||||||
{{ $t('views.document.setting.generateQuestion.title') }}
|
{{ $t('views.document.generateQuestion.title') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click="openDatasetDialog(row)">
|
<el-dropdown-item @click="openDatasetDialog(row)">
|
||||||
<AppIcon iconName="app-migrate"></AppIcon>
|
<AppIcon iconName="app-migrate"></AppIcon>
|
||||||
@ -403,7 +403,7 @@
|
|||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-else @click="openGenerateDialog(row)">
|
<el-dropdown-item v-else @click="openGenerateDialog(row)">
|
||||||
<el-icon><Connection /></el-icon>
|
<el-icon><Connection /></el-icon>
|
||||||
{{ $t('views.document.setting.generateQuestion.title') }}
|
{{ $t('views.document.generateQuestion.title') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click="openDatasetDialog(row)">
|
<el-dropdown-item @click="openDatasetDialog(row)">
|
||||||
<AppIcon iconName="app-migrate"></AppIcon>
|
<AppIcon iconName="app-migrate"></AppIcon>
|
||||||
|
|||||||
@ -165,7 +165,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="mb-16">
|
<div class="mb-16">
|
||||||
<div class="title mb-8">
|
<div class="title mb-8">
|
||||||
{{ $t('views.application.applicationForm.dialogues.topReferences') }}
|
{{ $t('views.application.applicationForm.dialog.topReferences') }}
|
||||||
</div>
|
</div>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="cloneForm.top_number"
|
v-model="cloneForm.top_number"
|
||||||
|
|||||||
@ -134,7 +134,7 @@
|
|||||||
<el-dropdown-item @click="openGenerateDialog(item)">
|
<el-dropdown-item @click="openGenerateDialog(item)">
|
||||||
<el-icon><Connection /></el-icon>
|
<el-icon><Connection /></el-icon>
|
||||||
{{
|
{{
|
||||||
$t('views.document.setting.generateQuestion.title')
|
$t('views.document.generateQuestion.title')
|
||||||
}}</el-dropdown-item
|
}}</el-dropdown-item
|
||||||
>
|
>
|
||||||
<el-dropdown-item @click="openSelectDocumentDialog(item)">
|
<el-dropdown-item @click="openSelectDocumentDialog(item)">
|
||||||
@ -159,7 +159,7 @@
|
|||||||
|
|
||||||
<div class="mul-operation border-t w-full" v-if="isBatch === true">
|
<div class="mul-operation border-t w-full" v-if="isBatch === true">
|
||||||
<el-button :disabled="multipleSelection.length === 0" @click="openGenerateDialog()">
|
<el-button :disabled="multipleSelection.length === 0" @click="openGenerateDialog()">
|
||||||
{{ $t('views.document.setting.generateQuestion.title') }}
|
{{ $t('views.document.generateQuestion.title') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button :disabled="multipleSelection.length === 0" @click="openSelectDocumentDialog()">
|
<el-button :disabled="multipleSelection.length === 0" @click="openSelectDocumentDialog()">
|
||||||
{{ $t('views.document.setting.migration') }}
|
{{ $t('views.document.setting.migration') }}
|
||||||
|
|||||||
@ -186,9 +186,9 @@ export const formNode = {
|
|||||||
node_data: {
|
node_data: {
|
||||||
is_result: true,
|
is_result: true,
|
||||||
form_field_list: [],
|
form_field_list: [],
|
||||||
form_content_format: t('views.applicationWorkflow.nodes.formNode.form_content_format', {
|
form_content_format: `${t('views.applicationWorkflow.nodes.formNode.form_content_format1')}
|
||||||
form: '{{form}}'
|
{{form}}
|
||||||
})
|
${t('views.applicationWorkflow.nodes.formNode.form_content_format2')}`
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
fields: [
|
fields: [
|
||||||
@ -249,7 +249,7 @@ export const imageGenerateNode = {
|
|||||||
value: 'answer'
|
value: 'answer'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('views.applicationWorkflow.nodes.imageGenerateNode.image'),
|
label: t('common.fileUpload.image'),
|
||||||
value: 'image'
|
value: 'image'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -367,15 +367,15 @@ export const compareList = [
|
|||||||
{ value: 'is_not_null', label: t('views.applicationWorkflow.compare.is_not_null') },
|
{ value: 'is_not_null', label: t('views.applicationWorkflow.compare.is_not_null') },
|
||||||
{ value: 'contain', label: t('views.applicationWorkflow.compare.contain') },
|
{ value: 'contain', label: t('views.applicationWorkflow.compare.contain') },
|
||||||
{ value: 'not_contain', label: t('views.applicationWorkflow.compare.not_contain') },
|
{ value: 'not_contain', label: t('views.applicationWorkflow.compare.not_contain') },
|
||||||
{ value: 'eq', label: t('views.applicationWorkflow.compare.eq') },
|
{ value: 'eq', label: t('views.applicationWorkflow.compare.eq') },
|
||||||
{ value: 'ge', label: t('views.applicationWorkflow.compare.ge') },
|
{ value: 'ge', label: t('views.applicationWorkflow.compare.ge') },
|
||||||
{ value: 'gt', label:t('views.applicationWorkflow.compare.gt') },
|
{ value: 'gt', label: t('views.applicationWorkflow.compare.gt') },
|
||||||
{ value: 'le', label: t('views.applicationWorkflow.compare.le') },
|
{ value: 'le', label: t('views.applicationWorkflow.compare.le') },
|
||||||
{ value: 'lt', label: t('views.applicationWorkflow.compare.lt') },
|
{ value: 'lt', label: t('views.applicationWorkflow.compare.lt') },
|
||||||
{ value: 'len_eq', label: t('views.applicationWorkflow.compare.len_eq')},
|
{ value: 'len_eq', label: t('views.applicationWorkflow.compare.len_eq') },
|
||||||
{ value: 'len_ge', label: t('views.applicationWorkflow.compare.len_ge') },
|
{ value: 'len_ge', label: t('views.applicationWorkflow.compare.len_ge') },
|
||||||
{ value: 'len_gt', label:t('views.applicationWorkflow.compare.len_gt') },
|
{ value: 'len_gt', label: t('views.applicationWorkflow.compare.len_gt') },
|
||||||
{ value: 'len_le', label: t('views.applicationWorkflow.compare.len_le') },
|
{ value: 'len_le', label: t('views.applicationWorkflow.compare.len_le') },
|
||||||
{ value: 'len_lt', label: t('views.applicationWorkflow.compare.len_lt') }
|
{ value: 'len_lt', label: t('views.applicationWorkflow.compare.len_lt') }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -185,7 +185,11 @@ const {
|
|||||||
} = app.config.globalProperties.$route as any
|
} = app.config.globalProperties.$route as any
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const defaultPrompt = t('views.applicationWorkflow.nodes.aiChatNode.defaultPrompt')
|
const defaultPrompt = `${t('views.applicationWorkflow.nodes.aiChatNode.defaultPrompt')}:
|
||||||
|
{{${t('views.applicationWorkflow.nodes.searchDatasetNode.label')}.data}}
|
||||||
|
${t('views.problem.title')}:
|
||||||
|
{{${t('views.applicationWorkflow.nodes.startNode.label')}.question}}`
|
||||||
|
|
||||||
const form = {
|
const form = {
|
||||||
model_id: '',
|
model_id: '',
|
||||||
system: '',
|
system: '',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex-between mb-16">
|
<div class="flex-between mb-16">
|
||||||
<h5 class="lighter">{{ $t('views.applicationWorkflow.templateForm.title.apiParamPassing') }}</h5>
|
<h5 class="lighter">{{ $t('views.template.templateForm.title.apiParamPassing') }}</h5>
|
||||||
<el-button link type="primary" @click="openAddDialog()">
|
<el-button link type="primary" @click="openAddDialog()">
|
||||||
<el-icon class="mr-4">
|
<el-icon class="mr-4">
|
||||||
<Plus />
|
<Plus />
|
||||||
|
|||||||
@ -26,11 +26,11 @@
|
|||||||
style="width: 60px; margin: 0 8px"
|
style="width: 60px; margin: 0 8px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:label="$t('views.applicationWorkflow.nodes.condition.AND')"
|
:label="$t('views.applicationWorkflow.condition.AND')"
|
||||||
value="and"
|
value="and"
|
||||||
/>
|
/>
|
||||||
<el-option
|
<el-option
|
||||||
:label="$t('views.applicationWorkflow.nodes.condition.OR')"
|
:label="$t('views.applicationWorkflow.condition.OR')"
|
||||||
value="or"
|
value="or"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|||||||
@ -209,9 +209,9 @@ const deleteField = (form_field_data: any) => {
|
|||||||
}
|
}
|
||||||
const form = ref<any>({
|
const form = ref<any>({
|
||||||
is_result: true,
|
is_result: true,
|
||||||
form_content_format: t('views.applicationWorkflow.nodes.formNode.form_content_format', {
|
form_content_format: `${t('views.applicationWorkflow.nodes.formNode.form_content_format1')}
|
||||||
form: '{{form}}'
|
{{form}}
|
||||||
}),
|
${t('views.applicationWorkflow.nodes.formNode.form_content_format2')}`,
|
||||||
form_field_list: []
|
form_field_list: []
|
||||||
})
|
})
|
||||||
const form_data = computed({
|
const form_data = computed({
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.dialogues.topReferences')"
|
:label="$t('views.application.applicationForm.dialog.topReferences')"
|
||||||
>
|
>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.top_n"
|
v-model="form.top_n"
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item :label="$t('views.application.applicationForm.dialogues.maxCharacters')">
|
<el-form-item :label="$t('views.application.applicationForm.dialog.maxCharacters')">
|
||||||
<el-slider
|
<el-slider
|
||||||
v-model="form.max_paragraph_char_number"
|
v-model="form.max_paragraph_char_number"
|
||||||
show-input
|
show-input
|
||||||
|
|||||||
@ -132,18 +132,18 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.applicationWorkflow.nodes.reranker_model.label')"
|
:label="$t('views.applicationWorkflow.nodes.rerankerNode.reranker_model.label')"
|
||||||
prop="reranker_model_id"
|
prop="reranker_model_id"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.applicationWorkflow.nodes.reranker_model.placeholder'),
|
message: $t('views.applicationWorkflow.nodes.rerankerNode.reranker_model.placeholder'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.applicationWorkflow.nodes.reranker_model.label')
|
>{{ $t('views.applicationWorkflow.nodes.rerankerNode.reranker_model.label')
|
||||||
}}<span class="danger">*</span></span
|
}}<span class="danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -152,7 +152,7 @@
|
|||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
v-model="form_data.reranker_model_id"
|
v-model="form_data.reranker_model_id"
|
||||||
:placeholder="$t('views.applicationWorkflow.nodes.reranker_model.placeholder')"
|
:placeholder="$t('views.applicationWorkflow.nodes.rerankerNode.reranker_model.placeholder')"
|
||||||
:options="modelOptions"
|
:options="modelOptions"
|
||||||
@submitModel="getModel"
|
@submitModel="getModel"
|
||||||
showFooter
|
showFooter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user