From fe161e34b5df48f17f9ffc8c11bb553bb37b8da8 Mon Sep 17 00:00:00 2001 From: Adrien L Date: Mon, 16 Jun 2025 09:39:22 +0200 Subject: [PATCH] fix: display name of upload plugin in roles settings (#23739) --- .../Settings/pages/Roles/components/PluginsAndSettings.tsx | 4 +++- .../users-permissions/admin/src/utils/formatPluginName.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/admin/admin/src/pages/Settings/pages/Roles/components/PluginsAndSettings.tsx b/packages/core/admin/admin/src/pages/Settings/pages/Roles/components/PluginsAndSettings.tsx index 64a3314df9..259c1a2859 100644 --- a/packages/core/admin/admin/src/pages/Settings/pages/Roles/components/PluginsAndSettings.tsx +++ b/packages/core/admin/admin/src/pages/Settings/pages/Roles/components/PluginsAndSettings.tsx @@ -91,6 +91,8 @@ const Row = ({ const { formatMessage } = useIntl(); const categoryName = name.split('::').pop() ?? ''; + const categoryDisplayName = + categoryName === 'upload' ? 'Media Library' : capitalise(categoryName.replace(/-/g, ' ')); return ( @@ -102,7 +104,7 @@ const Row = ({ { category: categoryName } )} ${kind === 'plugins' ? 'plugin' : kind}`} > - {capitalise(categoryName)} + {categoryDisplayName} diff --git a/packages/plugins/users-permissions/admin/src/utils/formatPluginName.js b/packages/plugins/users-permissions/admin/src/utils/formatPluginName.js index 4dc7814892..ed45285ba8 100644 --- a/packages/plugins/users-permissions/admin/src/utils/formatPluginName.js +++ b/packages/plugins/users-permissions/admin/src/utils/formatPluginName.js @@ -15,7 +15,7 @@ function formatPluginName(pluginSlug) { case 'plugin::i18n': return 'i18n'; case 'plugin::upload': - return 'Upload'; + return 'Media Library'; case 'plugin::users-permissions': return 'Users-permissions'; default: