Skip to content

Commit 96f467f

Browse files
author
王丹
committed
feat: i18n
1 parent 0e7f466 commit 96f467f

File tree

50 files changed

+752
-376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+752
-376
lines changed

ui/src/components/ai-chat/KnowledgeSource.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<template>
22
<div class="flex align-center mt-16" v-if="!isWorkFlow(props.type)">
3-
<span class="mr-4 color-secondary">知识来源</span>
3+
<span class="mr-4 color-secondary">{{ $t('components.chat.KnowledgeSource.title') }}</span>
44
<el-divider direction="vertical" />
55
<el-button type="primary" class="mr-8" link @click="openParagraph(data)">
66
<AppIcon iconName="app-reference-outlined" class="mr-4"></AppIcon>
7-
引用分段 {{ data.paragraph_list?.length || 0 }}</el-button
7+
{{ $t('components.chat.KnowledgeSource.referenceParagraph') }}
8+
{{ data.paragraph_list?.length || 0 }}</el-button
89
>
910
</div>
1011
<div class="mt-8" v-if="!isWorkFlow(props.type)">
@@ -42,8 +43,8 @@
4243

4344
<div class="border-t color-secondary flex-between mt-12" style="padding-top: 12px">
4445
<div>
45-
<span class="mr-8"> 消耗 tokens: {{ data?.message_tokens + data?.answer_tokens }} </span>
46-
<span> 耗时: {{ data?.run_time?.toFixed(2) }} s</span>
46+
<span class="mr-8"> {{ $t('components.chat.KnowledgeSource.consume') }} tokens: {{ data?.message_tokens + data?.answer_tokens }} </span>
47+
<span> {{ $t('components.chat.KnowledgeSource.consumeTime') }}: {{ data?.run_time?.toFixed(2) }} s</span>
4748
</div>
4849
<el-button
4950
v-if="isWorkFlow(props.type)"
@@ -52,7 +53,7 @@
5253
@click="openExecutionDetail(data.execution_details)"
5354
>
5455
<el-icon class="mr-4"><Document /></el-icon>
55-
执行详情</el-button
56+
{{ $t('components.chat.executionDetails.title') }}</el-button
5657
>
5758
</div>
5859
<!-- 知识库引用 dialog -->

ui/src/components/ai-chat/ParagraphSourceDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<el-form-item label="优化后问题">
2020
<el-input v-model="detail.padding_problem_text" disabled />
2121
</el-form-item>
22-
<el-form-item label="引用分段">
22+
<el-form-item :label="$t('components.chat.KnowledgeSource.referenceParagraph')">
2323
<div v-if="detail.paragraph_list.length > 0" class="w-full">
2424
<template v-for="(item, index) in detail.paragraph_list" :key="index">
2525
<ParagraphCard :data="item" :index="index" />

ui/src/components/app-table/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<el-input
77
ref="quickInputRef"
88
v-model="inputValue"
9-
:placeholder="`请输入${quickCreateName}`"
9+
:placeholder="`${$t('common.inputPlaceholder')}${quickCreateName}`"
1010
class="w-500 mr-12"
1111
autofocus
1212
:maxlength="quickCreateMaxlength || '-'"

ui/src/components/dynamics-form/constructor/items/MultiSelectConstructor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<el-icon class="mr-4">
88
<Plus />
99
</el-icon>
10-
添加
10+
{{ $t('common.add') }}
1111
</el-button>
1212
</div>
1313
</template>

ui/src/components/dynamics-form/constructor/items/RadioCardConstructor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<el-icon class="mr-4">
88
<Plus />
99
</el-icon>
10-
添加
10+
{{ $t('common.add') }}
1111
</el-button>
1212
</div>
1313
</template>

ui/src/components/dynamics-form/constructor/items/RadioRowConstructor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<el-icon class="mr-4">
88
<Plus />
99
</el-icon>
10-
添加
10+
{{ $t('common.add') }}
1111
</el-button>
1212
</div>
1313
</template>

ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<el-icon class="mr-4">
88
<Plus />
99
</el-icon>
10-
添加
10+
{{ $t('common.add') }}
1111
</el-button>
1212
</div>
1313
</template>

ui/src/components/dynamics-form/items/JsonInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</el-button>
2121
</div>
2222
<!-- Codemirror 弹出层 -->
23-
<el-dialog v-model="dialogVisible" title="Python 代码" append-to-body fullscreen>
23+
<el-dialog v-model="dialogVisible" :title="'Python ' + $t('views.functionLib.functionForm.form.param.code')" append-to-body fullscreen>
2424
<Codemirror
2525
v-model="cloneContent"
2626
:extensions="extensions"

ui/src/components/read-write/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<el-input
2323
ref="inputRef"
2424
v-model="writeValue"
25-
placeholder="请输入"
25+
:placeholder="$t('common.inputPlaceholder')"
2626
autofocus
2727
:maxlength="maxlength || '-'"
2828
:show-word-limit="maxlength ? true : false"

ui/src/components/tags-input/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<script setup lang="ts">
3434
import { ref, watch } from 'vue'
3535
import UserApi from '@/api/user'
36+
import { t } from '@/locales'
3637
defineOptions({ name: 'TagsInput' })
3738
const props = defineProps({
3839
tags: {
@@ -42,7 +43,7 @@ const props = defineProps({
4243
},
4344
placeholder: {
4445
type: String,
45-
default: '请输入'
46+
default: t('common.inputPlaceholder')
4647
},
4748
limit: {
4849
/* 最多生成标签数 */

0 commit comments

Comments
 (0)