Skip to content

Commit 9b76925

Browse files
committed
feat: i18n
1 parent 6b5f9a0 commit 9b76925

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

frontend/src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@
537537
"data_predict": "Data Prediction",
538538
"ds_is_invalid": "Datasource is invalid",
539539
"error": "Error",
540+
"no_data": "No Data",
540541
"show_error_detail": "Show error info"
541542
},
542543
"about": {

frontend/src/i18n/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@
537537
"data_predict": "数据预测",
538538
"ds_is_invalid": "数据源无效",
539539
"error": "错误",
540+
"no_data": "暂无数据",
540541
"show_error_detail": "查看具体信息"
541542
},
542543
"about": {

frontend/src/views/chat/component/DisplayChartBlock.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import ChartComponent from '@/views/chat/component/ChartComponent.vue'
33
import type { ChatMessage } from '@/api/chat.ts'
44
import { computed, nextTick, ref } from 'vue'
55
import type { ChartTypes } from '@/views/chat/component/BaseChart.ts'
6+
import { useI18n } from 'vue-i18n'
67
78
const props = defineProps<{
89
id?: number | string
@@ -11,6 +12,8 @@ const props = defineProps<{
1112
data: Array<{ [key: string]: any }>
1213
}>()
1314
15+
const { t } = useI18n()
16+
1417
const chartObject = computed<{
1518
type: ChartTypes
1619
title: string
@@ -91,7 +94,7 @@ defineExpose({
9194
:series="series"
9295
:data="data"
9396
/>
94-
<el-empty v-else description="No Data" />
97+
<el-empty v-else :description="t('chat.no_data')" />
9598
</div>
9699
</template>
97100

0 commit comments

Comments
 (0)