fix: i18n bugs

This commit is contained in:
wangdan-fit2cloud 2025-01-22 11:26:03 +08:00
parent 495ac39498
commit 6009d929cf
17 changed files with 39 additions and 27 deletions

View File

@ -60,7 +60,7 @@
</el-dropdown>
</el-dropdown-item>
<el-dropdown-item class="border-t" @click="openAbout">
{{ $t('layout.about.label') }}
{{ $t('layout.about.title') }}
</el-dropdown-item>
<el-dropdown-item class="border-t" @click="logout">

View File

@ -126,8 +126,8 @@ export default {
label: 'Question Optimization',
text: 'Optimize and improve the current question based on historical chat records to better match knowledge segments',
result: 'Optimized Question Result',
defaultPrompt: `Optimize and improve the user's question based on context: {{start.question}}
Please output an optimized question.`,
defaultPrompt1: `Optimize and improve the user's question based on context:`,
defaultPrompt2: `Please output an optimized question.`,
systemDefault: 'You are a question optimization expert'
},
conditionNode: {
@ -178,8 +178,10 @@ Please output an optimized question.`,
form_data: 'All Form Content',
formContent: {
label: 'Form Output Content',
requiredMessage: 'Please set the output content of this node, { form } is a placeholder for the form.',
tooltip: 'Set the content output by executing this node, { form } is a placeholder for the form.'
requiredMessage:
'Please set the output content of this node, { form } is a placeholder for the form.',
tooltip:
'Set the content output by executing this node, { form } is a placeholder for the form.'
},
formAllContent: 'All Form Content',
formSetting: 'Form Configuration'
@ -212,12 +214,15 @@ Please output an optimized question.`,
},
prompt: {
label: 'Positive Prompt',
tooltip: 'Positive prompt words, used to describe elements and visual features expected in the generated image'
tooltip:
'Positive prompt words, used to describe elements and visual features expected in the generated image'
},
negative_prompt: {
label: 'Negative Prompt',
tooltip: 'Negative prompt words, used to describe content that should not appear in the image, which can limit the image.',
placeholder: 'Please describe content you do not want to generate, such as color, bloody content'
tooltip:
'Negative prompt words, used to describe content that should not appear in the image, which can limit the image.',
placeholder:
'Please describe content you do not want to generate, such as color, bloody content'
}
},
speechToTextNode: {

View File

@ -62,6 +62,8 @@ export default {
references: ' (References Knowledge)',
placeholder: 'Please enter prompt',
requiredMessage: 'Please enter prompt',
tooltip:'By adjusting the content of the prompt, you can guide the direction of the large model conversation.',
noReferencesTooltip:
'By adjusting the content of the prompt, you can guide the direction of the large model conversation. This prompt will be fixed at the beginning of the context. Variables used: {question} is the question posed by the user.',
referencesTooltip:

View File

@ -48,7 +48,7 @@ export default {
},
datasetType: {
label: 'Knowledge Type',
generalInfo: 'Upload local files or manually enter',
generalInfo: 'Upload local documents',
webInfo: 'Sync text data from a Web site'
},
source_url: {

View File

@ -95,7 +95,7 @@ export default {
},
table: {
name: 'File Name',
char_length: 'words',
char_length: 'Words',
paragraph: 'Segment',
all: 'All',
updateTime: 'Update Time'

View File

@ -76,7 +76,7 @@ export default {
base_model: {
label: 'Base Model',
tooltip:
'For models not listed in the list, enter the model name directly and press Enter to add',
'For models not listed, enter the model name and press Enter.',
placeholder: 'Enter the base model name and press Enter to add',
requiredMessage: 'Base model cannot be empty'
}

View File

@ -127,8 +127,8 @@ export default {
label: '问题优化',
text: '根据历史聊天记录优化完善当前问题,更利于匹配知识库分段',
result: '问题优化结果',
defaultPrompt: `根据上下文优化和完善用户问题{{开始.question}}
`,
defaultPrompt1: `根据上下文优化和完善用户问题`,
defaultPrompt2: `请输出一个优化后的问题。`,
systemDefault: '你是一个问题优化大师'
},
conditionNode: {

View File

@ -47,7 +47,7 @@ export default {
},
datasetType: {
label: '知识库类型',
generalInfo: '上传本地文件或手动录入',
generalInfo: '上传本地文',
webInfo: '同步Web网站文本数据'
},
source_url: {

View File

@ -127,8 +127,8 @@ export default {
label: '問題優化',
text: '根據歷史聊天記錄優化完善當前問題,更利於匹配知識庫分段',
result: '問題優化結果',
defaultPrompt: `根據上下文優化和完善用戶問題:{{開始.question}}
`,
defaultPrompt1: `根據上下文優化和完善用戶問題:`,
defaultPrompt2: `請輸出一個優化後的問題。`,
systemDefault: '你是一個問題優化大師'
},
conditionNode: {

View File

@ -56,6 +56,8 @@ export default {
references: ' (引用知識庫)',
placeholder: '請輸入提示詞',
requiredMessage: '請輸入提示詞',
tooltip:'透過調整提示詞內容,可以引導大模型對話方向,該提示詞會被固定在上下文的開頭。',
noReferencesTooltip:
'透過調整提示詞內容,可以引導大模型對話方向,該提示詞會被固定在上下文的開頭。可以使用變數:{question} 是用戶提出問題的佔位符。',
referencesTooltip:

View File

@ -46,7 +46,7 @@ export default {
},
datasetType: {
label: '知識庫類型',
generalInfo: '上傳本地檔案或手動輸入',
generalInfo: '上傳本地檔案',
webInfo: '同步Web網站文字資料'
},
source_url: {

View File

@ -19,7 +19,6 @@ const usePromptStore = defineStore({
localStorage.setItem('PROMPT_CACHE', JSON.stringify(this.$state))
},
get(user: string) {
console.log(this.$state)
for (let i = 0; i < this.$state.length; i++) {
if (this.$state[i].user === user) {
return this.$state[i].formValue

View File

@ -512,7 +512,10 @@ const open = (data: any, content: any) => {
xpackForm.value.disclaimer = data.disclaimer
xpackForm.value.disclaimer_value = data.disclaimer_value
console.log(xpackForm.value.disclaimer_value)
if (xpackForm.value.disclaimer_value === '「以上内容均由AI生成仅供参考和借鉴」') {
if (
xpackForm.value.disclaimer_value ===
t('views.applicationOverview.appInfo.SettingDisplayDialog.disclaimerValue')
) {
xpackForm.value.disclaimer_value = t(
'views.applicationOverview.appInfo.SettingDisplayDialog.disclaimerValue'
)

View File

@ -26,7 +26,6 @@
:placeholder="$t('common.search')"
prefix-icon="Search"
class="w-240"
style="margin-left: 10px"
clearable
/>
<div style="display: flex; align-items: center" class="float-right">

View File

@ -133,8 +133,8 @@
@change="list_model"
style="width: 220px"
>
<el-option :label="$t('views.template.templateForm.form.permissionType.public')" value="PUBLIC" />
<el-option :label="$t('views.template.templateForm.form.permissionType.private')" value="PRIVATE" />
<el-option :label="$t('common.public')" value="PUBLIC" />
<el-option :label="$t('common.private')" value="PRIVATE" />
</el-select>
<el-select
v-else-if="search_type === 'model_type'"

View File

@ -104,15 +104,15 @@ export const searchDatasetNode = {
}
export const questionNode = {
type: WorkflowType.Question,
text: t('views.applicationWorkflow.nodes.searchDatasetNode.text'),
label: t('views.applicationWorkflow.nodes.searchDatasetNode.label'),
text: t('views.applicationWorkflow.nodes.questionNode.text'),
label: t('views.applicationWorkflow.nodes.questionNode.label'),
height: 345,
properties: {
stepName: t('views.applicationWorkflow.nodes.searchDatasetNode.label'),
stepName: t('views.applicationWorkflow.nodes.questionNode.label'),
config: {
fields: [
{
label: t('views.applicationWorkflow.nodes.searchDatasetNode.result'),
label: t('views.applicationWorkflow.nodes.questionNode.result'),
value: 'answer'
}
]

View File

@ -176,7 +176,9 @@ const {
} = app.config.globalProperties.$route as any
// @ts-ignore
const defaultPrompt = t('views.applicationWorkflow.nodes.questionNode.defaultPrompt')
const defaultPrompt = `${t('views.applicationWorkflow.nodes.questionNode.defaultPrompt1')}{{${t('views.applicationWorkflow.nodes.startNode.label')}.question}}
${t('views.applicationWorkflow.nodes.questionNode.defaultPrompt2')}`
const form = {
model_id: '',
system: t('views.applicationWorkflow.nodes.questionNode.systemDefault'),