i18n, vue-router and vuex upgrade

1. Configuration of i18n legacy as false.
2. Translation function t is called using the useI18n.
3. Used the i18n.global.t() function from i18n instead of this.$t()
4. Event bus error that occurred during logout.
5. Implemented vue-router 4.4.0 and vuex upgrade to 4.1.0

Change-Id: I9464d82c76dcc1445ce271983ea3ab9d7b03d265
Signed-off-by: Surya Venkatesan <suryav@ami.com>
diff --git a/src/router/routes.js b/src/router/routes.js
index 8b3ff17..d9e799a 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -30,7 +30,7 @@
 import VirtualMedia from '@/views/Operations/VirtualMedia';
 import Power from '@/views/ResourceManagement/Power';
 import SnmpAlerts from '@/views/Settings/SnmpAlerts';
-//import { i18n } from '@/i18n';
+import i18n from '@/i18n';
 
 const roles = {
   administrator: 'Administrator',
@@ -49,7 +49,7 @@
         name: 'login',
         component: Login,
         meta: {
-          //title: i18n.$t('appPageTitle.login'),
+          title: i18n.global.t('appPageTitle.login'),
         },
       },
       {
@@ -57,7 +57,7 @@
         name: 'change-password',
         component: ChangePassword,
         meta: {
-          //title: i18n.$t('appPageTitle.changePassword'),
+          title: i18n.global.t('appPageTitle.changePassword'),
           requiresAuth: true,
         },
       },
@@ -75,7 +75,7 @@
         name: 'serial-over-lan-console',
         component: SerialOverLanConsole,
         meta: {
-          //title: i18n.t('appPageTitle.serialOverLan'),
+          title: i18n.global.t('appPageTitle.serialOverLan'),
         },
       },
       {
@@ -83,7 +83,7 @@
         name: 'kvm-console',
         component: KvmConsole,
         meta: {
-          //title: i18n.t('appPageTitle.kvm'),
+          title: i18n.global.t('appPageTitle.kvm'),
         },
       },
     ],
