Skip to content

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

Update tranlations context

Anna Siwikf55fd79fb5ed
diff --git a/saleor/dashboard/product/filters.py b/saleor/dashboard/product/filters.py
index 4f4609929b..bb92e6a5ee 100644
--- a/saleor/dashboard/product/filters.py
+++ b/saleor/dashboard/product/filters.py
@@ -104,7 +104,7 @@ class ProductTypeFilter(SortedFilterSet):
label=pgettext_lazy('Product type list filter label', 'Name'),
lookup_expr='icontains')
sort_by = OrderingFilter(
- label=pgettext_lazy('Product class list filter label', 'Sort by'),
+ label=pgettext_lazy('Product type list filter label', 'Sort by'),
fields=PRODUCT_TYPE_SORT_BY_FIELDS.keys(),
field_labels=PRODUCT_TYPE_SORT_BY_FIELDS)
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.py
index 4277417de2..9d37806cb4 100644
--- a/saleor/dashboard/product/forms.py
+++ b/saleor/dashboard/product/forms.py
@@ -20,7 +20,7 @@ class ProductTypeSelectorForm(forms.Form):
"""
product_type = forms.ModelChoiceField(
queryset=ProductType.objects.all(),
- label=pgettext_lazy('Product class form label', 'Product type'),
+ label=pgettext_lazy('Product type form label', 'Product type'),
widget=forms.RadioSelect, empty_label=None)
@@ -85,12 +85,12 @@ class ProductTypeForm(forms.ModelForm):
variant_attr = set(self.cleaned_data['variant_attributes'])
if not has_variants and len(variant_attr) > 0:
msg = pgettext_lazy(
- 'Product class form error',
+ 'Product type form error',
'Product variants are disabled.')
self.add_error('variant_attributes', msg)
if len(product_attr & variant_attr) > 0:
msg = pgettext_lazy(
- 'Product class form error',
+ 'Product type form error',
'A single attribute can\'t belong to both a product '
'and its variant.')
self.add_error('variant_attributes', msg)
@@ -104,7 +104,7 @@ class ProductTypeForm(forms.ModelForm):
query = query.filter(variants_counter__gt=1)
if query.exists():
msg = pgettext_lazy(
- 'Product class form error',
+ 'Product type form error',
'Some products of this type have more than '
'one variant.')
self.add_error('has_variants', msg)
diff --git a/saleor/product/utils.py b/saleor/product/utils.py
index 7188f7e5f1..4416c68bde 100644
--- a/saleor/product/utils.py
+++ b/saleor/product/utils.py
@@ -284,7 +284,7 @@ def get_product_availability_status(product):
return ProductAvailabilityStatus.NOT_PUBLISHED
elif requires_variants and not product.variants.exists():
# We check the requires_variants flag here in order to not show this
- # status with product classes that don't require variants, as in that
+ # status with product types that don't require variants, as in that
# case variants are hidden from the UI and user doesn't manage them.
return ProductAvailabilityStatus.VARIANTS_MISSSING
elif not has_stock_records:
diff --git a/templates/dashboard/product/modal/select_type.html b/templates/dashboard/product/modal/select_type.html
index 5df75ea1c2..29938e27bb 100644
--- a/templates/dashboard/product/modal/select_type.html
+++ b/templates/dashboard/product/modal/select_type.html
@@ -8,7 +8,7 @@
{% endblock %}
{% block title %}
- {% trans "Product type" context "Modal select product classes title" %}
+ {% trans "Product type" context "Modal select product types title" %}
{% endblock %}
{% block content %}
diff --git a/templates/dashboard/product/product_type/form.html b/templates/dashboard/product/product_type/form.html
index 97cef8c145..3bb5b075df 100644
--- a/templates/dashboard/product/product_type/form.html
+++ b/templates/dashboard/product/product_type/form.html
@@ -8,7 +8,7 @@
{% if product_type.pk %}
{{ product_type }}
{% else %}
- {% trans "Add new product type" context "Product class page title" %}
+ {% trans "Add new product type" context "Product type page title" %}
{% endif %}
- {% trans "Products" context "Dashboard products list" %} - {{ block.super }}
{% endblock %}
@@ -39,7 +39,7 @@
{% if product_type.pk %}
{{ product_type }}
{% else %}
- {% trans 'Add new product type' context "Product class breadcrumbs" %}
+ {% trans 'Add new product type' context "Product type breadcrumbs" %}
{% endif %}
</span>
</li>
@@ -55,7 +55,7 @@
{% if perms.product.edit_properties %}
<li>
<a href="#base-modal" data-href="{% url 'dashboard:product-type-delete' pk=product_type.pk %}" class="modal-trigger-custom">
- {% trans "Remove product type" context "Product class action" %}
+ {% trans "Remove product type" context "Product type action" %}
</a>
</li>
{% endif %}
@@ -117,7 +117,7 @@
<div class="col m12 l3 help-box">
<p class="grey-text">
<svg data-src="{% static "dashboard/images/help.svg" %}" width="18" height="18" />
- {% blocktrans trimmed context "Product class help text" %}
+ {% blocktrans trimmed context "Product type help text" %}
Product Type is a template used for creating new products.
It also controls which attributes can be used during product creation process.
{% endblocktrans %}
diff --git a/templates/dashboard/product/product_type/modal/confirm_delete.html b/templates/dashboard/product/product_type/modal/confirm_delete.html
index 5f842f7d93..1c59f2c904 100644
--- a/templates/dashboard/product/product_type/modal/confirm_delete.html
+++ b/templates/dashboard/product/product_type/modal/confirm_delete.html
@@ -11,26 +11,26 @@
{% endblock %}
{% block title %}
-{% blocktrans trimmed context "Modal remove product class text" %}
- Remove product class {{ product_type }}
+{% blocktrans trimmed context "Modal remove product type text" %}
+ Remove product type {{ product_type }}
{% endblocktrans %}
{% endblock title %}
{% block content %}
<div class="col s12">
<p>
- {% blocktrans trimmed context "Modal remove product class text" %}
- Are you sure you want to remove product class <strong>{{ product_type }}</strong>?
+ {% blocktrans trimmed context "Modal remove product type text" %}
+ Are you sure you want to remove product type <strong>{{ product_type }}</strong>?
{% endblocktrans %}
</p>
<p>
{% if products %}
- {% blocktrans trimmed context "Modal remove product class text" with product_count=products.count %}
- There are {{ product_count }} products in product class.
+ {% blocktrans trimmed context "Modal remove product type text" with product_count=products.count %}
+ There are {{ product_count }} products in product type.
{% endblocktrans %}
{% else %}
- {% blocktrans trimmed context "Modal remove product class text" %}
- There are no products in this product class.
+ {% blocktrans trimmed context "Modal remove product type text" %}
+ There are no products in this product type.
{% endblocktrans %}
{% endif %}
</p>