From bfd656398bf497ba9a3bc379c299771f9afd718a Mon Sep 17 00:00:00 2001 From: Joanna Dyczka Date: Fri, 8 Mar 2024 11:14:50 +0100 Subject: [PATCH] [#217] use translations in menu items --- govtool/frontend/src/consts/navItems.ts | 16 ++++++++-------- govtool/frontend/src/i18n/locales/en.ts | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/govtool/frontend/src/consts/navItems.ts b/govtool/frontend/src/consts/navItems.ts index 643f7a025..4c6922b32 100644 --- a/govtool/frontend/src/consts/navItems.ts +++ b/govtool/frontend/src/consts/navItems.ts @@ -6,7 +6,7 @@ export const NAV_ITEMS = [ { dataTestId: "dashboard-link", navTo: PATHS.home, - label: "Dashboard", + label: i18n.t("dashboard.title"), newTabLink: null, }, { @@ -17,19 +17,19 @@ export const NAV_ITEMS = [ { dataTestId: "governance-actions-link", navTo: PATHS.governanceActions, - label: "Governance Actions", + label: i18n.t("govActions.title"), newTabLink: null, }, { dataTestId: "guides-link", navTo: "", - label: "Guides", + label: i18n.t("menu.guides"), newTabLink: "https://docs.sanchogov.tools/about/what-is-sanchonet-govtool", }, { dataTestId: "faqs-link", navTo: "", - label: "FAQs", + label: i18n.t("menu.faqs"), newTabLink: "https://docs.sanchogov.tools/faqs", }, ]; @@ -37,7 +37,7 @@ export const NAV_ITEMS = [ export const CONNECTED_NAV_ITEMS = [ { dataTestId: "dashboard-link", - label: "Dashboard", + label: i18n.t("dashboard.title"), navTo: PATHS.dashboard, activeIcon: ICONS.dashboardActiveIcon, icon: ICONS.dashboardIcon, @@ -52,7 +52,7 @@ export const CONNECTED_NAV_ITEMS = [ }, { dataTestId: "governance-actions-link", - label: "Governance Actions", + label: i18n.t("govActions.title"), navTo: PATHS.dashboardGovernanceActions, activeIcon: ICONS.governanceActionsActiveIcon, icon: ICONS.governanceActionsIcon, @@ -60,7 +60,7 @@ export const CONNECTED_NAV_ITEMS = [ }, { dataTestId: "guides-link", - label: "Guides", + label: i18n.t("menu.guides"), navTo: "", activeIcon: ICONS.guidesActiveIcon, icon: ICONS.guidesIcon, @@ -68,7 +68,7 @@ export const CONNECTED_NAV_ITEMS = [ }, { dataTestId: "faqs-link", - label: "FAQs", + label: i18n.t("menu.faqs"), navTo: "", activeIcon: ICONS.faqsActiveIcon, icon: ICONS.faqsIcon, diff --git a/govtool/frontend/src/i18n/locales/en.ts b/govtool/frontend/src/i18n/locales/en.ts index 6b2722e85..c050bc14a 100644 --- a/govtool/frontend/src/i18n/locales/en.ts +++ b/govtool/frontend/src/i18n/locales/en.ts @@ -413,8 +413,6 @@ export const en = { faqs: "FAQs", guides: "Guides", help: "Help", - dashboard: "Dashboard", - viewGovActions: "View Governance Actions", }, metadataUpdate: { description: