Skip to content

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

Rename product class to product type in UI

Krzysztof Wolski7189c83395d9
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.py
index 059b8cd3ee..a44907b384 100644
--- a/saleor/dashboard/product/forms.py
+++ b/saleor/dashboard/product/forms.py
@@ -25,7 +25,7 @@ class ProductClassSelectorForm(forms.Form):
else:
widget = forms.RadioSelect
self.fields['product_cls'] = forms.ChoiceField(
- label=pgettext_lazy('Product class form label', 'Product class'),
+ label=pgettext_lazy('Product class form label', 'Product type'),
choices=choices, widget=widget)
@@ -84,7 +84,7 @@ class ProductClassForm(forms.ModelForm):
if query.exists():
msg = pgettext_lazy(
'Product Class Errors',
- 'Some products based on this class have more than '
+ 'Some products based on this type have more than '
'one variant.')
self.add_error('has_variants', msg)
return data
diff --git a/saleor/dashboard/product/views.py b/saleor/dashboard/product/views.py
index bd7dc10c7c..4c61ba74a4 100644
--- a/saleor/dashboard/product/views.py
+++ b/saleor/dashboard/product/views.py
@@ -39,7 +39,7 @@ def product_class_create(request):
instance=product_class)
if form.is_valid():
product_class = form.save()
- msg = _('Added product class %s') % product_class
+ msg = _('Added product type %s') % product_class
messages.success(request, msg)
return redirect('dashboard:product-class-list')
ctx = {'form': form, 'product_class': product_class}
@@ -55,7 +55,7 @@ def product_class_edit(request, pk):
instance=product_class)
if form.is_valid():
product_class = form.save()
- msg = _('Updated product class %s') % product_class
+ msg = _('Updated product type %s') % product_class
messages.success(request, msg)
return redirect('dashboard:product-class-update', pk=pk)
ctx = {'form': form, 'product_class': product_class}
@@ -70,7 +70,7 @@ def product_class_delete(request, pk):
if request.method == 'POST':
product_class.delete()
messages.success(request,
- _('Deleted product class %s') % product_class)
+ _('Deleted product type %s') % product_class)
return redirect('dashboard:product-class-list')
return TemplateResponse(
request,
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 619ca6ec05..08c426d9c4 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -58,11 +58,11 @@
<li class="side-nav-section">
<p>{% trans "Configuration" %}</p>
<ul>
- <li class="{% block menu_product_classes_class %}{% endblock %}"><a href="{% url 'dashboard:product-class-list' %}">{% trans "Product classes" %}</a></li>
+ <li class="{% block menu_product_classes_class %}{% endblock %}"><a href="{% url 'dashboard:product-class-list' %}">{% trans "Product types" %}</a></li>
<li class="{% block menu_attributes_class %}{% endblock %}"><a href="{% url 'dashboard:product-attributes' %}">{% trans "Attributes" %}</a></li>
<li class="{% block menu_delivery_class %}{% endblock %}"><a href="{% url 'dashboard:shipping-methods' %}">{% trans "Shipping methods" %}</a></li>
</ul>
- </li>
+ </li>
</ul>
<ul>
<li class="menu-toggle">
diff --git a/templates/dashboard/product/class_list.html b/templates/dashboard/product/class_list.html
index 38bd8ee495..5df82f9033 100644
--- a/templates/dashboard/product/class_list.html
+++ b/templates/dashboard/product/class_list.html
@@ -4,7 +4,7 @@
{% load materializecss %}
{% load staticfiles %}
-{% block title %}{% trans "Product classes" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Product types" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-products{% endblock %}
@@ -13,7 +13,7 @@
{% block header_extra %}
<div class="fixed-action-btn">
- <a class="btn-fab btn-floating btn-large waves-effect waves-light teal" title="{% trans "Add product class" %}"
+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal" title="{% trans "Add product type" %}"
href="{% url 'dashboard:product-class-add' %}">
<i class="material-icons">add</i>
</a>
@@ -22,7 +22,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Product classes" %}</li>
+ <li>{% trans "Product types" %}</li>
</ul>
{% endblock %}
@@ -48,7 +48,7 @@
</ul>
{% include "dashboard/includes/_pagination.html" with page_obj=product_classes %}
{% else %}
- <p>{% trans "No product classes found." %}</p>
+ <p>{% trans "No product types found." %}</p>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.html
index af4e492b2d..0d204cbe4e 100644
--- a/templates/dashboard/product/list.html
+++ b/templates/dashboard/product/list.html
@@ -52,7 +52,7 @@
{% else %}
<p>{% trans "No products found." %}</p>
{% if not product_classes %}
- <p>{% trans "Create product class first." %}</p>
+ <p>{% trans "Create product type first." %}</p>
{% endif %}
{% endif %}
</div>
diff --git a/templates/dashboard/product/modal_product_class_confirm_delete.html b/templates/dashboard/product/modal_product_class_confirm_delete.html
index b857b8f761..8262a439d3 100644
--- a/templates/dashboard/product/modal_product_class_confirm_delete.html
+++ b/templates/dashboard/product/modal_product_class_confirm_delete.html
@@ -14,7 +14,7 @@
<div class="row">
<div class="col s12 center-align">
<p>
- {% blocktrans %}This class is base for created products. Cannot remove it.{% endblocktrans %}
+ {% blocktrans %}This type is base for created products. Cannot remove it.{% endblocktrans %}
</p>
</div>
</div>
@@ -33,7 +33,7 @@
</div>
</div>
<p>
- {% blocktrans %}If you remove <strong>{{ product_class }}</strong> you will lose all data related to this product class.{% endblocktrans %}
+ {% blocktrans %}If you remove <strong>{{ product_class }}</strong> you will lose all data related to this product type.{% endblocktrans %}
</p>
</div>
diff --git a/templates/dashboard/product/product_class_form.html b/templates/dashboard/product/product_class_form.html
index ff19f4f144..83e40ef034 100644
--- a/templates/dashboard/product/product_class_form.html
+++ b/templates/dashboard/product/product_class_form.html
@@ -5,7 +5,7 @@
{% load static %}
{% load attributes %}
-{% block title %}{% if product_class.pk %}{{ product_class }}{% else %}{% trans 'Add new product class' %}{% endif %} - {% trans "Products" %} - {{ block.super }}{% endblock %}
+{% block title %}{% if product_class.pk %}{{ product_class }}{% else %}{% trans 'Add new product type' %}{% endif %} - {% trans "Products" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-products{% endblock %}
@@ -18,9 +18,9 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url "dashboard:product-class-list" %}" class="breadcrumb">{% trans "Product classes" %}</a></li>
+ <li><a href="{% url "dashboard:product-class-list" %}" class="breadcrumb">{% trans "Product types" %}</a></li>
<li class="back-mobile"><a href="{% url "dashboard:product-class-list" %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% if product_class.pk %}{{ product_class }}{% else %}{% trans 'Add new product class' %}{% endif %}</span></li>
+ <li><span class="breadcrumbs--ellipsed-item">{% if product_class.pk %}{{ product_class }}{% else %}{% trans 'Add new product type' %}{% endif %}</span></li>
</ul>
{% endblock %}
@@ -34,7 +34,7 @@
<li>
<a href="#base-modal" data-href="{% url 'dashboard:product-class-delete' pk=product_class.pk %}"
class="modal-trigger-custom">
- {% trans "Remove product class" %}
+ {% trans "Remove product type" %}
</a>
</li>
</ul>