@@ -100,7 +100,7 @@
         name: 'overview',
         component: Overview,
         meta: {
-          //title: i18n.t('appPageTitle.overview'),
+          title: i18n.global.t('appPageTitle.overview'),
         },
       },
       {
@@ -108,7 +108,7 @@
         name: 'profile-settings',
         component: ProfileSettings,
         meta: {
-          //title: i18n.t('appPageTitle.profileSettings'),
+          title: i18n.global.t('appPageTitle.profileSettings'),
         },
       },
       {
@@ -116,7 +116,7 @@
         name: 'event-logs',
         component: EventLogs,
         meta: {
-          //title: i18n.t('appPageTitle.eventLogs'),
+          title: i18n.global.t('appPageTitle.eventLogs'),
         },
       },
       {
@@ -124,7 +124,7 @@
         name: 'post-code-logs',
         component: PostCodeLogs,
         meta: {
-          //title: i18n.t('appPageTitle.postCodeLogs'),
+          title: i18n.global.t('appPageTitle.postCodeLogs'),
         },
       },
       {
@@ -132,7 +132,7 @@
         name: 'inventory',
         component: Inventory,
         meta: {
-          //title: i18n.t('appPageTitle.inventory'),
+          title: i18n.global.t('appPageTitle.inventory'),
         },
       },
       {
@@ -140,7 +140,7 @@
         name: 'sensors',
         component: Sensors,
         meta: {
-          //title: i18n.t('appPageTitle.sensors'),
+          title: i18n.global.t('appPageTitle.sensors'),
         },
       },
       {
@@ -148,7 +148,7 @@
         name: 'sessions',
         component: Sessions,
         meta: {
-          //title: i18n.t('appPageTitle.sessions'),
+          title: i18n.global.t('appPageTitle.sessions'),
         },
       },
       {
@@ -156,7 +156,7 @@
         name: 'ldap',
         component: Ldap,
         meta: {
-          //title: i18n.t('appPageTitle.ldap'),
+          title: i18n.global.t('appPageTitle.ldap'),
         },
       },
       {
@@ -164,7 +164,7 @@
         name: 'user-management',
         component: UserManagement,
         meta: {
-          //title: i18n.t('appPageTitle.userManagement'),
+          title: i18n.global.t('appPageTitle.userManagement'),
         },
       },
       {
@@ -172,7 +172,7 @@
         name: 'policies',
         component: Policies,
         meta: {
-          //title: i18n.t('appPageTitle.policies'),
+          title: i18n.global.t('appPageTitle.policies'),
         },
       },
       {
@@ -180,7 +180,7 @@
         name: 'certificates',
         component: Certificates,
         meta: {
-          //title: i18n.t('appPageTitle.certificates'),
+          title: i18n.global.t('appPageTitle.certificates'),
         },
       },
       {
@@ -188,7 +188,7 @@
         name: 'date-time',
         component: DateTime,
         meta: {
-          //title: i18n.t('appPageTitle.dateTime'),
+          title: i18n.global.t('appPageTitle.dateTime'),
         },
       },
       {
@@ -196,7 +196,7 @@
         name: 'snmp-alerts',
         component: SnmpAlerts,
         meta: {
-          //title: i18n.t('appPageTitle.snmpAlerts'),
+          title: i18n.global.t('appPageTitle.snmpAlerts'),
         },
       },
       {
@@ -204,7 +204,7 @@
         name: 'factory-reset',
         component: FactoryReset,
         meta: {
-          //title: i18n.t('appPageTitle.factoryReset'),
+          title: i18n.global.t('appPageTitle.factoryReset'),
         },
       },
       {
@@ -212,7 +212,7 @@
         name: 'key-clear',
         component: KeyClear,
         meta: {
-          //title: i18n.t('appPageTitle.keyClear'),
+          title: i18n.global.t('appPageTitle.keyClear'),
         },
       },
       {
@@ -220,7 +220,7 @@
         name: 'kvm',
         component: Kvm,
         meta: {
-          //title: i18n.t('appPageTitle.kvm'),
+          title: i18n.global.t('appPageTitle.kvm'),
         },
       },
       {
@@ -228,7 +228,7 @@
         name: 'firmware',
         component: Firmware,
         meta: {
-          //title: i18n.t('appPageTitle.firmware'),
+          title: i18n.global.t('appPageTitle.firmware'),
         },
       },
       {
@@ -236,7 +236,7 @@
         name: 'network',
         component: Network,
         meta: {
-          //title: i18n.t('appPageTitle.network'),
+          title: i18n.global.t('appPageTitle.network'),
         },
       },
       {
@@ -244,7 +244,7 @@
         name: 'power-restore-policy',
         component: PowerRestorePolicy,
         meta: {
-          //title: i18n.t('appPageTitle.powerRestorePolicy'),
+          title: i18n.global.t('appPageTitle.powerRestorePolicy'),
         },
       },
       {
@@ -252,7 +252,7 @@
         name: 'power',
         component: Power,
         meta: {
-          //title: i18n.t('appPageTitle.power'),
+          title: i18n.global.t('appPageTitle.power'),
         },
       },
       {
@@ -260,7 +260,7 @@
         name: 'reboot-bmc',
         component: RebootBmc,
         meta: {
-          //title: i18n.t('appPageTitle.rebootBmc'),
+          title: i18n.global.t('appPageTitle.rebootBmc'),
         },
       },
       {
@@ -268,7 +268,7 @@
         name: 'serial-over-lan',
         component: SerialOverLan,
         meta: {
-          //title: i18n.t('appPageTitle.serialOverLan'),
+          title: i18n.global.t('appPageTitle.serialOverLan'),
           exclusiveToRoles: [roles.administrator],
         },
       },
@@ -277,7 +277,7 @@
         name: 'server-power-operations',
         component: ServerPowerOperations,
         meta: {
-          //title: i18n.t('appPageTitle.serverPowerOperations'),
+          title: i18n.global.t('appPageTitle.serverPowerOperations'),
         },
       },
       {
@@ -285,7 +285,7 @@
         name: 'virtual-media',
         component: VirtualMedia,
         meta: {
-          //title: i18n.t('appPageTitle.virtualMedia'),
+          title: i18n.global.t('appPageTitle.virtualMedia'),
           exclusiveToRoles: [roles.administrator],
         },
       },
@@ -294,7 +294,7 @@
         name: 'page-not-found',
         component: PageNotFound,
         meta: {
-          //title: i18n.t('appPageTitle.pageNotFound'),
+          title: i18n.global.t('appPageTitle.pageNotFound'),
         },
       },
     ],