27 lines
730 B
JavaScript
Raw Normal View History

2021-09-14 17:37:02 +02:00
import upperFirst from 'lodash/upperFirst';
function formatPluginName(pluginSlug) {
switch (pluginSlug) {
case 'application':
return 'Application';
2021-09-17 14:26:35 +02:00
case 'plugin::content-manager':
2021-09-14 17:37:02 +02:00
return 'Content manager';
2021-09-17 14:26:35 +02:00
case 'plugin::content-type-builder':
2021-09-14 17:37:02 +02:00
return 'Content types builder';
2021-09-17 14:26:35 +02:00
case 'plugin::documentation':
2021-09-14 17:37:02 +02:00
return 'Documentation';
2021-09-17 14:26:35 +02:00
case 'plugin::email':
2021-09-14 17:37:02 +02:00
return 'Email';
2021-09-17 14:26:35 +02:00
case 'plugin::i18n':
2021-09-14 17:37:02 +02:00
return 'i18n';
2021-09-17 14:26:35 +02:00
case 'plugin::upload':
return 'Media Library';
2021-09-17 14:26:35 +02:00
case 'plugin::users-permissions':
2021-09-14 17:37:02 +02:00
return 'Users-permissions';
default:
2021-09-17 14:26:35 +02:00
return upperFirst(pluginSlug.replace('api::', '').replace('plugin::', ''));
2021-09-14 17:37:02 +02:00
}
}
export default formatPluginName;