Skip to content

Commit 47bcb7f

Browse files
feat: i18n
1 parent 4dc2036 commit 47bcb7f

File tree

23 files changed

+75
-80
lines changed

23 files changed

+75
-80
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<el-input
77
ref="quickInputRef"
88
v-model="inputValue"
9-
:placeholder="`${$t('common.inputPlaceholder')}${quickCreateName}`"
9+
:placeholder="`${$t('common.inputPlaceholder')} ${quickCreateName}`"
1010
class="w-500 mr-12"
1111
autofocus
1212
:maxlength="quickCreateMaxlength || '-'"
@@ -62,11 +62,11 @@ const props = defineProps({
6262
},
6363
quickCreateName: {
6464
type: String,
65-
default: '文档名称'
65+
default: t('components.quickCreateName')
6666
},
6767
quickCreatePlaceholder: {
6868
type: String,
69-
default: '快速创建空白文档'
69+
default: t('components.quickCreatePlaceholder')
7070
},
7171
quickCreateMaxlength: {
7272
type: Number,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
v-model="formValue.default_value"
6969
:maxlength="formValue.maxlength"
7070
:minlength="formValue.minlength"
71-
:placeholder="$t('dynamicsForm.paramForm.default.placeholder')"
71+
:placeholder="$t('dynamicsForm.default.placeholder')"
7272
show-word-limit
7373
type="text"
7474
/>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
</div>
2121
<div class="ml-12 lighter">
2222
<p>{{ $t('views.document.generateQuestion.tip1', { data: '{data}' }) }}</p>
23-
<p>{{ $t('views.document.generateQuestion.tip2') }}</p>
24-
<p>{{ $t('views.document.generateQuestion.tip3') }}</p>
23+
<p>{{ $t('views.document.generateQuestion.tip2')+ '<question></question>' + $t('views.document.generateQuestion.tip3') }}</p>
24+
<p>{{ $t('views.document.generateQuestion.tip4') }}</p>
2525
</div>
2626
</div>
2727
<el-form-item
@@ -88,7 +88,6 @@ const apiType = ref('') // 文档document或段落paragraph
8888
const FormRef = ref()
8989
const userId = user.userInfo?.id as string
9090
const form = ref(prompt.get(userId))
91-
9291
const rules = reactive({
9392
model_id: [
9493
{

ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</el-button>
3535
</template>
3636
</el-table-column>
37-
<el-table-column :label="$t('common.status')" width="80">
37+
<el-table-column :label="$t('common.status.label')" width="80">
3838
<template #default="{ row }">
3939
<div @click.stop>
4040
<el-switch size="small" v-model="row.is_active" @change="changeState($event, row)" />
@@ -110,8 +110,8 @@ function settingApiKey(row: any) {
110110
function deleteApiKey(row: any) {
111111
MsgConfirm(
112112
// @ts-ignore
113-
`${t('common.msgConfirm1')}: ${row.secret_key}?`,
114-
t('common.msgConfirm2'),
113+
`${t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1')}: ${row.secret_key}?`,
114+
t(t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2')),
115115
{
116116
confirmButtonText: t('common.delete'),
117117
cancelButtonText: t('common.cancel'),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export default {
2424
search: 'Search',
2525
clear: 'Clear',
2626
professional: 'Purchase the Professional Edition',
27-
createDate: 'Create date',
28-
createTime: 'Create time',
27+
createDate: 'Create Date',
28+
createTime: 'Create Time',
2929
operation: 'Operation',
3030
character: 'words',
3131
export: 'Export',

ui/src/locales/lang/en-US/dynamics-form.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ export default {
1111
RadioRow: 'Radio Row'
1212
},
1313
default: {
14-
label: 'Default Value',
15-
placeholder: 'Please enter a default value',
14+
label: 'Default',
15+
placeholder: 'Please enter a default',
1616
requiredMessage: ' is a required property',
17-
show: 'Show Default Value'
17+
show: 'Show Default'
1818
},
1919
tip: {
2020
requiredMessage: 'Cannot be empty',
@@ -31,22 +31,22 @@ export default {
3131
requiredMessage2: 'Only letters, numbers, and underscores are allowed'
3232
},
3333
name: {
34-
label: 'Display Name',
35-
placeholder: 'Please enter a display name',
36-
requiredMessage: 'Display Name is a required property'
34+
label: 'Name',
35+
placeholder: 'Please enter a name',
36+
requiredMessage: 'Name is a required property'
3737
},
3838
tooltip: {
39-
label: 'Parameter Tooltip',
40-
placeholder: 'Please enter a parameter tooltip'
39+
label: 'Tooltip',
40+
placeholder: 'Please enter a tooltip'
4141
},
4242
required: {
43-
label: 'Is Required',
44-
requiredMessage: 'Is Required is a required property'
43+
label: 'Required',
44+
requiredMessage: 'Required is a required property'
4545
},
4646
input_type: {
47-
label: 'Component Type',
48-
placeholder: 'Please select a component type',
49-
requiredMessage: 'Component Type is a required property'
47+
label: 'Type',
48+
placeholder: 'Please select a type',
49+
requiredMessage: 'Type is a required property'
5050
}
5151
},
5252
DatePicker: {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
2-
github: 'Project address',
3-
wiki: 'User manual',
4-
forum: 'Forum for help',
2+
github: 'Project Address',
3+
wiki: 'User Manual',
4+
forum: 'Forum For Help',
55
avatar: {
66
about: 'About',
77
logout: 'Logout',

ui/src/locales/lang/en-US/views/application-overview.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export default {
88
copyLinkText: 'Copy Link',
99
refreshLinkText: 'Refresh Link',
1010
demo: 'Demo',
11-
embedThirdParty: 'Embed Third Party',
12-
accessRestrictions: 'Access Restrictions',
11+
embedInWebsite: 'Embed in website',
12+
accessControl: 'Access Control',
1313
displaySetting: 'Display Setting',
1414
apiAccessCredentials: 'API Access Credentials',
1515
apiKey: 'API Key',
@@ -38,7 +38,6 @@ export default {
3838
uploadImagePrompt: 'Please upload an image'
3939
},
4040
EmbedDialog: {
41-
embedDialogTitle: 'Embed Third Party',
4241
fullscreenModeTitle: 'Fullscreen Mode',
4342
copyInstructions: 'Copy the following code to embed',
4443
floatingModeTitle: 'Floating Mode'
@@ -95,10 +94,10 @@ export default {
9594
startDatePlaceholder: 'Start Date',
9695
endDatePlaceholder: 'End Date',
9796
pastDayOptions: {
98-
past7Days: 'Past 7 Days',
99-
past30Days: 'Past 30 Days',
100-
past90Days: 'Past 90 Days',
101-
past183Days: 'Past Half Year',
97+
past7Days: 'Last 7 Days',
98+
past30Days: 'Last 30 Days',
99+
past90Days: 'Last 90 Days',
100+
past183Days: 'Last 6 Months',
102101
other: 'Custom'
103102
},
104103
charts: {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default {
5353
},
5454
source_url: {
5555
label: 'Web Root URL',
56-
placeholder: 'Please enter the Web root URL',
56+
placeholder: 'Please enter the web root URL',
5757
requiredMessage: 'Please enter the Web root URL'
5858
},
5959
selector: {

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ export default {
130130
'Segments within the selected documents will also be deleted. Please proceed with caution.',
131131
successMessage: 'Batch deletion successful',
132132
confirmTitle3: 'Confirm Deleting Document:',
133-
confirmMessage1:
134-
'All segments under this document will be deleted. Please proceed with caution.'
133+
confirmMessage1: 'Under this document',
134+
confirmMessage2: 'All segments will be deleted, please operate with caution. '
135135
},
136136
form: {
137137
source_url: {
@@ -166,11 +166,11 @@ export default {
166166
title: 'Generate Questions',
167167
successMessage: 'Question generation successful',
168168
tip1: 'The {data} in the prompt is a placeholder for segmented content, which is replaced by the segmented content when executed and sent to the AI model;',
169-
tip2: 'The AI model generates relevant questions based on the segmented content. Please place the generated questions within the &lt;question&gt;&lt;/question&gt; tags, and the system will automatically associate the questions within these tags;',
170-
tip3: 'The generation effect depends on the selected model and prompt. Users can adjust to achieve the best effect.',
171-
prompt:`Content: {data}\n
172-
\n
173-
Please summarize the above content and generate a summary based on the content 5 a question. \n
174-
Answer requirements: \n - Please output only questions; \n - Please place each question in&lt;question&gt;&lt;/question&gt;tag.`
169+
tip2: 'The AI model generates relevant questions based on the segmented content. Please place the generated questions within the',
170+
tip3: 'tags, and the system will automatically associate the questions within these tags;',
171+
tip4: 'The generation effect depends on the selected model and prompt. Users can adjust to achieve the best effect.',
172+
prompt1:
173+
'Content: {data}\n \n Please summarize the above content and generate a summary based on the content 5 a question. \nAnswer requirements: \n - Please output only questions; \n - Please place each question in',
174+
prompt2: 'tag.'
175175
}
176176
}

0 commit comments

Comments
 (0)