From 2dae60292eed867b64363d2143126fd8eef58a86 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 23:29:50 +0100 Subject: [PATCH] Fix typos/naming (#4242) * fix usage of InvenTree name * small typo fix * rename notification plugin all builtins should be named inventree... --- .devcontainer/devcontainer.json | 2 +- .devcontainer/postCreateCommand.sh | 2 +- .github/actions/migration/action.yaml | 2 +- .github/actions/setup/action.yaml | 2 +- InvenTree/part/models.py | 2 +- InvenTree/plugin/builtin/barcodes/inventree_barcode.py | 2 +- .../plugin/builtin/integration/core_notifications.py | 6 +++--- .../plugin/builtin/integration/test_core_notifications.py | 8 ++++---- .../report/inventree_bill_of_materials_report.html | 2 +- RELEASE.md | 4 ++-- contrib/packager.io/functions.sh | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 85d3640bcc..65f10ec5eb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -64,7 +64,7 @@ }, "remoteEnv": { - // Inventree config + // InvenTree config "INVENTREE_DEBUG": "True", "INVENTREE_DEBUG_LEVEL": "INFO", "INVENTREE_DB_ENGINE": "sqlite3", diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 30e506383e..6eb2b5861e 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -8,7 +8,7 @@ cd /workspaces/InvenTree python3 -m venv dev/venv . dev/venv/bin/activate -# setup inventree server +# setup InvenTree server pip install invoke inv update inv setup-dev diff --git a/.github/actions/migration/action.yaml b/.github/actions/migration/action.yaml index 3270a9e55b..be2baf28c4 100644 --- a/.github/actions/migration/action.yaml +++ b/.github/actions/migration/action.yaml @@ -1,6 +1,6 @@ name: 'Migration test' description: 'Run migration test sequenze' -author: 'inventree' +author: 'InvenTree' runs: using: 'composite' diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 339fb9399c..4970841c60 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -1,6 +1,6 @@ name: 'Setup Enviroment' description: 'Setup the enviroment for general InvenTree tests' -author: 'inventree' +author: 'InvenTree' inputs: python: required: false diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 569e502f18..448f084175 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -692,7 +692,7 @@ class Part(InvenTreeBarcodeMixin, MetadataMixin, MPTTModel): @property def full_name(self): - """Format a 'full name' for this Part based on the format PART_NAME_FORMAT defined in Inventree settings. + """Format a 'full name' for this Part based on the format PART_NAME_FORMAT defined in InvenTree settings. As a failsafe option, the following is done: diff --git a/InvenTree/plugin/builtin/barcodes/inventree_barcode.py b/InvenTree/plugin/builtin/barcodes/inventree_barcode.py index ab0b302afc..4e6a6fae50 100644 --- a/InvenTree/plugin/builtin/barcodes/inventree_barcode.py +++ b/InvenTree/plugin/builtin/barcodes/inventree_barcode.py @@ -23,7 +23,7 @@ class InvenTreeInternalBarcodePlugin(BarcodeMixin, InvenTreePlugin): """Builtin BarcodePlugin for matching and generating internal barcodes.""" NAME = "InvenTreeBarcode" - TITLE = _("Inventree Barcodes") + TITLE = _("InvenTree Barcodes") DESCRIPTION = _("Provides native support for barcodes") VERSION = "2.0.0" AUTHOR = _("InvenTree contributors") diff --git a/InvenTree/plugin/builtin/integration/core_notifications.py b/InvenTree/plugin/builtin/integration/core_notifications.py index 9d57208875..c178e8960e 100644 --- a/InvenTree/plugin/builtin/integration/core_notifications.py +++ b/InvenTree/plugin/builtin/integration/core_notifications.py @@ -22,13 +22,13 @@ class PlgMixin: def get_plugin(self): """Return plugin reference.""" - return CoreNotificationsPlugin + return InvenTreeCoreNotificationsPlugin -class CoreNotificationsPlugin(SettingsContentMixin, SettingsMixin, InvenTreePlugin): +class InvenTreeCoreNotificationsPlugin(SettingsContentMixin, SettingsMixin, InvenTreePlugin): """Core notification methods for InvenTree.""" - NAME = "CoreNotificationsPlugin" + NAME = "InvenTreeCoreNotificationsPlugin" TITLE = _("InvenTree Notifications") AUTHOR = _('InvenTree contributors') DESCRIPTION = _('Integrated outgoing notificaton methods') diff --git a/InvenTree/plugin/builtin/integration/test_core_notifications.py b/InvenTree/plugin/builtin/integration/test_core_notifications.py index 88c166bf78..60ed1d6d35 100644 --- a/InvenTree/plugin/builtin/integration/test_core_notifications.py +++ b/InvenTree/plugin/builtin/integration/test_core_notifications.py @@ -5,7 +5,7 @@ from django.core import mail from part.test_part import BaseNotificationIntegrationTest from plugin import registry from plugin.builtin.integration.core_notifications import \ - CoreNotificationsPlugin + InvenTreeCoreNotificationsPlugin from plugin.models import NotificationUserSetting @@ -18,18 +18,18 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest): self.assertEqual(len(mail.outbox), 0) # enable plugin and set mail setting to true - plugin = registry.plugins.get('corenotificationsplugin') + plugin = registry.plugins.get('inventreecorenotificationsplugin') plugin.set_setting('ENABLE_NOTIFICATION_EMAILS', True) NotificationUserSetting.set_setting( key='NOTIFICATION_METHOD_MAIL', value=True, change_user=self.user, user=self.user, - method=CoreNotificationsPlugin.EmailNotification.METHOD_NAME + method=InvenTreeCoreNotificationsPlugin.EmailNotification.METHOD_NAME ) # run through - self._notification_run(CoreNotificationsPlugin.EmailNotification) + self._notification_run(InvenTreeCoreNotificationsPlugin.EmailNotification) # Now one mail should be send self.assertEqual(len(mail.outbox), 1) diff --git a/InvenTree/report/templates/report/inventree_bill_of_materials_report.html b/InvenTree/report/templates/report/inventree_bill_of_materials_report.html index 7ed000cf18..dd1461fda7 100644 --- a/InvenTree/report/templates/report/inventree_bill_of_materials_report.html +++ b/InvenTree/report/templates/report/inventree_bill_of_materials_report.html @@ -94,7 +94,7 @@ table td.expand { {% block header_content %} - +

{% trans "Bill of Materials" %}

diff --git a/RELEASE.md b/RELEASE.md index 7d6d0fba23..180b8c4ade 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,11 +16,11 @@ Merge the crowdin translation updates into master branch ### Documentation Release -Create new release for the [inventree documentation](https://github.com/inventree/inventree-docs) +Create new release for the [InvenTree documentation](https://github.com/inventree/inventree-docs) ### Python Library Release -Create new release for the [inventree python library](https://github.com/inventree/inventree-python) +Create new release for the [InvenTree python library](https://github.com/inventree/inventree-python) ## App Release diff --git a/contrib/packager.io/functions.sh b/contrib/packager.io/functions.sh index d15871af95..7d42dadf66 100755 --- a/contrib/packager.io/functions.sh +++ b/contrib/packager.io/functions.sh @@ -191,7 +191,7 @@ function create_initscripts() { ${INIT_CMD} start nginx echo "# (Re)creating init scripts" - # This reset scale parameters to a known state + # This resets scale parameters to a known state inventree scale web="1" worker="1" echo "# Enabling InvenTree on boot"