refactor: 国际化整理

This commit is contained in:
wangjiahao 2024-11-26 14:31:36 +08:00
parent 2686b7135d
commit 9cb5c4e1b9
14 changed files with 60 additions and 25 deletions

View File

@ -18,4 +18,14 @@ ALTER TABLE `visualization_link_jump_target_view_info`
update visualization_link_jump_target_view_info set target_type = 'view'; update visualization_link_jump_target_view_info set target_type = 'view';
ALTER TABLE `data_visualization_info` ALTER TABLE `data_visualization_info`
ADD COLUMN `check_version` varchar(50) NULL DEFAULT '1' COMMENT '内容检查标识'; ADD COLUMN `check_version` varchar(50) NULL DEFAULT '1' COMMENT '内容检查标识';
update data_visualization_info set check_version = '1'; update data_visualization_info set check_version = '1';
UPDATE `visualization_background` SET `name` = 'Board1' WHERE `id` = 'board_1';
UPDATE `visualization_background` SET `name` = 'Board2' WHERE `id` = 'board_2';
UPDATE `visualization_background` SET `name` = 'Board3' WHERE `id` = 'board_3';
UPDATE `visualization_background` SET `name` = 'Board4' WHERE `id` = 'board_4';
UPDATE `visualization_background` SET `name` = 'Board5' WHERE `id` = 'board_5';
UPDATE `visualization_background` SET `name` = 'Board6' WHERE `id` = 'board_6';
UPDATE `visualization_background` SET `name` = 'Board7' WHERE `id` = 'board_7';
UPDATE `visualization_background` SET `name` = 'Board8' WHERE `id` = 'board_8';
UPDATE `visualization_background` SET `name` = 'Board9' WHERE `id` = 'board_9';

View File

@ -21,4 +21,14 @@ ALTER TABLE `visualization_link_jump_target_view_info`
update visualization_link_jump_target_view_info set target_type = 'view'; update visualization_link_jump_target_view_info set target_type = 'view';
ALTER TABLE `data_visualization_info` ALTER TABLE `data_visualization_info`
ADD COLUMN `check_version` varchar(50) NULL DEFAULT '1' COMMENT '内容检查标识'; ADD COLUMN `check_version` varchar(50) NULL DEFAULT '1' COMMENT '内容检查标识';
update data_visualization_info set check_version = '1'; update data_visualization_info set check_version = '1';
UPDATE `visualization_background` SET `name` = 'Board1' WHERE `id` = 'board_1';
UPDATE `visualization_background` SET `name` = 'Board2' WHERE `id` = 'board_2';
UPDATE `visualization_background` SET `name` = 'Board3' WHERE `id` = 'board_3';
UPDATE `visualization_background` SET `name` = 'Board4' WHERE `id` = 'board_4';
UPDATE `visualization_background` SET `name` = 'Board5' WHERE `id` = 'board_5';
UPDATE `visualization_background` SET `name` = 'Board6' WHERE `id` = 'board_6';
UPDATE `visualization_background` SET `name` = 'Board7' WHERE `id` = 'board_7';
UPDATE `visualization_background` SET `name` = 'Board8' WHERE `id` = 'board_8';
UPDATE `visualization_background` SET `name` = 'Board9' WHERE `id` = 'board_9';

View File

@ -10,7 +10,7 @@ i18n_menu.system=System
i18n_menu.view=Data Display i18n_menu.view=Data Display
i18n_menu.data=Data preparation i18n_menu.data=Data preparation
i18n_menu.panel=Panel i18n_menu.panel=Panel
i18n_menu.screen=Big screen i18n_menu.screen=Data screen
i18n_menu.dataset=Dataset i18n_menu.dataset=Dataset
i18n_menu.datasource=datasource i18n_menu.datasource=datasource
i18n_menu.user=User i18n_menu.user=User

View File

