Merge pull request #13017 from ulleo/dev-v2

feat: 国际化
This commit is contained in:
ulleo 2024-10-30 16:37:41 +08:00 committed by GitHub
commit 4bbcaf8376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 37 additions and 16 deletions

View File

@ -5,13 +5,18 @@ import { computed } from 'vue'
import { ElHeader } from 'element-plus-secondary' import { ElHeader } from 'element-plus-secondary'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import AccountOperator from '@/layout/components/AccountOperator.vue' import AccountOperator from '@/layout/components/AccountOperator.vue'
import { propTypes } from '@/utils/propTypes'
import { useAppearanceStoreWithOut } from '@/store/modules/appearance' import { useAppearanceStoreWithOut } from '@/store/modules/appearance'
import { useI18n } from '@/hooks/web/useI18n'
const appearanceStore = useAppearanceStoreWithOut() const appearanceStore = useAppearanceStoreWithOut()
const { push } = useRouter() const { push } = useRouter()
const props = defineProps({ const { t } = useI18n()
title: propTypes.string.def('系统设置')
}) const props = withDefaults(
defineProps<{
title: string
}>(),
{}
)
const backToMain = () => { const backToMain = () => {
push('/workbranch/index') push('/workbranch/index')
} }
@ -25,17 +30,17 @@ const navigate = computed(() => appearanceStore.getNavigate)
:class="{ 'header-light': navigateBg && navigateBg === 'light' }" :class="{ 'header-light': navigateBg && navigateBg === 'light' }"
> >
<img class="logo" v-if="navigate" :src="navigate" alt="" /> <img class="logo" v-if="navigate" :src="navigate" alt="" />
<Icon class="de-logo" v-else className="logo" name="logo" <Icon class="de-logo" v-else className="logo" name="logo">
><logo class="svg-icon logo de-logo" <logo class="svg-icon logo de-logo" />
/></Icon> </Icon>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<span class="system">{{ props.title || '系统设置' }}</span> <span class="system">{{ title || t('commons.system_setting') }}</span>
<div class="operate-setting"> <div class="operate-setting">
<span @click="backToMain" class="work-bar flex-align-center"> <span @click="backToMain" class="work-bar flex-align-center">
<el-icon> <el-icon>
<Icon name="icon_left_outlined"><icon_left_outlined class="svg-icon" /></Icon> <Icon name="icon_left_outlined"><icon_left_outlined class="svg-icon" /></Icon>
</el-icon> </el-icon>
<span class="work">返回工作台</span> <span class="work">{{ t('work_branch.back_to_work_branch') }}</span>
</span> </span>
<AccountOperator /> <AccountOperator />

View File

@ -52,7 +52,13 @@ export default {
user: 'Operating User', user: 'Operating User',
time: 'Operation Time', time: 'Operation Time',
ip: 'IP Address', ip: 'IP Address',
error_msg: 'Error Message' error_msg: 'Error Message',
organization: 'Organization',
error_msg: 'Error Message',
confirm_export: 'Are You Sure You Want to Export the Log?',
export_success: 'Export Succeeded',
excel_file_name: 'DataEase Operation Log',
relevant_content_found: 'No Relevant Content Found'
}, },
template_manage: { template_manage: {
name_already_exists_type: 'Classification name already exists', name_already_exists_type: 'Classification name already exists',
@ -353,6 +359,7 @@ export default {
to_delete_: 'Are you sure to delete [100]?' to_delete_: 'Are you sure to delete [100]?'
}, },
work_branch: { work_branch: {
back_to_work_branch: 'Back to work branch',
recommended_dashboard: 'Recommended dashboard', recommended_dashboard: 'Recommended dashboard',
template_market_official: template_market_official:
'If you have not obtained the template download link, please contact the template market official', 'If you have not obtained the template download link, please contact the template market official',
@ -995,7 +1002,6 @@ export default {
task_finish_in_suffix: '', task_finish_in_suffix: '',
open_sub_task: 'Open Assigned Tasks' open_sub_task: 'Open Assigned Tasks'
}, },
on_the_left: 'Please select a form on the left',
search_by_commit_name: 'Search by operator name' search_by_commit_name: 'Search by operator name'
}, },
relation: { relation: {

View File

@ -77,7 +77,12 @@ export default {
user: '操作用戶', user: '操作用戶',
time: '操作時間', time: '操作時間',
ip: 'IP地址', ip: 'IP地址',
error_msg: '錯誤信息' organization: '所屬組織',
error_msg: '錯誤信息',
confirm_export: '確定導出日志嗎',
export_success: '導出成功',
excel_file_name: 'DataEase操作日志',
relevant_content_found: '沒有找到相關內容'
}, },
template_manage: { template_manage: {
name_already_exists_type: '分類名稱已存在', name_already_exists_type: '分類名稱已存在',
@ -120,6 +125,7 @@ export default {
exists_name_hint: '當前名稱已在模版管理中存在請修改' exists_name_hint: '當前名稱已在模版管理中存在請修改'
}, },
work_branch: { work_branch: {
back_to_work_branch: '返回工作台',
recommended_dashboard: '推薦儀表板', recommended_dashboard: '推薦儀表板',
template_market_official: '未獲取模板下載鏈接請聯系模板市場官方', template_market_official: '未獲取模板下載鏈接請聯系模板市場官方',
create_quickly: '快速創建', create_quickly: '快速創建',
@ -3257,7 +3263,6 @@ export default {
task_finish_in_suffix: '內完成填報', task_finish_in_suffix: '內完成填報',
open_sub_task: '查看已下發任務' open_sub_task: '查看已下發任務'
}, },
on_the_left: '請在左側選擇表單',
search_by_commit_name: '根據操作人名稱搜索' search_by_commit_name: '根據操作人名稱搜索'
}, },
threshold: { threshold: {

View File

@ -77,7 +77,12 @@ export default {
user: '操作用户', user: '操作用户',
time: '操作时间', time: '操作时间',
ip: 'IP地址', ip: 'IP地址',
error_msg: '错误信息' organization: '所属组织',
error_msg: '错误信息',
confirm_export: '确定导出日志吗',
export_success: '导出成功',
excel_file_name: 'DataEase操作日志',
relevant_content_found: '没有找到相关内容'
}, },
template_manage: { template_manage: {
name_already_exists_type: '分类名称已存在', name_already_exists_type: '分类名称已存在',
@ -120,6 +125,7 @@ export default {
exists_name_hint: '当前名称已在模版管理中存在请修改' exists_name_hint: '当前名称已在模版管理中存在请修改'
}, },
work_branch: { work_branch: {
back_to_work_branch: '返回工作台',
recommended_dashboard: '推荐仪表板', recommended_dashboard: '推荐仪表板',
template_market_official: '未获取模板下载链接请联系模板市场官方', template_market_official: '未获取模板下载链接请联系模板市场官方',
create_quickly: '快速创建', create_quickly: '快速创建',
@ -3316,7 +3322,6 @@ export default {
task_finish_in_suffix: '内完成填报', task_finish_in_suffix: '内完成填报',
open_sub_task: '查看已下发任务' open_sub_task: '查看已下发任务'
}, },
on_the_left: '请在左侧选择表单',
search_by_commit_name: '根据操作人名称搜索' search_by_commit_name: '根据操作人名称搜索'
}, },
threshold: { threshold: {

@ -1 +1 @@
Subproject commit 0c3c81beed9e0229d3989615f8b2886cd1c09493 Subproject commit bd9158c471ab1da8c1b0ee21404200152368d56c