fix: display name of upload plugin in roles settings (#23739)

This commit is contained in:
Adrien L 2025-06-16 09:39:22 +02:00 committed by GitHub
parent 610f71e631
commit fe161e34b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -91,6 +91,8 @@ const Row = ({
const { formatMessage } = useIntl(); const { formatMessage } = useIntl();
const categoryName = name.split('::').pop() ?? ''; const categoryName = name.split('::').pop() ?? '';
const categoryDisplayName =
categoryName === 'upload' ? 'Media Library' : capitalise(categoryName.replace(/-/g, ' '));
return ( return (
<Accordion.Item value={name}> <Accordion.Item value={name}>
@ -102,7 +104,7 @@ const Row = ({
{ category: categoryName } { category: categoryName }
)} ${kind === 'plugins' ? 'plugin' : kind}`} )} ${kind === 'plugins' ? 'plugin' : kind}`}
> >
{capitalise(categoryName)} {categoryDisplayName}
</Accordion.Trigger> </Accordion.Trigger>
</Accordion.Header> </Accordion.Header>
<Accordion.Content> <Accordion.Content>

View File

@ -15,7 +15,7 @@ function formatPluginName(pluginSlug) {
case 'plugin::i18n': case 'plugin::i18n':
return 'i18n'; return 'i18n';
case 'plugin::upload': case 'plugin::upload':
return 'Upload'; return 'Media Library';
case 'plugin::users-permissions': case 'plugin::users-permissions':
return 'Users-permissions'; return 'Users-permissions';
default: default: