Skip to content

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

Fix collections and categories i18n

NyanKiyoshifa29f4095ce4
diff --git a/saleor/dashboard/category/forms.py b/saleor/dashboard/category/forms.py
index d7e0785b38..94d238e694 100644
--- a/saleor/dashboard/category/forms.py
+++ b/saleor/dashboard/category/forms.py
@@ -22,7 +22,10 @@ class CategoryForm(forms.ModelForm):
exclude = ['slug']
labels = {
'name': pgettext_lazy('Item name', 'Name'),
- 'description': pgettext_lazy('Description', 'Description')}
+ 'description': pgettext_lazy('Description', 'Description'),
+ 'background_image': pgettext_lazy(
+ 'Category form',
+ 'Background Image')}
def save(self, commit=True):
self.instance.slug = slugify(unidecode(self.instance.name))
diff --git a/saleor/dashboard/collection/forms.py b/saleor/dashboard/collection/forms.py
index 9b7d464e03..b0e88d5920 100644
--- a/saleor/dashboard/collection/forms.py
+++ b/saleor/dashboard/collection/forms.py
@@ -12,14 +12,14 @@ from ..seo.fields import SeoDescriptionField, SeoTitleField
class CollectionForm(forms.ModelForm):
products = AjaxSelect2MultipleChoiceField(
queryset=Product.objects.all(),
- fetch_data_url=reverse_lazy('dashboard:ajax-products'), required=False)
+ fetch_data_url=reverse_lazy('dashboard:ajax-products'), required=False,
+ label=pgettext_lazy('Products selection', 'Products'))
class Meta:
model = Collection
exclude = ['slug']
labels = {
'name': pgettext_lazy('Item name', 'Name'),
- 'products': pgettext_lazy('Products selection', 'Products'),
'background_image': pgettext_lazy(
'Products selection',
'Background Image'),
diff --git a/templates/dashboard/collection/detail.html b/templates/dashboard/collection/detail.html
index bfc18933de..e72553a533 100644
--- a/templates/dashboard/collection/detail.html
+++ b/templates/dashboard/collection/detail.html
@@ -59,7 +59,7 @@
<div class="row">
{{ form.background_image|materializecss }}
</div>
- <span class="card-title">Availability</span>
+ <span class="card-title">{% trans 'Availability' context 'Collection form card title: availability sub form' %}</span>
<div class="row">
{{ form.is_published|materializecss }}
</div>