Complete the text translation of the 'Sidebar Menu' (#1145)

pull/1146/head
Svamei 2 years ago committed by GitHub
parent 3db4838884
commit 9676b6a4be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,8 +2,8 @@
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ $t(item.meta.title) }}</span>
<a v-else @click.prevent="handleLink(item)">{{ $t(item.meta.title) }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>

@ -29,7 +29,7 @@
<el-dropdown-item>Profile</el-dropdown-item>
</router-link>-->
<router-link to="/">
<el-dropdown-item>Dashboard</el-dropdown-item>
<el-dropdown-item>{{ this.$t('menu.dashboard') }}</el-dropdown-item>
</router-link>
<el-dropdown-item divided>
<span style="display:block;" @click="logout">{{ $t('system.logOut') }}</span>

@ -3,14 +3,14 @@
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="this.$t(onlyOneChild.meta.title)" />
</el-menu-item>
</app-link>
</template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="this.$t(item.meta.title)" />
</template>
<sidebar-item
v-for="child in item.children"

@ -201,4 +201,32 @@ export default {
operator: 'Operator',
logContent: 'Log Content',
},
//菜单
menu: {
dashboard: 'Dashboard',
tenantManage: 'Tenant Manage',
itemManage: 'Item Manage',
dynamicThreadPool: 'Dynamic ThreadPool',
threadPoolManage: 'ThreadPool Manage',
threadPoolInstance: 'ThreadPool Instance',
threadPoolMonitor: 'ThreadPool Monitor',
containerThreadPool: 'Container ThreadPool',
tomcat: 'Tomcat',
undertow: 'Undertow',
jetty : 'Jetty',
frameworkThreadPool: 'Framework ThreadPool',
dubbo: 'Dubbo',
hystrix: 'Hystrix',
rabbitMQ: 'RabbitMQ',
rocketMQ: 'RocketMQ',
alibabaDubbo: 'AlibabaDubbo',
rabbitMQStream: 'RabbitMQStream',
rocketMQStream: 'RocketMQStream',
threadPoolAudit: 'ThreadPool Audit',
notifyAlarm: 'Notify Alarm',
userAuthority: 'User Authority',
logManage: 'Log Manage',
officialWebsite: 'Official Website',
}
}

@ -201,4 +201,32 @@ export default {
operator: '操作人',
logContent: '日志内容',
},
//菜单
menu: {
dashboard: '运行报表',
tenantManage: '租户管理',
itemManage: '项目管理',
dynamicThreadPool: '动态线程池',
threadPoolManage: '线程池管理',
threadPoolInstance: '线程池实例',
threadPoolMonitor: '线程池监控',
containerThreadPool: '容器线程池',
tomcat: 'Tomcat',
undertow: 'Undertow',
jetty : 'Jetty',
frameworkThreadPool: '框架线程池',
dubbo: 'Dubbo',
hystrix: 'Hystrix',
rabbitMQ: 'rabbitMQ',
rocketMQ: 'RocketMQ',
alibabaDubbo: 'AlibabaDubbo',
rabbitMQStream: 'RabbitMQStream',
rocketMQStream: 'RocketMQStream',
threadPoolAudit: '线程池审核',
notifyAlarm: '通知报警',
userAuthority: '用户权限',
logManage: '日志管理',
officialWebsite: '官网外链',
}
}

