summaryrefslogtreecommitdiff
path: root/src/router
diff options
context:
space:
mode:
authorYoshie Muranaka <yoshiemuranaka@gmail.com>2020-09-09 20:08:14 +0300
committerYoshie Muranaka <yoshiemuranaka@gmail.com>2020-09-25 06:27:10 +0300
commitf15cc7ac46022487ca36a3d8a66eb86791e040f9 (patch)
tree97815d7c99eb1facaf6ae2b5134833bca42ad007 /src/router
parent12bc875329c0d8a9a28aa51daa6adfecb834f6f9 (diff)
downloadwebui-vue-f15cc7ac46022487ca36a3d8a66eb86791e040f9.tar.xz
Move translation into routes file
- Added intial application load document title update with created hook Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I73d18ed4a56bd04601fa7382c2d6c2ec504b03f5
Diffstat (limited to 'src/router')
-rw-r--r--src/router/routes.js51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/router/routes.js b/src/router/routes.js
index d187713a..1a86510c 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -25,9 +25,8 @@ import ServerPowerOperations from '@/views/Control/ServerPowerOperations';
import SslCertificates from '@/views/AccessControl/SslCertificates';
import Unauthorized from '@/views/Unauthorized';
import VirtualMedia from '@/views/Control/VirtualMedia';
+import i18n from '@/i18n';
-// Meta title is translated using i18n in App.vue and PageTitle.Vue
-// Example meta: {title: 'appPageTitle.overview'}
const routes = [
{
path: '/login',
@@ -38,7 +37,7 @@ const routes = [
name: 'login',
component: Login,
meta: {
- title: 'appPageTitle.login'
+ title: i18n.t('appPageTitle.login')
}
},
{
@@ -46,7 +45,7 @@ const routes = [
name: 'change-password',
component: ChangePassword,
meta: {
- title: 'appPageTitle.changePassword',
+ title: i18n.t('appPageTitle.changePassword'),
requiresAuth: true
}
}
@@ -64,7 +63,7 @@ const routes = [
name: 'serial-over-lan-console',
component: SerialOverLanConsole,
meta: {
- title: 'appPageTitle.serialOverLan'
+ title: i18n.t('appPageTitle.serialOverLan')
}
},
{
@@ -72,7 +71,7 @@ const routes = [
name: 'kvm-console',
component: KvmConsole,
meta: {
- title: 'appPageTitle.kvm'
+ title: i18n.t('appPageTitle.kvm')
}
}
]
@@ -89,7 +88,7 @@ const routes = [
name: 'overview',
component: Overview,
meta: {
- title: 'appPageTitle.overview'
+ title: i18n.t('appPageTitle.overview')
}
},
{
@@ -97,7 +96,7 @@ const routes = [
name: 'profile-settings',
component: ProfileSettings,
meta: {
- title: 'appPageTitle.profileSettings'
+ title: i18n.t('appPageTitle.profileSettings')
}
},
{
@@ -105,7 +104,7 @@ const routes = [
name: 'event-logs',
component: EventLogs,
meta: {
- title: 'appPageTitle.eventLogs'
+ title: i18n.t('appPageTitle.eventLogs')
}
},
{
@@ -113,7 +112,7 @@ const routes = [
name: 'hardware-status',
component: HardwareStatus,
meta: {
- title: 'appPageTitle.hardwareStatus'
+ title: i18n.t('appPageTitle.hardwareStatus')
}
},
{
@@ -121,7 +120,7 @@ const routes = [
name: 'sensors',
component: Sensors,
meta: {
- title: 'appPageTitle.sensors'
+ title: i18n.t('appPageTitle.sensors')
}
},
{
@@ -129,7 +128,7 @@ const routes = [
name: 'ldap',
component: Ldap,
meta: {
- title: 'appPageTitle.ldap'
+ title: i18n.t('appPageTitle.ldap')
}
},
{
@@ -137,7 +136,7 @@ const routes = [
name: 'local-users',
component: LocalUserManagement,
meta: {
- title: 'appPageTitle.localUserManagement'
+ title: i18n.t('appPageTitle.localUserManagement')
}
},
{
@@ -145,7 +144,7 @@ const routes = [
name: 'ssl-certificates',
component: SslCertificates,
meta: {
- title: 'appPageTitle.sslCertificates'
+ title: i18n.t('appPageTitle.sslCertificates')
}
},
{
@@ -153,7 +152,7 @@ const routes = [
name: 'date-time-settings',
component: DateTimeSettings,
meta: {
- title: 'appPageTitle.dateTimeSettings'
+ title: i18n.t('appPageTitle.dateTimeSettings')
}
},
{
@@ -161,7 +160,7 @@ const routes = [
name: 'firmware',
component: Firmware,
meta: {
- title: 'appPageTitle.firmware'
+ title: i18n.t('appPageTitle.firmware')
}
},
{
@@ -169,7 +168,7 @@ const routes = [
name: 'kvm',
component: Kvm,
meta: {
- title: 'appPageTitle.kvm'
+ title: i18n.t('appPageTitle.kvm')
}
},
{
@@ -177,7 +176,7 @@ const routes = [
name: 'manage-power-usage',
component: ManagePowerUsage,
meta: {
- title: 'appPageTitle.managePowerUsage'
+ title: i18n.t('appPageTitle.managePowerUsage')
}
},
{
@@ -185,7 +184,7 @@ const routes = [
name: 'network-settings',
component: NetworkSettings,
meta: {
- title: 'appPageTitle.networkSettings'
+ title: i18n.t('appPageTitle.networkSettings')
}
},
{
@@ -193,7 +192,7 @@ const routes = [
name: 'reboot-bmc',
component: RebootBmc,
meta: {
- title: 'appPageTitle.rebootBmc'
+ title: i18n.t('appPageTitle.rebootBmc')
}
},
{
@@ -201,7 +200,7 @@ const routes = [
name: 'server-led',
component: ServerLed,
meta: {
- title: 'appPageTitle.serverLed'
+ title: i18n.t('appPageTitle.serverLed')
}
},
{
@@ -209,7 +208,7 @@ const routes = [
name: 'serial-over-lan',
component: SerialOverLan,
meta: {
- title: 'appPageTitle.serialOverLan'
+ title: i18n.t('appPageTitle.serialOverLan')
}
},
{
@@ -217,7 +216,7 @@ const routes = [
name: 'server-power-operations',
component: ServerPowerOperations,
meta: {
- title: 'appPageTitle.serverPowerOperations'
+ title: i18n.t('appPageTitle.serverPowerOperations')
}
},
{
@@ -225,7 +224,7 @@ const routes = [
name: 'virtual-media',
component: VirtualMedia,
meta: {
- title: 'appPageTitle.virtualMedia'
+ title: i18n.t('appPageTitle.virtualMedia')
}
},
{
@@ -233,7 +232,7 @@ const routes = [
name: 'unauthorized',
component: Unauthorized,
meta: {
- title: 'appPageTitle.unauthorized'
+ title: i18n.t('appPageTitle.unauthorized')
}
},
{
@@ -241,7 +240,7 @@ const routes = [
name: 'page-not-found',
component: PageNotFound,
meta: {
- title: 'appPageTitle.pageNotFound'
+ title: i18n.t('appPageTitle.pageNotFound')
}
}
]