Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add help text to avalara plugin and update docs

Maciej Korycinskidb096c974368
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c409c9a00..cdc0c3bb40 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,14 +35,13 @@ All notable, unreleased changes to this project will be documented in this file.
- Display menu item form errors - #4551 by @dominik-zeglen
- Add voucher settings - #4556 by @benekex2
- Enforced pydocstyle for Python docstrings over the project - #4562 by @NyanKiyoshi
-- Add queries and mutation for serving and saving the configuration of all plugins - #4576 by @korycins
-
- The checkout process of digital orders no longer require shipping information over the API - #4573 by @NyanKiyoshi
- Add e2e test config - #4553 by @dominik-zeglen
- Fix MUI warnings - #4588 by @dominik-zeglen
- Disabled unneeded reports from uWSGI about broken pipe and write errors from disconnected clients. Preventing from spamming sentry users. - #4596 by @NyanKiyoshi
- Upgraded to django 2.2.4 - #4603 by @NyanKiyoshi
- Invalid IP address in HTTP requests now fallback to the requester's IP address. - #4597 by @NyanKiyoshi
+- Add queries and mutation for serving and saving the configuration of all plugins - #4576 by @korycins
## 2.8.0
diff --git a/docs/customization/extensions.rst b/docs/customization/extensions.rst
index 9886450b3c..99f1318a82 100644
--- a/docs/customization/extensions.rst
+++ b/docs/customization/extensions.rst
@@ -68,6 +68,7 @@ It requires an expected structure as in the followed example:
.. code-block:: python
+ from django.utils.translation import pgettext_lazy
from saleor.extensions import ConfigurationTypeField
@classmethod
def _get_default_configuration(cls):
@@ -80,15 +81,15 @@ It requires an expected structure as in the followed example:
"name": "Username or account",
"value": "",
"type": ConfigurationTypeField.STRING,
- "help_text": "",
- "label": "",
+ "help_text": "Provide user or account details",
+ "label": pgettext_lazy("Plugin label", "Username or account"),
},
{
"name": "Password or license",
"value": "",
"type": ConfigurationTypeField.STRING,
- "help_text": "",
- "label": "",
+ "help_text": "Provide password or license details",
+ "label": pgettext_lazy("Plugin label", "Password or license"),
},
]
}
diff --git a/saleor/extensions/plugins/avatax/plugin.py b/saleor/extensions/plugins/avatax/plugin.py
index 7742094c81..0e530efc67 100644
--- a/saleor/extensions/plugins/avatax/plugin.py
+++ b/saleor/extensions/plugins/avatax/plugin.py
@@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Union
from urllib.parse import urljoin
from django.conf import settings
+from django.utils.translation import pgettext_lazy
from prices import Money, TaxedMoney, TaxedMoneyRange
from ....core.taxes import TaxError, TaxType, zero_taxed_money
@@ -381,36 +382,40 @@ class AvataxPlugin(BasePlugin):
"name": "Username or account",
"value": "",
"type": ConfigurationTypeField.STRING,
- "help_text": "",
- "label": "",
+ "help_text": "Provide user or account details",
+ "label": pgettext_lazy("Plugin label", "Username or account"),
},
{
"name": "Password or license",
"value": "",
"type": ConfigurationTypeField.STRING,
- "help_text": "",
- "label": "",
+ "help_text": "Provide password or license details",
+ "label": pgettext_lazy("Plugin label", "Password or license"),
},
{
"name": "Use sandbox",
"value": True,
"type": ConfigurationTypeField.BOOLEAN,
- "help_text": "",
- "label": "",
+ "help_text": "Determines if Saleor should use Avatax sandbox API.",
+ "label": pgettext_lazy("Plugin label", "Use sandbox"),
},
{
"name": "Company name",
"value": "DEFAULT",
"type": ConfigurationTypeField.STRING,
- "help_text": "",
- "label": "",
+ "help_text": "Avalara needs to receive company code. Some more "
+ "complicated systems can use more than one company "
+ "code, in that case, this variable should be changed "
+ "based on data from Avalara's admin panel",
+ "label": pgettext_lazy("Plugin label", "Company name"),
},
{
"name": "Autocommit",
"value": False,
"type": ConfigurationTypeField.BOOLEAN,
- "help_text": "",
- "label": "",
+ "help_text": "Determines, if all transactions sent to Avalara "
+ "should be committed by default.",
+ "label": pgettext_lazy("Plugin label", "Autocommit"),
},
],
}