From c618ad74f4eafb93bea2de8690c6b3c0c47533c7 Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Wed, 7 Aug 2024 09:43:47 +0530 Subject: [PATCH 01/10] Add localization for rate limiting policies in admin portal --- .../AdminPages/Addons/FormDialogBase.jsx | 6 +- .../components/AdminPages/Addons/ListBase.jsx | 23 +- .../src/app/components/Base/Navigator.jsx | 5 +- .../app/components/Base/NavigatorChildren.jsx | 9 +- .../app/components/Base/RouteMenuMapping.jsx | 109 ++++++--- .../Throttling/Advanced/AddEditExecution.jsx | 19 +- .../Throttling/Advanced/ConditionalGroup.jsx | 7 +- .../Throttling/Application/AddEdit.jsx | 126 +++++++++-- .../Throttling/Application/Delete.jsx | 29 ++- .../Throttling/Blacklist/AddEdit.jsx | 156 ++++++++++--- .../Throttling/Blacklist/Delete.jsx | 29 ++- .../components/Throttling/Custom/AddEdit.jsx | 36 ++- .../components/Throttling/Custom/Delete.jsx | 30 ++- .../Throttling/Subscription/AddEdit.jsx | 214 +++++++++++++++--- .../Throttling/Subscription/Delete.jsx | 29 ++- 15 files changed, 648 insertions(+), 179 deletions(-) diff --git a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/FormDialogBase.jsx b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/FormDialogBase.jsx index 86208c8a863..b4f3e45b43e 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/FormDialogBase.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/FormDialogBase.jsx @@ -26,6 +26,7 @@ import DialogTitle from '@mui/material/DialogTitle'; import IconButton from '@mui/material/IconButton'; import CircularProgress from '@mui/material/CircularProgress'; import Alert from 'AppComponents/Shared/Alert'; +import { FormattedMessage } from 'react-intl'; /** * Render base for dialogs. @@ -94,7 +95,10 @@ function FormDialogBase({ - Remove Existing Vhost? + - Removing an existing VHost may result in inconsistent state if APIs - are deployed with this VHost. Please make sure there are no APIs - deployed with this VHost or redeploy those APIs. + - Gateway Access URLs + @@ -229,7 +253,12 @@ function AddEditVhost(props) { aria-controls='panel1a-content' id='panel1a-header' > - Advanced Settings + + + @@ -242,7 +271,13 @@ function AddEditVhost(props) { name={vhost.key} disabled={!vhost.isNew} onChange={changeHandler('httpContext')} - label='HTTP(s) context' + label={( + + )} value={vhost.httpContext} variant='outlined' /> @@ -345,7 +380,10 @@ function AddEditVhost(props) { color='primary' onClick={handleNewVhost} > - New VHost + diff --git a/portals/admin/src/main/webapp/source/src/app/components/GatewayEnvironments/DeleteGWEnvironment.jsx b/portals/admin/src/main/webapp/source/src/app/components/GatewayEnvironments/DeleteGWEnvironment.jsx index eb0142929eb..2c9f66c94ff 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/GatewayEnvironments/DeleteGWEnvironment.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/GatewayEnvironments/DeleteGWEnvironment.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'; @@ -31,6 +31,7 @@ import FormDialogBase from 'AppComponents/AdminPages/Addons/FormDialogBase'; */ function Delete({ updateList, dataRow }) { const { id } = dataRow; + const intl = useIntl(); const formSaveCallback = () => { const restApi = new API(); @@ -38,10 +39,10 @@ function Delete({ updateList, dataRow }) { .deleteGatewayEnvironment(id) .then(() => { return ( - + intl.formatMessage({ + id: 'AdminPages.Gateways.Delete.form.delete.successful', + defaultMessage: 'Gateway Environment deleted successfully', + }) ); }) .catch((error) => { @@ -54,8 +55,14 @@ function Delete({ updateList, dataRow }) { return ( } triggerIconProps={{ disabled: dataRow && dataRow.isReadOnly }} formSaveCallback={formSaveCallback} From 92934a28f9c4b35dea9f8f32c6c2a9cadd7f514e Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:14:33 +0530 Subject: [PATCH 04/10] Add localization for settings in admin portal --- .../APISettings/ApisTableContent.jsx | 7 +- .../app/components/APISettings/ListApis.jsx | 21 +- .../ApplicationSettings/EditApplication.jsx | 49 ++- .../ApplicationSettings/ListApplications.jsx | 26 +- .../RolePermissions/AdminTable/AdminTable.jsx | 22 +- .../RolePermissions/Commons/AddRoleWizard.jsx | 85 ++++- .../Commons/DeletePermission.jsx | 62 ++-- .../Commons/SelectPermissionsStep.jsx | 49 ++- .../components/RolePermissions/ListRoles.jsx | 30 +- .../TreeView/PermissionTree.jsx | 318 +++++++++++++++++- .../TreeView/PermissionsSelector.jsx | 28 +- .../components/TenantTheme/UploadTheme.jsx | 14 +- 12 files changed, 621 insertions(+), 90 deletions(-) diff --git a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx index 7f7ba4b18ef..1605acfb7b8 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx @@ -212,7 +212,12 @@ const ApisTableContent = ({ apis, updateApiList }) => { + )} variant='standard' size='small' defaultValue={api.provider} diff --git a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx index 85c27c17e6f..1ef0859c432 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx @@ -247,7 +247,26 @@ export default function ListApis() { count={totalApps} rowsPerPage={rowsPerPage} rowsPerPageOptions={[5, 10, 15]} - labelRowsPerPage='Show' + labelDisplayedRows={({ from, to, count }) => { + if (count !== -1) { + return intl.formatMessage({ + id: 'Applications.Listing.apis.list.rows.range.label', + defaultMessage: '{from}-{to} of {count}', + }, + { + from, to, count, + }); + } + return intl.formatMessage({ + id: 'Applications.Listing.apis.list.rows.more.than.label', + defaultMessage: 'more than {to}', + }, + { to }); + }} + labelRowsPerPage={intl.formatMessage({ + id: 'Applications.Listing.apis.list.rows.show.label', + defaultMessage: 'Show', + })} page={page} backIconButtonProps={{ 'aria-label': 'Previous Page', diff --git a/portals/admin/src/main/webapp/source/src/app/components/ApplicationSettings/EditApplication.jsx b/portals/admin/src/main/webapp/source/src/app/components/ApplicationSettings/EditApplication.jsx index 072d6cc1573..297dab4b853 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/ApplicationSettings/EditApplication.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/ApplicationSettings/EditApplication.jsx @@ -21,7 +21,7 @@ import { styled } from '@mui/material/styles'; import API from 'AppData/api'; import PropTypes from 'prop-types'; import TextField from '@mui/material/TextField'; -import { FormattedMessage } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import FormDialogBase from 'AppComponents/AdminPages/Addons/FormDialogBase'; const StyledSpan = styled('span')(({ theme }) => ({ color: theme.palette.error.dark })); @@ -49,6 +49,7 @@ function reducer(state, { field, value }) { */ function Edit(props) { const restApi = new API(); + const intl = useIntl(); const { updateList, dataRow, icon, triggerButtonText, title, applicationList, } = props; @@ -71,7 +72,10 @@ function Edit(props) { }; const validateOwner = () => { - let validationError = 'Something went wrong when validating user'; + let validationError = intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.edit.error.default', + defaultMessage: 'Something went wrong when validating user', + }); const applicationsWithSameName = applicationList.filter( (app) => app.name === name && app.owner === owner, @@ -79,7 +83,11 @@ function Edit(props) { const promiseValidation = new Promise((resolve, reject) => { if (applicationsWithSameName.length > 0) { - validationError = `${owner} already has an application with name: ${name}`; + validationError = intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.edit.error.already.exist', + defaultMessage: '{owner} already has an application with name: {name}', + }, + { owner, name }); reject(validationError); } const basicScope = 'apim:subscribe'; @@ -92,7 +100,11 @@ function Edit(props) { // This api returns 404 when the $owner is not found. // error codes: 901502, 901500 for user not found and scope not found if (response?.body?.code === 901502 || response?.body?.code === 901500) { - validationError = `${owner} is not a valid Subscriber`; + validationError = intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.edit.error.owner.invalid', + defaultMessage: '{owner} is not a valid Subscriber', + }, + { owner }); } }).finally(() => { if (validationError) { @@ -109,19 +121,26 @@ function Edit(props) { return restApi.updateApplicationOwner(dataRow.applicationId, owner) .then(() => { return ( - + intl.formatMessage({ + id: 'AdminPages.ApplicationSettings.Edit.form.edit.successful', + defaultMessage: 'Application owner changed successfully', + }) ); }) .catch((error) => { const { response } = error; if (response?.body?.code === 500) { - const notValidSubscriber = 'Error while updating ownership to ' + owner; + const notValidSubscriber = intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.edit.error.subscriber.invalid', + defaultMessage: 'Error while updating ownership to {owner}', + }, + { owner }); throw notValidSubscriber; } else { - const updateError = 'Something went wrong when updating owner'; + const updateError = intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.edit.error.unknown', + defaultMessage: 'Something went wrong when updating owner', + }); throw updateError; } }) @@ -139,7 +158,10 @@ function Edit(props) { return ( , - title: 'Change Application Owner', + title: intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.list.title', + defaultMessage: 'Change Application Owner', + }), applicationList, }} EditComponent={EditApplication} @@ -236,7 +239,26 @@ export default function ListApplications() { count={totalApps} rowsPerPage={rowsPerPage} rowsPerPageOptions={[5, 10, 15]} - labelRowsPerPage='Show' + labelDisplayedRows={({ from, to, count }) => { + if (count !== -1) { + return intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.list.rows.range.label', + defaultMessage: '{from}-{to} of {count}', + }, + { + from, to, count, + }); + } + return intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.list.rows.more.than.label', + defaultMessage: 'more than {to}', + }, + { to }); + }} + labelRowsPerPage={intl.formatMessage({ + id: 'Applications.Listing.Listing.applications.list.rows.show.label', + defaultMessage: 'Show', + })} page={page} backIconButtonProps={{ 'aria-label': 'Previous Page', diff --git a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/AdminTable/AdminTable.jsx b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/AdminTable/AdminTable.jsx index 5cbad4386b5..49675664b9b 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/AdminTable/AdminTable.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/AdminTable/AdminTable.jsx @@ -20,7 +20,7 @@ import React from 'react'; import Table from '@mui/material/Table'; import TableContainer from '@mui/material/TableContainer'; import TablePagination from '@mui/material/TablePagination'; - +import { useIntl } from 'react-intl'; import { TableContextProvider } from './AdminTableContext'; /** @@ -33,7 +33,7 @@ export default function AdminTable(props) { const { children, multiSelect, rowsPerPageOptions, dataIDs, } = props; - + const intl = useIntl(); const [order, setOrder] = React.useState('asc'); const [orderBy, setOrderBy] = React.useState('role'); const [selected, setSelected] = React.useState([]); @@ -96,6 +96,24 @@ export default function AdminTable(props) { page={page} onPageChange={handleChangePage} onRowsPerPageChange={handleChangeRowsPerPage} + labelDisplayedRows={({ from, to, count }) => { + if (count !== -1) { + return intl.formatMessage({ + id: 'Role.permissions.Role.Permissions.Admin.Table.displayed.rows.range.label', + defaultMessage: '{from}-{to} of {count}', + }, + { from, to, count }); + } + return intl.formatMessage({ + id: 'Role.permissions.Role.Permissions.Admin.Table.displayed.rows.more.than.label', + defaultMessage: 'more than {to}', + }, + { to }); + }} + labelRowsPerPage={intl.formatMessage({ + id: 'Role.permissions.Role.Permissions.Admin.Table.row.per.page.label', + defaultMessage: 'Rows per page:', + })} /> diff --git a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/AddRoleWizard.jsx b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/AddRoleWizard.jsx index c955d03ec79..703481f7148 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/AddRoleWizard.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/AddRoleWizard.jsx @@ -107,7 +107,10 @@ export default function AddRoleWizard(props) { const permissionsValidationConditions = Object.values(permissionsValidation); if (!permissionsValidationConditions.length || !permissionsValidationConditions.reduce((acc, cu) => acc || cu)) { - Alert.warning('You need to select at least one permission!'); + Alert.warning(intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.scope.error.empty.permission', + defaultMessage: 'You need to select at least one permission!', + })); setIsSaving(false); return; } @@ -115,9 +118,15 @@ export default function AddRoleWizard(props) { .then(() => { Alert.info( - Added scope mapping for - {` ${newRole} `} - successfully + {intl.formatMessage( + { + id: 'RolePermissions.Common.AddRoleWizard.add.scope.success', + defaultMessage: 'Added scope mapping for {newRole} successfully', + }, + { + newRole: {` ${newRole} `}, + }, + )} , ); onClose(); @@ -134,7 +143,10 @@ export default function AddRoleWizard(props) { .finally(() => setIsSaving(false)); } else { if (!mappedRole) { - Alert.warning("Mapped role selection can't be empty!"); + Alert.warning(intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.scope.error.role.empty', + defaultMessage: 'Mapped role selection can\'t be empty!', + })); setIsSaving(false); return; } @@ -151,14 +163,24 @@ export default function AddRoleWizard(props) { setRoleAliases(response.body); Alert.info( - Add new alias for - {` ${newRole} `} - successfully + {intl.formatMessage( + { + id: 'RolePermissions.Common.AddRoleWizard.add.scope.error.add.role' + + '.alias.success', + defaultMessage: 'Add new alias for {newRole} successfully', + }, + { + newRole: {` ${newRole} `}, + }, + )} , ); onClose(); }).catch((error) => { - Alert.error('Something went wrong while adding new role alias'); + Alert.error(intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.scope.error.add.role.alias', + defaultMessage: 'Something went wrong while adding new role alias', + })); console.error(error); }).finally(() => setIsSaving(false)); } @@ -190,7 +212,17 @@ export default function AddRoleWizard(props) { sx={{ mt: 1, mr: 1 }} disabled={isSaving} > - {activeStep === 0 ? 'Cancel' : 'Back'} + {activeStep === 0 ? ( + + ) : ( + + )} @@ -213,7 +251,16 @@ export default function AddRoleWizard(props) { >
- {['Provide role name', 'Select permissions'].map((label, index) => ( + {[ + intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.provide.role.text', + defaultMessage: 'Provide role name', + }), + intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.provide.select.permissions', + defaultMessage: 'Select permissions', + }), + ].map((label, index) => ( {label} @@ -228,11 +275,17 @@ export default function AddRoleWizard(props) { fullWidth autoFocus size='small' - label='Role Name' + label={intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.type.role.label', + defaultMessage: 'Role Name', + })} helperText={ validation.role - || 'Type existing user role, ' - + ' If not create a new role from carbon console first' + || intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.type.role', + defaultMessage: 'Type existing user role, ' + + ' If not create a new role from carbon console first', + }) } variant='outlined' onChange={({ target: { value } }) => { diff --git a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/DeletePermission.jsx b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/DeletePermission.jsx index 5332ee4def6..1f0daac8c57 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/DeletePermission.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/DeletePermission.jsx @@ -16,7 +16,7 @@ * under the License. */ import React, { useState } from 'react'; -import { useIntl } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; @@ -56,11 +56,15 @@ export default function DeletePermission(props) { .then(() => { Alert.info( - Scope Assignments - {' '} - {role} - {' '} - deleted successfully + {intl.formatMessage( + { + id: 'RolePermissions.ListRoles.scope.assignment.delete.scope.success', + defaultMessage: 'Scope Assignments {role} deleted successfully', + }, + { + role: {role}, + }, + )} , ); handleClose(); @@ -84,7 +88,10 @@ export default function DeletePermission(props) { variant='outlined' data-testid={role + '-delete-btn'} > - Delete + - Delete scope assignments of - {' '} - {role} - {' '} - ? + {intl.formatMessage( + { + id: 'RolePermissions.ListRoles.scope.assignment.delete.dialog.title', + defaultMessage: 'Delete scope assignments of {role} ?', + }, + { + role: {role}, + }, + )} - Are you sure you want to delete scope assignments for - {' '} - {role} - {' '} - ? + {intl.formatMessage( + { + id: 'RolePermissions.ListRoles.scope.assignment.delete.dialog.content', + defaultMessage: 'Are you sure you want to delete scope assignments for ' + + '{role} ?', + }, + { + role: {role}, + }, + )} - + diff --git a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/SelectPermissionsStep.jsx b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/SelectPermissionsStep.jsx index 39cd36bda5e..b06c0bacfbb 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/SelectPermissionsStep.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/Commons/SelectPermissionsStep.jsx @@ -23,7 +23,7 @@ import FormControl from '@mui/material/FormControl'; import Box from '@mui/material/Box'; import TextField from '@mui/material/TextField'; import Autocomplete from '@mui/material/Autocomplete'; - +import { useIntl, FormattedMessage } from 'react-intl'; import PermissionTree from '../TreeView/PermissionTree'; /** @@ -39,6 +39,7 @@ export default function SelectPermissionsStep(props) { } = props; const { ROLE_ALIAS, SELECT_PERMISSIONS } = SelectPermissionsStep.CONST; + const intl = useIntl(); return ( @@ -51,7 +52,10 @@ export default function SelectPermissionsStep(props) { } - label='Role alias' + label={intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.role.alias.label', + defaultMessage: 'Role alias', + })} /> - Role - {' '} - - {role} - - - {' '} - will be mapped to the selected role + + {role} + + ), + }} + /> )} id='outlined-basic' size='small' - label='Mapping role' + label={intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.role.mapping.label', + defaultMessage: 'Mapping role', + })} variant='outlined' inputProps={{ ...params.inputProps, @@ -102,7 +112,10 @@ export default function SelectPermissionsStep(props) { } - label='Custom scope assignments' + label={intl.formatMessage({ + id: 'RolePermissions.Common.AddRoleWizard.add.role.custom.scope.assignments', + defaultMessage: 'Custom scope assignments', + })} /> , + enableSort: true, }, { - id: 'permissions', numeric: false, disablePadding: false, label: 'Scope Assignments', + id: 'permissions', + numeric: false, + disablePadding: false, + label: , }, ]; @@ -276,7 +289,13 @@ export default function ListRoles() { ); } return ( - + - Delete + ), diff --git a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionTree.jsx b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionTree.jsx index 28c669fd575..57ca62e68a9 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionTree.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionTree.jsx @@ -26,6 +26,7 @@ import { useSpring, animated } from 'react-spring/web.cjs'; // web.cjs is requir import Checkbox from '@mui/material/Checkbox'; import ListItemText from '@mui/material/ListItemText'; import Typography from '@mui/material/Typography'; +import { useIntl } from 'react-intl'; /** * @@ -116,8 +117,308 @@ const StyledTreeItem = styled(TreeItem)(() => ({ */ export default function PermissionTreeView(props) { const { appMappings, role, onCheck } = props; - + const intl = useIntl(); const totalPermissions = appMappings.admin.length + appMappings.devportal.length + appMappings.publisher.length; + + const APIM_SCOPES_DESCRIPTION_MAP = { + 'apim:api_workflow_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_workflow_view', + defaultMessage: 'Retrive workflow requests', + }), + 'apim:tenant_theme_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.tenant_theme_manage', + defaultMessage: 'Manage tenant themes', + }), + 'apim:api_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_manage', + defaultMessage: 'Manage all API related operations', + }), + 'apim:gateway_policy_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.gateway_policy_manage', + defaultMessage: 'Add, Update and Delete gateway policies', + }), + 'apim:admin': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.admin', + defaultMessage: 'Manage all admin operations', + }), + 'apim:api_workflow_approve': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_workflow_approve', + defaultMessage: 'Manage workflows', + }), + 'apim:common_operation_policy_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.common_operation_policy_view', + defaultMessage: 'View common operation policies', + }), + 'apim:gateway_policy_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.gateway_policy_view', + defaultMessage: 'View gateway policies', + }), + 'apim:subscription_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.subscription_manage', + defaultMessage: 'Manage all Subscription related operations', + }), + 'apim:scope_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.scope_manage', + defaultMessage: 'Manage system scopes', + }), + 'apim:api_list_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_list_view', + defaultMessage: 'View, Retrieve API list', + }), + 'apim:app_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.app_manage', + defaultMessage: 'Retrieve, Manage and Import, Export applications', + }), + 'service_catalog:service_view': intl.formatMessage({ + id: 'PERMISSION_TREE.service_catalog.service_view', + defaultMessage: 'view access to services in service catalog', + }), + 'apim:admin_application_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.admin_application_view', + defaultMessage: 'View Applications', + }), + 'apim:bl_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.bl_view', + defaultMessage: 'View deny policies', + }), + 'apim:store_settings': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.store_settings', + defaultMessage: 'Retrieve Developer Portal settings', + }), + 'apim:common_operation_policy_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.common_operation_policy_manage', + defaultMessage: 'Add, Update and Delete common operation policies', + }), + 'apim:sub_alert_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.sub_alert_manage', + defaultMessage: 'Retrieve, subscribe and configure Developer Portal alert types', + }), + 'apim:threat_protection_policy_create': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.threat_protection_policy_create', + defaultMessage: 'Create threat protection policies', + }), + 'apim:mediation_policy_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.mediation_policy_manage', + defaultMessage: 'Update and delete mediation policies', + }), + 'apim:ep_certificates_update': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.ep_certificates_update', + defaultMessage: 'Update and delete backend endpoint certificates', + }), + 'apim:ep_certificates_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.ep_certificates_view', + defaultMessage: 'View backend endpoint certificates', + }), + 'apim:admin_settings': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.admin_settings', + defaultMessage: 'Retrieve admin settings', + }), + 'apim:app_import_export': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.app_import_export', + defaultMessage: 'Import and export applications related operations', + }), + 'apim:api_publish': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_publish', + defaultMessage: 'Publish API', + }), + 'apim:client_certificates_update': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.client_certificates_update', + defaultMessage: 'Update and delete client certificates', + }), + 'apim:environment_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.environment_manage', + defaultMessage: 'Manage gateway environments', + }), + 'apim:api_definition_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_definition_view', + defaultMessage: 'View, Retrieve API definition', + }), + 'apim:api_key': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_key', + defaultMessage: 'Generate API Keys', + }), + 'apim:admin_alert_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.admin_alert_manage', + defaultMessage: 'Manage admin alerts', + }), + 'apim:api_generate_key': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_generate_key', + defaultMessage: 'Generate Internal Key', + }), + 'apim:api_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_view', + defaultMessage: 'View API', + }), + 'apim:api_provider_change': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_provider_change', + defaultMessage: 'Retrieve and manage applications', + }), + 'apim:mediation_policy_create': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.mediation_policy_create', + defaultMessage: 'Create mediation policies', + }), + 'apim:pub_alert_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.pub_alert_manage', + defaultMessage: 'Get/ subscribe/ configure publisher alerts', + }), + 'apim:document_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.document_manage', + defaultMessage: 'Create, update and delete API documents', + }), + 'apim:ep_certificates_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.ep_certificates_manage', + defaultMessage: 'View, create, update and remove endpoint certificates', + }), + 'apim:comment_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.comment_view', + defaultMessage: 'Read permission to comments', + }), + 'service_catalog:service_write': intl.formatMessage({ + id: 'PERMISSION_TREE.service_catalog.service_write', + defaultMessage: 'write access to services in service catalog', + }), + 'apim:admin_tier_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.admin_tier_view', + defaultMessage: 'View throttling policies', + }), + 'apim:comment_write': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.comment_write', + defaultMessage: 'Write permission to comments', + }), + 'apim:api_category': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_category', + defaultMessage: 'Manage API categories', + }), + 'apim:admin_operations': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.admin_operations', + defaultMessage: 'Manage API categories and Key Managers related operations', + }), + 'apim:app_owner_change': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.app_owner_change', + defaultMessage: 'Retrieve and manage applications', + }), + 'apim:bl_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.bl_manage', + defaultMessage: 'Update and delete deny policies', + }), + 'apim:tier_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.tier_manage', + defaultMessage: 'View, update and delete throttling policies', + }), + 'apim:keymanagers_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.keymanagers_manage', + defaultMessage: 'Manage Key Managers', + }), + 'apim:role_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.role_manage', + defaultMessage: 'Manage system roles', + }), + 'apim:policies_import_export': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.policies_import_export', + defaultMessage: 'Export and import policies related operations', + }), + 'apim:sub_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.sub_manage', + defaultMessage: 'Retrieve, Manage subscriptions', + }), + 'apim:admin_tier_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.admin_tier_manage', + defaultMessage: 'Update and delete throttling policies', + }), + 'apim:subscribe': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.subscribe', + defaultMessage: 'Subscribe API', + }), + 'apim:comment_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.comment_manage', + defaultMessage: 'Read and Write comments', + }), + 'apim:tier_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.tier_view', + defaultMessage: 'View throttling policies', + }), + 'apim:document_create': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.document_create', + defaultMessage: 'Create API documents', + }), + 'apim:threat_protection_policy_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.threat_protection_policy_manage', + defaultMessage: 'Update and delete threat protection policies', + }), + 'apim:subscription_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.subscription_view', + defaultMessage: 'View Subscription', + }), + 'apim:api_create': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_create', + defaultMessage: 'Create API', + }), + 'apim:shared_scope_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.shared_scope_manage', + defaultMessage: 'Manage shared scopes', + }), + 'apim:client_certificates_add': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.client_certificates_add', + defaultMessage: 'Add client certificates', + }), + 'apim:api_product_import_export': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_product_import_export', + defaultMessage: 'Import and export API Products related operations', + }), + 'apim:environment_read': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.environment_read', + defaultMessage: 'Retrieve gateway environments', + }), + 'apim:monetization_usage_publish': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.monetization_usage_publish', + defaultMessage: 'Retrieve and publish Monetization related usage records', + }), + 'apim:tenantInfo': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.tenantInfo', + defaultMessage: 'Retrieve tenant related information', + }), + 'apim:api_delete': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_delete', + defaultMessage: 'Delete API', + }), + 'apim:client_certificates_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.client_certificates_view', + defaultMessage: 'View client certificates', + }), + 'apim:api_import_export': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_import_export', + defaultMessage: 'Import and export APIs related operations', + }), + 'apim:publisher_settings': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.publisher_settings', + defaultMessage: 'Retrieve store settings', + }), + 'apim:subscription_block': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.subscription_block', + defaultMessage: 'Block Subscription', + }), + 'apim:mediation_policy_view': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.mediation_policy_view', + defaultMessage: 'View mediation policies', + }), + 'apim:client_certificates_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.client_certificates_manage', + defaultMessage: 'View, create, update and remove client certificates', + }), + 'apim:ep_certificates_add': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.ep_certificates_add', + defaultMessage: 'Add backend endpoint certificates', + }), + 'apim:bot_data': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.bot_data', + defaultMessage: 'Retrieve bot detection data', + }), + 'apim:api_mediation_policy_manage': intl.formatMessage({ + id: 'PERMISSION_TREE.apim.api_mediation_policy_manage', + defaultMessage: 'View, create, update and remove API specific mediation policies', + }), + }; + return ( { Object.entries(appMappings).map(([app, scopes], APIIndex) => { @@ -176,7 +485,10 @@ export default function PermissionTreeView(props) { nodeId={`${index + 10 * nodeId}`} label={( )} diff --git a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionsSelector.jsx b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionsSelector.jsx index 6212a093bfa..0bab39423d2 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionsSelector.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/RolePermissions/TreeView/PermissionsSelector.jsx @@ -82,11 +82,15 @@ export default function PermissionsSelector(props) { .then(() => { Alert.info( - Update permissions for - {' '} - {role} - {' '} - successfully + {intl.formatMessage( + { + id: 'RolePermissions.TreeView.PermissionsSelector.update.scope.success', + defaultMessage: 'Update permissions for {role} successfully', + }, + { + role: {role}, + }, + )} , ); setOpen(false); @@ -146,7 +150,14 @@ export default function PermissionsSelector(props) { - + + diff --git a/portals/admin/src/main/webapp/source/src/app/components/TenantTheme/UploadTheme.jsx b/portals/admin/src/main/webapp/source/src/app/components/TenantTheme/UploadTheme.jsx index ece90ba5c28..e9958296314 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/TenantTheme/UploadTheme.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/TenantTheme/UploadTheme.jsx @@ -215,10 +215,10 @@ function UploadTheme() { .then(() => { setIsUploadUnsuccessful(false); Alert.success( - , + intl.formatMessage({ + id: 'TenantTheme.Upload.Theme.upload.successful', + defaultMessage: 'Theme uploaded successfully', + }), ); setThemeFile([]); }) @@ -296,7 +296,11 @@ function UploadTheme() { + 'develop/customizations/customizing-the-developer-portal/overriding-developer-portal-theme/#tenant-theming'} underline='hover' > - API Manager theme format + {' '} + From a63a2c52fb97c1120622e68cd3b3c60d56b0587b Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:46:35 +0530 Subject: [PATCH 05/10] Add localization for api category in admin portal --- .../APICategories/AddEditAPICategory.jsx | 67 +++++++++++++------ .../APICategories/DeleteAPICategory.jsx | 20 ++++-- 2 files changed, 64 insertions(+), 23 deletions(-) diff --git a/portals/admin/src/main/webapp/source/src/app/components/APICategories/AddEditAPICategory.jsx b/portals/admin/src/main/webapp/source/src/app/components/APICategories/AddEditAPICategory.jsx index 876c4d08729..5b832aa0a0e 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APICategories/AddEditAPICategory.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APICategories/AddEditAPICategory.jsx @@ -21,7 +21,7 @@ import { styled } from '@mui/material/styles'; import API from 'AppData/api'; import PropTypes from 'prop-types'; import TextField from '@mui/material/TextField'; -import { FormattedMessage } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import FormDialogBase from 'AppComponents/AdminPages/Addons/FormDialogBase'; import Alert from 'AppComponents/Shared/Alert'; @@ -53,7 +53,7 @@ function AddEdit(props) { const { updateList, dataRow, icon, triggerButtonText, title, } = props; - + const intl = useIntl(); const [initialState, setInitialState] = useState({ description: '', }); @@ -80,20 +80,35 @@ function AddEdit(props) { break; } if (value === '') { - error = 'Name is Empty'; + error = intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.error.name.empty', + defaultMessage: 'Name is Empty', + }); } else if (value.length > 255) { - error = 'API Category name is too long'; + error = intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.error.name.too.long', + defaultMessage: 'API Category name is too long', + }); } else if (/\s/.test(value)) { - error = 'Name contains spaces'; + error = intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.error.name.has.spaces', + defaultMessage: 'Name contains spaces', + }); } else if (/[!@#$%^&*(),?"{}[\]|<>\t\n]/i.test(value)) { - error = 'Name field contains special characters'; + error = intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.error.name.has.special.chars', + defaultMessage: 'Name field contains special characters', + }); } else { error = false; } break; case 'description': if (value && value.length > 1024) { - error = 'API Category description is too long'; + error = intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.error.description.too.long', + defaultMessage: 'API Category description is too long', + }); } break; default: @@ -142,17 +157,17 @@ function AddEdit(props) { .then(() => { if (dataRow) { return ( - + intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.edit.successful', + defaultMessage: 'API Category edited successfully', + }) ); } else { return ( - + intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.add.successful', + defaultMessage: 'API Category added successfully', + }) ); } }) @@ -176,7 +191,10 @@ function AddEdit(props) { return ( @@ -205,11 +227,18 @@ function AddEdit(props) { name='description' value={description} onChange={onChange} - label='Description' + label={intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.description', + defaultMessage: 'Description', + })} fullWidth multiline error={hasErrors('description', description)} - helperText={hasErrors('description', description) || 'Description of the API category'} + helperText={hasErrors('description', description) + || intl.formatMessage({ + id: 'AdminPages.ApiCategories.AddEdit.form.description.helper.text', + defaultMessage: 'Description of the API category', + })} variant='outlined' /> diff --git a/portals/admin/src/main/webapp/source/src/app/components/APICategories/DeleteAPICategory.jsx b/portals/admin/src/main/webapp/source/src/app/components/APICategories/DeleteAPICategory.jsx index f170b12fb3a..8b9777d45fa 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APICategories/DeleteAPICategory.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APICategories/DeleteAPICategory.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'; @@ -32,6 +32,7 @@ import Alert from 'AppComponents/Shared/Alert'; */ function Delete({ updateList, dataRow }) { const { id, noOfApis } = dataRow; + const intl = useIntl(); const getValidationErrors = () => { let errorText = ''; if (noOfApis > 0) { @@ -68,12 +69,23 @@ function Delete({ updateList, dataRow }) { return ( } formSaveCallback={formSaveCallback} > - Are you sure you want to delete this API Category? + + + ); } From 49cc57d4d7b98601b24154fa42f9280ecc976c60 Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:44:40 +0530 Subject: [PATCH 06/10] Add localization for key manager in admin portal --- .../KeyManagers/AddEditKeyManager.jsx | 29 ++++++++++--------- .../KeyManagers/ListKeyManagers.jsx | 18 ++++++++++++ 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/AddEditKeyManager.jsx b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/AddEditKeyManager.jsx index f111ebd50cd..157bda0d83a 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/AddEditKeyManager.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/AddEditKeyManager.jsx @@ -748,8 +748,8 @@ function AddEditKeyManager(props) { id='AddEditKeyManager.External.KeyManager.description.container' > @@ -1013,8 +1013,8 @@ function AddEditKeyManager(props) { label={( * @@ -1042,8 +1042,8 @@ function AddEditKeyManager(props) { label={( * @@ -1139,8 +1139,8 @@ function AddEditKeyManager(props) { label={( @@ -1202,8 +1202,8 @@ function AddEditKeyManager(props) { label={( * @@ -1360,8 +1360,8 @@ function AddEditKeyManager(props) { value={alias} helperText={( @@ -1617,7 +1617,10 @@ function AddEditKeyManager(props) { ); dispatch({ field: 'availableGrantTypes', value: filteredGrantTypes }); }} - placeholder='Type Grant Types and press Enter' + placeholder={intl.formatMessage({ + id: 'KeyManagers.AddEditKeyManager.form.claim.placeholder', + defaultMessage: 'Type Grant Types and press Enter', + })} helperText={(
{intl.formatMessage({ diff --git a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx index 66f17e9bc2c..9bfdb5eb672 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx @@ -615,6 +615,24 @@ export default function ListKeyManagers() { responsive: 'stacked', searchText, onColumnSortChange, + textLabels: { + body: { + noMatch: intl.formatMessage({ + id: 'Mui.data.table.search.no.records.found', + defaultMessage: 'Sorry, no matching records found', + }), + }, + pagination: { + rowsPerPage: intl.formatMessage({ + id: 'Mui.data.table.pagination.rows.per.page', + defaultMessage: 'Rows per page:', + }), + displayRows: intl.formatMessage({ + id: 'Mui.data.table.pagination.display.rows', + defaultMessage: 'of', + }), + }, + }, }; const filterData = (event) => { From a801263583c4d6b71185e19128b9c9abb427005a Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:48:21 +0530 Subject: [PATCH 07/10] Add i18n keys to en.json for localization in admin portal --- .../main/webapp/site/public/locales/en.json | 253 +++++++++++++++++- 1 file changed, 247 insertions(+), 6 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 9b13680f20f..dbb9e118ec2 100644 --- a/portals/admin/src/main/webapp/site/public/locales/en.json +++ b/portals/admin/src/main/webapp/site/public/locales/en.json @@ -22,38 +22,89 @@ "Admin.Throttling.Application.Throttling.Policy.add.name.helper.text": "Name of the throttle policy", "Admin.Throttling.Application.Throttling.Policy.add.quota.limits.details": "Quota Limits", "Admin.Throttling.Application.Throttling.Policy.add.request.count.helper.text": "Number of requests allowed", + "Admin.Throttling.Application.Throttling.Policy.add.save.btn": "Save", + "Admin.Throttling.Application.Throttling.Policy.add.time.days": "Day(s)", "Admin.Throttling.Application.Throttling.Policy.add.time.helper.text": "Time configuration", + "Admin.Throttling.Application.Throttling.Policy.add.time.hours": "Hour(s)", + "Admin.Throttling.Application.Throttling.Policy.add.time.minutes": "Minute(s)", + "Admin.Throttling.Application.Throttling.Policy.add.time.months": "Month(s)", + "Admin.Throttling.Application.Throttling.Policy.add.time.weeks": "Week(s)", + "Admin.Throttling.Application.Throttling.Policy.add.time.years": "Year(s)", + "Admin.Throttling.Application.Throttling.Policy.form.description": "Description", + "Admin.Throttling.Application.Throttling.Policy.form.policyName": "Name", + "Admin.Throttling.Application.Throttling.Policy.option.data.bandwidth.label": "Data Bandwith", + "Admin.Throttling.Application.Throttling.Policy.option.request.bandwidth.label": "Request Bandwidth", + "Admin.Throttling.Application.Throttling.Policy.option.request.count.label": "Request Count", + "Admin.Throttling.Application.Throttling.Policy.option.request.unit.time.label": "Unit Time", "Admin.Throttling.Application.Throttling.policy.table.header.name": "Name", "Admin.Throttling.Application.Throttling.policy.table.header.quota": "Quota", "Admin.Throttling.Application.Throttling.policy.table.header.unit.time": "Unit Time", "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type": "Condition Type", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.User": "User", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.api.context": "API Context", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.api.context.format": "Format : ${context}", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.application": "Application", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.application.format": "Format : ${userName}:${applicationName}", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.enable.condition": "Enable Condition", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.ip.address": "IP Address", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.ip.format": "Format : ${ip}", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.ip.range": "IP Range", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.user.format": "Format : ${userName}", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.value.ip.end.address": "End IP Address", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.value.ip.start.address": "Start IP Address", + "Admin.Throttling.Blacklist.Throttling.Policy.add.condition.type.value.label": "Value", + "Admin.Throttling.Blacklist.Throttling.Policy.add.dialog.btn.deny": "Deny", + "Admin.Throttling.Blacklist.Throttling.Policy.example.abbr": "Eg", "Admin.Throttling.Blacklist.Throttling.policy.table.header.condition.status": "Condition Status", "Admin.Throttling.Blacklist.Throttling.policy.table.header.condition.type": "Condition Type", "Admin.Throttling.Blacklist.Throttling.policy.table.header.conditional.value": "Conditional Value", "Admin.Throttling.Blacklist.policy.add.invert.condition": "Invert Condition:", "Admin.Throttling.Blacklist.policy.enable.condition": "Enable Condition", + "Admin.Throttling.Custom.Throttling.policy.add.field.description": "Description", + "Admin.Throttling.Custom.Throttling.policy.add.field.key.template": "Key Template", + "Admin.Throttling.Custom.Throttling.policy.add.field.name": "Name", "Admin.Throttling.Custom.Throttling.policy.table.header.description": "Description", "Admin.Throttling.Custom.Throttling.policy.table.header.key.template": "Key Template", "Admin.Throttling.Custom.Throttling.policy.table.header.name": "Name", + "Admin.Throttling.Custom.policy.add.key.template.helper.text": "Eg: $userId:$apiContext:$apiVersion", "Admin.Throttling.Custom.policy.add.policy.description": "Description of the throttle policy", "Admin.Throttling.Custom.policy.add.policy.name": "Name of the throttle policy", "Admin.Throttling.Custom.policy.add.siddhi.query": "Siddhi Query:", "Admin.Throttling.Custom.policy.add.siddhi.query.description": "The following sample query will allow 5 requests per minute for an Admin user.", "Admin.Throttling.Custom.policy.add.siddhi.query.key.template": "Key Template : $userId", + "Admin.Throttling.Subscription.Throttling.Policy.add.request.count.helper.text": "Number of requests allowed", + "Admin.Throttling.Subscription.Throttling.Policy.add.time.days": "Day(s)", + "Admin.Throttling.Subscription.Throttling.Policy.add.time.hours": "Hour(s)", + "Admin.Throttling.Subscription.Throttling.Policy.add.time.minutes": "Minute(s)", + "Admin.Throttling.Subscription.Throttling.Policy.add.time.months": "Month(s)", + "Admin.Throttling.Subscription.Throttling.Policy.add.time.years": "Year(s)", "Admin.Throttling.Subscription.Throttling.policy.table.header.name": "Name", "Admin.Throttling.Subscription.Throttling.policy.table.header.quota": "Quota", "Admin.Throttling.Subscription.Throttling.policy.table.header.quota.policy": "Quota Policy", "Admin.Throttling.Subscription.Throttling.policy.table.header.rate.limit": "Rate Limit", "Admin.Throttling.Subscription.Throttling.policy.table.header.time.unit": "Time Unit", "Admin.Throttling.Subscription.Throttling.policy.table.header.unit.time": "Unit Time", + "Admin.components.form.delete.btn": "Delete", "AdminPages.Addons.InlineProgress.message": "Loading...", "AdminPages.Addons.ListBase.noDataError": "Error while retrieving data.", "AdminPages.Addons.ListBase.nodata.message": "No items yet", "AdminPages.Addons.ListBase.reload": "Reload", "AdminPages.ApiCategories.AddEdit.form.add.successful": "API Category added successfully", + "AdminPages.ApiCategories.AddEdit.form.description": "Description", + "AdminPages.ApiCategories.AddEdit.form.description.helper.text": "Description of the API category", "AdminPages.ApiCategories.AddEdit.form.edit.successful": "API Category edited successfully", + "AdminPages.ApiCategories.AddEdit.form.error.description.too.long": "API Category description is too long", + "AdminPages.ApiCategories.AddEdit.form.error.name.empty": "Name is Empty", + "AdminPages.ApiCategories.AddEdit.form.error.name.has.spaces": "Name contains spaces", + "AdminPages.ApiCategories.AddEdit.form.error.name.has.special.chars": "Name field contains special characters", + "AdminPages.ApiCategories.AddEdit.form.error.name.too.long": "API Category name is too long", "AdminPages.ApiCategories.AddEdit.form.name": "Name", + "AdminPages.ApiCategories.AddEdit.form.name.helper.text": "Name of the API category", + "AdminPages.ApiCategories.AddEdit.form.save.btn": "Save", + "AdminPages.ApiCategories.Delete.form.delete.btn": "Delete", + "AdminPages.ApiCategories.Delete.form.delete.content": "Are you sure you want to delete this API Category?", "AdminPages.ApiCategories.Delete.form.delete.successful": "API Category deleted successfully", + "AdminPages.ApiCategories.Delete.form.delete.title": "Delete API category?", "AdminPages.ApiCategories.List.addButtonProps.title": "Add API Category", "AdminPages.ApiCategories.List.addButtonProps.triggerButtonText": "Add API Category", "AdminPages.ApiCategories.List.empty.content.apicategories": "You can use API categories to group APIs. In previous versions of WSO2 API Manager, the process of grouping APIs was carried out by using tag-wise groups. Unlike tag-wise grouping, API categories do not use a naming convention. Therefore, the admin does not need to take into consideration any naming conventions when using API category-based grouping.", @@ -66,12 +117,15 @@ "AdminPages.ApiCategories.table.header.category.number.of.apis": "Number of APIs", "AdminPages.ApiSettings.EditApi.form.edit.error": "API provider should not be empty.", "AdminPages.ApiSettings.EditApi.form.edit.other.error": "Given Username is not valid.", + "AdminPages.ApiSettings.EditApi.form.edit.provider.label": "Provider Name", "AdminPages.ApiSettings.EditApi.form.edit.successful": "API provider changed successfully", "AdminPages.ApiSettings.EditApi.form.edit.user.notvalid": "Error while updating the provider name.", "AdminPages.ApplicationSettings.Edit.form.edit.successful": "Application owner changed successfully", "AdminPages.ApplicationSettings.Edit.form.helperText": "Enter a new Owner. Make sure the new owner has logged into the Developer Portal at least once", "AdminPages.ApplicationSettings.Edit.form.name": "Application Name", + "AdminPages.Gateways.Delete.form.delete.confirmation.delete.btn": "Delete", "AdminPages.Gateways.Delete.form.delete.confirmation.message": "Are you sure you want to delete this Gateway Environment?", + "AdminPages.Gateways.Delete.form.delete.confirmation.message.title": "Delete Gateway Environment?", "AdminPages.Gateways.Delete.form.delete.successful": "Gateway Environment deleted successfully", "AdminPages.Gateways.List.addButtonProps.title": "Add Gateway Environment", "AdminPages.Gateways.List.addButtonProps.triggerButtonText": "Add Gateway Environment", @@ -94,6 +148,9 @@ "Api.Provider": "Provider", "Api.Version": "Version", "Apis.Details.Scopes.CreateScope.roles.help": "Enter a valid role and press `Enter`.", + "Apis.Details.Scopes.permission.status.allow": "Allow", + "Apis.Details.Scopes.permission.status.deny": "Deny", + "Apis.Details.Scopes.permission.status.none": "None", "Apis.Listing.Listing.apis.search": "Search", "Apis.Listing.Listing.apis.search.label": "Search by API", "Apis.Listing.Listing.apis.searching": "Searching", @@ -119,12 +176,26 @@ "Applications.Listing.ApplicationTableHead.actions": "Actions", "Applications.Listing.ApplicationTableHead.name": "Name", "Applications.Listing.ApplicationTableHead.owner": "Owner", + "Applications.Listing.Listing.applications.edit.error.already.exist": "{owner} already has an application with name: {name}", + "Applications.Listing.Listing.applications.edit.error.default": "Something went wrong when validating user", + "Applications.Listing.Listing.applications.edit.error.owner.invalid": "{owner} is not a valid Subscriber", + "Applications.Listing.Listing.applications.edit.error.subscriber.invalid": "Error while updating ownership to {owner}", + "Applications.Listing.Listing.applications.edit.error.unknown": "Something went wrong when updating owner", + "Applications.Listing.Listing.applications.edit.owner.label": "Owner", + "Applications.Listing.Listing.applications.edit.save.btn": "Save", + "Applications.Listing.Listing.applications.list.rows.more.than.label": "more than {to}", + "Applications.Listing.Listing.applications.list.rows.range.label": "{from}-{to} of {count}", + "Applications.Listing.Listing.applications.list.rows.show.label": "Show", + "Applications.Listing.Listing.applications.list.title": "Change Application Owner", "Applications.Listing.Listing.applications.search": "Search", "Applications.Listing.Listing.applications.search.label": "Search Application by Application Owner", "Applications.Listing.Listing.applications.searching": "Searching", "Applications.Listing.Listing.clear.search": "Clear Search", "Applications.Listing.Listing.empty.message": "No Data to Display", "Applications.Listing.Listing.search.placeholder": "Application Owner", + "Applications.Listing.apis.list.rows.more.than.label": "more than {to}", + "Applications.Listing.apis.list.rows.range.label": "{from}-{to} of {count}", + "Applications.Listing.apis.list.rows.show.label": "Show", "Base.Errors.ResourceNotFound.api.list": "API List", "Base.Errors.ResourceNotFound.api.product.list": "API Product List", "Base.Errors.ResourceNotFound.more.links": "You may check the links below", @@ -137,9 +208,13 @@ "Base.RouteMenuMapping.advanced.throttling.policies.Adding": "Add Advanced Policy", "Base.RouteMenuMapping.advanced.throttling.policies.Editing": "Edit Advanced Policy", "Base.RouteMenuMapping.api.categories": "API Categories", + "Base.RouteMenuMapping.api.product.state.change": "API Product State Change", + "Base.RouteMenuMapping.api.revision.deployment": "API Revision Deployment", + "Base.RouteMenuMapping.api.state.change": "API State Change", "Base.RouteMenuMapping.apis": "Change API Provider", "Base.RouteMenuMapping.application.creation": "Application Creation", "Base.RouteMenuMapping.application.deletion": "Application Deletion", + "Base.RouteMenuMapping.application.reg": "Application Registration", "Base.RouteMenuMapping.application.throttling.policies": "Application Policies", "Base.RouteMenuMapping.applications": "Change Application Owner", "Base.RouteMenuMapping.blacklisted.items": "Deny Policies", @@ -194,19 +269,43 @@ "Dashboard.tasksWorkflow.compactTasks.userCreation.name": "User Creation", "Dashboard.tasksWorkflow.noTasks.card.description": "Manage workflow tasks, increase productivity and enhance competitiveness by enabling developers to easily deploy business processes and models.", "Dashboard.tasksWorkflow.noTasks.card.title": "All the pending tasks completed", + "Form.Dialog.Base.cancel.btn": "Cancel", "GatewayEnvironments.AddEditGWEnvironment.form.description.help": "Description of the Gateway Environment", + "GatewayEnvironments.AddEditGWEnvironment.form.description.label": "Description", "GatewayEnvironments.AddEditGWEnvironment.form.displayName": "Display Name", "GatewayEnvironments.AddEditGWEnvironment.form.displayName.help": "Display name of the Gateway Environment", "GatewayEnvironments.AddEditGWEnvironment.form.environment.name.empty": "Name is Empty", "GatewayEnvironments.AddEditGWEnvironment.form.environment.name.invalid": "Name must not contain special characters or spaces", + "GatewayEnvironments.AddEditGWEnvironment.form.gateway.type.apk": "APK Gateway", + "GatewayEnvironments.AddEditGWEnvironment.form.gateway.type.apk.description": "Fast API gateway running on kubernetes designed to manage and secure APIs.", + "GatewayEnvironments.AddEditGWEnvironment.form.gateway.type.apk.new.label": "New", + "GatewayEnvironments.AddEditGWEnvironment.form.gateway.type.label": "Select Gateway type", + "GatewayEnvironments.AddEditGWEnvironment.form.gateway.type.regular": "Regular Gateway", + "GatewayEnvironments.AddEditGWEnvironment.form.gateway.type.regular.description": "API gateway embedded in APIM runtime. Connect directly to an existing APIManager.", "GatewayEnvironments.AddEditGWEnvironment.form.info.add.successful": "Gateway Environment added successfully", "GatewayEnvironments.AddEditGWEnvironment.form.info.edit.successful": "Gateway Environment edited successfully", "GatewayEnvironments.AddEditGWEnvironment.form.name": "Name", + "GatewayEnvironments.AddEditGWEnvironment.form.name.help": "Name of the Gateway Environment", "GatewayEnvironments.AddEditGWEnvironment.form.save.button.label": "Save", + "GatewayEnvironments.AddEditGWEnvironment.form.type.helper.text": "Supported Key Type of the Gateway Environment", + "GatewayEnvironments.AddEditGWEnvironment.form.type.hybrid.option": "Hybrid", + "GatewayEnvironments.AddEditGWEnvironment.form.type.label": "Type", + "GatewayEnvironments.AddEditGWEnvironment.form.type.prod.option": "Production", + "GatewayEnvironments.AddEditGWEnvironment.form.type.sandbox.option": "Sandbox", "GatewayEnvironments.AddEditGWEnvironment.form.vhost.context.invalid": "Invalid Http context", "GatewayEnvironments.AddEditGWEnvironment.form.vhost.host.empty": "Host of Vhost is empty", "GatewayEnvironments.AddEditGWEnvironment.form.vhost.host.invalid": "Invalid Host", + "GatewayEnvironments.AddEditVhost.add.vhost.btn": "New VHost", "GatewayEnvironments.AddEditVhost.host": "Host", + "GatewayEnvironments.AddEditVhost.host.gateway.access.url": "Gateway Access URLs", + "GatewayEnvironments.AddEditVhost.host.gateway.advanced.settings": "Advanced Settings", + "GatewayEnvironments.AddEditVhost.host.gateway.http.context": "HTTP(s) context", + "GatewayEnvironments.AddEditVhost.host.helper.text": "ex: mg.wso2.com", + "GatewayEnvironments.AddEditVhost.host.remove.btn": "Remove", + "GatewayEnvironments.AddEditVhost.host.remove.dialog.content": "Removing an existing VHost may result in inconsistent state if APIs are deployed with this VHost. Please make sure there are no APIs deployed with this VHost or redeploy those APIs.", + "GatewayEnvironments.AddEditVhost.host.remove.dialog.no.btn": "No, Don't Remove", + "GatewayEnvironments.AddEditVhost.host.remove.dialog.title": "Remove Existing Vhost?", + "GatewayEnvironments.AddEditVhost.host.remove.dialog.yes.btn": "Yes", "GatewayEnvironments.AddEditVhost.httpPort": "HTTP Port", "GatewayEnvironments.AddEditVhost.httpsPort": "HTTPS Port", "GatewayEnvironments.AddEditVhost.wsPort": "WS Port", @@ -226,9 +325,7 @@ "KeyManager.enter.permission.allowed": "Use of this Key-Manager is \"Allowed\" for above roles.", "KeyManager.enter.permission.denied": "Use of this Key-Manager is \"Denied\" for above roles.", "KeyManager.permissions": "Permissions", - "KeyManagers.AddEditKeyManager.\n form.scopeManagementEndpoint": "Scope Management Endpoint", - "KeyManagers.AddEditKeyManager.\n form.displayRevokeEndpoint": "Display Revoke Endpoint", - "KeyManagers.AddEditKeyManager.External.KeyManager\n .general.details.description": "Identity Provider vendor and the token usage mode", + "KeyManagers.AddEditKeyManager.External.KeyManager.general.details.description": "Identity Provider vendor and the token usage mode", "KeyManagers.AddEditKeyManager.KeyManager.type": "Key Manager Type", "KeyManagers.AddEditKeyManager.advanced": "Advanced Configurations", "KeyManagers.AddEditKeyManager.advanced.description": "Advanced options for the Key Manager", @@ -245,15 +342,15 @@ "KeyManagers.AddEditKeyManager.connector.configurations.description": "Provide connection params for the selected Key Manager.", "KeyManagers.AddEditKeyManager.endpoints": "Key Manager Endpoints", "KeyManagers.AddEditKeyManager.endpoints.description": "Configure endpoints such as client registration endpoint, the token endpoint for this Key Manager.", - "KeyManagers.AddEditKeyManager.exchange.token.form.\n token.audience.help": "The Audience of the authorization server which the access token is intended for.", - "KeyManagers.AddEditKeyManager.form.\n clientRegistrationEndpoint": "Client Registration Endpoint", - "KeyManagers.AddEditKeyManager.form.\n introspectionEndpoint": "Introspection Endpoint", + "KeyManagers.AddEditKeyManager.exchange.token.form.token.audience.help": "The Audience of the authorization server which the access token is intended for.", "KeyManagers.AddEditKeyManager.form.Issuer": "Issuer", "KeyManagers.AddEditKeyManager.form.add": "Add", "KeyManagers.AddEditKeyManager.form.authorizeEndpoint": "Authorize Endpoint", "KeyManagers.AddEditKeyManager.form.authorizeEndpoint.help": "E.g., https://localhost:9443/oauth2/userinfo", "KeyManagers.AddEditKeyManager.form.cancel": "Cancel", "KeyManagers.AddEditKeyManager.form.claim.help": "Type Available Grant Types and press Enter/Return to add them.", + "KeyManagers.AddEditKeyManager.form.claim.placeholder": "Type Grant Types and press Enter", + "KeyManagers.AddEditKeyManager.form.clientRegistrationEndpoint": "Client Registration Endpoint", "KeyManagers.AddEditKeyManager.form.clientRegistrationEndpoint.help": "E.g., https://localhost:9444/client-registration/v0.17/register", "KeyManagers.AddEditKeyManager.form.consumerKeyClaim.help": "Provide consumer key claim URIs.", "KeyManagers.AddEditKeyManager.form.description": "Description", @@ -262,12 +359,14 @@ "KeyManagers.AddEditKeyManager.form.displayRevokeEndpoint": "Display Revoke Endpoint", "KeyManagers.AddEditKeyManager.form.displayTokenEndpoint": "Display Token Endpoint", "KeyManagers.AddEditKeyManager.form.has.errors": "One or more fields contain errors.", + "KeyManagers.AddEditKeyManager.form.introspectionEndpoint": "Introspection Endpoint", "KeyManagers.AddEditKeyManager.form.introspectionEndpoint.help": "E.g., https://localhost:9443/oauth2/introspect", "KeyManagers.AddEditKeyManager.form.issuer.help": "E.g.,: https://localhost:9443/oauth2/token", "KeyManagers.AddEditKeyManager.form.name": "Name", "KeyManagers.AddEditKeyManager.form.name.help": "Name of the Key Manager.", "KeyManagers.AddEditKeyManager.form.revokeEndpoint": "Revoke Endpoint", "KeyManagers.AddEditKeyManager.form.revokeEndpoint.help": "E.g., https://localhost:9443/oauth2/revoke", + "KeyManagers.AddEditKeyManager.form.scopeManagementEndpoint": "Scope Management Endpoint", "KeyManagers.AddEditKeyManager.form.scopeManagementEndpoint.help": "E.g, https://localhost:9443/oauth2/scope", "KeyManagers.AddEditKeyManager.form.scopesClaim.help": "Provide scope claim URI.", "KeyManagers.AddEditKeyManager.form.token.audience.help": "The Audience of the authorization server which the access token is intended for.", @@ -338,20 +437,129 @@ "LoginDenied.message": "The server could not verify that you are authorized to access the requested resource.", "LoginDenied.retry": "Retry", "LoginDenied.title": "Error 403 : Forbidden", + "Mui.data.table.pagination.display.rows": "of", + "Mui.data.table.pagination.rows.per.page": "Rows per page:", + "Mui.data.table.search.no.records.found": "Sorry, no matching records found", + "PERMISSION_TREE.apim.admin": "Manage all admin operations", + "PERMISSION_TREE.apim.admin_alert_manage": "Manage admin alerts", + "PERMISSION_TREE.apim.admin_application_view": "View Applications", + "PERMISSION_TREE.apim.admin_operations": "Manage API categories and Key Managers related operations", + "PERMISSION_TREE.apim.admin_settings": "Retrieve admin settings", + "PERMISSION_TREE.apim.admin_tier_manage": "Update and delete throttling policies", + "PERMISSION_TREE.apim.admin_tier_view": "View throttling policies", + "PERMISSION_TREE.apim.api_category": "Manage API categories", + "PERMISSION_TREE.apim.api_create": "Create API", + "PERMISSION_TREE.apim.api_definition_view": "View, Retrieve API definition", + "PERMISSION_TREE.apim.api_delete": "Delete API", + "PERMISSION_TREE.apim.api_generate_key": "Generate Internal Key", + "PERMISSION_TREE.apim.api_import_export": "Import and export APIs related operations", + "PERMISSION_TREE.apim.api_key": "Generate API Keys", + "PERMISSION_TREE.apim.api_list_view": "View, Retrieve API list", + "PERMISSION_TREE.apim.api_manage": "Manage all API related operations", + "PERMISSION_TREE.apim.api_mediation_policy_manage": "View, create, update and remove API specific mediation policies", + "PERMISSION_TREE.apim.api_product_import_export": "Import and export API Products related operations", + "PERMISSION_TREE.apim.api_provider_change": "Retrieve and manage applications", + "PERMISSION_TREE.apim.api_publish": "Publish API", + "PERMISSION_TREE.apim.api_view": "View API", + "PERMISSION_TREE.apim.api_workflow_approve": "Manage workflows", + "PERMISSION_TREE.apim.api_workflow_view": "Retrive workflow requests", + "PERMISSION_TREE.apim.app_import_export": "Import and export applications related operations", + "PERMISSION_TREE.apim.app_manage": "Retrieve, Manage and Import, Export applications", + "PERMISSION_TREE.apim.app_owner_change": "Retrieve and manage applications", + "PERMISSION_TREE.apim.bl_manage": "Update and delete deny policies", + "PERMISSION_TREE.apim.bl_view": "View deny policies", + "PERMISSION_TREE.apim.bot_data": "Retrieve bot detection data", + "PERMISSION_TREE.apim.client_certificates_add": "Add client certificates", + "PERMISSION_TREE.apim.client_certificates_manage": "View, create, update and remove client certificates", + "PERMISSION_TREE.apim.client_certificates_update": "Update and delete client certificates", + "PERMISSION_TREE.apim.client_certificates_view": "View client certificates", + "PERMISSION_TREE.apim.comment_manage": "Read and Write comments", + "PERMISSION_TREE.apim.comment_view": "Read permission to comments", + "PERMISSION_TREE.apim.comment_write": "Write permission to comments", + "PERMISSION_TREE.apim.common_operation_policy_manage": "Add, Update and Delete common operation policies", + "PERMISSION_TREE.apim.common_operation_policy_view": "View common operation policies", + "PERMISSION_TREE.apim.document_create": "Create API documents", + "PERMISSION_TREE.apim.document_manage": "Create, update and delete API documents", + "PERMISSION_TREE.apim.environment_manage": "Manage gateway environments", + "PERMISSION_TREE.apim.environment_read": "Retrieve gateway environments", + "PERMISSION_TREE.apim.ep_certificates_add": "Add backend endpoint certificates", + "PERMISSION_TREE.apim.ep_certificates_manage": "View, create, update and remove endpoint certificates", + "PERMISSION_TREE.apim.ep_certificates_update": "Update and delete backend endpoint certificates", + "PERMISSION_TREE.apim.ep_certificates_view": "View backend endpoint certificates", + "PERMISSION_TREE.apim.gateway_policy_manage": "Add, Update and Delete gateway policies", + "PERMISSION_TREE.apim.gateway_policy_view": "View gateway policies", + "PERMISSION_TREE.apim.keymanagers_manage": "Manage Key Managers", + "PERMISSION_TREE.apim.mediation_policy_create": "Create mediation policies", + "PERMISSION_TREE.apim.mediation_policy_manage": "Update and delete mediation policies", + "PERMISSION_TREE.apim.mediation_policy_view": "View mediation policies", + "PERMISSION_TREE.apim.monetization_usage_publish": "Retrieve and publish Monetization related usage records", + "PERMISSION_TREE.apim.policies_import_export": "Export and import policies related operations", + "PERMISSION_TREE.apim.pub_alert_manage": "Get/ subscribe/ configure publisher alerts", + "PERMISSION_TREE.apim.publisher_settings": "Retrieve store settings", + "PERMISSION_TREE.apim.role_manage": "Manage system roles", + "PERMISSION_TREE.apim.scope_manage": "Manage system scopes", + "PERMISSION_TREE.apim.shared_scope_manage": "Manage shared scopes", + "PERMISSION_TREE.apim.store_settings": "Retrieve Developer Portal settings", + "PERMISSION_TREE.apim.sub_alert_manage": "Retrieve, subscribe and configure Developer Portal alert types", + "PERMISSION_TREE.apim.sub_manage": "Retrieve, Manage subscriptions", + "PERMISSION_TREE.apim.subscribe": "Subscribe API", + "PERMISSION_TREE.apim.subscription_block": "Block Subscription", + "PERMISSION_TREE.apim.subscription_manage": "Manage all Subscription related operations", + "PERMISSION_TREE.apim.subscription_view": "View Subscription", + "PERMISSION_TREE.apim.tenantInfo": "Retrieve tenant related information", + "PERMISSION_TREE.apim.tenant_theme_manage": "Manage tenant themes", + "PERMISSION_TREE.apim.threat_protection_policy_create": "Create threat protection policies", + "PERMISSION_TREE.apim.threat_protection_policy_manage": "Update and delete threat protection policies", + "PERMISSION_TREE.apim.tier_manage": "View, update and delete throttling policies", + "PERMISSION_TREE.apim.tier_view": "View throttling policies", + "PERMISSION_TREE.service_catalog.service_view": "view access to services in service catalog", + "PERMISSION_TREE.service_catalog.service_write": "write access to services in service catalog", + "Permissions.tree.scope.assignments.title": "Scope Assignments ({totalPermissions})", + "Role.permissions.Role.Permissions.Admin.Table.displayed.rows.more.than.label": "more than {to}", + "Role.permissions.Role.Permissions.Admin.Table.displayed.rows.range.label": "{from}-{to} of {count}", + "Role.permissions.Role.Permissions.Admin.Table.row.per.page.label": "Rows per page:", + "RolePermissions.Common.AddRoleWizard.add.dialog.back": "Back", + "RolePermissions.Common.AddRoleWizard.add.dialog.cancel": "Cancel", "RolePermissions.Common.AddRoleWizard.add.mapping.button": "Add scope mapping", "RolePermissions.Common.AddRoleWizard.add.mapping.title": "Add new scope mapping", + "RolePermissions.Common.AddRoleWizard.add.provide.role.next.btn": "Next", + "RolePermissions.Common.AddRoleWizard.add.provide.role.save.btn": "Save", + "RolePermissions.Common.AddRoleWizard.add.provide.role.text": "Provide role name", + "RolePermissions.Common.AddRoleWizard.add.provide.select.permissions": "Select permissions", + "RolePermissions.Common.AddRoleWizard.add.role.alias.label": "Role alias", + "RolePermissions.Common.AddRoleWizard.add.role.custom.scope.assignments": "Custom scope assignments", + "RolePermissions.Common.AddRoleWizard.add.role.mapping.label": "Mapping role", "RolePermissions.Common.AddRoleWizard.add.role.warn.empty": "Role name can not be empty!", "RolePermissions.Common.AddRoleWizard.add.scope.error": "Something went wrong while adding new scope mapping", + "RolePermissions.Common.AddRoleWizard.add.scope.error.add.role.alias": "Something went wrong while adding new role alias", + "RolePermissions.Common.AddRoleWizard.add.scope.error.add.role.alias.success": "Add new alias for {newRole} successfully", + "RolePermissions.Common.AddRoleWizard.add.scope.error.empty.permission": "You need to select at least one permission!", + "RolePermissions.Common.AddRoleWizard.add.scope.error.role.empty": "Mapped role selection can't be empty!", + "RolePermissions.Common.AddRoleWizard.add.scope.success": "Added scope mapping for {newRole} successfully", + "RolePermissions.Common.AddRoleWizard.add.type.role": "Type existing user role, If not create a new role from carbon console first", + "RolePermissions.Common.AddRoleWizard.add.type.role.label": "Role Name", + "RolePermissions.Common.AddRoleWizard.selected.role": "Role {role_value} will be mapped to the selected role", "RolePermissions.Common.DeletePermission.delete.scope.error": "Something went wrong while deleting the scope assignments", "RolePermissions.ListRoles.error.retrieving.perm": "Error while retrieving permission info", "RolePermissions.ListRoles.page.description": "Scope assignments are only related to internal, APIM-specific scope assignments. They are not related to role permission assignments in the Management Console.", + "RolePermissions.ListRoles.permission.delete.button": "Delete", "RolePermissions.ListRoles.permission.denied.content": "You do not have enough permission to view Scope Assignments. Please contact the site administrator.", "RolePermissions.ListRoles.permission.denied.title": "Permission Denied", "RolePermissions.ListRoles.scope.assignment.button": "Add scope mappings", + "RolePermissions.ListRoles.scope.assignment.cancel.button": "Cancel", + "RolePermissions.ListRoles.scope.assignment.delete.button": "Delete", + "RolePermissions.ListRoles.scope.assignment.delete.dialog.content": "Are you sure you want to delete scope assignments for {role} ?", + "RolePermissions.ListRoles.scope.assignment.delete.dialog.title": "Delete scope assignments of {role} ?", + "RolePermissions.ListRoles.scope.assignment.delete.scope.success": "Scope Assignments {role} deleted successfully", + "RolePermissions.ListRoles.table.column.role": "Roles", + "RolePermissions.ListRoles.table.column.scope.assignments": "Scope Assignments", "RolePermissions.ListRoles.title.role.permissions": "Scope Assignments", "RolePermissions.TreeView.PermissionsSelector.scope.assignment.button": "Scope Assignments", + "RolePermissions.TreeView.PermissionsSelector.scope.assignment.cancel.btn": "Cancel", + "RolePermissions.TreeView.PermissionsSelector.scope.assignment.save.btn": "Save", "RolePermissions.TreeView.PermissionsSelector.scope.assignment.title": "Select Scope Assignments", "RolePermissions.TreeView.PermissionsSelector.update.scope.error": "Something went wrong while updating the permission", + "RolePermissions.TreeView.PermissionsSelector.update.scope.success": "Update permissions for {role} successfully", "ScopeAssignments.List.search.default": "Search by Role Name", "Settings.Advanced.TenantConf.edit.success": "Advanced Configuration saved successfully", "Settings.Advanced.TenantConfSave.form.cancel": "Cancel", @@ -363,6 +571,7 @@ "TenantTheme.Upload.Theme.drag.and.drop.message": "Drag & Drop files here {break} or {break}", "TenantTheme.Upload.Theme.help.link.one": "Tenant theming", "TenantTheme.Upload.Theme.info.message": "The theme should be a zip file containing CSS and images compliant with the", + "TenantTheme.Upload.Theme.info.message.link": "API Manager theme format", "TenantTheme.Upload.Theme.page.heading": "Manage Tenant Theme", "TenantTheme.Upload.Theme.upload.files": "Upload/Download Theme", "TenantTheme.Upload.Theme.upload.successful": "Theme uploaded successfully", @@ -376,6 +585,7 @@ "Throttling.Advanced.AddEdit.default.limits.description": "Request Count and Request Bandwidth are the two options for default limit. You can use the option according to your requirement.", "Throttling.Advanced.AddEdit.edit.success": "Policy Updated Successfully", "Throttling.Advanced.AddEdit.empty.error": "contains white spaces.", + "Throttling.Advanced.AddEdit.form.actions.label": "Actions", "Throttling.Advanced.AddEdit.form.add.btn": "Add", "Throttling.Advanced.AddEdit.form.bandwidth.allowed.help": "Bandwidth allowed", "Throttling.Advanced.AddEdit.form.cancel": "Cancel", @@ -385,6 +595,7 @@ "Throttling.Advanced.AddEdit.form.has.errors": "One or more fields contain errors.", "Throttling.Advanced.AddEdit.form.name.help": "Name of the throttle policy.", "Throttling.Advanced.AddEdit.form.policyName": "Name", + "Throttling.Advanced.AddEdit.form.request.count.allowed.help": "Number of requests allowed", "Throttling.Advanced.AddEdit.form.requestCount.label": "Request Count", "Throttling.Advanced.AddEdit.form.timeUnit.day": "Day(s)", "Throttling.Advanced.AddEdit.form.timeUnit.hour": "Hour(s)", @@ -425,7 +636,10 @@ "Throttling.Advanced.AddEditConditionPolicyIP.valid.ip.address.error": "Invalid IP Addresss", "Throttling.Advanced.AddEditConditionPolicyIP.valid.ip.range.error": "Invalid IP Range", "Throttling.Advanced.AddEditExecution.default.limit.option": "Default Limit Option", + "Throttling.Advanced.AddEditExecution.default.limit.option.request.bandwith.label": "Request Bandwidth", + "Throttling.Advanced.AddEditExecution.default.limit.option.request.count.label": "Request Count", "Throttling.Advanced.ConditionalGroup.alert": "To add rate limiting with different parameters for Query Params, Header Data and JWT token claim, you must enable them in the deployment.toml file.", + "Throttling.Advanced.ConditionalGroup.alert.title": "Warning", "Throttling.Advanced.ConditionalGroup.condition.policies": "Condition Policies", "Throttling.Advanced.ConditionalGroup.execution.policy": "Execution Policy", "Throttling.Advanced.ConditionalGroup.from": "From:", @@ -465,6 +679,8 @@ "Throttling.Advanced.List.search.default": "Search by Advanced Policy name", "Throttling.Advanced.List.title.main": "Advanced Rate Limiting Policies", "Throttling.Application.AddEdit.burst.control.limit": "Number of requests for burst control", + "Throttling.Application.AddEdit.burst.rate.limit.min": "Requests/min", + "Throttling.Application.AddEdit.burst.rate.limit.seconds": "Requests/sec", "Throttling.Application.AddEdit.form.request.rate": "Request Rate", "Throttling.Application.Policy..List.search.default": "Search by Application Policy name", "Throttling.Application.Policy.List.addButtonProps.title": "Add Policy", @@ -477,7 +693,9 @@ "Throttling.Application.Policy.policy.data.amount.empty": "Data Amount is Empty", "Throttling.Application.Policy.policy.delete.error": "Application Rate Limiting Policy could not be deleted.", "Throttling.Application.Policy.policy.delete.success": "Application Rate Limiting Policy successfully deleted.", + "Throttling.Application.Policy.policy.dialog.delete.btn": "Delete", "Throttling.Application.Policy.policy.dialog.delete.error": "Application Rate Limiting Policy will be deleted.", + "Throttling.Application.Policy.policy.dialog.delete.title": "Delete Application Policy?", "Throttling.Application.Policy.policy.edit.success": "Application Rate Limiting Policy edited successfully.", "Throttling.Application.Policy.policy.name.empty": "Name is Empty", "Throttling.Application.Policy.policy.name.invalid.character": "Name contains one or more illegal characters", @@ -494,6 +712,7 @@ "Throttling.Blacklist.Policy.List.help.link.one": "Denying requests", "Throttling.Blacklist.Policy.List.search.default": "Search by Deny Policy name", "Throttling.Blacklist.Policy.policy.add.success": "Deny Policy added successfully.", + "Throttling.Blacklist.Policy.policy.delete.dialog.title": "Delete Deny Policy?", "Throttling.Blacklist.Policy.policy.delete.error": "Deny Policy could not be deleted.", "Throttling.Blacklist.Policy.policy.delete.success": "Deny Policy successfully deleted.", "Throttling.Blacklist.Policy.policy.dialog.delete.error": "Deny Policy will be deleted.", @@ -521,8 +740,10 @@ "Throttling.Custom.Policy.List.help.link.one": "Custom Throttling Policy", "Throttling.Custom.Policy.List.search.default": "Search by Custom Policy name", "Throttling.Custom.Policy.policy.add.success": "Custom Policy added successfully.", + "Throttling.Custom.Policy.policy.delete.btn": "Delete", "Throttling.Custom.Policy.policy.delete.error": "Custom Policy could not be deleted.", "Throttling.Custom.Policy.policy.delete.success": "Custom Policy successfully deleted.", + "Throttling.Custom.Policy.policy.delete.title": "Delete Custom Policy?", "Throttling.Custom.Policy.policy.dialog.delete.error": "Custom Policy will be deleted.", "Throttling.Custom.Policy.policy.edit.success": "Custom Policy edited successfully", "Throttling.Custom.Policy.policy.invalid.key.template": "Invalid Key Template", @@ -533,14 +754,18 @@ "Throttling.Custom.Policy.search.default": "Custom Rate Limiting Policies", "Throttling.Subscription.AddEdit.burst.control.add.description": "Define Burst Control Limits for the subscription policy. This is optional.", "Throttling.Subscription.AddEdit.burst.control.limit": "Number of requests for burst control", + "Throttling.Subscription.AddEdit.burst.control.limit.time.unit.minute": "Requests/min", + "Throttling.Subscription.AddEdit.burst.control.limit.time.unit.second": "Requests/s", "Throttling.Subscription.AddEdit.burst.control.limits": "Burst Control (Rate Limiting)", "Throttling.Subscription.AddEdit.custom.attributes.add.description": "Define custom attributes for the subscription policy.", "Throttling.Subscription.AddEdit.form.add": "Save", + "Throttling.Subscription.AddEdit.form.add.data.amount.helper.text": "Bandwidth allowed", "Throttling.Subscription.AddEdit.form.cancel": "Cancel", "Throttling.Subscription.AddEdit.form.dataAmount.name": "Data Bandwidth", "Throttling.Subscription.AddEdit.form.description": "Description", "Throttling.Subscription.AddEdit.form.description.help": "Description of the rate limiting policy", "Throttling.Subscription.AddEdit.form.eventCount.count": "Event Count", + "Throttling.Subscription.AddEdit.form.eventCount.count.helper.text": "Number of events allowed", "Throttling.Subscription.AddEdit.form.max.complexity": "Max Complexity", "Throttling.Subscription.AddEdit.form.max.depth": "Max Depth", "Throttling.Subscription.AddEdit.form.max.webhooks.connections": "Max Subscriptions", @@ -548,18 +773,26 @@ "Throttling.Subscription.AddEdit.form.policyName": "Name", "Throttling.Subscription.AddEdit.form.request.rate": "Request Rate", "Throttling.Subscription.AddEdit.form.requestCount.count": "Request Count", + "Throttling.Subscription.AddEdit.form.unit.time.label": "Unit Time", "Throttling.Subscription.AddEdit.general.details": "General Details", "Throttling.Subscription.AddEdit.general.details.description": "Provide the name and description of the subscription policy.", "Throttling.Subscription.AddEdit.graphql.add.description": "Provide the Maximum Complexity and Maximum depth values for GraphQL APIs using this policy.", "Throttling.Subscription.AddEdit.permissions.add.description": "Define the permissions for the subscription policy.", + "Throttling.Subscription.AddEdit.permissions.add.role.label": "Roles", + "Throttling.Subscription.AddEdit.permissions.add.role.placeholder": "Type roles and press Enter", "Throttling.Subscription.AddEdit.policy.flags.add.description": "Define the billing plan for the subscription policy. Enable stop on quota reach to block invoking an API when the defined quota is reached.", "Throttling.Subscription.AddEdit.quota.limits": "Quota Limits", "Throttling.Subscription.AddEdit.quota.policies.add.description": "Request Count and Request Bandwidth are the two options for Quota Limit. You can use the option according to your requirement.", + "Throttling.Subscription.AddEdit.quota.policies.add.limits.event.count": "Event Based (Async API)", + "Throttling.Subscription.AddEdit.quota.policies.add.limits.request.bandwidth": "Request Bandwidth", + "Throttling.Subscription.AddEdit.quota.policies.add.limits.request.count": "Request Count", "Throttling.Subscription.AddEdit.subscription.count.add.description": "Maximum number of webhooks allowed for a Webhooks API using this policy.", "Throttling.Subscription.AddEdit.title.add": "Subscription Rate Limiting Policy - Create new", "Throttling.Subscription.AddEdit.title.edit": "Subscription Rate Limiting Policy - Edit", "Throttling.Subscription.AddEdit.unitTime": "Unit Time", "Throttling.Subscription.Billing.Plan": "Billing Plan", + "Throttling.Subscription.Billing.Plan.type.commercial": "Commercial", + "Throttling.Subscription.Billing.Plan.type.free": "Free", "Throttling.Subscription.Fixed.Rate": "Fixed Rate", "Throttling.Subscription.GraphQL": "GraphQL", "Throttling.Subscription.Policy..List.search.default": "Search by Subscription Policy name", @@ -571,8 +804,10 @@ "Throttling.Subscription.Policy.List.help.link.two": "Setting a Subscription Rate Limiting Policy as an API Publisher", "Throttling.Subscription.Policy.policy.add.success": "Subscription Rate Limiting Policy added successfully.", "Throttling.Subscription.Policy.policy.data.amount.empty.error.msg": "Data Bandwidth amount is Empty", + "Throttling.Subscription.Policy.policy.delete.btn": "Delete", "Throttling.Subscription.Policy.policy.delete.error": "Subscription Rate Limiting Policy could not be deleted.", "Throttling.Subscription.Policy.policy.delete.success": "Subscription Rate Limiting Policy successfully deleted.", + "Throttling.Subscription.Policy.policy.delete.title": "Delete Subscription Policy?", "Throttling.Subscription.Policy.policy.dialog.delete.error": "Subscription Rate Limiting Policy will be deleted.", "Throttling.Subscription.Policy.policy.edit.success": "Subscription Rate Limiting Policy updated successfully.", "Throttling.Subscription.Policy.policy.event.count.empty.error.msg": "Event Count is Empty", @@ -590,6 +825,9 @@ "Throttling.Subscription.Subscriber.Count": "Webhooks", "Throttling.Subscription.attribute.delete.tooltip": "Delete", "Throttling.Subscription.billing.cycle": "Billing Cycle", + "Throttling.Subscription.billing.cycle.menu.month": "Month", + "Throttling.Subscription.billing.cycle.menu.week": "Week", + "Throttling.Subscription.billing.cycle.menu.year": "Year", "Throttling.Subscription.currency": "Currency", "Throttling.Subscription.custom.attributes": "Custom Attributes", "Throttling.Subscription.custom.attributes.add": "Add Custom Attribute", @@ -599,8 +837,11 @@ "Throttling.Subscription.enter.permission.denied": "This policy is \"Denied\" for above roles.", "Throttling.Subscription.fixed.rate.tooltip": "Fixed rate for the given billing cycle", "Throttling.Subscription.monetization.plan": "Monetization Plan", + "Throttling.Subscription.monetization.plan.dynamic.usage": "Dynamic Usage", + "Throttling.Subscription.monetization.plan.fixed.rate": "Fixed Rate", "Throttling.Subscription.monetization.plan.tooltip": "Monetization category type", "Throttling.Subscription.permissions": "Permissions", + "Throttling.Subscription.price.per.request": "Price Per Request", "Throttling.Subscription.stop.quota.reach": "Stop On Quota Reach", "Throttling.Subsription.Policy.List.empty.content.subscription.policies": "Subscription-level throttling policies are applicable per access token generated for an application.", "UnexpectedError.logout": "Logout", From 7b1928639aeb73a5c94ea04a294f7c57675b4be5 Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:43:21 +0530 Subject: [PATCH 08/10] Add missing localization in admin portal to ui elements and MUI components --- .../main/webapp/site/public/locales/en.json | 21 ++++- .../components/AdminPages/Addons/HelpBase.jsx | 6 +- .../Dashboard/APICategoriesCard.jsx | 5 +- .../AdminPages/Dashboard/Dashboard.jsx | 12 ++- .../components/Base/Header/Breadcrumbs.jsx | 22 +++-- .../KeyManagers/ListKeyManagerUsages.jsx | 80 ++++++++++++++++--- .../KeyManagers/ListKeyManagers.jsx | 32 ++++++-- .../Throttling/Advanced/ConditionalGroup.jsx | 10 ++- .../components/Workflow/APIStateChange.jsx | 16 ++-- 9 files changed, 166 insertions(+), 38 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 dbb9e118ec2..5c9c1356d73 100644 --- a/portals/admin/src/main/webapp/site/public/locales/en.json +++ b/portals/admin/src/main/webapp/site/public/locales/en.json @@ -1,4 +1,5 @@ { + "Admin.Addons.Help.Base.title": "Help", "Admin.KeyManager.form.type": "Key Manager Type", "Admin.KeyManager.label.ConsumerKey.Claim": "Consumer Key Claim URI", "Admin.KeyManager.label.DisplayName": "Display Name", @@ -141,6 +142,8 @@ "AdminPages.KeyManager.Delete.form.delete.confirmation.message": "Are you sure you want to delete this 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", + "AdminPages.KeyManagers.Usages.dialog.title": "Key Manager Usages -", "AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.displayName.empty": "Display Name is Empty", "AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.vhost.duplicate": "VHosts are duplicated", "AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.vhost.empty": "VHost is empty", @@ -244,7 +247,9 @@ "Dashboard.apiCategories.apiCategoriesListing.no.description": "No description available", "Dashboard.apiCategories.noApiCategories.card.add.new.link.text": "Add new Category", "Dashboard.apiCategories.noApiCategories.card.description": "API categories allow API providers to categorize APIs that have similar attributes. When a categorized API gets published to the Developer Portal, its categories appear as clickable links to the API consumers. The API consumers can use the available API categories to quickly jump to a category of interest. {learnMoreLink}", + "Dashboard.apiCategories.noApiCategories.card.document.link.text": "Go to Category Documentation", "Dashboard.apiCategories.noApiCategories.card.title": "API Category based grouping", + "Dashboard.header.title": "Dashboard", "Dashboard.rateLimiting.card.advancedPolicies.description": "Control access per API or API resource using advanced rules", "Dashboard.rateLimiting.card.advancedPolicies.name": "Advanced Policies", "Dashboard.rateLimiting.card.applicationPolicies.description": "Applicable per access token generated for an application", @@ -412,20 +417,28 @@ "KeyManagers.Certificates.paste.label": "Paste the content of the PEM file", "KeyManagers.ListKeyManagerAPIUsages.error": "Unable to get Key Manager API usage details", "KeyManagers.ListKeyManagerApplicationUsages.error": "Unable to get Key Manager application usage details", + "KeyManagers.ListKeyManagerUsages.API.usages.count.multiple": "{count} APIs are using this key manager specifically", + "KeyManagers.ListKeyManagerUsages.API.usages.count.one": "1 API is using this key manager specifically.", + "KeyManagers.ListKeyManagerUsages.Application.usages.count.multiple": "{count} Applications are using this key manager specifically", + "KeyManagers.ListKeyManagerUsages.Application.usages.count.one": "1 Application is using this key manager specifically.", "KeyManagers.ListKeyManagerUsages.empty.content": "There are no Key Manger usages.", "KeyManagers.ListKeyManagerUsages.empty.title": "Key Manager Usages", "KeyManagers.ListKeyManagerUsages.permission.denied.content": "You dont have enough permission to view Key Manager Usages. Please contact the site administrator.", "KeyManagers.ListKeyManagerUsages.permission.denied.title": "Permission Denied", + "KeyManagers.ListKeyManagerUsages.tab.API.usages": "API Usages", + "KeyManagers.ListKeyManagerUsages.tab.Application.usages": "Application Usages", "KeyManagers.ListKeyManagers.List.title": "Key Managers", "KeyManagers.ListKeyManagers.addButtonProps.triggerButtonText": "Add Key Manager", "KeyManagers.ListKeyManagers.addGlobalKeyManager": "Add Global Key Manager", "KeyManagers.ListKeyManagers.edit.success": "Key Manager updated successfully.", "KeyManagers.ListKeyManagers.empty.title": "Key Managers", + "KeyManagers.ListKeyManagers.table.global.delete.tooltip": "Global Key Manager only can be deleted by the super admin user", "KeyManagers.ListKeyManagers.table.header.label.description": "Description", "KeyManagers.ListKeyManagers.table.header.label.name": "Name", "KeyManagers.ListKeyManagers.table.header.label.provider": "Provider", "KeyManagers.ListKeyManagers.table.header.label.tokenType": "Type", "KeyManagers.ListKeyManagers.table.header.label.usage": "Usage", + "KeyManagers.ListKeyManagers.table.is.used.delete.tooltip": "Key manager is used by an API or an Application", "Keymanager.Claim.Action": "Action", "Keymanager.KeyValidation.Action": "Action", "Keymanager.KeyValidation.ClaimKey": "Claim Key", @@ -437,8 +450,10 @@ "LoginDenied.message": "The server could not verify that you are authorized to access the requested resource.", "LoginDenied.retry": "Retry", "LoginDenied.title": "Error 403 : Forbidden", + "Mui.data.table.filter.icon.label": "Filter Table", "Mui.data.table.pagination.display.rows": "of", "Mui.data.table.pagination.rows.per.page": "Rows per page:", + "Mui.data.table.search.icon.label": "Search", "Mui.data.table.search.no.records.found": "Sorry, no matching records found", "PERMISSION_TREE.apim.admin": "Manage all admin operations", "PERMISSION_TREE.apim.admin_alert_manage": "Manage admin alerts", @@ -642,11 +657,13 @@ "Throttling.Advanced.ConditionalGroup.alert.title": "Warning", "Throttling.Advanced.ConditionalGroup.condition.policies": "Condition Policies", "Throttling.Advanced.ConditionalGroup.execution.policy": "Execution Policy", + "Throttling.Advanced.ConditionalGroup.expand.label": "Expand to edit", "Throttling.Advanced.ConditionalGroup.from": "From:", "Throttling.Advanced.ConditionalGroup.header": "Header Condition Policy", "Throttling.Advanced.ConditionalGroup.header.help": "This configuration is used to throttle based on Headers.", "Throttling.Advanced.ConditionalGroup.header.name": "Name", "Throttling.Advanced.ConditionalGroup.header.value": "Value", + "Throttling.Advanced.ConditionalGroup.hide.label": "Hide group", "Throttling.Advanced.ConditionalGroup.invert.condition": "Invert Condition", "Throttling.Advanced.ConditionalGroup.ip": "IP Condition Policy", "Throttling.Advanced.ConditionalGroup.ip.header.name": "IP Condition Type", @@ -850,6 +867,7 @@ "Workflow.APIProductStateChange.List.empty.content.apiProduct.statechange": "There are no pending workflow requests for API Product state change", "Workflow.APIProductStateChange.List.empty.title.apistatechange": "API Product State Change", "Workflow.APIProductStateChange.apicall.has.errors": "Unable to get workflow pending requests for API Product State Change", + "Workflow.APIProductStateChange.title.apistatechange": "API Product State Change - Approval Tasks", "Workflow.APIProductStateChange.updateStatus.has.errors": "Unable to complete API Product state change approve/reject process.", "Workflow.APIRevisionDeployment.List.empty.content.revisiondeployments": "There are no pending workflow requests for revision deployment.", "Workflow.APIRevisionDeployment.List.empty.title.revisiondeployments": "Revision Deployment", @@ -880,6 +898,7 @@ "Workflow.APIStateChange.table.header.CurrentState": "Current State", "Workflow.APIStateChange.table.header.Description": "Description", "Workflow.APIStateChange.table.header.RequestState": "Request State", + "Workflow.APIStateChange.title.apistatechange": "API State Change - Approval Tasks", "Workflow.APIStateChange.update.success": "Workflow status is updated successfully.", "Workflow.APIStateChange.updateStatus.has.errors": "Unable to complete API state change approve/reject process.", "Workflow.APIStatechange.help.link.one": "Create a API State change approval workflow request", @@ -1017,4 +1036,4 @@ "error.list.404.description": "The page you are looking for might have been removed, had its name changed or is temporarily unavailable.", "error.list.500": "500 : The page cannot be displayed.", "error.list.500.description": "The server encountered an internal error or misconfiguration and was unable to complete your request." -} +} \ No newline at end of file diff --git a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/HelpBase.jsx b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/HelpBase.jsx index 93e9e2923f0..8ca8286dc71 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/HelpBase.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/HelpBase.jsx @@ -22,7 +22,7 @@ import Popover from '@mui/material/Popover'; import HelpIcon from '@mui/icons-material/Help'; import Tooltip from '@mui/material/Tooltip'; import IconButton from '@mui/material/IconButton'; - +import { useIntl } from 'react-intl'; /** * Render base for help links on top right corner of the page. * @returns {JSX} Header AppBar components. @@ -37,13 +37,13 @@ function HelpBase({ children }) { const handleClose = () => { setAnchorEl(null); }; - + const intl = useIntl(); const open = Boolean(anchorEl); const id = open ? 'simple-popover' : undefined; return (
- + diff --git a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/APICategoriesCard.jsx b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/APICategoriesCard.jsx index 34002635586..31b43cc6ef1 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/APICategoriesCard.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/APICategoriesCard.jsx @@ -82,7 +82,10 @@ export default function APICategoriesCard() { + 'customize-api-listing/categorizing-and-grouping-apis/' + 'api-category-based-grouping'} > - Go to Category Documentation + , }} diff --git a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/Dashboard.jsx b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/Dashboard.jsx index e1868bef5de..35e3bf456a0 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/Dashboard.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/AdminPages/Dashboard/Dashboard.jsx @@ -23,18 +23,26 @@ import APICategoriesCard from 'AppComponents/AdminPages/Dashboard/APICategoriesC import RateLimitingCard from 'AppComponents/AdminPages/Dashboard/RateLimitingCard'; import TasksWorkflowCard from 'AppComponents/AdminPages/Dashboard/TasksWorkflowCard'; import { useAppContext } from 'AppComponents/Shared/AppContext'; - +import { useIntl } from 'react-intl'; /** * Render progress inside a container centering in the container. * @returns {JSX} Loading animation. */ export default function Dashboard() { const { user: { _scopes } } = useAppContext(); + const intl = useIntl(); const hasWorkflowViewPermission = _scopes.includes('apim:api_workflow_view'); const hasPolicyViewPermission = _scopes.includes('apim:admin_tier_view'); const hasAPICategoryViewPermission = _scopes.includes('apim:api_category'); return ( - + {hasPolicyViewPermission && ( diff --git a/portals/admin/src/main/webapp/source/src/app/components/Base/Header/Breadcrumbs.jsx b/portals/admin/src/main/webapp/source/src/app/components/Base/Header/Breadcrumbs.jsx index 1f89cd9d8f2..140841bee41 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/Base/Header/Breadcrumbs.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/Base/Header/Breadcrumbs.jsx @@ -38,19 +38,31 @@ function getPageDetails(routeMenuMapping, currentPath, pageDetails = []) { if (typeof routeDetail.children !== 'undefined') { const result = getPageDetails(routeDetail.children, currentPath, pageDetails); if (result !== '') { - result.unshift({ id: routeDetail.id, path: routeDetail.path }); + result.unshift({ + id: routeDetail.id, + displayText: routeDetail.displayText, + path: routeDetail.path, + }); return result; } } else if (typeof routeDetail.addEditPageDetails !== 'undefined') { const result = getPageDetails(routeDetail.addEditPageDetails, currentPath, pageDetails); if (result !== '') { - result.unshift({ id: routeDetail.id, path: routeDetail.path }); + result.unshift({ + id: routeDetail.id, + displayText: routeDetail.displayText, + path: routeDetail.path, + }); return result; } } if (routeDetail.path && currentPath.match(routeDetail.path)) { - return [{ id: routeDetail.id, path: currentPath }]; + return [{ + id: routeDetail.id, + displayText: routeDetail.displayText, + path: currentPath, + }]; } } } @@ -79,12 +91,12 @@ function Breadcrumbs(props) { key={page.id} underline='hover' > - {page.id} + {page.displayText} , ); } else { breadcrumbElements.push( - {page.id}, + {page.displayText}, ); } }); diff --git a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagerUsages.jsx b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagerUsages.jsx index dff02008050..243bc1c03e9 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagerUsages.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagerUsages.jsx @@ -266,6 +266,34 @@ function ListKeyManagerUsages(props) { viewColumns: false, customToolbar: false, responsive: 'stacked', + textLabels: { + toolbar: { + search: intl.formatMessage({ + id: 'Mui.data.table.search.icon.label', + defaultMessage: 'Search', + }), + filterTable: intl.formatMessage({ + id: 'Mui.data.table.filter.icon.label', + defaultMessage: 'Filter Table', + }), + }, + body: { + noMatch: intl.formatMessage({ + id: 'Mui.data.table.search.no.records.found', + defaultMessage: 'Sorry, no matching records found', + }), + }, + pagination: { + rowsPerPage: intl.formatMessage({ + id: 'Mui.data.table.pagination.rows.per.page', + defaultMessage: 'Rows per page:', + }), + displayRows: intl.formatMessage({ + id: 'Mui.data.table.pagination.display.rows', + defaultMessage: 'of', + }), + }, + }, }; if (data && data.length === 0) { return ( @@ -339,8 +367,22 @@ function ListKeyManagerUsages(props) { - - + + @@ -359,9 +401,19 @@ function ListKeyManagerUsages(props) { {data.apiCount === 1 - ? '1 API is using this key manager specifically.' - : data.apiCount - + ' APIs are using this key manager specifically.'} + ? intl.formatMessage({ + id: 'KeyManagers.ListKeyManagerUsages.API.usages' + + '.count.one', + defaultMessage: '1 API is using this key manager' + + ' specifically.', + }) + : intl.formatMessage({ + id: 'KeyManagers.ListKeyManagerUsages.API.usages' + + '.count.multiple', + defaultMessage: '{count} APIs are using this key' + + ' manager specifically', + }, + { count: data.apiCount })} @@ -419,10 +471,20 @@ function ListKeyManagerUsages(props) { - {appData.applicationCount === 1 ? '1 Application is using this ' - + 'key manager specifically.' - : appData.applicationCount + ' Applications are using this ' - + 'key manager specifically.'} + {appData.applicationCount === 1 + ? intl.formatMessage({ + id: 'KeyManagers.ListKeyManagerUsages.Application' + + '.usages.count.one', + defaultMessage: '1 Application is using this key ' + + 'manager specifically.', + }) + : intl.formatMessage({ + id: 'KeyManagers.ListKeyManagerUsages.Application' + + '.usages.count.multiple', + defaultMessage: '{count} Applications are using this' + + ' key manager specifically', + }, + { count: appData.applicationCount })} diff --git a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx index 9bfdb5eb672..dc22bffb9c5 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/KeyManagers/ListKeyManagers.jsx @@ -379,9 +379,15 @@ export default function ListKeyManagers() { const artifactId = tableMeta.rowData[6]; let tooltipTitle = ''; if (dataRow.isGlobal && !isSuperAdmin) { - tooltipTitle = 'Global Key Manager only can be deleted by the super admin user'; + tooltipTitle = intl.formatMessage({ + id: 'KeyManagers.ListKeyManagers.table.global.delete.tooltip', + defaultMessage: 'Global Key Manager only can be deleted by the super admin user', + }); } else if (dataRow.isUsed) { - tooltipTitle = 'Key manager is used by an API or an Application'; + tooltipTitle = intl.formatMessage({ + id: 'KeyManagers.ListKeyManagers.table.is.used.delete.tooltip', + defaultMessage: 'Key manager is used by an API or an Application', + }); } return (
@@ -415,9 +421,15 @@ export default function ListKeyManagers() { } let tooltipTitle = ''; if (dataRow.isGlobal && !isSuperAdmin) { - tooltipTitle = 'Global Key Manager only can be deleted by the super admin user'; + tooltipTitle = intl.formatMessage({ + id: 'KeyManagers.ListKeyManagers.table.global.delete.tooltip', + defaultMessage: 'Global Key Manager only can be deleted by the super admin user', + }); } else if (dataRow.isUsed) { - tooltipTitle = 'Key manager is used by an API or an Application'; + tooltipTitle = intl.formatMessage({ + id: 'KeyManagers.ListKeyManagers.table.is.used.delete.tooltip', + defaultMessage: 'Key manager is used by an API or an Application', + }); } return (
@@ -748,7 +760,10 @@ export default function ListKeyManagers() { fullWidth > - Key Manager Usages - + {' '} {selectedKMName} @@ -756,7 +771,12 @@ export default function ListKeyManagers() { - +
diff --git a/portals/admin/src/main/webapp/source/src/app/components/Throttling/Advanced/ConditionalGroup.jsx b/portals/admin/src/main/webapp/source/src/app/components/Throttling/Advanced/ConditionalGroup.jsx index e2745d5fc28..aade1fad944 100755 --- a/portals/admin/src/main/webapp/source/src/app/components/Throttling/Advanced/ConditionalGroup.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/Throttling/Advanced/ConditionalGroup.jsx @@ -383,12 +383,18 @@ function ConditionalGroup(props) {
{!expanded && ( - Expand to edit + )} {expanded && ( - Hide group + )} diff --git a/portals/admin/src/main/webapp/source/src/app/components/Workflow/APIStateChange.jsx b/portals/admin/src/main/webapp/source/src/app/components/Workflow/APIStateChange.jsx index ad539b1fa02..c5fbb852c1e 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/Workflow/APIStateChange.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/Workflow/APIStateChange.jsx @@ -213,15 +213,13 @@ function ListLabels(props) { ), pageStyle: 'half', - title: intl.formatMessage( - isAPIProduct ? { - id: 'Workflow.APIProductStateChange.title.apistatechange', - defaultMessage: 'API Product State Change - Approval Tasks', - } : { - id: 'Workflow.APIStateChange.title.apistatechange', - defaultMessage: 'API State Change - Approval Tasks', - }, - ), + title: isAPIProduct ? intl.formatMessage({ + id: 'Workflow.APIProductStateChange.title.apistatechange', + defaultMessage: 'API Product State Change - Approval Tasks', + }) : intl.formatMessage({ + id: 'Workflow.APIStateChange.title.apistatechange', + defaultMessage: 'API State Change - Approval Tasks', + }), }; const [searchText, setSearchText] = useState(''); From 527d12a86ac77d76eeee30c12967b71c078176e1 Mon Sep 17 00:00:00 2001 From: Nisan Abeywickrama <29643986+nisan-abeywickrama@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:44:55 +0530 Subject: [PATCH 09/10] Fix incorrect default prop in NavigatorChildren --- .../webapp/source/src/app/components/Base/NavigatorChildren.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portals/admin/src/main/webapp/source/src/app/components/Base/NavigatorChildren.jsx b/portals/admin/src/main/webapp/source/src/app/components/Base/NavigatorChildren.jsx index 55272d80d5a..be75ba44a0a 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/Base/NavigatorChildren.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/Base/NavigatorChildren.jsx @@ -101,7 +101,7 @@ Navigator.NavigatorChildren = { classes: PropTypes.shape({}).isRequired, navChildren: PropTypes.arrayOf(JSON).isRequired, navId: PropTypes.number.isRequired, - displayText: PropTypes.string.isRequired, + navText: PropTypes.string.isRequired, }; export default NavigatorChildren; 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 10/10] 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={{