From 8f3a52f04c8ec56f408f62eb521215078ac837dd Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:02:27 +0530 Subject: [PATCH] add intl keys to delete key manager dialog --- .../src/main/webapp/site/public/locales/en.json | 2 ++ .../components/KeyManagers/DeleteKeyManager.jsx | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/portals/admin/src/main/webapp/site/public/locales/en.json b/portals/admin/src/main/webapp/site/public/locales/en.json index 5c9c1356d73..da5c4854698 100644 --- a/portals/admin/src/main/webapp/site/public/locales/en.json +++ b/portals/admin/src/main/webapp/site/public/locales/en.json @@ -140,6 +140,8 @@ "AdminPages.Gateways.table.header.type": "Type", "AdminPages.Gateways.table.header.vhosts": "Virtual Host(s)", "AdminPages.KeyManager.Delete.form.delete.confirmation.message": "Are you sure you want to delete this KeyManager ?", + "AdminPages.KeyManagers.Delete.form.delete.dialog.btn": "Delete", + "AdminPages.KeyManagers.Delete.form.delete.dialog.title": "Delete KeyManager ?", "AdminPages.KeyManagers.Delete.form.delete.successful": "KeyManager deleted successfully", "AdminPages.KeyManagers.List.empty.content.keymanagers": "It is possible to register an OAuth Provider.", "AdminPages.KeyManagers.Usages.dialog.close.btn": "Close", diff --git a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/DeleteKeyManager.jsx b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/DeleteKeyManager.jsx index 8330fdeb774..e657e348c35 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/DeleteKeyManager.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/DeleteKeyManager.jsx @@ -19,7 +19,7 @@ import React from 'react'; import API from 'AppData/api'; import PropTypes from 'prop-types'; -import { FormattedMessage } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import DialogContentText from '@mui/material/DialogContentText'; import DeleteForeverIcon from '@mui/icons-material/DeleteForever'; import FormDialogBase from 'AppComponents/AdminPages/Addons/FormDialogBase'; @@ -34,7 +34,7 @@ function Delete({ updateList, dataRow, isDisabled }) { const { id, type, isGlobal } = dataRow; const { isSuperTenant, user: { _scopes } } = useAppContext(); const isSuperAdmin = isSuperTenant && _scopes.includes('apim:admin_settings'); - + const intl = useIntl(); const formSaveCallback = () => { // todo: don't create a new promise const promiseAPICall = new Promise((resolve, reject) => { @@ -61,8 +61,14 @@ function Delete({ updateList, dataRow, isDisabled }) { return ( } formSaveCallback={formSaveCallback} triggerIconProps={{