@ -5,6 +5,7 @@ import NProgress from 'nprogress'; // progress bar
import 'nprogress/nprogress.css'; // progress bar style
import { getToken } from '@/utils/auth'; // get token from cookie
import getPageTitle from '@/utils/get-page-title';
import i18n from "@/locale";
NProgress.configure({ showSpinner: false }); // NProgress Configuration
@ -15,7 +16,7 @@ router.beforeEach(async (to, from, next) => {
NProgress.start();
// set page title
document.title = getPageTitle(to.meta.title);
document.title = getPageTitle(i18n.t(to.meta.title));
// determine whether the user has logged in
const hasToken = getToken();

@ -47,7 +47,7 @@ export const constantRoutes = [
path: 'dashboard',
component: () => import('@/views/dashboard/admin/index'),
name: 'Dashboard',
meta: { title: '运行报表', icon: 'dashboard2', affix: true },
meta: { title: 'menu.dashboard', icon: 'dashboard2', affix: true },
},
],
},
@ -107,13 +107,13 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/tenantList',
name: 'tenant',
meta: { title: '租户管理', icon: 'lessee' },
meta: { title: 'menu.tenantManage', icon: 'lessee' },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/hippo4j/tenant/index'),
meta: { title: '租户管理', icon: 'lessee' },
meta: { title: 'menu.tenantManage', icon: 'lessee' },
},
],
},
@ -122,13 +122,13 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/itemList',
name: 'item',
meta: { title: '项目管理', icon: 'item' },
meta: { title: 'menu.itemManage', icon: 'item' },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/hippo4j/item/index'),
meta: { title: '项目管理', icon: 'item' },
meta: { title: 'menu.itemManage', icon: 'item' },
},
],
},
@ -138,25 +138,25 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/dynamic/thread-pool',
name: 'thread-pool',
meta: { title: '动态线程池', icon: 'pool' },
meta: { title: 'menu.dynamicThreadPool', icon: 'pool' },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/hippo4j/threadpool/index'),
meta: { title: '线程池管理' },
meta: { title: 'menu.threadPoolManage' },
},
{
path: 'instance',
name: 'instance',
component: () => import('@/views/hippo4j/instance/index'),
meta: { title: '线程池实例' },
meta: { title: 'menu.threadPoolInstance' },
},
{
path: 'monitor',
name: 'monitor',
component: () => import('@/views/hippo4j/monitor/index'),
meta: { title: '线程池监控' },
meta: { title: 'menu.threadPoolMonitor' },
},
],
},
@ -165,25 +165,25 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/server',
name: 'server-thread-pool',
meta: { title: '容器线程池', icon: 'vessel' },
meta: { title: 'menu.containerThreadPool', icon: 'vessel' },
children: [
{
path: 'tomcat',
name: 'tomcat',
component: () => import('@/views/hippo4j/server/tomcat/index'),
meta: { title: 'Tomcat' },
meta: { title: 'menu.tomcat' },
},
{
path: 'undertow',
name: 'undertow',
component: () => import('@/views/hippo4j/server/undertow/index'),
meta: { title: 'Undertow' },
meta: { title: 'menu.undertow' },
},
{
path: 'jetty',
name: 'jetty',
component: () => import('@/views/hippo4j/server/jetty/index'),
meta: { title: 'Jetty' },
meta: { title: 'menu.jetty' },
},
],
},
@ -192,49 +192,49 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/other',
name: 'other-thread-pool',
meta: { title: '框架线程池', icon: 'other' },
meta: { title: 'menu.frameworkThreadPool', icon: 'other' },
children: [
{
path: 'dubbo',
name: 'dubbo',
component: () => import('@/views/hippo4j/other/dubbo/index'),
meta: { title: 'Dubbo' },
meta: { title: 'menu.dubbo' },
},
{
path: 'hystrix',
name: 'hystrix',
component: () => import('@/views/hippo4j/other/hystrix/index'),
meta: { title: 'Hystrix' },
meta: { title: 'menu.hystrix' },
},
{
path: 'rabbitmq',
name: 'rabbitmq',
component: () => import('@/views/hippo4j/other/rabbitmq/index'),
meta: { title: 'RabbitMQ' },
meta: { title: 'menu.rabbitMQ' },
},
{
path: 'rocketmq',
name: 'rocketmq',
component: () => import('@/views/hippo4j/other/rocketmq/index'),
meta: { title: 'RocketMQ' },
meta: { title: 'menu.rocketMQ' },
},
{
path: 'alibaba-dubbo',
name: 'alibaba-dubbo',
component: () => import('@/views/hippo4j/other/alibaba-dubbo/index'),
meta: { title: 'AlibabaDubbo' },
meta: { title: 'menu.alibabaDubbo' },
},
{
path: 'rabbitmq-stream',
name: 'rabbitmq-stream',
component: () => import('@/views/hippo4j/other/rabbitmq-stream/index'),
meta: { title: 'RabbitMQStream' },
meta: { title: 'menu.rabbitMQStream' },
},
{
path: 'rocketmq-stream',
name: 'rocketmq-stream',
component: () => import('@/views/hippo4j/other/rocketmq-stream/index'),
meta: { title: 'RocketMQStream' },
meta: { title: 'menu.rocketMQStream' },
},
],
},
@ -243,13 +243,13 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/verifyList',
name: 'config-modification-verify',
meta: { title: '线程池审核', icon: 'audit', roles: ['ROLE_MANAGE', 'ROLE_ADMIN'] },
meta: { title: 'menu.threadPoolAudit', icon: 'audit', roles: ['ROLE_MANAGE', 'ROLE_ADMIN'] },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/hippo4j/verify/index'),
meta: { title: '线程池审核', icon: 'audit' },
meta: { title: 'menu.threadPoolAudit', icon: 'audit' },
},
],
},
@ -258,13 +258,13 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/notifyList',
name: 'notify',
meta: { title: '通知报警', icon: 'notify' },
meta: { title: 'menu.notifyAlarm', icon: 'notify' },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/hippo4j/notify/index'),
meta: { title: '通知报警', icon: 'notify' },
meta: { title: 'menu.notifyAlarm', icon: 'notify' },
},
],
},
@ -273,13 +273,13 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/userList',
name: 'user',
meta: { title: '用户权限', icon: 'user', roles: ['ROLE_ADMIN'] },
meta: { title: 'menu.userAuthority', icon: 'user', roles: ['ROLE_ADMIN'] },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/hippo4j/user/index'),
meta: { title: '用户权限', icon: 'user' },
meta: { title: 'menu.userAuthority', icon: 'user' },
},
],
},
@ -288,13 +288,13 @@ export const asyncRoutes = [
component: Layout,
redirect: '/hippo4j/logList',
name: 'log',
meta: { title: '日志管理', icon: 'log' },
meta: { title: 'menu.logManage', icon: 'log' },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/hippo4j/log/index'),
meta: { title: '日志管理', icon: 'log' },
meta: { title: 'menu.logManage', icon: 'log' },
},
],
},
@ -305,7 +305,7 @@ export const asyncRoutes = [
children: [
{
path: 'https://hippo4j.cn',
meta: { title: '官网外链', icon: 'link' },
meta: { title: 'menu.officialWebsite', icon: 'link' },
},
],
},

Loading…
Cancel
Save