Skip to content

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

Add labels to CategoryForm

akjanikedeaace4fd02
diff --git a/saleor/dashboard/category/forms.py b/saleor/dashboard/category/forms.py
index 52b33caa03..4e7ad33e03 100644
--- a/saleor/dashboard/category/forms.py
+++ b/saleor/dashboard/category/forms.py
@@ -19,6 +19,17 @@ class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = ['slug']
+ labels = {
+ 'name': pgettext_lazy(
+ 'Category field',
+ 'Category\'s name'),
+ 'description': pgettext_lazy(
+ 'Category field',
+ 'Category\'s description'),
+ 'is_hidden': pgettext_lazy(
+ 'Category field',
+ 'Hide in navigation')
+ }
def save(self, commit=True):
self.instance.slug = slugify(unidecode(self.instance.name))