diff --git a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue
index 426e707421..cbe65812e3 100644
--- a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue
+++ b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue
@@ -106,17 +106,21 @@ const saveSelfSubject = () => {
-
+
{{ $t('commons.save') }}
-
+
-
+
{
:background-border-select-width="197"
/>
-
+
@@ -147,7 +155,7 @@ const saveSelfSubject = () => {
diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue
index cc4e1a459b..938f1baa45 100644
--- a/core/core-frontend/src/components/dashboard/DbToolbar.vue
+++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue
@@ -106,7 +106,7 @@ const closeEditCanvasName = () => {
return
}
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) {
- ElMessage.warning('名称字段长度1-64个字符')
+ ElMessage.warning(t('components.length_1_64_characters'))
editCanvasName()
return
}
@@ -134,7 +134,7 @@ const previewInner = () => {
const previewOuter = () => {
if (!dvInfo.value.id) {
- ElMessage.warning('请先保存当前页面')
+ ElMessage.warning(t('components.current_page_first'))
return
}
canvasSave(() => {
@@ -174,11 +174,11 @@ const resourceOptFinish = param => {
const saveCanvasWithCheck = () => {
if (userStore.getOid && wsCache.get('user.oid') && userStore.getOid !== wsCache.get('user.oid')) {
- ElMessageBox.confirm('已切换至新组织,无权保存其他组织的资源', {
+ ElMessageBox.confirm(t('components.from_other_organizations'), {
confirmButtonType: 'primary',
type: 'warning',
- confirmButtonText: '关闭页面',
- cancelButtonText: '取消',
+ confirmButtonText: t('components.close_the_page'),
+ cancelButtonText: t('common.cancel'),
autofocus: false,
showClose: false
}).then(() => {
@@ -218,7 +218,7 @@ const saveResource = () => {
try {
canvasSave(() => {
snapshotStore.resetStyleChangeTimes()
- ElMessage.success('保存成功')
+ ElMessage.success(t('common.save_success'))
let url = window.location.href
url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`)
window.history.replaceState(null, '', url)
@@ -251,7 +251,7 @@ const backToMain = () => {
url = url + '?dvId=' + dvInfo.value.id
}
if (styleChangeTimes.value > 0) {
- ElMessageBox.confirm('当前的更改尚未保存,确定退出吗?', {
+ ElMessageBox.confirm(t('components.sure_to_exit'), {
confirmButtonType: 'primary',
type: 'warning',
autofocus: false,
@@ -300,7 +300,7 @@ const openDataBoardSetting = () => {
const openMobileSetting = () => {
if (!dvInfo.value.id || dvInfo.value.dataState === 'prepare') {
- ElMessage.warning('请先保存当前页面')
+ ElMessage.warning(t('components.current_page_first'))
return
}
useEmitt().emitter.emit('mobileConfig')
@@ -366,11 +366,11 @@ const batchOptStatusChange = value => {
const openOuterParamsSet = () => {
if (componentData.value.length === 0) {
- ElMessage.warning('当前仪表板为空,请先添加组件')
+ ElMessage.warning(t('components.add_components_first'))
return
}
if (!dvInfo.value.id) {
- ElMessage.warning('请先保存当前页面')
+ ElMessage.warning(t('components.current_page_first'))
return
}
//设置需要先触发保存
@@ -418,7 +418,7 @@ const saveLinkageSetting = () => {
linkageInfo: targetLinkageInfo.value
}
saveLinkage(request).then(() => {
- ElMessage.success('保存成功')
+ ElMessage.success(t('save_success.common'))
// 刷新联动信息
getPanelAllLinkageInfo(dvInfo.value.id).then(rsp => {
dvMainStore.setNowPanelTrackInfo(rsp.data)
@@ -497,7 +497,7 @@ const initOpenHandler = newWindow => {
- 已选 {{ curBatchOptComponents.length }} 项
+ {{ t('user.selection_info', [curBatchOptComponents.length]) }}
@@ -507,7 +507,7 @@ const initOpenHandler = newWindow => {
is-label
:icon-name="dvView"
themes="light"
- title="图表"
+ :title="t('chart.datalist')"
>
@@ -517,7 +517,7 @@ const initOpenHandler = newWindow => {
is-label
themes="light"
:icon-name="dvFilter"
- title="查询组件"
+ :title="t('visualization.filter_component')"
>
@@ -526,7 +526,7 @@ const initOpenHandler = newWindow => {
themes="light"
:base-width="115"
:icon-name="dvText"
- title="富文本"
+ :title="t('components.rich_text')"
>
@@ -536,7 +536,7 @@ const initOpenHandler = newWindow => {
placement="bottom"
:base-width="328"
:icon-name="dvMedia"
- title="媒体"
+ :title="t('components.media')"
>
@@ -549,13 +549,13 @@ const initOpenHandler = newWindow => {
is-label
:base-width="115"
:icon-name="dvMoreCom"
- title="更多"
+ :title="'visualization.more'"
>
@@ -564,32 +564,45 @@ const initOpenHandler = newWindow => {
-
+
-
+
-
+
-
+
@@ -598,7 +611,7 @@ const initOpenHandler = newWindow => {
- 预览
+ {{ t('visualization.preview') }}
@@ -606,13 +619,13 @@ const initOpenHandler = newWindow => {
- 全屏预览
+ {{ t('visualization.fullscreen_preview') }}
- 新页面预览
+ {{ t('work_branch.new_page_preview') }}
@@ -625,7 +638,7 @@ const initOpenHandler = newWindow => {
@click="edit()"
type="primary"
>
- 编辑
+ {{ t('data_set.edit') }}
{
style="float: right; margin-right: 12px"
type="primary"
>
- 保存
+ {{ t('data_set.save') }}
@@ -648,7 +661,7 @@ const initOpenHandler = newWindow => {
:disabled="curBatchOptComponents.length === 0"
style="float: right; margin-right: 12px"
>
- 复制
{
:disabled="curBatchOptComponents.length === 0"
style="float: right; margin-right: 12px"
>
- 删除
-
完成{{ t('components.complete') }}
@@ -673,13 +689,13 @@ const initOpenHandler = newWindow => {
@click="cancelLinkageSetting()"
style="float: right; margin-right: 12px"
>
- 取消
确定{{ t('userimport.sure') }}
diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/ComponentColorSelector.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/ComponentColorSelector.vue
index 5d57e6451b..dfbf7ff0bd 100644
--- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/ComponentColorSelector.vue
+++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/ComponentColorSelector.vue
@@ -159,7 +159,7 @@
-
+
-
+
{{ t('chart.text_pos_left') }}
@@ -50,7 +50,7 @@
-
+
{{ t('chart.text_pos_top') }}
@@ -82,7 +82,7 @@
-
+
-
+
diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue
index e0838f9a69..628490b9c8 100644
--- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue
+++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue
@@ -79,11 +79,11 @@
v-model="canvasStyleData.refreshBrowserEnable"
@change="themeChange"
>
- 整体刷新
+ {{ t('components.overall_refresh') }}
- 仅公共链接和新Tab预览生效
+ {{ t('components.previews_take_effect') }}
{
return props.themes === 'dark' ? 'ndark' : 'dark'
})
-const resourceType = computed(() => (dvInfo.value.type === 'dashboard' ? '仪表板' : '数据大屏'))
+const resourceType = computed(() =>
+ dvInfo.value.type === 'dashboard' ? t('dashboard.dashboard') : t('dashboard.big_data_screen')
+)
const onRefreshChange = val => {
if (val === '' || parseFloat(val).toString() === 'NaN' || parseFloat(val) < 1) {
diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue
index 30ffe42673..e8cdb8a033 100644
--- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue
+++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue
@@ -7,7 +7,7 @@
:effect="themes"
class="form-item"
:class="'form-item-' + themes"
- label="联动、钻取、跳转的图标颜色"
+ :label="t('components.jump_icon_color')"
>
- 文本
+ {{ t('chart.text') }}
+
@@ -19,7 +21,7 @@
style="width: 56px"
:title="t('chart.text_fontsize')"
v-model="titleForm.fontSize"
- :placeholder="'大小'"
+ :placeholder="t('chart.size')"
size="small"
@change="changeTitleStyle('fontSize')"
>
diff --git a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/Slider.vue b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/Slider.vue
index c7b81973e3..8191edb649 100644
--- a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/Slider.vue
+++ b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/Slider.vue
@@ -206,6 +206,7 @@ const dvMainStore = dvMainStoreWithOut()
const { canvasStyleData } = storeToRefs(dvMainStore)
const emit = defineEmits(['reload'])
import { guid } from '@/views/visualized/data/dataset/form/util.js'
+import { useI18n } from '@/hooks/web/useI18n'
import SubjectEditDialog from '@/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue'
const subjectEditDialogRef = ref(null)
@@ -221,7 +222,7 @@ const props = defineProps({
})
const { initialSpeed } = toRefs(props)
-
+const { t } = useI18n()
const state = reactive({
temp: null,
sliders: [],
@@ -264,7 +265,7 @@ const querySubjectWithGroup = () => {
const subjectDelete = id => {
deleteSubject(id).then(() => {
- ElMessage.success('删除成功')
+ ElMessage.success(t('chart.delete_success'))
querySubjectWithGroup()
})
}
@@ -274,7 +275,7 @@ const subjectEditFinish = subjectItem => {
saveOrUpdateSubject(subjectItem)
.then(() => {
subjectEditDialogRef.value.resetForm()
- ElMessage.success('保存成功')
+ ElMessage.success(t('dataset.save_success'))
querySubjectWithGroup()
})
.catch(() => {
@@ -295,7 +296,7 @@ const saveSelfSubject = () => {
const canvasStyle = deepCopy(canvasStyleData.value)
canvasStyle.themeId = guid()
const subjectItemNew = {
- name: '新建主题',
+ name: t('components.a_new_theme'),
coverUrl: null,
details: JSON.stringify(canvasStyle)
}
diff --git a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue
index 2dcaa0d1d7..a40f475af2 100644
--- a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue
+++ b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue
@@ -22,7 +22,7 @@ const rules = {
coverUrl: [
{
required: true,
- message: '请上传封面',
+ message: t('components.upload_a_cover'),
trigger: 'change'
}
]
@@ -36,7 +36,9 @@ const resetForm = () => {
subjectDialogShow.value = false
}
const subjectForm = ref(null)
-const title = computed(() => (optType.value === 'new' ? '新建主题' : '编辑主题'))
+const title = computed(() =>
+ optType.value === 'new' ? t('components.a_new_theme') : t('components.edit_theme')
+)
const optInit = (subjectItem, opt) => {
optType.value = opt
@@ -80,20 +82,20 @@ const onImgChange = imgUrl => {
>
-
+
-
+
- 取消
- 确认
+ {{ t('common.cancel') }}
+ {{ t('chart.confirm') }}
diff --git a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectTemplateItem.vue b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectTemplateItem.vue
index 1a09845db7..9c815dc9ae 100644
--- a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectTemplateItem.vue
+++ b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectTemplateItem.vue
@@ -59,6 +59,7 @@ import { adaptCurThemeCommonStyleAll } from '@/utils/canvasStyle'
import { useEmitt } from '@/hooks/web/useEmitt'
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
+import { useI18n } from '@/hooks/web/useI18n'
const { canvasStyleData } = storeToRefs(dvMainStore)
@@ -67,6 +68,7 @@ const state = reactive({
subjectItemDetails: null,
canEdit: false
})
+const { t } = useI18n()
const props = defineProps({
subjectItem: {
@@ -83,7 +85,7 @@ const themeSelected = computed(() => {
})
const emit = defineEmits(['subjectDelete', 'onSubjectChange', 'subjectEdit'])
const subjectDelete = () => {
- ElMessageBox.confirm('确定删除[' + subjectItem.value.name + ']吗?', {
+ ElMessageBox.confirm(t('components.to_delete_', [subjectItem.value.name]), {
confirmButtonType: 'danger',
type: 'warning',
autofocus: false,
diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts
index bac843f1cd..fa79c509b4 100644
--- a/core/core-frontend/src/locales/en.ts
+++ b/core/core-frontend/src/locales/en.ts
@@ -36,6 +36,40 @@ export default {
delete_success: 'Delete success',
no_auth_tips: 'Missing menu permissions, please contact the administrator'
},
+ components: {
+ dashboard_style: 'Dashboard style',
+ overall_configuration: 'Overall configuration',
+ dashboard_background: 'Dashboard background',
+ chart_color: 'Chart color',
+ advanced_style_settings: 'Advanced style settings',
+ length_1_64_characters: 'Name field length 1-64 characters',
+ current_page_first: 'Please save the current page first',
+ from_other_organizations:
+ 'Switch to new organization, no permission to save resources from other organizations',
+ close_the_page: 'Close the page',
+ sure_to_exit: 'Current changes have not been saved, are you sure to exit?',
+ add_components_first: 'The current dashboard is empty, please add components first',
+ rich_text: 'Rich text',
+ media: 'Media',
+ dashboard_configuration: 'Dashboard configuration',
+ to_mobile_layout: 'Switch to mobile layout',
+ complete: 'Complete',
+ pager_color: 'Pager color',
+ title_horizontal_position: 'Title horizontal position',
+ title_display_position: 'Title display position',
+ title_color: 'Title color',
+ label_color: 'Label color',
+ input_box_style: 'Input box style',
+ overall_refresh: 'Overall refresh',
+ previews_take_effect: 'Only public links and new tab previews take effect',
+ jump_icon_color: 'Link, drill, jump icon color',
+ level_display_color: 'Drill level display color',
+ a_new_theme: 'Create a new theme',
+ upload_a_cover: 'Please upload a cover',
+ edit_theme: 'Edit theme',
+ cover: 'Cover',
+ to_delete_: 'Are you sure to delete [100]?'
+ },
work_branch: {
recommended_dashboard: 'Recommended dashboard',
template_market_official:
diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts
index a27b6822e0..23b766e826 100644
--- a/core/core-frontend/src/locales/zh-CN.ts
+++ b/core/core-frontend/src/locales/zh-CN.ts
@@ -393,6 +393,39 @@ export default {
role: '角色',
addUser: '@:common.add@:system.user'
},
+ components: {
+ dashboard_style: '仪表板风格',
+ overall_configuration: '整体配置',
+ dashboard_background: '仪表板背景',
+ chart_color: '图表配色',
+ advanced_style_settings: '高级样式设置',
+ length_1_64_characters: '名称字段长度1-64个字符',
+ current_page_first: '请先保存当前页面',
+ from_other_organizations: '已切换至新组织,无权保存其他组织的资源',
+ close_the_page: '关闭页面',
+ sure_to_exit: '当前的更改尚未保存,确定退出吗?',
+ add_components_first: '当前仪表板为空,请先添加组件',
+ rich_text: '富文本',
+ media: '媒体',
+ dashboard_configuration: '仪表板配置',
+ to_mobile_layout: '切换至移动端布局',
+ complete: '完成',
+ pager_color: '分页器配色',
+ title_horizontal_position: '标题水平位置',
+ title_display_position: '标题显示位置',
+ title_color: '标题颜色',
+ label_color: '标签颜色',
+ input_box_style: '输入框样式',
+ overall_refresh: '整体刷新',
+ previews_take_effect: '仅公共链接和新Tab预览生效',
+ jump_icon_color: '联动、钻取、跳转的图标颜色',
+ level_display_color: '钻取层级展示颜色',
+ a_new_theme: '新建主题',
+ upload_a_cover: '请上传封面',
+ edit_theme: '编辑主题',
+ cover: '封面',
+ to_delete_: '确定删除[{0}]吗?'
+ },
user: {
change_password: '修改密码',
select_users: '请选择用户',