From 825059ac475c16d5dcbbdb1af2d33d4f73d30f66 Mon Sep 17 00:00:00 2001 From: Surya Venkatesan Date: Fri, 4 Oct 2024 19:40:42 +0530 Subject: i18n fix after vue3 merge to master Fix i18n issue in the Power restore policy, Inventory LEDs, and User management page. After merge the vue3 code to master the i18n Power restore policy, Inventory LEDs, and User management page got conflicts and old code retrieved in master. So unable to render the Power restore policy, Inventory LEDs and unable to disable the user in user management page change the i18n.t method to i18n.global.t for the vue3 support. Change-Id: I46f3f56632308ceaee321dd896e16e922d964b60 Signed-off-by: Surya Venkatesan --- src/store/modules/Settings/PowerPolicyStore.js | 2 +- src/views/HardwareStatus/Inventory/InventoryTableFans.vue | 2 +- .../HardwareStatus/Inventory/InventoryTablePowerSupplies.vue | 2 +- src/views/SecurityAndAccess/UserManagement/UserManagement.vue | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/store/modules/Settings/PowerPolicyStore.js b/src/store/modules/Settings/PowerPolicyStore.js index 5ee36196..9cbf3c8b 100644 --- a/src/store/modules/Settings/PowerPolicyStore.js +++ b/src/store/modules/Settings/PowerPolicyStore.js @@ -34,7 +34,7 @@ const PowerPolicyStore = { }) => { let powerPoliciesData = PowerRestorePolicyTypes.enum.map( (powerState) => { - let desc = `${i18n.t( + let desc = `${i18n.global.t( `pagePowerRestorePolicy.policies.${powerState}`, )} - ${ PowerRestorePolicyTypes.enumDescriptions[powerState] diff --git a/src/views/HardwareStatus/Inventory/InventoryTableFans.vue b/src/views/HardwareStatus/Inventory/InventoryTableFans.vue index 373ecc8d..4a540e04 100644 --- a/src/views/HardwareStatus/Inventory/InventoryTableFans.vue +++ b/src/views/HardwareStatus/Inventory/InventoryTableFans.vue @@ -156,7 +156,7 @@ export default { }, { key: 'statusState', - label: this.$t('pageInventory.table.state'), + label: i18n.global.t('pageInventory.table.state'), formatter: this.dataFormatter, tdClass: 'text-nowrap', }, diff --git a/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue b/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue index 78b2a960..ddc3333c 100644 --- a/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue +++ b/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue @@ -177,7 +177,7 @@ export default { }, { key: 'statusState', - label: this.$t('pageInventory.table.state'), + label: i18n.global.t('pageInventory.table.state'), formatter: this.dataFormatter, tdClass: 'text-nowrap', }, diff --git a/src/views/SecurityAndAccess/UserManagement/UserManagement.vue b/src/views/SecurityAndAccess/UserManagement/UserManagement.vue index 99c344b1..cfe04a6f 100644 --- a/src/views/SecurityAndAccess/UserManagement/UserManagement.vue +++ b/src/views/SecurityAndAccess/UserManagement/UserManagement.vue @@ -366,20 +366,20 @@ export default { case 'disable': this.$bvModal .msgBoxConfirm( - this.$tc( + i18n.global.t( 'pageUserManagement.modal.batchDisableConfirmMessage', this.selectedRows.length, ), { - title: this.$tc( + title: i18n.global.t( 'pageUserManagement.disableUser', this.selectedRows.length, ), - okTitle: this.$tc( + okTitle: i18n.global.t( 'pageUserManagement.disableUser', this.selectedRows.length, ), - cancelTitle: this.$t('global.action.cancel'), + cancelTitle: i18n.global.t('global.action.cancel'), autoFocusButton: 'ok', }, ) -- cgit v1.2.3