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