diff --git a/InvenTree/plugins/integration.py b/InvenTree/plugins/integration.py index 60716773e5..10d8b58d66 100644 --- a/InvenTree/plugins/integration.py +++ b/InvenTree/plugins/integration.py @@ -255,6 +255,14 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): name = self.plugin_name() return slugify(name) + @property + def human_name(self): + """human readable name for labels etc.""" + name = getattr(self, 'PLUGIN_TITLE', None) + if not name: + name = self.plugin_name() + return name + def mixin(self, key): """check if mixin is registered""" return key in self._mixins diff --git a/InvenTree/templates/InvenTree/settings/plugin.html b/InvenTree/templates/InvenTree/settings/plugin.html index 30db6966c8..6cc340f164 100644 --- a/InvenTree/templates/InvenTree/settings/plugin.html +++ b/InvenTree/templates/InvenTree/settings/plugin.html @@ -30,7 +30,7 @@ {% mixin_enabled plugin 'settings' as settings %} - {{plugin_key}} - {{ plugin.plugin_name}} + {{plugin_key}} - {{ plugin.human_name }} {% if urls %} {% trans 'Has urls' %} {% endif %} @@ -42,7 +42,7 @@ {% if mixin_list %} {% for mixin in mixin_list %} - {% blocktrans with name=mixin.human_name%}has {{name}}{% endblocktrans %} + {% blocktrans with name=mixin.human_name %}has {{name}}{% endblocktrans %} {% endfor %} {% endif %} diff --git a/InvenTree/templates/InvenTree/settings/plugin_settings.html b/InvenTree/templates/InvenTree/settings/plugin_settings.html index 2769093365..26c354be62 100644 --- a/InvenTree/templates/InvenTree/settings/plugin_settings.html +++ b/InvenTree/templates/InvenTree/settings/plugin_settings.html @@ -7,7 +7,7 @@ {% block heading %} -{% blocktrans with name=plugin.plugin_name %}Plugin details for {{name}}{% endblocktrans %} +{% blocktrans with name=plugin.human_name %}Plugin details for {{name}}{% endblocktrans %} {% endblock %} {% block content %} diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html index c6ea7e4761..ef3d4066a8 100644 --- a/InvenTree/templates/navbar.html +++ b/InvenTree/templates/navbar.html @@ -65,7 +65,7 @@ {% if navigation %}