diff --git a/InvenTree/part/templates/part/category_delete.html b/InvenTree/part/templates/part/category_delete.html index 1faf104ed1..d93519058e 100644 --- a/InvenTree/part/templates/part/category_delete.html +++ b/InvenTree/part/templates/part/category_delete.html @@ -2,38 +2,31 @@ {% load i18n %} {% block pre_form_content %} -{% trans 'Are you sure you want to delete category' %} {{ category.name }}? + +
+ {% trans "Are you sure you want to delete this part category?" %} +
{% if category.children.all|length > 0 %} -

{% blocktrans with count=category.children.all|length%}This category contains {{count}} child categories{% endblocktrans %}.
-{% trans 'If this category is deleted, these child categories will be moved to the' %} -{% if category.parent %} - {{ category.parent.name }} {% trans 'category' %}. -{% else %} - {% trans 'top level Parts category' %}. -{% endif %} -

- - +
+ {% blocktrans with n=category.children.all|length %}This category contains {{ n }} child categories{% endblocktrans %}.
+ {% if category.parent %} + {% blocktrans with category=category.parent.name %}If this category is deleted, these child categories will be moved to {{ category }}{% endblocktrans %}. + {% else %} + {% trans "If this category is deleted, these child categories will be moved to the top level part category" %}. + {% endif %} +
{% endif %} {% if category.parts.all|length > 0 %} -

{% blocktrans with count=category.parts.all|length %}This category contains {{count}} parts{% endblocktrans %}.
+

+ {% blocktrans with n=category.parts.all|length %}This category contains {{ n }} parts{% endblocktrans %}.
{% if category.parent %} - {% blocktrans with path=category.parent.pathstring %}If this category is deleted, these parts will be moved to the parent category {{path}}{% endblocktrans %} + {% blocktrans with category=category.parent.name %}If this category is deleted, these parts will be moved to {{ category }}{% endblocktrans %}. {% else %} - {% trans 'If this category is deleted, these parts will be moved to the top-level category Teile' %} + {% trans "If this category is deleted, these parts will be moved to the top level part category" %}. {% endif %} -

- +
{% endif %} {% endblock %} \ No newline at end of file diff --git a/InvenTree/stock/templates/stock/location_delete.html b/InvenTree/stock/templates/stock/location_delete.html index 9c560e58c5..c86ab4bc05 100644 --- a/InvenTree/stock/templates/stock/location_delete.html +++ b/InvenTree/stock/templates/stock/location_delete.html @@ -4,40 +4,31 @@ {% load inventree_extras %} {% block pre_form_content %} -{% trans "Are you sure you want to delete this stock location?" %} - -
- +
+ {% trans "Are you sure you want to delete this stock location?" %} +
+ {% if location.children.all|length > 0 %} -

This location contains {{ location.children.all|length }} child locations.
-If this location is deleted, these child locations will be moved to -{% if location.parent %} -the '{{ location.parent.name }}' location. -{% else %} -the top level 'Stock' location. +

+ {% blocktrans with n=location.children.all|length %}This location contains {{ n }} child locations{% endblocktrans %}.
+ {% if location.parent %} + {% blocktrans with location=location.parent.name %}If this location is deleted, these child locations will be moved to {{ location }}{% endblocktrans %}. + {% else %} + {% trans "If this location is deleted, these child locations will be moved to the top level stock location" %}. + {% endif %} +
{% endif %} -

- -{% endif %} {% if location.stock_items.all|length > 0 %} -

This location contains {{ location.stock_items.all|length }} stock items.
-{% if location.parent %} -If this location is deleted, these items will be moved to the '{{ location.parent.name }}' location. -{% else %} -If this location is deleted, these items will be moved to the top level 'Stock' location. +

+ {% blocktrans with n=location.stock_items.all|length %}This location contains {{ n }} stock items{% endblocktrans %}.
+ {% if location.parent %} + {% blocktrans with location=location.parent.name %}If this location is deleted, these stock items will be moved to {{ location }}{% endblocktrans %}. + {% else %} + {% trans "If this location is deleted, these stock items will be moved to the top level stock location" %}. + {% endif %} +
{% endif %} -

- -{% endif %} {% endblock %} \ No newline at end of file