From f1b01902bddadd3b1567de99cf47adf9aeebe570 Mon Sep 17 00:00:00 2001 From: Jason Madigan Date: Thu, 5 Sep 2024 17:24:33 +0100 Subject: [PATCH] i8n strings --- locales/en/plugin__console-plugin-template.json | 10 +++++++++- src/components/KuadrantPoliciesPage.tsx | 17 +++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/locales/en/plugin__console-plugin-template.json b/locales/en/plugin__console-plugin-template.json index 935a6df..69e0831 100644 --- a/locales/en/plugin__console-plugin-template.json +++ b/locales/en/plugin__console-plugin-template.json @@ -17,5 +17,13 @@ "Address": "Address", "Dashboard": "Dashboard", "Policies": "Policies", - "Policy Topology": "Policy Topology" + "Policy Topology": "Policy Topology", + "TLS": "TLS", + "Are you sure you want to delete the policy": "Are you sure you want to delete the policy", + "All Policies": "All Policies", + "DNS": "DNS", + "Auth": "Auth", + "RateLimit": "RateLimit", + "Edit": "Edit", + "Delete": "Delete" } diff --git a/src/components/KuadrantPoliciesPage.tsx b/src/components/KuadrantPoliciesPage.tsx index 15542f6..da80c00 100644 --- a/src/components/KuadrantPoliciesPage.tsx +++ b/src/components/KuadrantPoliciesPage.tsx @@ -168,6 +168,7 @@ const AllPoliciesTable: React.FC = ({ data, unfilteredDat }; const DropdownWithKebab: React.FC = ({ obj }) => { + const { t } = useTranslation('plugin__console-plugin-template'); const [isOpen, setIsOpen] = React.useState(false); const [isDeleteModalOpen, setIsDeleteModalOpen] = React.useState(false); @@ -242,10 +243,10 @@ const DropdownWithKebab: React.FC = ({ obj }) => { > - Edit + {t('Edit')} - Delete + {t('Delete')} @@ -259,7 +260,7 @@ const DropdownWithKebab: React.FC = ({ obj }) => { > - Are you sure you want to delete the resource {obj.metadata.name}? + {t("Are you sure you want to delete the policy")}: {obj.metadata.name}?