Skip to content

Commit 54ebfc3

Browse files
fix: Modify generate question page translation and bugs
1 parent d5f867c commit 54ebfc3

File tree

14 files changed

+34
-41
lines changed

14 files changed

+34
-41
lines changed

ui/src/components/ai-chat/component/user-form/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
<el-icon class="mr-8 arrow-icon" :class="showUserInput ? 'rotate-90' : ''"
1717
><CaretRight
1818
/></el-icon>
19+
<span class="break-all ellipsis-1 mr-16" :title="inputFieldConfig.title">
1920
{{ inputFieldConfig.title }}
21+
</span>
2022
</div>
2123
<el-scrollbar max-height="160">
2224
<el-collapse-transition>

ui/src/components/generate-related-dialog/index.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
type="textarea"
4949
/>
5050
</el-form-item>
51-
<el-form-item :label="$t('views.problem.relateParagraph.selectParagraph')" prop="state">
51+
<el-form-item v-if="apiType === 'document'" :label="$t('components.selectParagraph.title')" prop="state">
5252
<el-radio-group v-model="state" class="radio-block">
53-
<el-radio value="error" size="large" class="mb-16">{{
54-
$t('views.document.form.selectVectorization.error')
53+
<el-radio value="error" size="large">{{
54+
$t('components.selectParagraph.error')
5555
}}</el-radio>
5656
<el-radio value="all" size="large">{{
57-
$t('views.document.form.selectVectorization.all')
57+
$t('components.selectParagraph.all')
5858
}}</el-radio>
5959
</el-radio-group>
6060
</el-form-item>
@@ -148,7 +148,6 @@ const submitHandle = async (formEl: FormInstance) => {
148148
const data = {
149149
...form.value,
150150
paragraph_id_list: idList.value,
151-
state_list: stateMap[state.value]
152151
}
153152
paragraphApi.batchGenerateRelated(id, documentId, data, loading).then(() => {
154153
MsgSuccess(t('views.document.generateQuestion.successMessage'))

ui/src/locales/lang/en-US/components.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@ export default {
33
quickCreateName: 'document name',
44
noData: 'No Data',
55
loading: 'Loading',
6-
noMore: 'No more!'
6+
noMore: 'No more! ',
7+
selectParagraph: {
8+
title: 'Select Paragraph',
9+
error: 'Process only the failed segments',
10+
all: 'All Segments'
11+
}
712
}

ui/src/locales/lang/en-US/views/document.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
cancelGenerateQuestion: 'Cancel Generating Questions',
1313
cancelVectorization: 'Cancel Vectorization',
1414
cancelGenerate: 'Cancel Generation',
15-
export: 'Export to',
15+
export: 'Export to'
1616
},
1717
tip: {
1818
saveMessage: 'Current changes have not been saved. Confirm exit?',
@@ -84,8 +84,7 @@ export default {
8484
text: 'Remove duplicate extra symbols, spaces, blank lines, and tab words.'
8585
},
8686
checkedConnect: {
87-
label:
88-
'Add "Related Questions" section for question-based QA pairs during import.'
87+
label: 'Add "Related Questions" section for question-based QA pairs during import.'
8988
}
9089
},
9190
buttons: {
@@ -153,11 +152,6 @@ export default {
153152
label: 'Similarity Higher Than',
154153
placeholder: 'Directly return segment content',
155154
requiredMessage: 'Please enter similarity value'
156-
},
157-
selectVectorization: {
158-
label: 'Select Vectorization Content',
159-
error: 'Segments that failed vectorization',
160-
all: 'All Segments'
161155
}
162156
},
163157
hitHandlingMethod: {
@@ -173,7 +167,6 @@ export default {
173167
tip4: 'The generation effect depends on the selected model and prompt. Users can adjust to achieve the best effect.',
174168
prompt1:
175169
'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',
176-
prompt2: 'tag.',
177-
error: 'Segments only failed',
170+
prompt2: 'tag.'
178171
}
179172
}

ui/src/locales/lang/en-US/views/problem.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default {
3131
title: 'Relate to Segment',
3232
selectDocument: 'Select a Document',
3333
placeholder: 'Search document by name',
34-
selectParagraph: 'Select Segments',
3534
selectedParagraph: 'Selected Segments',
3635
count: 'Count'
3736
}

ui/src/locales/lang/zh-CN/components.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ export default {
44
noData: '无匹配数据',
55
loading: '加载中',
66
noMore: '到底啦!',
7+
selectParagraph: {
8+
title: '选择分段',
9+
error: '仅执行未成功分段',
10+
all: '全部分段'
11+
}
712
}

ui/src/locales/lang/zh-CN/views/document.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ export default {
150150
placeholder: '直接返回分段内容',
151151
requiredMessage: '请输入相似度'
152152
},
153-
selectVectorization: {
154-
label: '选择向量化内容',
155-
error: '向量化未成功的分段',
156-
all: '全部分段'
157-
}
158153
},
159154
hitHandlingMethod: {
160155
optimization: '模型优化',
@@ -169,6 +164,5 @@ export default {
169164
tip4: '生成效果依赖于所选模型和提示词,用户可自行调整至最佳效果。',
170165
prompt1: `内容:{data}\n\n请总结上面的内容,并根据内容总结生成 5 个问题。\n回答要求:\n- 请只输出问题;\n- 请将每个问题放置`,
171166
prompt2: `标签中。`,
172-
error: '仅执行未成功的分段',
173167
}
174168
}

ui/src/locales/lang/zh-CN/views/problem.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default {
3131
title: '关联分段',
3232
selectDocument: '选择文档',
3333
placeholder: '按 文档名称 搜索',
34-
selectParagraph: '选择分段',
3534
selectedParagraph: '已选分段',
3635
count: '个'
3736
},

ui/src/locales/lang/zh-Hant/components.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ export default {
44
noData: '無匹配数据',
55
loading: '加載中',
66
noMore: '到底啦!',
7+
selectParagraph: {
8+
title: '選擇分段',
9+
error: '僅執行未成功分段',
10+
all: '全部分段'
11+
}
712
}

ui/src/locales/lang/zh-Hant/views/document.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ export default {
150150
placeholder: '直接返回分段内容',
151151
requiredMessage: '请输入相似度'
152152
},
153-
selectVectorization: {
154-
label: '選擇向量化',
155-
error: '向量化未成功的分段',
156-
all: '全部分段'
157-
}
158153
},
159154
hitHandlingMethod: {
160155
optimization: '模型優化',
@@ -169,6 +164,5 @@ export default {
169164
tip4: '生成效果取決於所選模型和提示詞,用戶可自行調整至最佳效果。',
170165
prompt1: `內容:{data}\n\n請總結上面的內容,並根據內容總結生成 5 個問題。\n回答要求:\n - 請只輸出問題;\n - 請將每個問題放置在`,
171166
prompt2: `標籤中。`,
172-
error: '只執行未成功的分段',
173167
}
174168
}

0 commit comments

Comments
 (0)