Skip to content

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

Add choices to ConfigurationTypeField

Maciej Korycinski5854ef238ec2
diff --git a/saleor/extensions/__init__.py b/saleor/extensions/__init__.py
index 4dbad62922..d01bc94286 100644
--- a/saleor/extensions/__init__.py
+++ b/saleor/extensions/__init__.py
@@ -1,6 +1,8 @@
import importlib
from typing import List
+from django.utils.translation import pgettext_lazy
+
from .checks import check_extensions # NOQA: F401
@@ -22,3 +24,15 @@ def discover_plugins_modules(plugins: List[str]):
class ConfigurationTypeField:
STRING = "String"
BOOLEAN = "Boolean"
+ CHOICES = [
+ (
+ STRING,
+ pgettext_lazy("Configuration field is a String type", "Field is a String"),
+ ),
+ (
+ BOOLEAN,
+ pgettext_lazy(
+ "Configuration field is a Boolean type", "Field is a Boolean"
+ ),
+ ),
+ ]