From 2dd9f0f672ee1dfdb46f21799ad7f9d5e860a28e Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 11 Mar 2025 15:15:28 -0700 Subject: [PATCH] fix: Force re-render route i18n string (#11063) The string were not taking the correct locale as there were initialized during the component mount. This change would force the component to re-render the strings. --- .../dashboard/components-next/sidebar/Sidebar.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue index 3b68bfd8c..f15137fad 100644 --- a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue +++ b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue @@ -90,7 +90,7 @@ const sortedInboxes = computed(() => inboxes.value.slice().sort((a, b) => a.name.localeCompare(b.name)) ); -const newReportRoutes = [ +const newReportRoutes = () => [ { name: 'Reports Agent', label: t('SIDEBAR.REPORTS_AGENT'), @@ -116,7 +116,7 @@ const newReportRoutes = [ }, ]; -const oldReportRoutes = [ +const oldReportRoutes = () => [ { name: 'Reports Agent', label: t('SIDEBAR.REPORTS_AGENT'), @@ -140,7 +140,7 @@ const oldReportRoutes = [ ]; const reportRoutes = computed(() => - showV4Routes.value ? newReportRoutes : oldReportRoutes + showV4Routes.value ? newReportRoutes() : oldReportRoutes() ); const menuItems = computed(() => {