From a8f3e247c6c4a8ff30c86ebc0717cb6f24f1e47c Mon Sep 17 00:00:00 2001 From: zhongzm Date: Fri, 7 Feb 2025 09:52:10 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E4=B8=AD=E8=8B=B1=E6=96=87=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/langs/en-us.ts | 34 +++++++++++- src/locales/langs/zh-cn.ts | 34 +++++++++++- src/views/dashboard/modules/card-data.vue | 19 +++---- src/views/dashboard/modules/header-banner.vue | 54 ++++++++++--------- 4 files changed, 104 insertions(+), 37 deletions(-) diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 06194ef..e509825 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -645,7 +645,39 @@ const local: any = { clearOk: "Cleared Successfully", statusChange: "Are you sure you want the {text} {num} job?", } - } + }, + carddata:{ + sitelist:'Site List', + sitename:'NAME', + country:'COUNTRY/REGION', + alert:'ALERTS', + gateway:'GATEWAY', + switches:'SWITCHES', + clients:'CLIENTS', + search:'Search site name', + }, + headerbanner:{ + controller:'Controller Overview', + connected:'Connected', + cloud:'Cloud Access', + sites:'Sites', + totalsite:'Total Sites', + gateway:'Gateways', + switches:'Switches', + register:'Register Users', + online:'Online Users', + client:'Client', + alerts:'Alerts', + connect:'Connected', + disconnect:'Disconnected', + registuser:'Register', + onlineuser:'Online', + isolated:'Isolated', + wired:'Wired client', + wireless:'Wireless client', + guest:'Wireless Guest', + alert:'Alerts', + }, }, form: { required: 'Cannot be empty', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index d36506f..fa903df 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -645,7 +645,39 @@ const local:any = { clearOk: "清空成功", statusChange: "确定要{text} {num} 任务吗?", } - } + }, + carddata:{ + sitelist:'站点列表', + sitename:'站点名称', + country:'国家/地区', + alert:'警告', + gateway:'网关', + switches:'交换机', + clients:'装置', + search:'输入站点名称', + }, + headerbanner:{ + controller:'控制仪表盘', + connected:'连接', + cloud:'云访问', + sites:'站点', + totalsite:'站点数', + gateway:'网关', + switches:'交换机', + register:'注册用户', + online:'在线用户', + client:'装置', + alerts:'警告', + connect:'连接数', + disconnect:'断连数', + registuser:'注册用户数', + onlineuser:'在线用户数', + isolated:'隔离', + wired:'有线客户端', + wireless:'无线客户端', + guest:'无线访客', + alert:'告警数', + }, }, form: { required: '不能为空', diff --git a/src/views/dashboard/modules/card-data.vue b/src/views/dashboard/modules/card-data.vue index 324f3a9..7f7e80c 100644 --- a/src/views/dashboard/modules/card-data.vue +++ b/src/views/dashboard/modules/card-data.vue @@ -10,8 +10,9 @@ import { SearchOutlined, PlusOutlined } from '@ant-design/icons-vue'; - import { getDashboardSiteList } from '@/service/api/auth'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); defineOptions({ name: 'CardData' @@ -65,27 +66,27 @@ watch([currentPage, pageSize, searchValue], () => { // 表格列定义 const columns: TableColumnType[] = [ { - title: 'NAME', + title: t('page.carddata.sitename'), key: 'name', dataIndex: 'name' }, { - title: 'COUNTRY/REGION', + title: t('page.carddata.country'), key: 'region', dataIndex: 'region' }, { - title: 'ALERTS', + title: t('page.carddata.alert'), key: 'alerts', width: 100 }, { - title: 'GATEWAY', + title: t('page.carddata.gateway'), key: 'gateway', width: 100 }, { - title: 'SWITCHES', + title: t('page.carddata.switches'), key: 'switches', width: 100 }, @@ -100,7 +101,7 @@ const columns: TableColumnType[] = [ width: 100 }, { - title: 'CLIENTS', + title: t('page.carddata.clients'), key: 'clients', width: 150 }, @@ -146,12 +147,12 @@ const handlePageSizeChange = (size: number) => {
- Site List + {{ t('page.carddata.sitelist') }}
diff --git a/src/views/dashboard/modules/header-banner.vue b/src/views/dashboard/modules/header-banner.vue index db751b0..a661173 100644 --- a/src/views/dashboard/modules/header-banner.vue +++ b/src/views/dashboard/modules/header-banner.vue @@ -9,6 +9,8 @@ import { } from '@ant-design/icons-vue'; import { computed, ref, onMounted } from 'vue'; import { getDashboardOverview } from '@/service/api/auth'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); defineOptions({ name: 'HeaderBanner' @@ -119,7 +121,7 @@ const otherDevices = computed(() => ({