@ -271,11 +271,11 @@ eventBus.on('clearCanvas', clearCanvas)
const openOuterParamsSet = () => { const openOuterParamsSet = () => {
if (componentData.value.length === 0) { if (componentData.value.length === 0) {
ElMessage.warning('当前仪表板为空,请先添加组件') ElMessage.warning(t('components.add_components_first'))
return return
} }
if (!dvInfo.value.id) { if (!dvInfo.value.id) {
ElMessage.warning('请先保存当前页面') ElMessage.warning(t('components.current_page_first'))
return return
} }
// //

View File

@ -3,7 +3,7 @@
ref="canvasCacheDialogRef" ref="canvasCacheDialogRef"
:append-to-body="true" :append-to-body="true"
v-model="dialogShow" v-model="dialogShow"
width="340px" width="360px"
:show-close="false" :show-close="false"
trigger="click" trigger="click"
> >

View File

@ -23,7 +23,7 @@ const dvMainStore = dvMainStoreWithOut()
const { dvInfo, mobileInPc } = storeToRefs(dvMainStore) const { dvInfo, mobileInPc } = storeToRefs(dvMainStore)
const tips = const tips =
'从顶部工具栏中选择组件,添加到这里创建' + t('visualization.resource_create_tips') +
(dvInfo.value.type === 'dashboard' (dvInfo.value.type === 'dashboard'
? t('work_branch.dashboard') ? t('work_branch.dashboard')
: t('work_branch.big_data_screen')) : t('work_branch.big_data_screen'))

View File

@ -34,9 +34,9 @@ const styleMounted = ref({
}) })
const borderStyleList = [ const borderStyleList = [
{ name: '实线', value: 'solid' }, { name: t('visualization.border_style_solid'), value: 'solid' },
{ name: '虚线', value: 'dashed' }, { name: t('visualization.border_style_dashed'), value: 'dashed' },
{ name: '点线', value: 'dotted' } { name: t('visualization.border_style_dotted'), value: 'dotted' }
] ]
const styleInit = () => { const styleInit = () => {

View File

@ -3,7 +3,7 @@
<CommonAttr :themes="themes" :element="curComponent"> <CommonAttr :themes="themes" :element="curComponent">
<el-collapse-item <el-collapse-item
:effect="themes" :effect="themes"
title="链接信息" :title="t('visualization.link_info')"
name="frameLinks" name="frameLinks"
v-if="curComponent && curComponent.frameLinks && !mobileInPc" v-if="curComponent && curComponent.frameLinks && !mobileInPc"
> >
@ -18,8 +18,10 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import CommonAttr from '@/custom-component/common/CommonAttr.vue' import CommonAttr from '@/custom-component/common/CommonAttr.vue'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import FrameLinks from '@/custom-component/de-frame/FrameLinks.vue' import FrameLinks from '@/custom-component/de-frame/FrameLinks.vue'
import { useI18n } from '@/hooks/web/useI18n'
const dvMainStore = dvMainStoreWithOut() const dvMainStore = dvMainStoreWithOut()
const { curComponent, mobileInPc } = storeToRefs(dvMainStore) const { curComponent, mobileInPc } = storeToRefs(dvMainStore)
const { t } = useI18n()
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
themes?: EditorTheme themes?: EditorTheme

View File

@ -3,7 +3,7 @@
<CommonAttr :themes="themes" :element="curComponent"> <CommonAttr :themes="themes" :element="curComponent">
<el-collapse-item <el-collapse-item
:effect="themes" :effect="themes"
title="流媒体信息" :title="t('visualization.stream_media_info')"
name="streamLinks" name="streamLinks"
v-if="curComponent && curComponent.streamMediaLinks && !mobileInPc" v-if="curComponent && curComponent.streamMediaLinks && !mobileInPc"
> >
@ -21,8 +21,10 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import CommonAttr from '@/custom-component/common/CommonAttr.vue' import CommonAttr from '@/custom-component/common/CommonAttr.vue'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import StreamMediaLinks from '@/custom-component/de-stream-media/StreamMediaLinks.vue' import StreamMediaLinks from '@/custom-component/de-stream-media/StreamMediaLinks.vue'
import { useI18n } from '@/hooks/web/useI18n'
const dvMainStore = dvMainStoreWithOut() const dvMainStore = dvMainStoreWithOut()
const { curComponent, mobileInPc } = storeToRefs(dvMainStore) const { curComponent, mobileInPc } = storeToRefs(dvMainStore)
const { t } = useI18n()
withDefaults( withDefaults(
defineProps<{ defineProps<{
themes?: EditorTheme themes?: EditorTheme

View File

@ -6,7 +6,8 @@ import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
import { imgUrlTrans } from '@/utils/imgUtils' import { imgUrlTrans } from '@/utils/imgUtils'
import eventBus from '@/utils/eventBus' import eventBus from '@/utils/eventBus'
import TimeClockFormat from '@/custom-component/de-time-clock/TimeClockFormat.vue' import TimeClockFormat from '@/custom-component/de-time-clock/TimeClockFormat.vue'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
withDefaults( withDefaults(
defineProps<{ defineProps<{
themes?: EditorTheme themes?: EditorTheme
@ -62,7 +63,7 @@ onBeforeUnmount(() => {
> >
<el-collapse-item <el-collapse-item
:effect="themes" :effect="themes"
title="日期格式" :title="t('visualization.data_format')"
name="timeClockFormat" name="timeClockFormat"
v-if="curComponent && curComponent.formatInfo" v-if="curComponent && curComponent.formatInfo"
> >

View File

@ -1302,8 +1302,8 @@ export default {
custom_count: 'Number of records', custom_count: 'Number of records',
table_title_fontsize: 'Header font size', table_title_fontsize: 'Header font size',
table_item_fontsize: 'Table font size', table_item_fontsize: 'Table font size',
table_header_bg: 'Header background', table_header_bg: 'Header Bg',
table_item_bg: 'Table background', table_item_bg: 'Table Bg',
table_header_font_color: 'Header font', table_header_font_color: 'Header font',
table_item_font_color: 'Table font', table_item_font_color: 'Table font',
table_show_index: 'Show serial number', table_show_index: 'Show serial number',
@ -2568,7 +2568,7 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
condition_cascade_configuration: 'Query condition cascade configuration', condition_cascade_configuration: 'Query condition cascade configuration',
not_reverse_cascade: '(Only the upper level can cascade the lower level, not reverse cascade)', not_reverse_cascade: '(Only the upper level can cascade the lower level, not reverse cascade)',
must_be_met: must_be_met:
'Based on the query condition of the current query component, if cascade configuration is required, the following conditions must be met:', 'Based on the condition of the current component, if cascade configuration is required, the following conditions must be met:',
select_data_set: select_data_set:
'1. Display type: text drop-down component and number drop-down component; 2. Option value source: select Dataset', '1. Display type: text drop-down component and number drop-down component; 2. Option value source: select Dataset',
add_cascade_configuration: 'Add cascade configuration', add_cascade_configuration: 'Add cascade configuration',
@ -2596,7 +2596,7 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
cannot_be_empty_name: 'Field name cannot be empty', cannot_be_empty_name: 'Field name cannot be empty',
query_condition_setting: 'Query condition setting', query_condition_setting: 'Query condition setting',
query_condition: 'Query condition', query_condition: 'Query condition',
chart_and_field: 'Select the associated chart and field', chart_and_field: 'Select the associated chart&field',
be_switched_to: be_switched_to:
'Note: Automatic mode supports automatic association of fields with the same Dataset, which can be switched to', 'Note: Automatic mode supports automatic association of fields with the same Dataset, which can be switched to',
to_automatic_again: to_automatic_again:
@ -2647,6 +2647,9 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
column_name: 'Field name' column_name: 'Field name'
}, },
visualization: { visualization: {
resource_create_tips: 'Select components from the top toolbar and add them here to create.',
component_select_tips: 'Please elect a component...',
border_style_dotted: 'Dotted',
app_export: 'App Export', app_export: 'App Export',
app_name: 'App Name', app_name: 'App Name',
app_version: 'App Version', app_version: 'App Version',
@ -2735,7 +2738,7 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
no_screen: 'No data screens available', no_screen: 'No data screens available',
query: 'Query', query: 'Query',
carousel: 'Carousel', carousel: 'Carousel',
carousel_time: 'Carousel Time (seconds)', carousel_time: 'Carousel Time(s)',
carousel_tips: 'Carousel will only take effect after exiting edit mode', carousel_tips: 'Carousel will only take effect after exiting edit mode',
carousel_tips2: 'Carousel will be disabled after enabling conditional styling', carousel_tips2: 'Carousel will be disabled after enabling conditional styling',
background: 'Background', background: 'Background',
@ -2762,7 +2765,7 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
pop_area_tips: pop_area_tips:
'Click or drag the query component to this position, click preview to view the pop-up area', 'Click or drag the query component to this position, click preview to view the pop-up area',
view: 'View', view: 'View',
query_component: 'Query Component', query_component: 'Query',
media: 'Media', media: 'Media',
more: 'More', more: 'More',
source_material: 'Material', source_material: 'Material',
@ -2782,13 +2785,13 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
size: 'Size', size: 'Size',
font_family_select: 'Dashboard Font Selection', font_family_select: 'Dashboard Font Selection',
screen_font_family_select: 'Data Screen Font Selection', screen_font_family_select: 'Data Screen Font Selection',
button_tips: 'Display zoom, export, and other floating buttons', button_tips: 'Display floating buttons',
display_auxiliary_grid: 'Display Auxiliary Grid', display_auxiliary_grid: 'Display Auxiliary Grid',
show_pop_button: 'Show Pop-up Area Query Button', show_pop_button: 'Show Pop-up Area Query Button',
show_zoom_button: 'Show floating buttons', show_zoom_button: 'Show floating buttons',
keep_ratio: 'Keep Aspect Ratio', keep_ratio: 'Keep Aspect Ratio',
rotation_3d: '3D Rotation', rotation_3d: '3D Rotation',
keep_size: 'Adjust size while keeping internal component size', keep_size: 'Adjust size & keeping inner',
no_save_tips: 'There are unsaved {0}', no_save_tips: 'There are unsaved {0}',
no_save_tips2: 'There are unsaved changes, restore now?', no_save_tips2: 'There are unsaved changes, restore now?',
locate_tips: 'Locate to Center', locate_tips: 'Locate to Center',
@ -3004,7 +3007,7 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
stream_mobile_tips: 'May not be displayed on IOS devices', stream_mobile_tips: 'May not be displayed on IOS devices',
json_params_error: 'Failed to parse third-party parameters. Please check the parameter format.', json_params_error: 'Failed to parse third-party parameters. Please check the parameter format.',
inner_padding: 'Inner Padding', inner_padding: 'Inner Padding',
board_radio: 'Rounded Corners', board_radio: 'Corners',
web_set_tips: 'Some websites may not allow embedding and will not display.', web_set_tips: 'Some websites may not allow embedding and will not display.',
repeat_params: 'Duplicate parameter names exist.', repeat_params: 'Duplicate parameter names exist.',
enable_outer_param_set: 'Enable External Parameter Settings', enable_outer_param_set: 'Enable External Parameter Settings',

View File

@ -2585,6 +2585,9 @@ export default {
column_name: '欄位名稱' column_name: '欄位名稱'
}, },
visualization: { visualization: {
resource_create_tips: '從頂部工具欄中選擇組件添加到這裡創建',
component_select_tips: '請選擇組件...',
border_style_dotted: '點線',
app_export: '應用導出', app_export: '應用導出',
app_name: '應用名稱', app_name: '應用名稱',
app_version: '應用版本號', app_version: '應用版本號',

View File

@ -2587,6 +2587,9 @@ export default {
column_name: '字段名称' column_name: '字段名称'
}, },
visualization: { visualization: {
resource_create_tips: '从顶部工具栏中选择组件添加到这里创建',
component_select_tips: '请选择组件...',
border_style_dotted: '点线',
app_export: '应用导出', app_export: '应用导出',
app_name: '应用名称', app_name: '应用名称',
app_version: '应用版本号', app_version: '应用版本号',

View File

@ -37,7 +37,7 @@
:themes="themes" :themes="themes"
></common-attr> ></common-attr>
<el-row v-else class="view-selected-message-class"> <el-row v-else class="view-selected-message-class">
<span class="select-view">请选择组件...</span> <span class="select-view">{{ t('visualization.component_select_tips') }}</span>
</el-row> </el-row>
</div> </div>
</template> </template>
@ -51,7 +51,8 @@ import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapsho
import CommonAttr from '@/custom-component/common/CommonAttr.vue' import CommonAttr from '@/custom-component/common/CommonAttr.vue'
const dvMainStore = dvMainStoreWithOut() const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut() const snapshotStore = snapshotStoreWithOut()
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
const { batchOptComponentInfo, batchOptComponentType, mixProperties, mixPropertiesInner } = const { batchOptComponentInfo, batchOptComponentType, mixProperties, mixPropertiesInner } =
storeToRefs(dvMainStore) storeToRefs(dvMainStore)
const param = { id: 'mixId', optType: 'edit' } const param = { id: 'mixId', optType: 'edit' }