diff --git a/dashboard/src/components/AppSidebar.vue b/dashboard/src/components/AppSidebar.vue index b0ee747..0526f07 100644 --- a/dashboard/src/components/AppSidebar.vue +++ b/dashboard/src/components/AppSidebar.vue @@ -56,6 +56,7 @@ import { NMenu, NDropdown, NIcon } from 'naive-ui'; import NavigationItems from './NavigationItems.vue'; import JLogo from '@/components/icons/JLogo.vue'; import ChevronDown from '~icons/lucide/chevron-down'; +import { t } from '../utils/i18n'; export default { name: 'AppSidebar', @@ -96,12 +97,12 @@ export default { (team.valid_teams?.length > 1 || team.is_desk_user) ) { options.push({ - label: '切换团队', + label: t('Switch Team'), key: 'switch-team', }); } options.push({ - label: '退出登录', + label: t('Logout'), key: 'logout', }); return options; @@ -221,7 +222,7 @@ export default { const teamUserText = computed(() => { const team = instance?.appContext.config.globalProperties.$team; if (team?.get?.loading) { - return '加载中...'; + return t('Loading...'); } return team?.pg?.user || ''; }); diff --git a/dashboard/src/components/MobileNav.vue b/dashboard/src/components/MobileNav.vue index 7f1e52b..6914340 100644 --- a/dashboard/src/components/MobileNav.vue +++ b/dashboard/src/components/MobileNav.vue @@ -14,12 +14,12 @@ class="ml-auto" :options="[ { - label: '切换团队', + label: $t('Switch Team'), icon: 'command', onClick: () => (showTeamSwitcher = true) }, { - label: '注销', + label: $t('Logout'), icon: 'log-out', onClick: $session.logout.submit } @@ -30,7 +30,7 @@ - {{ $team?.get.loading ? '加载中...' : $team?.pg?.user }} + {{ $team?.get.loading ? $t('Loading...') : $team?.pg?.user }} diff --git a/dashboard/src/components/SwitchTeamDialog.vue b/dashboard/src/components/SwitchTeamDialog.vue index 986f05b..8f831d3 100644 --- a/dashboard/src/components/SwitchTeamDialog.vue +++ b/dashboard/src/components/SwitchTeamDialog.vue @@ -1,13 +1,13 @@ - + - 您当前登录的用户是 + {{ $t('You are currently logged in as') }} {{ $session.user }} - 您正在查看的团队仪表板是 + {{ $t('The team dashboard you are viewing is') }} - 切换 + {{ $t('Switch') }} - 切换 + {{ $t('Switch') }} diff --git a/jcloud/translations/zh.csv b/jcloud/translations/zh.csv index 3670416..64fc9af 100644 --- a/jcloud/translations/zh.csv +++ b/jcloud/translations/zh.csv @@ -1075,3 +1075,12 @@ Log Browser,日志浏览器, Database Analyzer,数据库分析器, Recharge,充值, Partner Portal,合作伙伴门户, +Switch Team,切换团队, +Logout,退出登录, +Loading...,加载中..., +You are currently logged in as,您当前登录的用户是, +The team dashboard you are viewing is,您正在查看的团队仪表板是, +Currently Active,当前激活, +Switch,切换, +Select Team,选择团队, +This feature is only available for system users,此功能仅对系统用户可用,