Skip to content

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

Add contextual markers to dashboard templates

Marco Badan80585c0038bb
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 7614393357..7496a71772 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <title>{% block title %}{% trans "Dashboard - Saleor" %}{% endblock %}</title>
+ <title>{% block title %}{% trans "Dashboard - Saleor" context "Dashboard default page title" %}{% endblock %}</title>
{% render_bundle 'vendor' 'css' %}
{% render_bundle 'dashboard' 'css' %}
@@ -25,8 +25,12 @@
<ul id="user-action" class="dropdown-content">
<li class="user-name">{{ request.user }}</li>
<li class="divider"></li>
- <li><a href="/" target="_blank" class="waves-effect waves-teal">{% trans "Visit storefront" %}</a></li>
- <li><a href="{% url 'account_logout' %}" class="waves-effect waves-teal">{% trans "Log out" %}</a></li>
+ <li><a href="/" target="_blank" class="waves-effect waves-teal">
+ {% trans "Visit storefront" context "Dashboard top navigation action" %}
+ </a></li>
+ <li><a href="{% url 'account_logout' %}" class="waves-effect waves-teal">
+ {% trans "Log out" context "Dashboard top navigation action" %}
+ </a></li>
</ul>
<a class="dropdown-button" data-constrainwidth="false" href="#" data-activates="user-action"><i class="material-icons">account_circle</i><i class="mdi-navigation-arrow-drop-down right"></i></a>
{% if SEARCH_IS_ENABLED %}
@@ -34,37 +38,58 @@
{% endif %}
</div>
<ul class="side-nav" id="main-nav">
- <li class="nav-home"><a href="{% url 'dashboard:index' %}">{% trans "Home" %}</a></li>
+ <li class="nav-home"><a href="{% url 'dashboard:index' %}">
+ {% trans "Home" context "Dashboard side navigation link" %}
+ </a></li>
<li class="side-nav-section" id="first">
- <p>{% trans "Catalogue" %}</p>
+ <p>{% trans "Catalogue" context "Dashboard side navigation title" %}</p>
<ul>
- <li class="{% block menu_products_class %}{% endblock %}"><a href="{% url 'dashboard:product-list' %}">{% trans "Products" %}</a></li>
- <li class="{% block menu_categories_class %}{% endblock %}"><a href="{% url 'dashboard:category-list' %}">{% trans "Categories" %}</a></li>
- <li class="{% block menu_location_class %}{% endblock %}"><a href="{% url 'dashboard:product-stock-location-list' %}">{% trans "Stock locations" %}</a></li>
+ <li class="{% block menu_products_class %}{% endblock %}"><a href="{% url 'dashboard:product-list' %}">
+ {% trans "Products" context "Dashboard side navigation link" %}
+ </a></li>
+ <li class="{% block menu_categories_class %}{% endblock %}"><a href="{% url 'dashboard:category-list' %}">
+ {% trans "Categories" context "Dashboard side navigation link" %}
+ </a></li>
+ <li class="{% block menu_location_class %}{% endblock %}"><a href="{% url 'dashboard:product-stock-location-list' %}">
+ {% trans "Stock locations" context "Dashboard side navigation link" %}
+ </a></li>
</ul>
</li>
<li class="side-nav-section">
- <p>{% trans "Discounts" %}</p>
+ <p>{% trans "Discounts" context "Dashboard side navigation title" %}</p>
<ul>
- <li class="{% block menu_sales_class %}{% endblock %}"><a href="{% url 'dashboard:sale-list' %}">{% trans "Sales" %}</a></li>
- <li class="{% block menu_vouchers_class %}{% endblock %}"><a href="{% url 'dashboard:voucher-list' %}">{% trans "Vouchers" %}</a></li>
+ <li class="{% block menu_sales_class %}{% endblock %}"><a href="{% url 'dashboard:sale-list' %}">
+ {% trans "Sales" context "Dashboard side navigation link" %}
+ </a></li>
+ <li class="{% block menu_vouchers_class %}{% endblock %}"><a href="{% url 'dashboard:voucher-list' %}">
+ {% trans "Vouchers" context "Dashboard side navigation link" %}</a></li>
</ul>
</li>
<li class="side-nav-section">
- <p>{% trans "Sales" %}</p>
+ <p>{% trans "Sales" context "Dashboard side navigation title. `Sales' is noun of to sell" %}</p>
<ul>
- <li class="{% block menu_orders_class %}{% endblock %}"><a href="{% url 'dashboard:orders' %}">{% trans "Orders" %}</a></li>
- <li class="{% block menu_customers_class %}{% endblock %}"><a href="{% url 'dashboard:customers' %}">{% trans "Customers" %}</a></li>
- <li class="{% block menu_payments_class %}{% endblock %}"><a href="{% url 'dashboard:payments' %}">{% trans "Payments" %}</a></li>
+ <li class="{% block menu_orders_class %}{% endblock %}"><a href="{% url 'dashboard:orders' %}">
+ {% trans "Orders" %}
+ </a></li>
+ <li class="{% block menu_customers_class %}{% endblock %}"><a href="{% url 'dashboard:customers' %}">
+ {% trans "Customers" context "Dashboard side navigation link" %}
+ </a></li>
+ <li class="{% block menu_payments_class %}{% endblock %}"><a href="{% url 'dashboard:payments' %}">
+ {% trans "Payments" context "Dashboard side navigation link" %}
+ </a></li>
</ul>
</li>
<li class="side-nav-section">
- <p>{% trans "Configuration" %}</p>
+ <p>{% trans "Configuration" context "Dashboard side navigation title" %}</p>
<ul>
- <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>
- <li class="{% block menu_settings_class %}{% endblock %}"><a href="{% url 'dashboard:site-index' %}">{% trans "Site settings" %}</a></li>
+ <li class="{% block menu_product_classes_class %}{% endblock %}"><a href="{% url 'dashboard:product-class-list' %}">
+ {% trans "Product types" context "Dashboard side navigation link" %}</a></li>
+ <li class="{% block menu_attributes_class %}{% endblock %}"><a href="{% url 'dashboard:product-attributes' %}">
+ {% trans "Attributes" context "Dashboard side navigation link" %}</a></li>
+ <li class="{% block menu_delivery_class %}{% endblock %}"><a href="{% url 'dashboard:shipping-methods' %}">
+ {% trans "Shipping methods" context "Dashboard side navigation link" %}</a></li>
+ <li class="{% block menu_settings_class %}{% endblock %}"><a href="{% url 'dashboard:site-index' %}">
+ {% trans "Site settings" context "Dashboard side navigation link" %}</a></li>
</ul>
</li>
</ul>
@@ -80,7 +105,7 @@
{% if SEARCH_IS_ENABLED %}
<form method="get" action="{% url "dashboard:search" %}" class="hide-on-small-only">
<div class="input-field">
- <input id="search" type="search" class="validate" placeholder="Order, product, customer" name="q" value="{% if query %}{{ query }}{% endif %}">
+ <input id="search" type="search" class="validate" placeholder="{% trans "Order, product, customer" context "Dashboard search placeholder" %}" name="q" value="{% if query %}{{ query }}{% endif %}">
<button type="submit" class="right search-icon">
<i class="material-icons">search</i>
</button>
@@ -99,7 +124,7 @@
<div class="nav-wrapper container">
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s"><a href="#">{% trans "Home" %}</a></li>
+ <li class="visible-s"><a href="#">{% trans "Home" context "Dashboard homepage breadcrumbs" %}</a></li>
</ul>
{% endblock %}
{% block header_extra %}{% endblock %}
diff --git a/templates/dashboard/category/category_confirm_delete.html b/templates/dashboard/category/category_confirm_delete.html
index 339bd32fe5..0fed81b8d0 100644
--- a/templates/dashboard/category/category_confirm_delete.html
+++ b/templates/dashboard/category/category_confirm_delete.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load mptt_tags %}
-{% block title %}{% trans "Delete category" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Delete category" context "Delete category page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-categories{% endblock %}
@@ -13,7 +13,7 @@
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
- {% blocktrans with category=category %}
+ {% blocktrans trimmed with category=category context "Delete category title" %}
Are you sure you want to delete the category {{ category }}?
{% endblocktrans %}
</h1>
@@ -23,7 +23,7 @@
<div class="row">
<div class="col-lg-12">
{% if descendants %}
- {% trans 'The following child categories will be deleted:' %}
+ {% trans "The following child categories will be deleted:" context "Delete category form text about descendant categories" %}
<ul>
{% recursetree descendants %}
<li>{{ node.name }}
@@ -38,9 +38,9 @@
{% endif %}
{% if products_count %}
- {% blocktrans count counter=products_count %}
+ {% blocktrans count counter=products_count trimmed context "Delete category form text about products" %}
There is one product in this category that will be deleted.
- {% plural %}
+ {% plural %}
There are {{ counter }} products in this category that will be deleted.
{% endblocktrans %}
{% endif %}
@@ -49,8 +49,13 @@
<div class="form-group">
<div class="col-md-6">
- <button class="btn btn-danger" type="submit"><i class="glyphicon glyphicon-trash"></i> {% trans "Delete" %}</button>
- <a class="btn btn-default" href="{% url 'dashboard:category-list' root_pk=category.pk %}"><i class="glyphicon glyphicon-remove"></i> {% trans "Cancel" %}</a>
+ <button class="btn btn-danger" type="submit"><i class="glyphicon glyphicon-trash"></i>
+ {% trans "Delete" context "Delete category form primary action" %}
+ </button>
+ <a class="btn btn-default" href="{% url 'dashboard:category-list' root_pk=category.pk %}">
+ <i class="glyphicon glyphicon-remove"></i>
+ {% trans "Cancel" context "Delete category form secondary action" %}
+ </a>
</div>
</div>
</form>
diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.html
index 9ea9b86059..eaeca7e5ed 100644
--- a/templates/dashboard/category/detail.html
+++ b/templates/dashboard/category/detail.html
@@ -3,17 +3,18 @@
{% load i18n %}
{% load mptt_tags %}
-{% block title %}{% if category.pk %}{{ category }}{% else %}{% trans 'Add new category' %}{% endif %} - {% trans 'Categories' %} - {{ block.super }}{% endblock %}
+{% block title %}{% if category.pk %}{{ category }}{% else %}{% trans "Add new category" context "Category detail page title" %}{% endif %} - {% trans "Categories" context "Category detail page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-categories{% endblock %}
{% block menu_categories_class %}active{% endblock %}
-{% block page_title %}{% if category.pk %}{{ category }}{% else %}{% trans 'Add new category' %}{% endif %}{% endblock %}
+{% block page_title %}{% if category.pk %}{{ category }}{% else %}{% trans "Add new category" context "Category detail page title" %}{% endif %}{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li class="back-mobile"><a href="{% url 'dashboard:category-list' %}" class="breadcrumbs--ellipsed-item">{% trans "Categories" %}</a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:category-list' %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Categories" context "Category detail breadcrumbs" %}</a></li>
{% if path %}
{% for node in path %}
<li><a href="{% url 'dashboard:category-list' root_pk=node.pk %}" class="breadcrumbs--ellipsed-item">{{ node.name }}</a></li>
@@ -23,7 +24,9 @@
{% if category.pk %}
<span class="breadcrumbs--ellipsed-item">{{ category }}</span>
{% else %}
- <span class="breadcrumbs--ellipsed-item">{% trans 'Add new category' %}</span>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Add new category" context "Category detail breadcrumbs" %}
+ </span>
{% endif %}
</li>
</ul>
@@ -47,14 +50,20 @@
<div class="row">
<div class="col s12 l8 right-align">
{% if category.parent %}
- <a href="{% url 'dashboard:category-list' root_pk=category.parent.pk %}" class="btn-flat">{% trans "Cancel" %}</a>
+ <a href="{% url 'dashboard:category-list' root_pk=category.parent.pk %}" class="btn-flat">
+ {% trans "Cancel" context "Category form secondary action" %}</a>
{% else %}
- <a href="{% url 'dashboard:category-list' %}" class="btn-flat">{% trans "Cancel" %}</a>
+ <a href="{% url 'dashboard:category-list' %}" class="btn-flat">
+ {% trans "Cancel" context "Category form secondary action" %}</a>
{% endif %}
{% if category.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Update" context "Category form primary action" %}
+ </button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Create" context "Category form primary action" %}
+ </button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.html
index 8ddff8ae30..842e1e7a15 100644
--- a/templates/dashboard/category/list.html
+++ b/templates/dashboard/category/list.html
@@ -3,7 +3,7 @@
{% load mptt_tags %}
{% load materializecss %}
-{% block title %}{% trans "Categories" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Categories" context "Category list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-categories{% endblock %}
@@ -24,51 +24,55 @@
{% block header_extra %}
<div class="fixed-action-btn">
- <a class="btn-fab btn-floating btn-large waves-effect waves-light teal" title="{% trans "Add category" %}"
- href="{% if root %}{% url 'dashboard:category-add' root_pk=root.pk %}{% else %}{% url 'dashboard:category-add' %}{% endif %}">
+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
+ title="{% trans "Add category" context "Category list add button text" %}"
+ href="
+ {% if root %}{% url 'dashboard:category-add' root_pk=root.pk %}{% else %}{% url 'dashboard:category-add' %}{% endif %}">
<i class="material-icons">add</i>
</a>
</div>
{% if root %}
- <a class="dropdown-button" href="#" data-activates="category-delete" data-constrainwidth="false">
- <i class="material-icons">arrow_drop_down</i>
- </a>
- <ul id="category-delete" class="dropdown-content">
- <li>
- <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-edit' root_pk=root.pk %}" href="#base-modal">
- {% trans "Edit category" %}
- </a>
- </li>
+ <a class="dropdown-button" href="#" data-activates="category-delete" data-constrainwidth="false">
+ <i class="material-icons">arrow_drop_down</i>
+ </a>
+ <ul id="category-delete" class="dropdown-content">
+ <li>
+ <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-edit' root_pk=root.pk %}"
+ href="#base-modal">
+ {% trans "Edit category" context "Category list action link" %}
+ </a>
+ </li>
- <li>
- <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-delete' pk=root.pk %}" href="#base-modal">
- {% trans "Remove category" %}
- </a>
- </li>
- </ul>
+ <li>
+ <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-delete' pk=root.pk %}"
+ href="#base-modal">
+ {% trans "Remove category" context "Category list action link" %}
+ </a>
+ </li>
+ </ul>
{% endif %}
{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
{% if path %}
- <li><a href="{% url 'dashboard:category-list' %}">{% trans "Categories" %}</a></li>
+ <li><a href="{% url 'dashboard:category-list' %}">{% trans "Categories" context "Category list breadcrumbs" %}</a></li>
{% else %}
- <li class="visible-s"><span>{% trans "Categories" %}</span></li>
- {% endif %}
+ <li class="visible-s"><span>{% trans "Categories" context "Category list breadcrumbs" %}</span></li>
+ {% endif %}
{% if path %}
- <li class="back-mobile"><a href="{% url 'dashboard:category-list' %}"><i class="material-icons">arrow_back</i></a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:category-list' %}"><i
+ class="material-icons">arrow_back</i></a></li>
{% for node in path %}
{% if forloop.last %}
<li title="{{ node.name }}">
- <span class="breadcrumbs--ellipsed-item">
- {{ node.name }}
- </span>
+ <span class="breadcrumbs--ellipsed-item">{{ node.name }}</span>
</li>
{% else %}
<li class="hide-on-med-and-down">
- <a title="{{ node.name }}" href="{% url 'dashboard:category-list' root_pk=node.pk %}" class="breadcrumbs--ellipsed-item">
+ <a title="{{ node.name }}" href="{% url 'dashboard:category-list' root_pk=node.pk %}"
+ class="breadcrumbs--ellipsed-item">
{{ node.name }}
</a>
</li>
@@ -87,7 +91,7 @@
{% if categories %}
{% for node in categories %}
<li class="collection-item list-item list-item--two-lines">
- <a class="list-item-name" href="{% url 'dashboard:category-list' root_pk=node.pk %}">
+ <a class="list-item-name" href="{% url "dashboard:category-list" root_pk=node.pk %}">
{{ node.name }}
</a>
@@ -107,9 +111,9 @@
{% else %}
<p>
{% if root %}
- {% trans "No subcategories." %}
+ {% trans "No subcategories." context "Empty Category list message" %}
{% else %}
- {% trans "No categories." %}
+ {% trans "No categories." context "Empty Category list message" %}
{% endif %}
</p>
{% endif %}
diff --git a/templates/dashboard/category/modal_delete.html b/templates/dashboard/category/modal_delete.html
index 8ad46f0cbd..c6466a71fe 100644
--- a/templates/dashboard/category/modal_delete.html
+++ b/templates/dashboard/category/modal_delete.html
@@ -1,13 +1,13 @@
{% load i18n %}
{% load mptt_tags %}
-<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-delete' pk=category.pk %}" novalidate>
+<form method="post" id="form-category" class="form-async" action="{% url "dashboard:category-delete" pk=category.pk %}" novalidate>
{% csrf_token %}
<div class="modal-content">
<div class="row">
<div class="col s12">
<h5>
- {% blocktrans with category=category %}
+ {% blocktrans with category=category trimmed context "Delete category modal title" %}
Are you sure you want to delete the category {{ category }}?
{% endblocktrans %}
</h5>
@@ -17,7 +17,7 @@
{% if descendants %}
<div class="row">
<div class="col s12">
- {% trans 'The following child categories will be deleted:' %}
+ {% trans "The following child categories will be deleted:" context "Delete category form text about descendant categories" %}
<ul>
{% recursetree descendants %}
<li>{{ node.name }}
@@ -34,16 +34,20 @@
{% endif %}
{% if products_count %}
- {% blocktrans count counter=products_count %}
+ {% blocktrans count counter=products_count trimmed context "Delete category form text about products" %}
There is one product in this category that will be deleted.
- {% plural %}
+ {% plural %}
There are {{ counter }} products in this category that will be deleted.
{% endblocktrans %}
{% endif %}
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Delete category form primary action" %}
+ </button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Delete category form secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/category/modal_edit.html b/templates/dashboard/category/modal_edit.html
index dde2c5c135..2895d432b3 100644
--- a/templates/dashboard/category/modal_edit.html
+++ b/templates/dashboard/category/modal_edit.html
@@ -2,24 +2,30 @@
{% load i18n %}
{% load mptt_tags %}
-<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-edit' root_pk=category.pk %}" novalidate>
- {% csrf_token %}
- <div class="modal-content">
- <div class="row">
- <div class="col s12">
- <h5>{% trans "Edit" %} {{ category }}</h5>
- </div>
- </div>
-
- <div class="row">
- {{ form.name|materializecss:"s8 m10" }}
- {{ form.hidden|materializecss:"s4 m2" }}
- {{ form.description|materializecss }}
- </div>
+<form method="post" id="form-category" class="form-async" action="{% url "dashboard:category-edit" root_pk=category.pk %}" novalidate>
+ {% csrf_token %}
+ <div class="modal-content">
+ <div class="row">
+ <div class="col s12">
+ <h5>{% blocktrans trimmed context "Edit category modal title" %}
+ Edit {{ category }}
+ {% endblocktrans %}</h5>
+ </div>
</div>
- <div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Update" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <div class="row">
+ {{ form.name|materializecss:"s8 m10" }}
+ {{ form.hidden|materializecss:"s4 m2" }}
+ {{ form.description|materializecss }}
</div>
+ </div>
+
+ <div class="modal-footer">
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Update" context "Edit category form primary action" %}
+ </button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Edit category form secondary action" %}
+ </a>
+ </div>
</form>
diff --git a/templates/dashboard/customer/detail.html b/templates/dashboard/customer/detail.html
index 4c9570eac3..16992e2553 100644
--- a/templates/dashboard/customer/detail.html
+++ b/templates/dashboard/customer/detail.html
@@ -3,7 +3,7 @@
{% load i18n %}
{% load status %}
-{% block title %}{{ customer }} - {% trans "Customers" %} - {{ block.super }}{% endblock %}
+{% block title %}{{ customer }} - {% trans "Customers" context "Customer detail page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-customers{% endblock %}
@@ -16,32 +16,37 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url "dashboard:customers" %}">{% trans "Customers" %}</a></li>
- <li class="back-mobile"><a href="{% url "dashboard:customers" %}"><i class="material-icons">arrow_back</i></a></li>
- <li><span class="breadcrumbs--elipsed-item">{{ customer }}</li>
+ <li><a href="{% url "dashboard:customers" %}">{% trans "Customers" context "Customer details breadcrumbs" %}</a></li>
+ <li class="back-mobile">
+ <a href="{% url "dashboard:customers" %}">
+ <i class="material-icons">arrow_back</i></a>
+ </li>
+ <li><span class="breadcrumbs--elipsed-item">{{ customer }}</span></li>
</ul>
{% endblock %}
{% block menu_sales_class %} active{% endblock %}
{% block content %}
-<div class="row">
- <div class="col s12 l8">
- <div class="card">
- <div class="data-table-header{% if not customer_orders %} data-table-header--no-data{% endif %}">
- <span class="card-title black-text">{% trans "Order history" %}</span>
- </div>
+ <div class="row">
+ <div class="col s12 l8">
+ <div class="card">
+ <div class="data-table-header{% if not customer_orders %} data-table-header--no-data{% endif %}">
+ <span class="card-title black-text">
+ {% trans "Order history" context "Customer orders table title" %}
+ </span>
+ </div>
- {% if customer_orders %}
- <div class="data-table-container">
- <table class="bordered hoverable responsive data-table">
+ {% if customer_orders %}
+ <div class="data-table-container">
+ <table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th>{% trans "Number" %}</th>
- <th>{% trans "Placed on" %}</th>
- <th>{% trans "Payment" %}</th>
- <th>{% trans "Order status" %}</th>
- <th>{% trans "Total" %}</th>
+ <th>{% trans "Number" context "Customer orders table header" %}</th>
+ <th>{% trans "Placed on" context "Customer orders table header" %}</th>
+ <th>{% trans "Payment" context "Customer orders table header" %}</th>
+ <th>{% trans "Order status" context "Customer orders table header" %}</th>
+ <th>{% trans "Total" context "Customer orders table header" %}</th>
</tr>
</thead>
<tbody>
@@ -59,7 +64,7 @@
</div>
{% else %}
<div class="card-content card-content--no-data">
- <p>{% trans "No orders found." %}</p>
+ <p>{% trans "No orders found." context "Empty customer orders table message" %}</p>
</div>
{% endif %}
</div>
@@ -69,14 +74,16 @@
<div class="col s12 m6 l12">
<div class="card equal-height-on-med">
<div class="card-content">
- <span class="card-title black-text">{% trans "Default shipping address" %}</span>
+ <span class="card-title black-text">
+ {% trans "Default shipping address" context "Customer default shipping address card title" %}
+ </span>
{% if customer.default_shipping_address %}
{% with customer.default_shipping_address as address %}
{% include 'dashboard/includes/_address.html' with address=address only %}
{% endwith %}
{% else %}
- <span>{% trans "No default shipping address." %}</span>
+ <span>{% trans "No default shipping address." context "Customer without default shipping address message" %}</span>
{% endif %}
<i class="material-icons">email</i> <a href="mailto:{{ customer.email }}">{{ customer.email }}</a>
</div>
@@ -86,14 +93,18 @@
<div class="col s12 m6 l12">
<div class="card equal-height-on-med">
<div class="card-content">
- <span class="card-title black-text">{% trans "Default billing address" %}</span>
+ <span class="card-title black-text">
+ {% trans "Default billing address" context "Customer default billing address card title" %}
+ </span>
{% if customer.default_billing_address %}
{% with customer.default_billing_address as address %}
{% include 'dashboard/includes/_address.html' with address=address only %}
{% endwith %}
{% else %}
- <span>{% trans "No default billing address." %}</span>
+ <span>
+ {% trans "No default billing address." context "Customer without default billing address message" %}
+ </span>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.html
index 3537b3dc72..f06162a234 100644
--- a/templates/dashboard/customer/list.html
+++ b/templates/dashboard/customer/list.html
@@ -3,7 +3,7 @@
{% load prices_i18n %}
{% load materializecss %}
-{% block title %}{% trans "Customers" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Customers" context "Customer list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-customers{% endblock %}
@@ -11,7 +11,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Customers" %}</li>
+ <li class="visible-s">{% trans "Customers" context "Customer list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -23,9 +23,11 @@
{{ form.order_status|materializecss:"s7 m3 l2" }}
<div class="col s5 m3 l3">
- <button type="submit" class="btn btn--inline">{% trans "Filter" %}</button>
+ <button type="submit" class="btn btn--inline">
+ {% trans "Filter" context="Customer list form primary action" %}</button>
{% if form.is_bound %}
- <a class="btn btn--inline" href="{% url 'dashboard:customers' %}">{% trans "Clear" %}</a>
+ <a class="btn btn--inline" href="{% url 'dashboard:customers' %}">
+ {% trans "Clear" context "Customer list form secondary action" %}</a>
{% endif %}
</div>
</div>
@@ -42,11 +44,11 @@
<table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th>{% trans "Email" %}</th>
- <th class="wide">{% trans "Name" %}</th>
- <th>{% trans "Location" %}</th>
- <th class="right-align">{% trans "Number of orders" %}</th>
- <th>{% trans "Last order" %}</th>
+ <th>{% trans "Email" context "Customers table header" %}</th>
+ <th class="wide">{% trans "Name" context "Customers table header" %}</th>
+ <th>{% trans "Location" context "Customers table header" %}</th>
+ <th class="right-align">{% trans "Number of orders" context "Customers table header" %}</th>
+ <th>{% trans "Last order" context "Customers table header" %}</th>
</tr>
</thead>
<tbody>
@@ -72,7 +74,11 @@
</td>
<td>
{% if customer.last_order %}
- <a href="{% url 'dashboard:order-details' order_pk=customer.last_order %}">#{{ customer.last_order }}</a>
+ <a href="{% url 'dashboard:order-details' order_pk=customer.last_order %}">
+ {% blocktrans with last_order=customer.last_order trimmed context "Customers table last order data" %}
+ #{{ last_order }}
+ {% endblocktrans %}
+ </a>
{% endif %}
</td>
</tr>
@@ -82,7 +88,7 @@
</div>
{% else %}
<div class="card-content card-content--no-data">
- <p>{% trans "No customers found." %}</p>
+ <p>{% trans "No customers found." context "Empty customers table message" %}</p>
</div>
{% endif %}
</div>
diff --git a/templates/dashboard/discount/sale_confirm_delete.html b/templates/dashboard/discount/sale_confirm_delete.html
index 962d8de6b6..a431e49bd0 100644
--- a/templates/dashboard/discount/sale_confirm_delete.html
+++ b/templates/dashboard/discount/sale_confirm_delete.html
@@ -1,17 +1,21 @@
{% extends "dashboard/base.html" %}
{% load i18n %}
-{% block title %}{% trans "Delete sale" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Delete sale" context "Delete sale (discount) page title" %} - {{ block.super }}{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Discounts" %}</a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% trans "Delete sale" %}</span></li>
+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Discounts" context "Delete sale (discount) breadcrumbs" %}
+ </a></li>
+ <li><span class="breadcrumbs--ellipsed-item">
+ {% trans "Delete sale" context "Delete sale (discount) breadcrumbs" %}
+ </span></li>
</ul>
{% endblock %}
{% block content %}
- <p>{% trans "Are you sure you want to delete the following sale?" %}</p>
+ <p>{% trans "Are you sure you want to delete the following sale?" context "Delete sale (discount) message" %}</p>
<form method="post" novalidate>
{% csrf_token %}
<div class="row">
@@ -24,8 +28,11 @@
<div class="row">
<div class="col m6 l4 offset-m3 offset-l4 right-align">
- <a href="{% url 'dashboard:sale-list' %}" class="btn-flat"><i class="material-icons">clear</i> {% trans "Cancel" %}</a>
- <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i> {% trans "Delete" %}</button>
+ <a href="{% url 'dashboard:sale-list' %}" class="btn-flat"><i class="material-icons">clear</i>
+ {% trans "Cancel" context "Delete sale (discount) secondary action" %}</a>
+ <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i>
+ {% trans "Delete" context "Delete sale (discount) primary action" %}
+ </button>
</div>
</div>
</form>
diff --git a/templates/dashboard/discount/sale_form.html b/templates/dashboard/discount/sale_form.html
index 97b60ca8b2..3be36424ab 100644
--- a/templates/dashboard/discount/sale_form.html
+++ b/templates/dashboard/discount/sale_form.html
@@ -3,8 +3,8 @@
{% load materializecss %}
{% load static %}
-{% block title %}{% if sale.pk %}{{ sale }}{% else %}{% trans 'Add new sale' %}
-{% endif %} - {% trans "Sales" %} - {{ block.super }}{% endblock %}
+{% block title %}{% if sale.pk %}{{ sale }}{% else %}{% trans "Add new sale" context "Sale (discount) page title" %}
+{% endif %} - {% trans "Sales" context "Sale (discount) page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-sales{% endblock %}
@@ -25,7 +25,7 @@
<li>
<a class="modal-trigger-custom" href="#base-modal"
data-href="{% url 'dashboard:sale-delete' pk=sale.pk %}">
- {% trans "Remove sale" %}
+ {% trans "Remove sale" context "Sale (discount) action" %}
</a>
</li>
</ul>
@@ -34,10 +34,12 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url 'dashboard:sale-list' %}">{% trans "Sales" %}</a></li>
+ <li><a href="{% url 'dashboard:sale-list' %}">
+ {% trans "Sales" context "Sale (discount) breadcrumbs" %}
+ </a></li>
<li class="back-mobile"><a href="{% url 'dashboard:sale-list' %}"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if sale.pk %}{{ sale }}{% else %}
- {% trans 'Add new sale' %}{% endif %}</span></li>
+ {% trans "Add new sale" context "Sale (discount) breadcrumbs" %}{% endif %}</span></li>
</ul>
{% endblock %}
@@ -61,9 +63,13 @@
<div class="row">
<div class="col l8 right-align">
{% if sale.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Update" context "Sale (discount) primary action" %}
+ </button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Create" context "Sale (discount) primary action" %}
+ </button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/discount/sale_list.html b/templates/dashboard/discount/sale_list.html
index 70dcd038f1..72bb380e20 100644
--- a/templates/dashboard/discount/sale_list.html
+++ b/templates/dashboard/discount/sale_list.html
@@ -12,7 +12,7 @@
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
- href="{% url 'dashboard:sale-add' %}" title="{% trans "Add sale" %}">
+ href="{% url 'dashboard:sale-add' %}" title="{% trans "Add sale" context "Sale (discount) list add button text" %}">
<i class="material-icons">add</i>
</a>
</div>
@@ -20,7 +20,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Sales" %}</li>
+ <li class="visible-s">{% trans "Sales" context "Sale (discount) list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -33,8 +33,8 @@
<table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th>{% trans "Name" %}</th>
- <th>{% trans "Discount" %}</th>
+ <th>{% trans "Name" context "Sale (discount) table header" %}</th>
+ <th>{% trans "Discount" context "Sale (discount) table header" %}</th>
</tr>
</thead>
<tbody>
@@ -53,6 +53,6 @@
{% include "dashboard/includes/_pagination.html" %}
{% else %}
- <p>{% trans "No sales found." %}</p>
+ <p>{% trans "No sales found." context "Empty sale (discount) table message" %}</p>
{% endif %}
{% endblock %}
diff --git a/templates/dashboard/discount/sale_modal_confirm_delete.html b/templates/dashboard/discount/sale_modal_confirm_delete.html
index 20c6e83501..8268dd82fa 100644
--- a/templates/dashboard/discount/sale_modal_confirm_delete.html
+++ b/templates/dashboard/discount/sale_modal_confirm_delete.html
@@ -3,15 +3,19 @@
<form action="{% url "dashboard:sale-delete" pk=sale.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Delete sale (discount) title" %}</h5>
<p>
- {% blocktrans %}You are about to delete <strong>{{ sale }}</strong>.{% endblocktrans %}
+ {% blocktrans trimmed context "Delete sale (discount) text" %}
+ You are about to delete <strong>{{ sale }}</strong>.
+ {% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Delete sale (discount) form primary action" %}</button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Delete sale (discount) form secondary action" %}</a>
</div>
</form>
diff --git a/templates/dashboard/discount/voucher_form.html b/templates/dashboard/discount/voucher_form.html
index 27d1720162..7345de47e3 100644
--- a/templates/dashboard/discount/voucher_form.html
+++ b/templates/dashboard/discount/voucher_form.html
@@ -3,8 +3,8 @@
{% load materializecss %}
{% load static %}
-{% block title %}{% if voucher.pk %}{{ voucher }}{% else %}{% trans 'Add new voucher' %}
-{% endif %} - {% trans "Vouchers" %} - {{ block.super }}{% endblock %}
+{% block title %}{% if voucher.pk %}{{ voucher }}{% else %}{% trans "Add new voucher" context "Voucher page title" %}
+{% endif %} - {% trans "Vouchers" context "Voucher page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-vouchers{% endblock %}
@@ -24,7 +24,7 @@
<ul id="voucher-delete" class="dropdown-content">
<li>
<a class="modal-trigger-custom" href="#base-modal" data-href="{% url 'dashboard:voucher-delete' pk=voucher.pk %}">
- {% trans "Remove voucher" %}
+ {% trans "Remove voucher" context "Voucher action" %}
</a>
</li>
</ul>
@@ -33,10 +33,12 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url 'dashboard:voucher-list' %}">{% trans "Vouchers" %}</a></li>
- <li class="back-mobile"><a href="{% url 'dashboard:voucher-list' %}"><i class="material-icons">arrow_back</i></a></li>
+ <li><a href="{% url 'dashboard:voucher-list' %}">
+ {% trans "Vouchers" context "Voucher breadcrumbs" %}</a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:voucher-list' %}">
+ <i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if voucher.pk %}
- {{ voucher }}{% else %}{% trans 'Add new voucher' %}{% endif %}</span></li>
+ {{ voucher }}{% else %}{% trans "Add new voucher" context "Voucher breadcrumbs" %}{% endif %}</span></li>
</ul>
{% endblock %}
@@ -82,9 +84,9 @@
<div class="row">
<div class="col l8 right-align">
{% if voucher.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">{% trans "Update" context "Voucher form primary action" %}</button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">{% trans "Create" context "Voucher form primary action" %}</button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/discount/voucher_list.html b/templates/dashboard/discount/voucher_list.html
index a005200a3b..1366c302d2 100644
--- a/templates/dashboard/discount/voucher_list.html
+++ b/templates/dashboard/discount/voucher_list.html
@@ -3,7 +3,7 @@
{% load prices_i18n %}
{% load materializecss %}
-{% block title %}{% trans "Vouchers" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Vouchers" context "Voucher list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-vouchers{% endblock %}
@@ -12,7 +12,7 @@
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
- href="{% url 'dashboard:voucher-add' %}" title="{% trans "Add voucher" %}">
+ href="{% url 'dashboard:voucher-add' %}" title="{% trans "Add voucher" context "Voucher list add button text" %}">
<i class="material-icons">add</i>
</a>
</div>
@@ -20,7 +20,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Vouchers" %}</li>
+ <li class="visible-s">{% trans "Vouchers" context "Voucher list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -33,13 +33,13 @@
<table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th class="wide">{% trans "Name" %}</th>
- <th>{% trans "Discount" %}</th>
- <th>{% trans "Start date" %}</th>
- <th>{% trans "End date" %}</th>
- <th>{% trans "Used" %}</th>
- <th>{% trans "Apply to" %}</th>
- <th>{% trans "Limit" %}</th>
+ <th class="wide">{% trans "Name" context "Voucher table header" %}</th>
+ <th>{% trans "Discount" context "Voucher table header" %}</th>
+ <th>{% trans "Start date" context "Voucher table header" %}</th>
+ <th>{% trans "End date" context "Voucher table header" %}</th>
+ <th>{% trans "Used" context "Voucher table header" %}</th>
+ <th>{% trans "Apply to" context "Voucher table header" %}</th>
+ <th>{% trans "Limit" context "Voucher table header" %}</th>
</tr>
</thead>
<tbody>
@@ -76,6 +76,6 @@
{% include "dashboard/includes/_pagination.html" %}
{% else %}
- <p>{% trans "No vouchers found." %}</p>
+ <p>{% trans "No vouchers found." context "Empty voucher table message" %}</p>
{% endif %}
{% endblock %}
diff --git a/templates/dashboard/discount/voucher_modal_confirm_delete.html b/templates/dashboard/discount/voucher_modal_confirm_delete.html
index f4f2c57daa..dcf8de647d 100644
--- a/templates/dashboard/discount/voucher_modal_confirm_delete.html
+++ b/templates/dashboard/discount/voucher_modal_confirm_delete.html
@@ -3,15 +3,19 @@
<form action="{% url "dashboard:voucher-delete" pk=voucher.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Delete voucher title" %}</h5>
<p>
- {% blocktrans %}You are about to delete <strong>{{ voucher }}</strong>.{% endblocktrans %}
+ {% blocktrans trimmed context "Delete voucher text" %}
+ You are about to delete <strong>{{ voucher }}</strong>.
+ {% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Delete voucher primary action" %}</button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Delete voucher secondary action" %}</a>
</div>
</form>
diff --git a/templates/dashboard/includes/_orders_table.html b/templates/dashboard/includes/_orders_table.html
index ae0854e5fc..5482240a7b 100644
--- a/templates/dashboard/includes/_orders_table.html
+++ b/templates/dashboard/includes/_orders_table.html
@@ -7,11 +7,11 @@
<thead>
<tr>
<th></th>
- <th>{% trans "Order status" %}</th>
- <th>{% trans "Payment status" %}</th>
- <th>{% trans "Customer" %}</th>
- <th>{% trans "Placed on" %}</th>
- <th>{% trans "Total" %}</th>
+ <th>{% trans "Order status" context "Orders table header" %}</th>
+ <th>{% trans "Payment status" context "Orders table header" %}</th>
+ <th>{% trans "Customer" context "Orders table header" %}</th>
+ <th>{% trans "Placed on" context "Orders table header" %}</th>
+ <th>{% trans "Total" context "Orders table header" %}</th>
</tr>
</thead>
<tbody>
@@ -22,7 +22,8 @@
</td>
<td>{% render_status order.status order.get_status_display %}</td>
<td>{% render_status order.get_last_payment_status order.get_last_payment_status_display %}</td>
- <td>{{ order.user|default:_("Guest") }}</td>
+ {% trans "Guest" context "Customer column anonymous user text" as guest %}
+ <td>{{ order.user|default:guest }}</td>
<td>{{ order.created }}</td>
<td>{% gross order.get_total %}</td>
</tr>
diff --git a/templates/dashboard/includes/_status_filters.html b/templates/dashboard/includes/_status_filters.html
index 10d47e3d53..689ac79128 100644
--- a/templates/dashboard/includes/_status_filters.html
+++ b/templates/dashboard/includes/_status_filters.html
@@ -5,7 +5,7 @@
<div class="row">
{{ form|materializecss:"s8 m4" }}
<div class="col s4 m2 left-align">
- <button type="submit" class="btn btn--inline">{% trans "Filter" %}</button>
+ <button type="submit" class="btn btn--inline">{% trans "Filter" context "Status filter action" %}</button>
</div>
</div>
</form>
diff --git a/templates/dashboard/includes/address_short.html b/templates/dashboard/includes/address_short.html
index 204061e658..2bdaccd393 100644
--- a/templates/dashboard/includes/address_short.html
+++ b/templates/dashboard/includes/address_short.html
@@ -8,4 +8,4 @@
{{ address.postal_code }} {{ address.city }}<br>
{% if address.country_area %}{{ address.country_area }}, {% endif %}{{ address.get_country_display }}<br>
{{ address.phone }}"
- data-html="true" title="{{ address.first_name }} {{ address.last_name }}<span class='pull-right'><a href='{% url "dashboard:address-shipping-edit" order_pk=order.pk group_pk=group.pk %}'><i class='glyphicon glyphicon-pencil'></i> {% trans "Edit" %}</a></span>">{{ address }}</span>
+ data-html="true" title="{{ address.first_name }} {{ address.last_name }}<span class='pull-right'><a href='{% url "dashboard:address-shipping-edit" order_pk=order.pk group_pk=group.pk %}'><i class='glyphicon glyphicon-pencil'></i> {% trans "Edit" context "Address detail action" %}</a></span>">{{ address }}</span>
diff --git a/templates/dashboard/index.html b/templates/dashboard/index.html
index 5eec881cde..5a31f8daa9 100644
--- a/templates/dashboard/index.html
+++ b/templates/dashboard/index.html
@@ -9,7 +9,7 @@
<div class="col s12">
<div class="card">
<div class="data-table-header{% if not preauthorized_payments %} data-table-header--no-data{% endif %}">
- <span class="card-title black-text">{% trans "Preauthorized payments" %}</span>
+ <span class="card-title black-text">{% trans "Preauthorized payments" context "Dashboard homepage table title" %}</span>
</div>
{% if preauthorized_payments %}
@@ -17,10 +17,10 @@
<table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th>{% trans "Order number" %}</th>
- <th>{% trans "Date" %}</th>
- <th>{% trans "Customer" %}</th>
- <th class="text-right">{% trans "Amount" %}</th>
+ <th>{% trans "Order number" context "Preauthorized payments table header" %}</th>
+ <th>{% trans "Date" context "Preauthorized payments table header" %}</th>
+ <th>{% trans "Customer" context "Preauthorized payments table header" %}</th>
+ <th class="text-right">{% trans "Amount" context "Preauthorized payments table header" %}</th>
</tr>
</thead>
<tbody>
@@ -37,28 +37,30 @@
</div>
{% else %}
<div class="card-content card-content--no-data">
- <p>{% trans "No preauthorized payments." %}</p>
+ <p>{% trans "No preauthorized payments." context "Empty Preauthorized payments table message" %}</p>
</div>
{% endif %}
</div>
<div class="card">
<div class="data-table-header{% if not orders_to_ship %} data-table-header--no-data{% endif %}">
- <span class="card-title black-text">{% trans "Orders ready for shipment" %}</span>
+ <span class="card-title black-text">
+ {% trans "Orders ready for shipment" context "Dashboard homepage table title" %}
+ </span>
</div>
{% if orders_to_ship %}
{% include "dashboard/includes/_orders_table.html" with orders=orders_to_ship %}
{% else %}
<div class="card-content card-content--no-data">
- <p>{% trans "No orders are ready for shipment." %}</p>
+ <p>{% trans "No orders are ready for shipment." context "Empty order table message" %}</p>
</div>
{% endif %}
</div>
<div class="card">
<div class="card-content">
- <span class="card-title black-text">{% trans "Products with low stock" %}</span>
+ <span class="card-title black-text">{% trans "Products with low stock" context "Dashboard homepage table title" %}</span>
{% if low_stock %}
<ul class="list">
@@ -71,7 +73,7 @@
{% endfor %}
</ul>
{% else %}
- <p>{% trans "No products are low in stock." %}</p>
+ <p>{% trans "No products are low in stock." context "Empty low stock table message" %}</p>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.html
index 6204d8afbe..46b4bda92e 100644
--- a/templates/dashboard/order/detail.html
+++ b/templates/dashboard/order/detail.html
@@ -5,7 +5,7 @@
{% load status %}
{% load discount_amount_for from prices %}
-{% block title %}{{ order }} - {% trans "Orders" %} - {{ block.super }}{% endblock %}
+{% block title %}{{ order }} - {% trans "Orders" context "Order detail page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-orders{% endblock %}
@@ -25,7 +25,7 @@
<li>
<a href="#base-modal" data-href="{% url "dashboard:order-cancel" order_pk=order.pk %}"
class="modal-trigger-custom">
- {% trans "Cancel Order" %}
+ {% trans "Cancel Order" context "Order detail action" %}
</a>
</li>
</ul>
@@ -34,7 +34,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url "dashboard:orders" %}">{% trans "Orders" %}</a></li>
+ <li><a href="{% url "dashboard:orders" %}">{% trans "Orders" context "Order detail breadcrumbs" %}</a></li>
<li class="back-mobile"><a href="{% url "dashboard:orders" %}"><i class="material-icons">arrow_back</i></a></li>
<li><span>{{ order }}</span></li>
</ul>
@@ -45,15 +45,15 @@
<div class="col s12">
<ul class="tabs" role="tablist">
<li role="presentation" class="tab col s4">
- <a href="#order-details" role="tab" class="active">{% trans "Details" %}</a>
+ <a href="#order-details" role="tab" class="active">{% trans "Details" context "Order detail tab" %}</a>
</li>
<li role="presentation" class="tab col s4">
- <a href="#payment-history" role="tab">{% trans "Payments" %}</a>
+ <a href="#payment-history" role="tab">{% trans "Payments" context "Order detail tab" %}</a>
</li>
<li role="presentation" class="tab col s4">
- <a href="#order-history" role="tab">{% trans "History" %}</a>
+ <a href="#order-history" role="tab">{% trans "History" context "Order detail tab" %}</a>
</li>
</ul>
</div>
@@ -63,42 +63,46 @@
<div class="col s12 l4 switch-two-columns">
<div class="card grey lighten-4">
<div class="card-content data-table-container">
- <span class="card-title black-text">{% trans "Order summary" %}</span>
+ <span class="card-title black-text">{% trans "Order summary" context "Order summary title" %}</span>
<table class="order-summary responsive-table">
<tbody>
<tr>
- <td>{% trans "Account" %}</td>
+ <td>{% trans "Account" context "Order summary card header" %}</td>
<td class="right-align">
{% if order.user %}
<a class="order-user" href="{% url "dashboard:customer-details" pk=order.user.pk %}">{{ order.user }}</a>
{% else %}
- {% trans "Guest" %}
+ {% trans "Guest" context "Anonymous user account value" %}
{% endif %}
</td>
</tr>
<tr>
- <td>{% trans "Order status" %}</td>
+ <td>{% trans "Order status" context "Order summary card header" %}</td>
<td class="right-align">{% render_status order.status order.get_status_display %}</td>
</tr>
<tr>
- <td>{% trans "Payment status:" %}</td>
- <td class="right-align">{% if payment %}{% render_status payment.status payment.get_status_display %}{% else %}{% trans "N/A" %}{% endif %}</td>
+ <td>{% trans "Payment status" context "Order summary card header" %}</td>
+ <td class="right-align">
+ {% if payment %}{% render_status payment.status payment.get_status_display %}
+ {% else %}{% trans "N/A" context "Payment status not available" %} %}{% endif %}</td>
</tr>
<tr>
- <td>{% trans "Order total" %}</td>
+ <td>{% trans "Order total" context "Order summary card header" %}</td>
<td class="right-align"><strong>{% gross order.get_total %}</strong></td>
</tr>
<tr>
- <td>{% trans "Preauthorized amount" %}</td>
- <td class="right-align">{% if preauthorized %}{% gross preauthorized %}{% else %}{% trans "N/A" %}{% endif %}</td>
+ <td>{% trans "Preauthorized amount" context "Order summary card header" %}</td>
+ <td class="right-align">
+ {% if preauthorized %}{% gross preauthorized %}
+ {% else %}{% trans "N/A" context "Preauthorized amount not available" %}{% endif %}</td>
</tr>
<tr>
- <td>{% trans "Captured amount" %}</td>
+ <td>{% trans "Captured amount" context "Order summary card header" %}</td>
<td class="right-align">{% gross captured %}</td>
</tr>
<tr>
- <td>{% trans "Outstanding balance" %}</td>
+ <td>{% trans "Outstanding balance" context "Order summary card header" %}</td>
<td class="right-align">{% gross balance %}</td>
</tr>
</tbody>
@@ -109,14 +113,14 @@
<div class="card-action">
{% if can_capture %}
<a href="#base-modal" data-href="{% url 'dashboard:capture-payment' order_pk=order.pk payment_pk=payment.pk %}"
- class="modal-trigger-custom">{% trans "Capture" %}</a>
+ class="modal-trigger-custom">{% trans "Capture" context "Order summary card action" %}</a>
{% elif can_refund %}
<a href="#base-modal" data-href="{% url 'dashboard:refund-payment' order_pk=order.pk payment_pk=payment.pk %}"
- class="modal-trigger-custom">{% trans "Refund" %}</a>
+ class="modal-trigger-custom">{% trans "Refund" context "Order summary card action" %}</a>
{% endif %}
{% if can_release %}
<a href="#base-modal" data-href="{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}"
- class="modal-trigger-custom">{% trans "Release" %}</a>
+ class="modal-trigger-custom">{% trans "Release" context "Order summary card action" %}</a>
{% endif %}
</div>
{% endif %}
@@ -128,7 +132,7 @@
<div class="col s12 m6 l12">
<div class="card grey lighten-4">
<div class="card-content">
- <span class="card-title black-text">{% trans "Shipping address" %}</span>
+ <span class="card-title black-text">{% trans "Shipping address" context "Shipping address card title" %}</span>
{% include 'dashboard/includes/_address.html' with address=address only %}
@@ -139,7 +143,9 @@
<div class="card-action">
<a href="#base-modal-fixed" class="modal-trigger-custom"
- data-href="{% url "dashboard:address-edit" order_pk=order.pk address_type="shipping" %}">{% trans "Edit" %}</a>
+ data-href="{% url "dashboard:address-edit" order_pk=order.pk address_type="shipping" %}">
+ {% trans "Edit" context "Shipping address card action" %}
+ </a>
</div>
</div>
</div>
@@ -149,7 +155,9 @@
<div class="card grey lighten-4">
<div class="card-content">
{% with order.billing_address as address %}
- <span class="card-title black-text">{% trans "Billing address" %}</span>
+ <span class="card-title black-text">
+ {% trans "Billing address" context "Billing address card title" %}
+ </span>
{% include 'dashboard/includes/_address.html' with address=address only %}
<div>
@@ -160,7 +168,8 @@
<div class="card-action">
<a href="#base-modal-fixed" class="modal-trigger-custom"
- data-href="{% url "dashboard:address-edit" order_pk=order.pk address_type="billing" %}">{% trans "Edit" %}</a>
+ data-href="{% url "dashboard:address-edit" order_pk=order.pk address_type="billing" %}">
+ {% trans "Edit" context "Billing address card action" %}</a>
</div>
</div>
</div>
@@ -173,7 +182,9 @@
<div class="card">
<div class="data-table-header">
<h5 class="data-table-title">
- {% blocktrans with shipment=group.id %}Shipment #{{ shipment }}{% endblocktrans %}
+ {% blocktrans trimmed with shipment=group.id context "Shipment group table title" %}
+ Shipment #{{ shipment }}
+ {% endblocktrans %}
{% if group.can_cancel %}
<a class="dropdown-button right" href="#" data-activates="group-actions-{{ group.pk }}" data-constrainwidth="false">
<i class="material-icons">more_vert</i>
@@ -184,8 +195,8 @@
<ul id="group-actions-{{ group.pk }}" class="dropdown-content">
<li>
<a href="#base-modal" data-href="{% url 'dashboard:cancel-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="modal-trigger-custom"
- title="{% trans "Cancel group" %}">
- {% trans "Cancel group" %}
+ title="{% trans "Cancel group" context "Shipment group table action" %}">
+ {% trans "Cancel group" context "Shipment group table action" %}
</a>
</li>
</ul>
@@ -195,11 +206,11 @@
<table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th class="wide">{% trans "Item" %}</th>
- <th>{% trans "SKU" %}</th>
- <th class="right-align">{% trans "Price" %}</th>
- <th class="right-align">{% trans "Quantity" %}</th>
- <th class="right-align">{% trans "Total" %}</th>
+ <th class="wide">{% trans "Item" context "Shipment group table header" %}</th>
+ <th>{% trans "SKU" context "Shipment group table header" %}</th>
+ <th class="right-align">{% trans "Price" context "Shipment group table header" %}</th>
+ <th class="right-align">{% trans "Quantity" context "Shipment group table header" %}</th>
+ <th class="right-align">{% trans "Total" context "Shipment group table header" %}</th>
<th class="no-padded"></th>
</tr>
</thead>
@@ -208,7 +219,9 @@
{% if group.shipping_price.gross or group.is_shipping_required %}
<tr>
<td colspan="4">
- {% trans "Shipping" %} ({{ group.shipping_method_name }})
+ {% blocktrans trimmed context "Shipment group table item column data" %}
+ Shipping ({{ group.shipping_method_name }})
+ {% endblocktrans %}
</td>
<td class="right-align">
{% gross group.shipping_price %}
@@ -236,20 +249,20 @@
<ul id="line-actions-{{ item.pk }}" class="dropdown-content">
<li>
<a href="#base-modal" data-href="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom"
- {% if group.status != 'new' %} disabled{% endif %} title="{% trans "Change quantity" %}">
- {% trans "Change quantity" %}
+ {% if group.status != 'new' %} disabled{% endif %} title="{% trans "Change quantity" context "Shipment group table row action" %}">
+ {% trans "Change quantity" context "Shipment group table row action" %}
</a>
</li>
<li>
<a href="#base-modal" data-href="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom"
- {% if group.status != 'new' %} disabled{% endif %} title="{% trans "Split line" %}">
- {% trans "Split order line" %}
+ {% if group.status != 'new' %} disabled{% endif %} title="{% trans "Split line" context "Shipment group table row action" %}">
+ {% trans "Split order line" context "Shipment group table row action" %}
</a>
</li>
<li>
<a href="#base-modal" data-href="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom"
- title="{% trans "Cancel line" %}">
- {% trans "Cancel line" %}
+ title="{% trans "Cancel line" context "Shipment group table row action" %}">
+ {% trans "Cancel line" context "Shipment group table row action" %}
</a>
</li>
</ul>
@@ -264,13 +277,13 @@
{% if group.can_ship %}
<div class="card-action">
<a href="#base-modal" data-href="{% url 'dashboard:ship-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="modal-trigger-custom">
- {% trans "Ship" %}
+ {% trans "Ship" context "Shipment group table action" %}
</a>
</div>
{% else %}
{% if group.tracking_number %}
<div class="card-action">
- {% blocktrans with tracking=group.tracking_number %}
+ {% blocktrans trimmed with tracking=group.tracking_number context "Shipment group table text" %}
Tracking number: {{ tracking }}
{% endblocktrans %}
</div>
@@ -285,7 +298,7 @@
<tfoot>
<tr>
<td>
- {% trans "Grand total" %}
+ {% trans "Grand total" context "Order totals header" %}
</td>
<td>
{% gross order.get_total %}
@@ -297,7 +310,7 @@
<tbody>
<tr>
<td class="wide">
- {% trans "Subtotal" %}
+ {% trans "Subtotal" context "Order totals header" %}
</td>
<td class="right-align">
{% gross order.get_subtotal_without_voucher %}
@@ -305,7 +318,7 @@
<td class="no-padded"></td>
</tr>
<tr>
- <td>{% trans "Shipping" %}</td>
+ <td>{% trans "Shipping" context "Order totals header" %}</td>
<td class="right-align">
{% gross order.get_total_shipping %}
</td>
@@ -314,7 +327,9 @@
{% if order.discount_amount.gross %}
<tr>
<td>
- {% blocktrans with voucher=order.discount_name %}Voucher {{ voucher }}{% endblocktrans %}
+ {% blocktrans trimmed with voucher=order.discount_name context "Order totals header" %}
+ Voucher {{ voucher }}
+ {% endblocktrans %}
</td>
<td class="right-align">
{% gross order.discount|discount_amount_for:order.total %}
@@ -326,9 +341,10 @@
<ul id="voucher-actions" class="dropdown-content">
<li>
- <a href="#base-modal" data-href="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}" class="modal-trigger-custom"
- title="{% trans "Remove voucher" %}">
- {% trans "Remove voucher" %}
+ <a href="#base-modal" data-href="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}"
+ class="modal-trigger-custom"
+ title="{% trans "Remove voucher" context "Order totals action" %}">
+ {% trans "Remove voucher" context "Order totals action" %}
</a>
</li>
</ul>
@@ -342,7 +358,7 @@
<div class="card" id="order-notes">
<div class="card-content">
- <span class="card-title black-text">{% trans "Order notes" %}</span>
+ <span class="card-title black-text">{% trans "Order notes" context "Order notes card title" %}</span>
{% if notes %}
<ul class="list">
@@ -354,13 +370,13 @@
{% endfor %}
</ul>
{% else %}
- <p>{% trans "There are no notes associated with this order." %}</p>
+ <p>{% trans "There are no notes associated with this order." context "Empty order notes card message" %}</p>
{% endif %}
</div>
<div class="card-action">
<a data-href="{% url "dashboard:order-add-note" order_pk=order.pk %}"
- class="modal-trigger-custom" href="#base-modal">{% trans "Add note" %}</a>
+ class="modal-trigger-custom" href="#base-modal">{% trans "Add note" context "Order notes card action" %}</a>
</div>
</div>
</div>
@@ -374,15 +390,19 @@
<thead>
<tr>
<th></th>
- <th>{% trans "Date" %}</th>
- <th class="wide">{% trans "Payment status" %}</th>
+ <th>{% trans "Date" context "Payment history table header" %}</th>
+ <th class="wide">{% trans "Payment status" context "Payment history table header" %}</th>
</tr>
</thead>
<tbody>
{% for payment in all_payments %}
<tr>
- <td><a href="{% url "dashboard:payment-details" pk=payment.pk %}">#{{ payment.id }}</a></td>
+ <td><a href="{% url "dashboard:payment-details" pk=payment.pk %}">
+ {% blocktrans trimmed context "Payment item column data" %}
+ #{{ payment.id }}
+ {% endblocktrans %}
+ </a></td>
<td>{{ payment.created }}</td>
<td>{% render_status payment.status payment.get_status_display %}</td>
</tr>
@@ -392,7 +412,7 @@
</div>
</div>
{% else %}
- <p>{% trans "No payments made for this order." %}</p>
+ <p>{% trans "No payments made for this order." context "Empty payment history table message" %}</p>
{% endif %}
</div>
@@ -401,10 +421,10 @@
<table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th>{% trans "Date" %}</th>
- <th>{% trans "Order status" %}</th>
- <th>{% trans "User" %}</th>
- <th class="wide">{% trans "Comment" %}</th>
+ <th>{% trans "Date" context "Order history table header" %}</th>
+ <th>{% trans "Order status" context "Order history table header" %}</th>
+ <th>{% trans "User" context "Order history table header" %}</th>
+ <th class="wide">{% trans "Comment" context "Order history table header" %}</th>
</tr>
</thead>
diff --git a/templates/dashboard/order/list.html b/templates/dashboard/order/list.html
index 9a6fc3435c..3ce857e6aa 100644
--- a/templates/dashboard/order/list.html
+++ b/templates/dashboard/order/list.html
@@ -3,7 +3,7 @@
{% load prices_i18n %}
{% load status %}
-{% block title %}{% trans "Orders" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Orders" context "Order list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-orders{% endblock %}
@@ -11,7 +11,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Orders" %}</li>
+ <li class="visible-s">{% trans "Orders" context "Order list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -26,6 +26,6 @@
{% include "dashboard/includes/_pagination.html" %}
</div>
{% else %}
- <p>{% trans "No orders." %}</p>
+ <p>{% trans "No orders." context "Empty order list message" %}</p>
{% endif %}
{% endblock %}
diff --git a/templates/dashboard/order/modal_add_note.html b/templates/dashboard/order/modal_add_note.html
index af6a232ae7..517e8bc614 100644
--- a/templates/dashboard/order/modal_add_note.html
+++ b/templates/dashboard/order/modal_add_note.html
@@ -4,7 +4,7 @@
<form role="form" method="post" action="{% url 'dashboard:order-add-note' order_pk=order.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Add note" %}</h5>
+ <h5>{% trans "Add note" context "Modal add note title" %}</h5>
<div class="row">
{{ form|materializecss }}
@@ -12,7 +12,10 @@
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text btn-">{% trans "Save note" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text btn-">
+ {% trans "Save note" context "Modal add note primary action" %}
+ </button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal add note secondary action" %}</a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_address_edit.html b/templates/dashboard/order/modal_address_edit.html
index e06cafefb8..127e68d526 100644
--- a/templates/dashboard/order/modal_address_edit.html
+++ b/templates/dashboard/order/modal_address_edit.html
@@ -6,9 +6,9 @@
<div class="modal-content">
<h5>
{% if address_type == "shipping" %}
- {% trans "Edit shipping address" %}
+ {% trans "Edit shipping address" context "Modal address title" %}
{% else %}
- {% trans "Edit billing address" %}
+ {% trans "Edit billing address" context "Modal address title" %}
{% endif %}
</h5>
@@ -17,7 +17,11 @@
</div>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text"> {% trans "Update" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Update" context "Modal address primary action" %}
+ </button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal address secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_cancel_delivery_group.html b/templates/dashboard/order/modal_cancel_delivery_group.html
index 52c3f4a444..714a9b4c93 100644
--- a/templates/dashboard/order/modal_cancel_delivery_group.html
+++ b/templates/dashboard/order/modal_cancel_delivery_group.html
@@ -5,16 +5,18 @@
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Cancel delivery group?" %}</h5>
+ <h5>{% trans "Cancel delivery group?" context "Modal cancel delivery group title" %}</h5>
<p>
- {% blocktrans %}
+ {% blocktrans trimmed context "Modal cancel delivery group text" %}
After this action, {{ group }} will be cancelled. Ordered items will be returned to stock.
{% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat red-text">{% trans "Cancel group" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat red-text">
+ {% trans "Cancel group" context "Modal cancel delivery group primary action" %}</button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal cancel delivery group secondary action" %}</a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_cancel_line.html b/templates/dashboard/order/modal_cancel_line.html
index 30e159a5db..df7eb307cf 100644
--- a/templates/dashboard/order/modal_cancel_line.html
+++ b/templates/dashboard/order/modal_cancel_line.html
@@ -5,9 +5,9 @@
<form class="form-async" role="form" method="post" action="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Cancel order line?" %}</h5>
+ <h5>{% trans "Cancel order line?" context "Modal cancel order line title" %}</h5>
<p>
- {% blocktrans with order=order%}
+ {% blocktrans trimmed with order=order context "Modal cancel order line text" %}
Are you sure, you want cancel this order line?
{% endblocktrans %}
</p>
@@ -15,11 +15,11 @@
<table>
<thead>
<tr>
- <th class="wide">{% trans "Item" %}</th>
- <th>{% trans "SKU" %}</th>
- <th class="right-align">{% trans "Price" %}</th>
- <th class="right-align">{% trans "Quantity" %}</th>
- <th class="right-align">{% trans "Total" %}</th>
+ <th class="wide">{% trans "Item" context "Modal cancel order line table header" %}</th>
+ <th>{% trans "SKU" context "Modal cancel order line table header" %}</th>
+ <th class="right-align">{% trans "Price" context "Modal cancel order line table header" %}</th>
+ <th class="right-align">{% trans "Quantity" context "Modal cancel order line table header" %}</th>
+ <th class="right-align">{% trans "Total" context "Modal cancel order line table header" %}</th>
</tr>
</thead>
<tbody>
@@ -37,7 +37,9 @@
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat red-text">{% trans "Cancel Line" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>
+ <button type="submit" class="modal-action btn-flat red-text">
+ {% trans "Cancel Line" context "Modal cancel order line primary action" %}</button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Abort" context "Modal cancel order line secondary action" %}</a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_cancel_order.html b/templates/dashboard/order/modal_cancel_order.html
index fa3524449c..64e9b48e2d 100644
--- a/templates/dashboard/order/modal_cancel_order.html
+++ b/templates/dashboard/order/modal_cancel_order.html
@@ -2,9 +2,9 @@
{% load materializecss %}
<div class="modal-content">
- <h5>{% trans "Cancel order?" %}</h5>
+ <h5>{% trans "Cancel order?" context "Modal cancel order title" %}</h5>
<p>
- {% blocktrans with order=order%}
+ {% blocktrans trimmed with order=order context "Modal cancel order text" %}
Are you sure, you want cancel order {{ order }}?
{% endblocktrans %}</p>
</div>
@@ -13,7 +13,9 @@
<form id="release-form" method="post" role="form" class="form-async"
action="{% url 'dashboard:order-cancel' order_pk=order.pk %}" novalidate>
{% csrf_token %}
- <button type="submit" class="modal-action btn-flat red-text">{% trans "Cancel Order" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>
+ <button type="submit" class="modal-action btn-flat red-text">
+ {% trans "Cancel Order" context "Modal cancel order primary action" %}</button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Abort" context "Modal cancel order secondary action" %}</a>
</form>
</div>
diff --git a/templates/dashboard/order/modal_capture.html b/templates/dashboard/order/modal_capture.html
index 5d20baf0b6..fe1692c4cc 100644
--- a/templates/dashboard/order/modal_capture.html
+++ b/templates/dashboard/order/modal_capture.html
@@ -7,22 +7,28 @@
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Capture payment" %}</h5>
+ <h5>{% trans "Capture payment" context "Modal capture payment title" %}</h5>
<div class="row">
{{ form|materializecss }}
</div>
- <h5>{% trans "Before this action" %}</h5>
+ <h5>{% trans "Before this action" context "Modal capture payment title" %}</h5>
<ul class="list">
- <li class="list-item">{% trans "Order total: " %}{% gross payment.order.get_total %}</li>
- <li class="list-item">{% trans "Captured amount: " %}{{ captured|currencyfmt:currency }} </li>
+ <li class="list-item">{% trans "Order total:" context "Modal capture payment list title" %}
+ {% gross payment.order.get_total %}</li>
+ <li class="list-item">{% trans "Captured amount:" context "Modal capture payment list title" %}
+ {{ captured|currencyfmt:currency }} </li>
</ul>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans 'Capture' %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Capture" context "Modal capture payment primary action" %}
+ </button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal capture payment secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_change_quantity.html b/templates/dashboard/order/modal_change_quantity.html
index c02dfbb00a..de2f4ba9fe 100644
--- a/templates/dashboard/order/modal_change_quantity.html
+++ b/templates/dashboard/order/modal_change_quantity.html
@@ -4,7 +4,7 @@
<form method="post" role="form" action="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=object.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Change quantity" %}</h5>
+ <h5>{% trans "Change quantity" context "Modal change quantity title" %}</h5>
<div class="row">
{{ form|materializecss:"s12 m6" }}
@@ -12,7 +12,10 @@
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Update" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Update" context "Modal change quantity primary action" %}</button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal change quantity secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_order_remove_voucher.html b/templates/dashboard/order/modal_order_remove_voucher.html
index 6e508966be..962bb51d4e 100644
--- a/templates/dashboard/order/modal_order_remove_voucher.html
+++ b/templates/dashboard/order/modal_order_remove_voucher.html
@@ -2,18 +2,22 @@
{% load materializecss %}
<div class="modal-content">
- <h5>{% trans "Remove voucher?" %}</h5>
+ <h5>{% trans "Remove voucher?" context "Modal remove voucher from order title" %}</h5>
<p>
- {% blocktrans with order=order%}
+ {% blocktrans trimmed with order=order context "Modal remove voucher from order text" %}
Are you sure, you want remove voucher discount from {{ order }}?
- {% endblocktrans %}</p>
+ {% endblocktrans %}
+ </p>
</div>
<div class="modal-footer">
<form id="release-form" method="post" role="form" class="form-async"
action="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}" novalidate>
{% csrf_token %}
- <button type="submit" class="modal-action btn-flat red-text">{% trans "Remove voucher" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>
+ <button type="submit" class="modal-action btn-flat red-text">
+ {% trans "Remove voucher" context "Modal remove voucher from order primary action" %}</button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Abort" context "Modal remove voucher from order secondary action" %}
+ </a>
</form>
</div>
diff --git a/templates/dashboard/order/modal_refund.html b/templates/dashboard/order/modal_refund.html
index 86fbf40b9b..43121285a8 100644
--- a/templates/dashboard/order/modal_refund.html
+++ b/templates/dashboard/order/modal_refund.html
@@ -7,22 +7,30 @@
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Refund payment" %}</h5>
+ <h5>{% trans "Refund payment" context "Modal refund payment title" %}</h5>
<div class="row">
{{ form|materializecss }}
</div>
- <h5>{% trans "Before this action" %}</h5>
+ <h5>{% trans "Before this action" context "Modal refund payment title" %}</h5>
<ul class="list">
- <li class="list-item">{% trans "Order total: " %}{% gross payment.order.get_total %}</li>
- <li class="list-item">{% trans "Captured amount: " %}{{ captured|currencyfmt:currency }} </li>
+ <li class="list-item">{% trans "Order total:" context "Modal refund payment list title" %}
+ {% gross payment.order.get_total %}
+ </li>
+ <li class="list-item">{% trans "Captured amount:" context "Modal refund payment list title" %}
+ {{ captured|currencyfmt:currency }}
+ </li>
</ul>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans 'Refund' %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Refund" context "Modal refund payment primary action" %}
+ </button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal refund payment secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_release.html b/templates/dashboard/order/modal_release.html
index 771b125833..8816cc771c 100644
--- a/templates/dashboard/order/modal_release.html
+++ b/templates/dashboard/order/modal_release.html
@@ -2,9 +2,9 @@
{% load materializecss %}
<div class="modal-content">
- <h5>{% trans "Release payment" %}</h5>
+ <h5>{% trans "Release payment" context "Modal release payment text" %}</h5>
- <p>{% trans "Do you want to release the payment?" %}</p>
+ <p>{% trans "Do you want to release the payment?" context "Modal release payment text" %}</p>
</div>
<div class="modal-footer">
@@ -12,7 +12,11 @@
action="{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}" novalidate>
{% csrf_token %}
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Release" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Release" context "Modal release payment primary action" %}
+ </button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal release payment secondary action" %}
+ </a>
</form>
</div>
diff --git a/templates/dashboard/order/modal_ship_delivery_group.html b/templates/dashboard/order/modal_ship_delivery_group.html
index 7391e1f551..c039e7d2fc 100644
--- a/templates/dashboard/order/modal_ship_delivery_group.html
+++ b/templates/dashboard/order/modal_ship_delivery_group.html
@@ -5,8 +5,8 @@
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Ship delivery group " %}</h5>
- <p>{% trans "Ship selected delivery group to the following address:" %}</p>
+ <h5>{% trans "Ship delivery group" context "Modal ship delivery group title" %}</h5>
+ <p>{% trans "Ship selected delivery group to the following address:" context "Modal ship delivery group text" %}</p>
{% include 'dashboard/includes/_address.html' with address=group.order.shipping_address only %}
<div class="row">
{{ form|materializecss }}
@@ -14,7 +14,11 @@
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Ship" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Ship" context "Modal ship delivery group primary action" %}
+ </button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal ship delivery group secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/order/modal_split_order_line.html b/templates/dashboard/order/modal_split_order_line.html
index 01fc8d84a1..71b500d963 100644
--- a/templates/dashboard/order/modal_split_order_line.html
+++ b/templates/dashboard/order/modal_split_order_line.html
@@ -5,7 +5,7 @@
action="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=line_pk %}" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Split order line " %}</h5>
+ <h5>{% trans "Split order line" context "Modal split order line title" %}</h5>
<div class="row">
{{ form|materializecss:"s12 m6" }}
@@ -13,7 +13,10 @@
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text"> {% trans "Split" %}</button>
- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Split" context "Modal split order line primary action" %}</button>
+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal split order line primary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/payments/detail.html b/templates/dashboard/payments/detail.html
index 04ee0ac194..8fa03914ed 100644
--- a/templates/dashboard/payments/detail.html
+++ b/templates/dashboard/payments/detail.html
@@ -4,7 +4,11 @@
{% load status %}
{% load utils %}
-{% block title %}{% trans "Payment" %} #{{ payment.id }} - {% trans "Payments" %} - {{ block.super }}{% endblock %}
+{% block title %}
+ {% blocktrans trimmed with payment_id=payment.id context "Payment detail page title" %}
+ Payment #{{ payment_id }} - Payments
+ {% endblocktrans %} - {{ block.super }}
+{% endblock %}
{% block body_class %}body-payments{% endblock %}
@@ -17,9 +21,15 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url "dashboard:payments" %}">{% trans "Payments" %}</a></li>
+ <li><a href="{% url "dashboard:payments" %}">
+ {% trans "Payments" context "Payment detail breadcrumbs" %}
+ </a></li>
<li class="back-mobile"><a href="{% url "dashboard:payments" %}"><i class="material-icons">arrow_back</i></a></li>
- <li><span>#{{ payment.id }}</span></li>
+ <li><span>
+ {% blocktrans trimmed with payment_id=payment.id context "Payment detail breadcrumbs" %}
+ #{{ payment.id }}
+ {% endblocktrans %}
+ </span></li>
</ul>
{% endblock %}
@@ -30,28 +40,28 @@
<div class="col s12 l8">
<div class="card grey lighten-4">
<div class="card-content">
- <span class="card-title black-text">{% trans "Payment details" %}</span>
+ <span class="card-title black-text">{% trans "Payment details" context "Payment detail card title" %}</span>
<ul>
- <li>{% trans "Payment status" %}: {% render_status payment.status payment.get_status_display %}</li>
- <li>{% trans "Fraud status" %}: {% render_status payment.fraud_status payment.get_fraud_status_display %}</li>
- <li>{% trans "Amount" %}: {% gross payment.get_total_price %}</li>
- <li>{% trans "Captured amount" %}: {% gross payment.get_captured_price %}</li>
- <li>{% trans "Gateway" %}: {{ payment.variant }}</li>
- <li>{% trans "Transaction ID" %}: {{ payment.transaction_id }}</li>
- <li>{% trans "Payment date" %}: {{ payment.created }}</li>
+ <li>{% trans "Payment status" context "Payment detail card list item title" %}: {% render_status payment.status payment.get_status_display %}</li>
+ <li>{% trans "Fraud status" context "Payment detail card list item title" %}: {% render_status payment.fraud_status payment.get_fraud_status_display %}</li>
+ <li>{% trans "Amount" context "Payment detail card list item title" %}: {% gross payment.get_total_price %}</li>
+ <li>{% trans "Captured amount" context "Payment detail card list item title" %}: {% gross payment.get_captured_price %}</li>
+ <li>{% trans "Gateway" context "Payment detail card list item title" %}: {{ payment.variant }}</li>
+ <li>{% trans "Transaction ID" context "Payment detail card list item title" %}: {{ payment.transaction_id }}</li>
+ <li>{% trans "Payment date" context "Payment detail card list item title" %}: {{ payment.created }}</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-content">
- <span class="card-title black-text">{% trans "Gateway response" %}</span>
+ <span class="card-title black-text">{% trans "Gateway response" context "Gateway response card title" %}</span>
{% if payment.message %}
{{ payment.message }}
{% else %}
- <p>{% trans "No response available." %}</p>
+ <p>{% trans "No response available." context "Empty gateway response card message" %}</p>
{% endif %}
</div>
</div>
@@ -62,13 +72,16 @@
<div class="col s12 m6 l12">
<div class="card equal-height-on-med">
<div class="card-content">
- <span class="card-title black-text">{% trans "Customer" %}</span>
+ <span class="card-title black-text">{% trans "Customer" context "Customer card title" %}</span>
<div class="address">
{% if payment.order.user %}
- <div>{% trans "Account" %}: <a href="{% url "dashboard:customer-details" pk=payment.order.user.pk %}">{{ payment.order.user }}</a></div>
+ <div>{% trans "Account" context "Customer card item title" %}:
+ <a href="{% url "dashboard:customer-details" pk=payment.order.user.pk %}">
+ {{ payment.order.user }}</a>
+ </div>
{% else %}
- <div>{% trans "Account" %}: {% trans "Guest" %}</div>
+ <div>{% trans "Account" context "Customer card item title" %}: {% trans "Guest" context "Customer card item value" %}</div>
{% endif %}
<div><i class="material-icons">email</i> <a href="mailto:{{ payment.order.user_email }}">{{ payment.order.user_email }}</a></div>
<div>Customer IP: {{ payment.customer_ip_address }}</div>
@@ -80,7 +93,7 @@
<div class="col s12 m6 l12">
<div class="card equal-height-on-med">
<div class="card-content">
- <span class="card-title black-text">{% trans "Billing address" %}</span>
+ <span class="card-title black-text">{% trans "Billing address" context "Billing address card title" %}</span>
<div class="address">
<strong>{{ payment.billing_first_name }} {{ payment.billing_last_name }}</strong>
diff --git a/templates/dashboard/payments/list.html b/templates/dashboard/payments/list.html
index 6f7f58ae3a..db9ca2c784 100644
--- a/templates/dashboard/payments/list.html
+++ b/templates/dashboard/payments/list.html
@@ -3,7 +3,7 @@
{% load prices_i18n %}
{% load status %}
-{% block title %}{% trans "Payments" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Payments" context "Payment list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-payments{% endblock %}
@@ -11,7 +11,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Payments" %}</li>
+ <li class="visible-s">{% trans "Payments" context "Payment list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -25,20 +25,30 @@
<thead>
<tr>
<th></th>
- <th>{% trans "Date" %}</th>
- <th>{% trans "Payment" %}</th>
- <th class="right-align">{% trans "Amount" %}</th>
- <th class="wide">{% trans "Status" %}</th>
+ <th>{% trans "Date" context "Payments table header" %}</th>
+ <th>{% trans "Payment" context "Payments table header" %}</th>
+ <th class="right-align">{% trans "Amount" context "Payments table header" %}</th>
+ <th class="wide">{% trans "Status" context "Payments table header" %}</th>
</tr>
</thead>
<tbody>
{% for payment in payments %}
<tr>
- <td><a href="{% url "dashboard:payment-details" pk=payment.pk %}">#{{ payment.id }}</a></td>
+ <td><a href="{% url "dashboard:payment-details" pk=payment.pk %}">
+ {% blocktrans trimmed with payment_id=payment.id context "Payments table item data" %}
+ #{{ payment_id }}
+ {% endblocktrans %}
+ </a></td>
<td>{{ payment.created }}</td>
<td>
- {% trans "Gateway" %}: {{ payment.variant }} &middot;
- <a href="{% url 'dashboard:order-details' order_pk=payment.order.pk %}"> {% trans "Order " %}{{ payment.order }}</a>
+ {% blocktrans trimmed with payment_variant=payment.variant context "Payments table item data" %}
+ Gateway {{ payment_variant }}
+ {% endblocktrans %} &middot;
+ <a href="{% url 'dashboard:order-details' order_pk=payment.order.pk %}">
+ {% blocktrans trimmed with order=payment.order context "Payments table item data" %}
+ Order {{ order }}
+ {% endblocktrans %}
+ </a>
</td>
<td class="right-align">{% gross payment.get_total_price %}</td>
<td>{% render_status payment.status payment.get_status_display %}</td>
@@ -51,7 +61,7 @@
{% include "dashboard/includes/_pagination.html" %}
{% else %}
- <p>{% trans "No payments found." %}</p>
+ <p>{% trans "No payments found." context "Empty payments table message" %}</p>
{% endif %}
{% endblock %}
diff --git a/templates/dashboard/product/attributes/confirm_delete.html b/templates/dashboard/product/attributes/confirm_delete.html
index 6070c07ddd..6a7e33eda3 100644
--- a/templates/dashboard/product/attributes/confirm_delete.html
+++ b/templates/dashboard/product/attributes/confirm_delete.html
@@ -1,17 +1,19 @@
{% extends "dashboard/base.html" %}
{% load i18n %}
-{% block title %}{% trans "Delete attribute" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Delete attribute" context "Delete attribute page title" %} - {{ block.super }}{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Attributes" %}</a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% trans "Delete attribute" %}</span></li>
+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Attributes" context "Delete attribute breadcrumbs" %}
+ </a></li>
+ <li><span class="breadcrumbs--ellipsed-item">{% trans "Delete attribute" context "Delete attribute breadcrumbs" %}</span></li>
</ul>
{% endblock %}
{% block content %}
- <p>{% trans "Are you sure you want to delete the following attribute?" %}</p>
+ <p>{% trans "Are you sure you want to delete the following attribute?" context "Delete attribute text" %}</p>
<form method="post" novalidate>
{% csrf_token %}
<div class="row">
@@ -24,8 +26,10 @@
<div class="row">
<div class="col m6 l4 offset-m3 offset-l4 right-align">
- <a href="{% url 'dashboard:product-attributes' %}" class="btn-flat"><i class="material-icons">clear</i> {% trans "Cancel" %}</a>
- <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i> {% trans "Delete" %}</button>
+ <a href="{% url 'dashboard:product-attributes' %}" class="btn-flat"><i class="material-icons">clear</i>
+ {% trans "Cancel" context "Delete attribute secondary action" %}</a>
+ <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i>
+ {% trans "Delete" context "Delete attribute primary action" %}</button>
</div>
</div>
</form>
diff --git a/templates/dashboard/product/attributes/form.html b/templates/dashboard/product/attributes/form.html
index ea80629385..0abf6e8173 100644
--- a/templates/dashboard/product/attributes/form.html
+++ b/templates/dashboard/product/attributes/form.html
@@ -3,7 +3,8 @@
{% load materializecss %}
{% load static %}
-{% block title %}{% if attribute.pk %}{{ attribute }}{% else %}{% trans 'Add new attribute' %}{% endif %} - {% trans "Attributes" %} - {{ block.super }}{% endblock %}
+{% block title %}{% if attribute.pk %}{{ attribute }}{% else %}{% trans "Add new attribute" context "Attribute detail page title" %}{% endif %} -
+ {% trans "Attributes" context "Attribute detail page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-attributes{% endblock %}
@@ -23,7 +24,7 @@
<li>
<a class="modal-trigger-custom" href="#base-modal"
data-href="{% url 'dashboard:product-attribute-delete' pk=attribute.pk %}">
- {% trans "Remove attribute" %}
+ {% trans "Remove attribute" context "Attribute detail action" %}
</a>
</li>
</ul>
@@ -32,9 +33,13 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Attributes" %}</a></li>
+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Attributes" context "Attribute detail breadcrumbs" %}
+ </a></li>
<li class="back-mobile"><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% if attribute.pk %}{{ attribute }}{% else %}{% trans 'Add new attribute' %}{% endif %}</span></li>
+ <li><span class="breadcrumbs--ellipsed-item">
+ {% if attribute.pk %}{{ attribute }}{% else %}{% trans "Add new attribute" context "Attribute detail breadcrumbs" %}{% endif %}
+ </span></li>
</ul>
{% endblock %}
@@ -50,7 +55,7 @@
{{ form.name|materializecss }}
</div>
- <h5>{% trans "Attribute values" %}</h5>
+ <h5>{% trans "Attribute values" context "Attribute values formset title" %}</h5>
{{ formset.management_form }}
{{ formset.non_form_errors.as_ul }}
<table id="formset" class="highlight">
@@ -84,9 +89,9 @@
<div class="row">
<div class="col s12 l8 right-align">
{% if attribute.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">{% trans "Update" context "Attribute values formset action" %}</button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">{% trans "Create" context "Attribute values formset action" %}</button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/product/attributes/list.html b/templates/dashboard/product/attributes/list.html
index 619423a8a2..0e88d0d7a1 100644
--- a/templates/dashboard/product/attributes/list.html
+++ b/templates/dashboard/product/attributes/list.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load materializecss %}
-{% block title %}{% trans "Attributes" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Attributes" context "Attribute list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-attributes{% endblock %}
@@ -11,7 +11,7 @@
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
- href="{% url 'dashboard:product-attribute-add' %}" title="{% trans "Add attribute" %}">
+ href="{% url 'dashboard:product-attribute-add' %}" title="{% trans "Add attribute" context "Attribute list add button text" %}">
<i class="material-icons">add</i>
</a>
</div>
@@ -19,7 +19,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Attributes" %}</li>
+ <li class="visible-s">{% trans "Attributes" context "Attribute list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -43,7 +43,7 @@
{% endfor %}
</ul>
{% else %}
- <p>{% trans "No attributes found." %}</p>
+ <p>{% trans "No attributes found." context "Empty attribute list message" %}</p>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/product/attributes/modal_confirm_delete.html b/templates/dashboard/product/attributes/modal_confirm_delete.html
index 73c8fe552a..5244fe5842 100644
--- a/templates/dashboard/product/attributes/modal_confirm_delete.html
+++ b/templates/dashboard/product/attributes/modal_confirm_delete.html
@@ -3,15 +3,19 @@
<form action="{% url "dashboard:product-attribute-delete" pk=attribute.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Modal delete attribute title" %}</h5>
<p>
- {% blocktrans %}You are about to delete an attribute <strong>{{ attribute }}</strong>.{% endblocktrans %}
+ {% blocktrans trimmed context "Modal delete attribute text" %}
+ You are about to delete an attribute <strong>{{ attribute }}</strong>.
+ {% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Modal delete attribute primary action" %}</button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete attribute secondary action" %}</a>
</div>
</form>
diff --git a/templates/dashboard/product/class_list.html b/templates/dashboard/product/class_list.html
index 5df82f9033..a0e39e3218 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 types" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Product types" context "Product type list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-products{% endblock %}
@@ -13,7 +13,8 @@
{% 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 type" %}"
+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
+ title="{% trans "Add product type" context "Product type list add button text" %}"
href="{% url 'dashboard:product-class-add' %}">
<i class="material-icons">add</i>
</a>
@@ -22,7 +23,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Product types" %}</li>
+ <li>{% trans "Product types" context "Product type list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -39,19 +40,20 @@
<span class="list-item-name">{{ name }}</span>
</a>
<p>
- {% trans 'Variants' %}: {% if has_variants %}{% trans 'Yes' %}{% else %}{% trans 'No' %}{% endif %}
- {% if variant_attributes %} | {% trans 'Variant attributes' %}: {{ variant_attributes|join:", " }}{% endif %}
- {% if product_attributes %} | {% trans 'Product attributes' %}: {{ product_attributes|join:", " }}{% endif %}
+ {% trans "Variants" context "Product type item list text" %}: {% if has_variants %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}
+ {% if variant_attributes %} | {% trans "Variant attributes" context "Product type item list text" %}: {{ variant_attributes|join:", " }}{% endif %}
+ {% if product_attributes %} | {% trans "Product attributes" context "Product type item list text" %}: {{ product_attributes|join:", " }}{% endif %}
</p>
</li>
{% endfor %}
</ul>
{% include "dashboard/includes/_pagination.html" with page_obj=product_classes %}
{% else %}
- <p>{% trans "No product types found." %}</p>
+ <p>{% trans "No product types found." context "Empty product type list message" %}</p>
{% endif %}
</div>
</div>
+ <Div></Div>
<div id="modal-product-class" class="modal">
<div class="modal-content">
<form method="post" novalidate>
@@ -63,7 +65,7 @@
<div class="row">
<div class="col s12">
<button class="btn" type="submit">
- <i class="material-icons left">create</i> {% trans "Create new" %}
+ <i class="material-icons left">create</i> {% trans "Create new" context "Modal add product type action" %}
</button>
</div>
</div>
diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.html
index 0d204cbe4e..5916023487 100644
--- a/templates/dashboard/product/list.html
+++ b/templates/dashboard/product/list.html
@@ -4,7 +4,7 @@
{% load materializecss %}
{% load staticfiles %}
-{% block title %}{% trans "Products" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Products" context "Product list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-products{% endblock %}
@@ -14,7 +14,8 @@
<div class="fixed-action-btn">
{% if product_classes %}
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal modal-trigger"
- href="#modal-product-class" title="{% trans "Add product" %}">
+ href="#modal-product-class"
+ title="{% trans "Add product" context "Product list add button text" %}">
<i class="material-icons">add</i>
</a>
{% endif %}
@@ -23,7 +24,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Products" %}</li>
+ <li class="visible-s">{% trans "Products" context "Product list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -50,9 +51,9 @@
</ul>
{% include "dashboard/includes/_pagination.html" with page_obj=products %}
{% else %}
- <p>{% trans "No products found." %}</p>
+ <p>{% trans "No products found." context "Empty product list message" %}</p>
{% if not product_classes %}
- <p>{% trans "Create product type first." %}</p>
+ <p>{% trans "Create product type first." context "Empty product list without product types message" %}</p>
{% endif %}
{% endif %}
</div>
@@ -68,7 +69,8 @@
<div class="row">
<div class="col s12">
<button class="btn" type="submit">
- <i class="material-icons left">create</i> {% trans "Create new" %}
+ <i class="material-icons left">create</i>
+ {% trans "Create new" context "Product list choose product type for new product action" %}
</button>
</div>
</div>
diff --git a/templates/dashboard/product/modal_product_class_confirm_delete.html b/templates/dashboard/product/modal_product_class_confirm_delete.html
index 8262a439d3..40a14e3866 100644
--- a/templates/dashboard/product/modal_product_class_confirm_delete.html
+++ b/templates/dashboard/product/modal_product_class_confirm_delete.html
@@ -7,21 +7,25 @@
<div class="modal-content">
<div class="row">
<div class="col s12">
- <h5>{% trans "Error" %}</h5>
+ <h5>{% trans "Error" context "Modal delete product class with products title" %}</h5>
</div>
</div>
<div class="row">
<div class="col s12 center-align">
<p>
- {% blocktrans %}This type is base for created products. Cannot remove it.{% endblocktrans %}
+ {% blocktrans trimmed context "Modal delete product class with products text" %}
+ This type is base for created products. Cannot remove it.
+ {% endblocktrans %}
</p>
</div>
</div>
</div>
<div class="modal-footer">
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete product class with products secondary action" %}
+ </a>
</div>
{% else %}
<form action="{% url "dashboard:product-class-delete" pk=product_class.pk %}" method="post" novalidate>
@@ -29,17 +33,23 @@
<div class="modal-content">
<div class="row">
<div class="col s12">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Modal delete product class title" %}</h5>
</div>
</div>
<p>
- {% blocktrans %}If you remove <strong>{{ product_class }}</strong> you will lose all data related to this product type.{% endblocktrans %}
+ {% blocktrans trimmed context "Modal delete product class text" %}
+ If you remove <strong>{{ product_class }}</strong> you will lose all data related to this product type.
+ {% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Modal delete product class primary action" %}
+ </button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete product class secondary action" %}
+ </a>
</div>
</form>
{% endif %}
diff --git a/templates/dashboard/product/modal_product_confirm_delete.html b/templates/dashboard/product/modal_product_confirm_delete.html
index d3e47dc879..45efd54d9d 100644
--- a/templates/dashboard/product/modal_product_confirm_delete.html
+++ b/templates/dashboard/product/modal_product_confirm_delete.html
@@ -7,7 +7,7 @@
<div class="modal-content">
<div class="row">
<div class="col s12">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Modal delete product title" %}</h5>
</div>
</div>
@@ -22,12 +22,18 @@
</div>
<p>
- {% blocktrans %}If you remove <strong>{{ product }}</strong> you will lose all data related to this product.{% endblocktrans %}
+ {% blocktrans trimmed context "Modal delete product text" %}
+ If you remove <strong>{{ product }}</strong> you will lose all data related to this product.
+ {% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Modal delete product primary action" %}
+ </button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete product secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/product/modal_product_image_confirm_delete.html b/templates/dashboard/product/modal_product_image_confirm_delete.html
index 81f604d0b2..82180831a1 100644
--- a/templates/dashboard/product/modal_product_image_confirm_delete.html
+++ b/templates/dashboard/product/modal_product_image_confirm_delete.html
@@ -7,7 +7,7 @@
<div class="modal-content">
<div class="row">
<div class="col s12">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Modal delete image title" %}</h5>
</div>
</div>
@@ -16,12 +16,16 @@
</div>
<p>
- {% blocktrans %}You are about to delete this image.{% endblocktrans %}
+ {% blocktrans trimmed context "Modal delete image text" %}
+ You are about to delete this image.
+ {% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Modal delete image primary action" %}</button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete image secondary action" %}</a>
</div>
</form>
diff --git a/templates/dashboard/product/product_class_form.html b/templates/dashboard/product/product_class_form.html
index 832f727fc3..d96df5b994 100644
--- a/templates/dashboard/product/product_class_form.html
+++ b/templates/dashboard/product/product_class_form.html
@@ -5,7 +5,8 @@
{% load static %}
{% load attributes %}
-{% block title %}{% if product_class.pk %}{{ product_class }}{% else %}{% trans 'Add new product type' %}{% endif %} - {% trans "Products" %} - {{ block.super }}{% endblock %}
+{% block title %}{% if product_class.pk %}{{ product_class }}{% else %}
+ {% trans "Add new product type" context "Product class page title" %}{% endif %} - {% trans "Products" context "Product class page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-products{% endblock %}
@@ -18,9 +19,13 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <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 type' %}{% endif %}</span></li>
+ <li><a href="{% url "dashboard:product-class-list" %}" class="breadcrumb">
+ {% trans "Product types" context "Product class breadcrumbs" %}</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 type' context "Product class breadcrumbs" %}{% endif %}</span></li>
</ul>
{% endblock %}
@@ -34,7 +39,7 @@
<li>
<a href="#base-modal" data-href="{% url 'dashboard:product-class-delete' pk=product_class.pk %}"
class="modal-trigger-custom">
- {% trans "Remove product type" %}
+ {% trans "Remove product type" context "Product class action" %}
</a>
</li>
</ul>
@@ -53,13 +58,20 @@
<div class="col s12 right-align">
<div class="row">
<button type="submit" class="btn">
- {% if product_class.pk %}{% trans "Update" %}{% else %}{% trans "Create" %}{% endif %}
+ {% if product_class.pk %}
+ {% trans "Update" context "Product class primary action" %}
+ {% else %}
+ {% trans "Create" context "Product class primary action" %}
+ {% endif %}
</button>
</div>
</div>
</form>
<p>
- {% blocktrans %}Product Type is a template used for creating new products. It also controls which attributes can be used during product creation process.{% endblocktrans %}
+ {% blocktrans trimmed context "Product class 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 %}
</p>
</div>
{% endblock %}
diff --git a/templates/dashboard/product/product_confirm_delete.html b/templates/dashboard/product/product_confirm_delete.html
index 7f94d9fa1f..08c77d474d 100644
--- a/templates/dashboard/product/product_confirm_delete.html
+++ b/templates/dashboard/product/product_confirm_delete.html
@@ -3,7 +3,7 @@
{% load prices_i18n %}
{% load staticfiles %}
-{% block title %}{% trans "Delete" %} {{ product }} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Delete" context "Product delete page title" %} {{ product }} - {{ block.super }}{% endblock %}
{% block body_class %}body-store body-products{% endblock %}
@@ -14,11 +14,19 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>
+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Products" context "Product delete breadcrumbs" %}
+ </a></li>
<li><a href="{% url "dashboard:product-update" pk=product.pk %}" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
<li>
- <span class="hide-on-med-and-down">{% trans "Delete product" %}</span>
- <span class="hide-on-large-only">{% trans "Delete" %} {{ product }}</span>
+ <span class="hide-on-med-and-down">
+ {% trans "Delete product" context "Product delete breadcrumbs" %}
+ </span>
+ <span class="hide-on-large-only">
+ {% blocktrans trimmed context "Product delete breadcrumbs" %}
+ Delete {{ product }}
+ {% endblocktrans %}
+ </span>
</li>
</ul>
{% endblock %}
@@ -40,7 +48,7 @@
</div>
<div class="card-action">
- <button type="submit" class="card-link blue-text">{% trans "Delete" %}</button>
+ <button type="submit" class="card-link blue-text">{% trans "Delete" context "Product delete primary action" %}</button>
</div>
</div>
</div>
diff --git a/templates/dashboard/product/product_form.html b/templates/dashboard/product/product_form.html
index 3105cbf4f7..c5ca3632f7 100644
--- a/templates/dashboard/product/product_form.html
+++ b/templates/dashboard/product/product_form.html
@@ -5,7 +5,9 @@
{% load static %}
{% load attributes %}
-{% block title %}{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %} - {% trans "Products" %} - {{ block.super }}{% endblock %}
+{% block title %}{% if product.pk %}{{ product }}{% else %}
+ {% trans "Add new product" context "Product form page title" %}{% endif %} -
+ {% trans "Products" context "Product form page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-products{% endblock %}
@@ -18,9 +20,15 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumb">{% trans "Products" %}</a></li>
- <li class="back-mobile"><a href="{% url "dashboard:product-list" %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %}</span></li>
+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumb">
+ {% trans "Products" context "Product form breadcrumbs" %}
+ </a></li>
+ <li class="back-mobile"><a href="{% url "dashboard:product-list" %}" class="breadcrumb">
+ <i class="material-icons">arrow_back</i>
+ </a></li>
+ <li><span class="breadcrumbs--ellipsed-item">
+ {% if product.pk %}{{ product }}{% else %}{% trans "Add new product" context "Product form breadcrumbs" %}{% endif %}
+ </span></li>
</ul>
{% endblock %}
@@ -32,13 +40,13 @@
<ul id="context-menu" class="dropdown-content">
<li>
<a href="{{ product.get_absolute_url }}" target="_blank">
- {% trans 'View on site' %}
+ {% trans "View on site" context "Product form action" %}
</a>
</li>
<li>
<a href="#base-modal" data-href="{% url 'dashboard:product-delete' pk=product.pk %}"
class="modal-trigger-custom">
- {% trans "Remove product" %}
+ {% trans "Remove product" context "Product form action" %}
</a>
</li>
</ul>
@@ -54,28 +62,28 @@
<ul class="tabs">
<li class="tab col s3" role="presentation">
<a href="#details" class="active" role="tab">
- <span>{% trans "Details" %}</span>
+ <span>{% trans "Details" context "Product form tab" %}</span>
<i class="material-icons">edit</i>
</a>
</li>
{% if product.product_class.has_variants %}
<li class="tab col s3" role="presentation">
<a href="#variants" role="tab">
- <span>{% trans "Variants" %}</span>
+ <span>{% trans "Variants" context "Product form tab" %}</span>
<i class="material-icons">style</i>
</a>
</li>
{% endif %}
<li class="tab col s3" role="presentation">
<a href="#stock" role="tab">
- <span>{% trans "Stock" %}</span>
+ <span>{% trans "Stock" context "Product form tab" %}</span>
<i class="material-icons">store</i>
</a>
</li>
<li class="tab col s3" role="presentation">
<a href="#images" role="tab">
- <span>{% trans "Images" %}</span>
+ <span>{% trans "Images" context "Product form tab" %}</span>
<i class="material-icons">collections</i>
</a>
</li>
@@ -86,7 +94,7 @@
<div class="row tab-content" id="details">
<div class="col s12 l8">
- <label>{% trans 'Product type' %}</label>
+ <label>{% trans "Product type" context "Product form details tab label" %}</label>
<h5>
{{ product.product_class }}
</h5>
@@ -119,9 +127,13 @@
<div class="col s12 right-align">
<div class="row">
{% if product.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Update" context "Product form details tab action" %}
+ </button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Create" context "Product form details tab action" %}
+ </button>
{% endif %}
</div>
</div>
@@ -135,22 +147,26 @@
{% csrf_token %}
<div class="data-table-header">
<a href="{% url 'dashboard:variant-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked blue-text">
- {% trans "Add" %}
+ {% trans "Add" context "Product form variants tab table action" %}
</a>
<a href="#modal-product-variant-delete" class="modal-trigger btn-data-table btn-show-when-checked blue-text" hidden>
- {% trans "Delete" %}
+ {% trans "Delete" context "Product form variants tab table action" %}
</a>
<div class="modal" id="modal-product-variant-delete">
<div class="modal-content">
- <h5>{% trans "Are you sure?" %}</h5>
- <p>{% blocktrans %}You are about to delete variants of this product.{% endblocktrans %}</p>
+ <h5>{% trans "Are you sure?" context "Modal delete variant from product title" %}</h5>
+ <p>{% blocktrans trimmed context "Modal delete variant from product text" %}
+ You are about to delete variants of this product.
+ {% endblocktrans %}</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Modal delete variant from product primary action" %}</button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete variant from product secondary action" %}</a>
</div>
</div>
</div>
@@ -164,12 +180,12 @@
<input type="checkbox" id="select-all-variants" class="filled-in select-all switch-actions">
<label for="select-all-variants"></label>
</th>
- <th>{% trans "SKU" %}</th>
+ <th>{% trans "SKU" context "Product variant table header" %}</th>
{% for attribute in attributes %}
<th>{{ attribute.display|capfirst }}</th>
{% endfor %}
- <th class="wide">{% trans "Variant name" %}</th>
- <th class="right-align">{% trans "Price" %}</th>
+ <th class="wide">{% trans "Variant name" context "Product variant table header" %}</th>
+ <th class="right-align">{% trans "Price" context "Product variant table header" %}</th>
</tr>
</thead>
@@ -180,7 +196,8 @@
<input id="id_variants_{{ variant.id }}" name="items" type="checkbox" value="{{ variant.id }}" class="filled-in switch-actions">
<label for="id_variants_{{ variant.id }}"></label>
</td>
- <td><a class="light-blue-text text-lighten-1" title="{% trans "Edit variant" %}"
+ <td><a class="light-blue-text text-lighten-1"
+ title="{% trans "Edit variant" context "Product variant table link title" %}"
href="{% url 'dashboard:variant-update' product_pk=product.pk variant_pk=variant.pk %}">
{{ variant.sku }}
</a></td>
@@ -198,7 +215,9 @@
<tbody>
<tr>
<td>
- <span>{% trans "There are no variants for this product" %}</span>
+ <span>
+ {% trans "There are no variants for this product" context "Empty product variant table message" %}
+ </span>
</td>
</tr>
</tbody>
@@ -215,25 +234,29 @@
{% csrf_token %}
<div class="data-table-header">
<a href="{% url 'dashboard:product-stock-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked blue-text">
- {% trans "Add" %}
+ {% trans "Add" context "Product form stock tab table action" %}
</a>
<a href="#modal-product-stock-delete" class="modal-trigger btn-data-table btn-show-when-checked blue-text" hidden>
- {% trans "Delete" %}
+ {% trans "Delete" context "Product form stock tab table action" %}
</a>
<div class="modal" id="modal-product-stock-delete">
<div class="modal-content">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Modal delete stock from variant title" %}</h5>
<p>
- {% blocktrans %}You are about to delete stock for this product variant.{% endblocktrans %}
+ {% blocktrans trimmed context "Modal delete stock from variant text" %}
+ You are about to delete stock for this product variant.
+ {% endblocktrans %}
</p>
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Modal delete stock from variant primary action" %}</button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete stock from variant secondary action" %}</a>
</div>
</div>
</div>
@@ -247,10 +270,10 @@
<input type="checkbox" id="select-all-stock" class="filled-in select-all switch-actions">
<label for="select-all-stock"></label>
</th>
- <th>{% trans "SKU" %}</th>
- <th class="wide">{% trans "Location" %}</th>
- <th class="right-align">{% trans "Quantity" %}</th>
- <th class="right-align">{% trans "Allocated" %}</th>
+ <th>{% trans "SKU" context "Stock table header" %}</th>
+ <th class="wide">{% trans "Location" context "Stock table header" %}</th>
+ <th class="right-align">{% trans "Quantity" context "Stock table header" %}</th>
+ <th class="right-align">{% trans "Allocated" context "Stock table header" %}</th>
</tr>
</thead>
@@ -261,8 +284,9 @@
<input name="items" type="checkbox" id="{{ item.id }}" class="filled-in switch-actions" value="{{ item.id }}">
<label for="{{ item.id }}"></label>
</td>
- <td><a class="light-blue-text text-lighten-1" title="{% trans "Edit variant" %}"
- href="{% url 'dashboard:product-stock-update' product_pk=product.pk stock_pk=item.pk %}">
+ <td><a class="light-blue-text text-lighten-1"
+ title="{% trans "Edit variant" context "Stock table action" %}"
+ href="{% url 'dashboard:product-stock-update' product_pk=product.pk stock_pk=item.pk %}">
{{ item.variant.sku }}
</a></td>
<td>{{ item.location }}</td>
@@ -275,7 +299,7 @@
<tbody>
<tr>
<td>
- <span>{% trans "There is no stock for this product." %}</span>
+ <span>{% trans "There is no stock for this product." context "Empty stock table message" %}</span>
</td>
</tr>
</tbody>
@@ -307,7 +331,7 @@
{% if image.alt %}
{{ image.alt }}
{% else %}
- <span class="grey-text">{% trans "No description" %}</span>
+ <span class="grey-text">{% trans "No description" context "Image card text" %}</span>
{% endif %}
</span>
<span class="product-gallery-item-desc" title="{{ image.image.name }}">{{ image.image.name }}</span>
@@ -315,26 +339,28 @@
<div class="card-action">
<a href="{% url 'dashboard:product-image-update' product_pk=product.pk img_pk=image.pk %}">
- {% trans "Edit" %}
+ {% trans "Edit" context "Image card action" %}
</a>
<a href="#base-modal" class="modal-trigger-custom"
data-href="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=image.pk %}">
- {% trans "Delete" %}
+ {% trans "Delete" context "Image card action" %}
</a>
</div>
<div class="sortable__drag-area"></div>
</li>
{% endfor %}
{% else %}
- <p class="no-images">{% trans "This product has no images yet." %}</p>
+ <p class="no-images">{% trans "This product has no images yet." context "Empty image gallery message" %}</p>
{% endif %}
</ul>
<div class="col s6 m3 card product-gallery-item dropzone-ghost">
<div class="card-content">
<span class="product-gallery-item-title product-gallery-item-title--noclip card-title black-text">
- <span class="grey-text">{% trans "Drop images here to upload" %}</span>
+ <span class="grey-text">
+ {% trans "Drop images here to upload" context "Image gallery upload box text" %}
+ </span>
</span>
</div>
</div>
@@ -355,7 +381,7 @@
<div class="card-content">
<span class="product-gallery-item-title card-title black-text">
- <span class="grey-text">{% trans "No description" %}</span>
+ <span class="grey-text">{% trans "No description" context "Empty image gallery message" %}</span>
</span>
<span class="product-gallery-item-desc">
&nbsp;
@@ -364,11 +390,12 @@
<div class="card-action">
<a class="card-action-edit" href="{% url 'dashboard:product-image-update' product_pk=product.pk img_pk=0 %}">
- {% trans "Edit" %}
+ {% trans "Edit" context "Image card action" %}
</a>
- <a href="#base-modal" class="card-action-delete modal-trigger-custom" data-href="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=0 %}">
- {% trans "Delete" %}
+ <a href="#base-modal" class="card-action-delete modal-trigger-custom"
+ data-href="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=0 %}">
+ {% trans "Delete" context "Image card action" %}
</a>
&nbsp;
@@ -380,7 +407,8 @@
<div class="fixed-action-btn">
<a class="btn-fab btn-fab-hidden btn-floating btn-large waves-effect waves-light teal" id="images-btn"
- href="{% url 'dashboard:product-image-add' product_pk=product.pk %}" title="{% trans "Add image" %}">
+ href="{% url 'dashboard:product-image-add' product_pk=product.pk %}"
+ title="{% trans "Add image" context "Add image button text" %}">
<i class="material-icons">add</i>
</a>
</div>
diff --git a/templates/dashboard/product/product_image_confirm_delete.html b/templates/dashboard/product/product_image_confirm_delete.html
index 83b59ab6bf..7e91ef2872 100644
--- a/templates/dashboard/product/product_image_confirm_delete.html
+++ b/templates/dashboard/product/product_image_confirm_delete.html
@@ -1,7 +1,7 @@
{% extends "dashboard/base.html" %}
{% load i18n %}
-{% block title %}{% trans "Delete image" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Delete image" context "Delete image page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-store body-products{% endblock %}
@@ -12,9 +12,11 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>
+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Products" context "Delete image breadcrumbs" %}
+ </a></li>
<li><a href="{% url "dashboard:product-update" pk=product.pk %}" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
- <li>{% trans "Delete image" %}</li>
+ <li>{% trans "Delete image" context "Delete image breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -23,7 +25,7 @@
{% csrf_token %}
<input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">
<div class="row">
- <p>{% trans "Are you sure you want to delete the following image?" %}</p>
+ <p>{% trans "Are you sure you want to delete the following image?" context "Delete image text" %}</p>
<div class="col m6 l4 offset-m3 offset-l4">
<div class="card">
<div class="card-content">
@@ -36,8 +38,10 @@
<div class="row">
<div class="col m6 l4 offset-m3 offset-l4 right-align">
- <a href="{% url 'dashboard:product-update' pk=product.pk %}#images" class="btn-flat"><i class="material-icons">clear</i> {% trans "Cancel" %}</a>
- <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i> {% trans "Delete" %}</button>
+ <a href="{% url 'dashboard:product-update' pk=product.pk %}#images" class="btn-flat"><i class="material-icons">clear</i>
+ {% trans "Cancel" context "Delete image text primary action" %}</a>
+ <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i>
+ {% trans "Delete" context "Delete image secondary action" %}</button>
</div>
</div>
</form>
diff --git a/templates/dashboard/product/product_image_form.html b/templates/dashboard/product/product_image_form.html
index ebe9a851fb..29b72b49ce 100644
--- a/templates/dashboard/product/product_image_form.html
+++ b/templates/dashboard/product/product_image_form.html
@@ -28,8 +28,13 @@
<li><span class="breadcrumbs--ellipsed-item">{{ product_image.image }}</span></li>
{% else %}
<li>
- <span class="hide-on-med-and-down">{% trans "Add image" %}</span>
- <span class="hide-on-large-only breadcrumbs--ellipsed-item">{% blocktrans %}Add image for {{ product }}{% endblocktrans %}</span>
+ <span class="hide-on-med-and-down">
+ {% trans "Add image" context "Image form breadcrumbs" %}</span>
+ <span class="hide-on-large-only breadcrumbs--ellipsed-item">
+ {% blocktrans trimmed context "Image form breadcrumbs" %}
+ Add image for {{ product }}
+ {% endblocktrans %}
+ </span>
</li>
{% endif %}
</ul>
@@ -44,7 +49,9 @@
{% csrf_token %}
{% if product_image.pk %}
- <p class="no-margin">{% trans "Pick the most relevant part of the image using the red circle." %}</p>
+ <p class="no-margin">
+ {% trans "Pick the most relevant part of the image using the red circle." context "Image form text" %}
+ </p>
{% endif %}
<div class="row">
{{ form.image|materializecss }}
@@ -60,9 +67,9 @@
<div class="row">
<div class="col l8 right-align">
{% if product_image.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">{% trans "Update" context "Image form primary action" %}</button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">{% trans "Create" context "Image form secondary action" %}</button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/product/product_variant_confirm_delete.html b/templates/dashboard/product/product_variant_confirm_delete.html
index 7e279be0ea..1cf625e959 100644
--- a/templates/dashboard/product/product_variant_confirm_delete.html
+++ b/templates/dashboard/product/product_variant_confirm_delete.html
@@ -1,7 +1,7 @@
{% extends "dashboard/base.html" %}
{% load i18n %}
-{% block title %}{% trans "Delete variant" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Delete variant" context "Delete variant page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-store body-products{% endblock %}
@@ -12,11 +12,20 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>
- <li><a href="{% url "dashboard:product-update" pk=product.pk %}#variants" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Products" context "Delete variant breadcrumbs" %}
+ </a></li>
+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}#variants" class="breadcrumbs--ellipsed-item">
+ {{ product }}
+ </a></li>
<li>
- <span class="hide-on-med-and-down">{% trans "Delete variant" %}</span>
- <span class="hide-on-large-only">{% blocktrans %}Delete variant for {{ product }}{% endblocktrans %}</span>
+ <span class="hide-on-med-and-down">
+ {% trans "Delete variant" context "Delete variant breadcrumbs" %}</span>
+ <span class="hide-on-large-only">
+ {% blocktrans trimmed context "Delete variant breadcrumbs" %}
+ Delete variant for {{ product }}
+ {% endblocktrans %}
+ </span>
</li>
</ul>
{% endblock %}
@@ -32,17 +41,22 @@
<div class="card">
<div class="card-content">
{% if is_only_variant %}
- <p>{% trans 'This is the only variant. Deleting it will make the product unavailable for your customers.' %}</p>
+ <p>{% blocktrans trimmed context "Delete variant text" %}
+ This is the only variant.
+ Deleting it will make the product unavailable for your customers.
+ {% endblocktrans %}</p>
{% endif %}
<h5>{{ variant }}{% if variant.name %} {{ variant.name }}{% endif %} </h5>
</div>
<div class="card-action">
- <button type="submit" class="card-link blue-text">{% trans "Delete" %}</button>
+ <button type="submit" class="card-link blue-text">
+ {% trans "Delete" context "Delete variant action" %}
+ </button>
</div>
- </li>
- </ul>
+ </div>
+ </div>
</div>
</form>
{% endblock %}
diff --git a/templates/dashboard/product/stock_confirm_delete.html b/templates/dashboard/product/stock_confirm_delete.html
index c6336bb35c..9bdf540840 100644
--- a/templates/dashboard/product/stock_confirm_delete.html
+++ b/templates/dashboard/product/stock_confirm_delete.html
@@ -1,7 +1,7 @@
{% extends "dashboard/base.html" %}
{% load i18n %}
-{% block title %}{% trans "Delete stock" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Delete stock" context "Delete stock page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-store body-products{% endblock %}
@@ -12,11 +12,18 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>
+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Products" context "Delete stock breadcrumbs" %}
+ </a></li>
<li><a href="{% url "dashboard:product-update" pk=product.pk %}#stock" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
<li>
- <span class="hide-on-med-and-down">{% trans "Delete stock" %}</span>
- <span class="hide-on-large-only">{% blocktrans %}Delete stock for {{ product }}{% endblocktrans %}</span>
+ <span class="hide-on-med-and-down">
+ {% trans "Delete stock" context "Delete stock breadcrumbs" %}</span>
+ <span class="hide-on-large-only">
+ {% blocktrans trimmed context "Delete stock breadcrumbs" %}
+ Delete stock for {{ product }}
+ {% endblocktrans %}
+ </span>
</li>
</ul>
{% endblock %}
@@ -37,7 +44,9 @@
</div>
<div class="card-action">
- <button type="submit" class="card-link blue-text">{% trans "Delete" %}</button>
+ <button type="submit" class="card-link blue-text">
+ {% trans "Delete" context "Delete stock action" %}
+ </button>
</div>
</div>
</div>
diff --git a/templates/dashboard/product/stock_form.html b/templates/dashboard/product/stock_form.html
index 6f7bcf036e..f9a69c6a7e 100644
--- a/templates/dashboard/product/stock_form.html
+++ b/templates/dashboard/product/stock_form.html
@@ -5,9 +5,11 @@
{% block title %}
{% if stock.pk %}
- {% trans "Stock" %} {{ stock }}
+ {% blocktrans trimmed with variant_name=stock.variant.name location=stock.location context "Stock form page title" %}
+ Stock {{ variant_name }} - {{ location }}
+ {% endblocktrans %}
{% else %}
- {% trans "Add stock" %}
+ {% trans "Add stock" context "Stock form page title" %}
{% endif %} - {{ block.super }}
{% endblock %}
@@ -26,11 +28,21 @@
<li><a href="{% url "dashboard:product-update" pk=product.pk %}#stock" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
<li class="back-mobile"><a href="{% url "dashboard:product-update" pk=product.pk %}#stock"><i class="material-icons">chevron_left</i></a></li>
{% if stock.pk %}
- <li><span class="breadcrumbs--ellipsed-item">{% trans "Stock" %} {{ stock.variant }}</span></li>
+ <li><span class="breadcrumbs--ellipsed-item">
+ {% blocktrans trimmed with variant=stock.variant context "Stock form breadcrumbs" %}
+ Stock {{ variant }}
+ {% endblocktrans %}
+ </span></li>
{% else %}
<li>
- <span class="hide-on-med-and-down breadcrumbs--ellipsed-item">{% trans "Add stock" %}</span>
- <span class="hide-on-large-only breadcrumbs--ellipsed-item">{% blocktrans %}Add stock for {{ product }}{% endblocktrans %}</span>
+ <span class="hide-on-med-and-down breadcrumbs--ellipsed-item">
+ {% trans "Add stock" context "Stock form breadcrumbs" %}
+ </span>
+ <span class="hide-on-large-only breadcrumbs--ellipsed-item">
+ {% blocktrans trimmed context "Stock form breadcrumbs" %}
+ Add stock for {{ product }}
+ {% endblocktrans %}
+ </span>
</li>
{% endif %}
</ul>
@@ -55,9 +67,13 @@
<div class="row">
<div class="col s12 l8 right-align">
{% if stock.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Update" context "Stock form action" %}
+ </button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Create" context "Stock form action" %}
+ </button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/product/stock_locations/form.html b/templates/dashboard/product/stock_locations/form.html
index 52d0ae5c79..57ff1a2ad9 100644
--- a/templates/dashboard/product/stock_locations/form.html
+++ b/templates/dashboard/product/stock_locations/form.html
@@ -4,7 +4,9 @@
{% load materializecss %}
{% load static %}
-{% block title %}{% if location.pk %}{{ location }}{% else %}{% trans 'Add new stock location' %}{% endif %} - {% trans "Stock location" %} - {{ block.super }}{% endblock %}
+{% block title %}{% if location.pk %}{{ location }}{% else %}
+ {% trans "Add new stock location" context "Stock location page title" %}{% endif %} -
+ {% trans "Stock location" context "Stock location page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-locations{% endblock %}
@@ -17,7 +19,7 @@
<li>
<a class="modal-trigger-custom" href="#base-modal"
data-href="{% url 'dashboard:product-stock-location-delete' location.pk %}">
- {% trans "Remove location" %}
+ {% trans "Remove location" context "Stock location detail action" %}
</a>
</li>
</ul>
@@ -26,8 +28,11 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url 'dashboard:product-stock-location-list' %}" class="breadcrumbs--ellipsed-item">{% trans "Stock location" %}</a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% if location.pk %}{{ location }}{% else %}{% trans 'Add new stock location' %}{% endif %}</span></li>
+ <li><a href="{% url 'dashboard:product-stock-location-list' %}" class="breadcrumbs--ellipsed-item">
+ {% trans "Stock location" context "Stock location detail breadcrumbs" %}</a></li>
+ <li><span class="breadcrumbs--ellipsed-item">
+ {% if location.pk %}{{ location }}{% else %}
+ {% trans "Add new stock location" context "Stock location detail breadcrumbs" %}{% endif %}</span></li>
</ul>
{% endblock %}
@@ -48,9 +53,13 @@
<div class="col s12 right-align">
<div class="row">
{% if location.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Update" context "Stock location detail action" %}
+ </button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Create" context "Stock location detail action" %}
+ </button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/product/stock_locations/list.html b/templates/dashboard/product/stock_locations/list.html
index 634d1a24be..fcc33e8e8b 100644
--- a/templates/dashboard/product/stock_locations/list.html
+++ b/templates/dashboard/product/stock_locations/list.html
@@ -3,14 +3,15 @@
{% load materializecss %}
{% load staticfiles %}
-{% block title %}{% trans "Stock locations" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Stock locations" context "Stock location list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-locations{% endblock %}
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
- href="{% url 'dashboard:product-stock-location-add' %}" title="{% trans "Add stock location" %}">
+ href="{% url 'dashboard:product-stock-location-add' %}"
+ title="{% trans "Add stock location" context "Stock location list add button text" %}">
<i class="material-icons">add</i>
</a>
</div>
@@ -18,7 +19,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Stock locations" %}</li>
+ <li>{% trans "Stock locations" context "Stock location list breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -32,13 +33,15 @@
<ul class="collection list">
{% for location in locations %}
<li class="collection-item list-item">
- <a class="list-item-name" href="{% url 'dashboard:product-stock-location-edit' location.pk %}">{{ location }}</a>
+ <a class="list-item-name" href="{% url 'dashboard:product-stock-location-edit' location.pk %}">
+ {{ location }}
+ </a>
</li>
{% endfor %}
</ul>
{% else %}
- <p>{% trans "No locations found." %}</p>
+ <p>{% trans "No locations found." context "Empty stock location list message" %}</p>
{% endif %}
</div>
</div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/templates/dashboard/product/stock_locations/modal_confirm_delete.html b/templates/dashboard/product/stock_locations/modal_confirm_delete.html
index e74fbdffd6..2098803ff7 100644
--- a/templates/dashboard/product/stock_locations/modal_confirm_delete.html
+++ b/templates/dashboard/product/stock_locations/modal_confirm_delete.html
@@ -3,18 +3,18 @@
<form action="{% url 'dashboard:product-stock-location-delete' location.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
- <h5>{% trans "Are you sure?" %}</h5>
+ <h5>{% trans "Are you sure?" context "Modal delete stock location text" %}</h5>
<div class="row">
<div class="col l12">
- {% blocktrans %}
+ {% blocktrans trimmed context "Modal delete stock location text" %}
You are about to delete a stock location <strong>{{ location }}</strong>.
{% endblocktrans %}
</div>
</div>
{% if stock_count %}
- {% blocktrans count counter=stock_count %}
+ {% blocktrans trimmed count counter=stock_count context "Modal delete stock location text" %}
There is one stock associated with this stock location that will be deleted.
{% plural %}
There are {{ stock_count }} stocks associated with this stock location that will be deleted.
@@ -23,7 +23,10 @@
</div>
<div class="modal-footer">
- <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>
- <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>
+ <button type="submit" class="modal-action btn-flat blue-text">
+ {% trans "Delete" context "Modal delete stock location primary action" %}</button>
+ <a href="#!" class="modal-action modal-close btn-flat blue-text">
+ {% trans "Cancel" context "Modal delete stock location secondary action" %}
+ </a>
</div>
</form>
diff --git a/templates/dashboard/product/variant_form.html b/templates/dashboard/product/variant_form.html
index b6535522bc..dee910508d 100644
--- a/templates/dashboard/product/variant_form.html
+++ b/templates/dashboard/product/variant_form.html
@@ -7,7 +7,7 @@
{% if variant.pk %}
{{ variant.sku }}{% if variant.name %} ({{ variant.name }}){% endif %}
{% else %}
- {% trans "Add variant" %}
+ {% trans "Add variant" context "Variant form page title" %}
{% endif %} - {{ block.super }}{% endblock %}
{% block body_class %}body-store body-products{% endblock %}
@@ -23,11 +23,22 @@
<li><a href="{% url "dashboard:product-update" pk=product.pk %}#variants" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
<li class="back-mobile"><a href="{% url "dashboard:product-update" pk=product.pk %}#variants"><i class="material-icons">chevron_left</i></a></li>
{% if variant.pk %}
- <li><span class="breadcrumbs--ellipsed-item">{% trans "Variant" %} {{ variant.sku }}{% if variant.name %} ({{ variant.name }}){% endif %}</span></li>
+ <li><span class="breadcrumbs--ellipsed-item">
+ {% blocktrans trimmed with variant_sku=variant.sku context "Variant form breadcrumbs" %}
+ Variant {{ variant_sku }}
+ {% endblocktrans %}
+ {% if variant.name %} ({{ variant.name }}){% endif %}
+ </span></li>
{% else %}
<li>
- <span class="hide-on-med-and-down">{% trans "Add variant" %}</span>
- <span class="hide-on-large-only breadcrumbs--ellipsed-item">{% blocktrans %}Add variant for {{ product }}{% endblocktrans %}</span>
+ <span class="hide-on-med-and-down">
+ {% trans "Add variant" context "Variant form breadcrumbs" %}
+ </span>
+ <span class="hide-on-large-only breadcrumbs--ellipsed-item">
+ {% blocktrans trimmed context "Variant form breadcrumbs" %}
+ Add variant for {{ product }}
+ {% endblocktrans %}
+ </span>
</li>
{% endif %}
</ul>
@@ -48,7 +59,7 @@
{% endfor %}
</div>
{% else %}
- <p>{% trans "This product has no attributes." %}</p>
+ <p>{% trans "This product has no attributes." context "Variant form text" %}</p>
{% endif %}
</div>
@@ -64,9 +75,13 @@
<div class="row">
<div class="col s12 l8 right-align">
{% if variant.pk %}
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Update" context "Variant form action" %}
+ </button>
{% else %}
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ <button type="submit" class="btn">
+ {% trans "Create" context "Variant form action" %}
+ </button>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/search/results.html b/templates/dashboard/search/results.html
index 244ef58b82..ad33ce1528 100644
--- a/templates/dashboard/search/results.html
+++ b/templates/dashboard/search/results.html
@@ -5,11 +5,11 @@
{% load staticfiles %}
{% load product_first_image from product_images %}
-{% block title %}{% trans "Search results" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Search results" context "Search page title" %} - {{ block.super }}{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Search" %}</li>
+ <li>{% trans "Search" context "Search breadcrumbs" %}</li>
</ul>
{% endblock %}
@@ -19,7 +19,9 @@
<div class="row">
<div class="col s12">
<form class="hide-on-med-and-up row" method="get" action="{% url "dashboard:search" %}">
- <input id="icon_prefix" type="text" class="validate col s10" placeholder="Search" name="q" value="{% if query %}{{ query }}{% endif %}">
+ <input id="icon_prefix" type="text" class="validate col s10"
+ placeholder="{% trans "Search" context "Search form placeholder" %}"
+ name="q" value="{% if query %}{{ query }}{% endif %}">
<button class="btn-flat search-button col s2" type="submit">
<i class="material-icons left right">search</i>
</button>
@@ -37,7 +39,8 @@
<li class="collection-item avatar list-item">
{% if result.content_type == 'product_product' %}
{% with product=result %}
- <img src="{% product_first_image product size="100x100" method="crop" %}" class="circle teal" alt="{{ product.name }}">
+ <img src="{% product_first_image product size="100x100" method="crop" %}"
+ class="circle teal" alt="{{ product.name }}">
<a class="title" href="{% url 'dashboard:product-update' pk=product.pk %}">
<span class="list-item-name">{{ product.name }}</span>
</a>
@@ -48,12 +51,22 @@
{% elif result.content_type == 'order_order' %}
<i class="small material-icons circle teal">payment</i>
<a class="title" href="{% url 'dashboard:order-details' order_pk=result.pk %}">
- <span class="list-item-name">{% blocktrans with order_number=result.pk %}Order #{{ order_number }}{% endblocktrans %}</span>
+ <span class="list-item-name">
+ {% blocktrans trimmed with order_number=result.pk context "Search order result text" %}
+ Order #{{ order_number }}
+ {% endblocktrans %}
+ </span>
</a>
<p class="list-item-price">
- <small>{% blocktrans with email=result.user_email %}Customer: {{ email }}{% endblocktrans %}</small>
<small>
- {% blocktrans with placed=result.created %}Placed on: {{ placed }}{% endblocktrans %}
+ {% blocktrans trimmed context "Search order result text" with email=result.user_email %}
+ Customer: {{ email }}
+ {% endblocktrans %}
+ </small>
+ <small>
+ {% blocktrans trimmed with placed=result.created context "Search order result text" %}
+ Placed on: {{ placed }}
+ {% endblocktrans %}
</small>
</p>
@@ -61,11 +74,13 @@
<i class="small material-icons circle teal">perm_identity</i>
<a class="title" href="{% url 'dashboard:order-details' order_pk=result.pk %}">
<span class="list-item-name">
- {% blocktrans with full_name=result.get_full_name %}User {{ full_name }}{% endblocktrans %}
+ {% blocktrans trimmed with full_name=result.get_full_name context "Search user result text" %}
+ User {{ full_name }}
+ {% endblocktrans %}
</span>
</a>
<p class="list-item-price">
- <small>{% trans "Customer" %}</small>
+ <small>{% trans "Customer" context "Search user result text" %}</small>
</p>
{% endif %}
</li>
@@ -73,7 +88,11 @@
</ul>
{% include "dashboard/includes/_pagination.html" with page_obj=results %}
{% elif query %}
- <p>{% trans "No results for query " %}"{{ query }}".</p>
+ <p>
+ {% blocktrans trimmed with full_name=result.get_full_name context "No Search result message" %}
+ No results for query "{{ query }}".
+ {% endblocktrans %}
+ </p>
{% endif %}
</div>
</div>
diff --git a/templates/dashboard/shipping/method_delete.html b/templates/dashboard/shipping/method_delete.html
index f01932d4a8..cf8954a89d 100644
--- a/templates/dashboard/shipping/method_delete.html
+++ b/templates/dashboard/shipping/method_delete.html
@@ -2,24 +2,35 @@
{% load materializecss %}
{% load i18n %}
-{% block title %}{% trans "Delete" %} {{ shipping_method }}{% endblock %}
+{% block title %}
+ {% blocktrans trimmed context "Delete shipping method page title" %}
+ Delete {{ shipping_method }}
+ {% endblocktrans %}
+{% endblock %}
{% block body_class %}body-shipping-methods{% endblock %}
-{% block page_title %}{% trans "Delete" %} {{ shipping_method }}{% endblock %}
+{% block page_title %}
+ {% blocktrans trimmed context "Delete shipping method page title" %}
+ Delete {{ shipping_method }}
+ {% endblocktrans %}
+{% endblock %}
{% block menu_delivery_class %}active{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
<li><a href="{% url 'dashboard:shipping-methods' %}"
- class="breadcrumbs--ellipsed-item">{% trans "Subscription methods" %}</a>
- </li>
+ class="breadcrumbs--ellipsed-item">
+ {% trans "Subscription methods" context "Delete shipping method breadcrumbs" %}
+ </a></li>
<li><a href="{% url 'dashboard:shipping-method-detail' pk=shipping_method.pk %}"
class="breadcrumbs--ellipsed-item">{{ shipping_method }}</a>
</li>
<li>
- <span class="breadcrumbs--ellipsed-item">{% trans "Delete" %}</span>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Delete" context "Delete shipping method breadcrumbs" %}
+ </span>
</li>
</ul>
{% endblock %}
@@ -30,15 +41,14 @@
<div class="row">
<div class="col s12 m5">
<div class="card-panel">
- {% blocktrans with shipping_method_name=shipping_method %}
- Are you sure you want to delete the {{ shipping_method_name }} method?
+ {% blocktrans trimmed with shipping_method_name=shipping_method context "Delete shipping method text" %}
+ Are you sure you want to delete the {{ shipping_method_name }} method?
{% endblocktrans %}
</div>
</div>
</div>
<form method="post">
{% csrf_token %}
- <button type="submit" class="btn red">{% trans "Delete" %}</button>
- </div>
+ <button type="submit" class="btn red">{% trans "Delete" context "Delete shipping method action" %}</button>
</form>
{% endblock %}
diff --git a/templates/dashboard/shipping/method_form.html b/templates/dashboard/shipping/method_form.html
index e51a244703..a689aeaa8f 100644
--- a/templates/dashboard/shipping/method_form.html
+++ b/templates/dashboard/shipping/method_form.html
@@ -5,11 +5,11 @@
{% block title %}
- {% trans "Shipping methods" %}
+ {% trans "Shipping methods" context "Shipping method form page title" %}
{% if shipping_method.pk %}
- {{ shipping_method }}
{% else %}
- - {% trans 'Add new method' %}
+ - {% trans "Add new method" context "Shipping method form page title" %}
{% endif %}
- {{ block.super }}
{% endblock %}
@@ -19,18 +19,22 @@
{% block menu_delivery_class %}active{% endblock %}
{% block page_title %}{% if shipping_method.pk %}{{ shipping_method }}{% else %}
- {% trans 'Add new method' %}
+ {% trans "Add new method" context "Shipping method form page title" %}
{% endif %}{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url 'dashboard:shipping-methods' %}">{% trans "Shipping methods" %}</a></li>
+ <li><a href="{% url 'dashboard:shipping-methods' %}">
+ {% trans "Shipping methods" context "Shipping method form breadcrumbs" %}
+ </a></li>
<li class="back-mobile"><a href="{% url 'dashboard:shipping-methods' %}"><i class="material-icons">arrow_back</i></a></li>
<li>
{% if shipping_method.pk %}
<span class="breadcrumbs--ellipsed-item">{{ shipping_method }}</span>
{% else %}
- <span class="breadcrumbs--ellipsed-item">{% trans 'Add new method' %}</span>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Add new method" context "Shipping method form breadcrumbs" %}
+ </span>
{% endif %}
</li>
</ul>
@@ -45,7 +49,7 @@
<div class="row">
{{ shipping_method_form|materializecss }}
</div>
- <h4 class="light">{% trans "Price per country" %}</h4>
+ <h4 class="light">{% trans "Price per country" context "Shipping method form text" %}</h4>
<div class="card-panel">
{% for form in price_per_country_formset %}
@@ -68,18 +72,20 @@
{% if shipping_method.pk %}
<div class="col s12 l6">
<a href="{% url 'dashboard:shipping-method-delete' pk=shipping_method.pk %}"
- class="btn red">{% trans "Delete" %}</a>
+ class="btn red">{% trans "Delete" context "Shipping method form action" %}</a>
</div>
<div class="col s12 l6 right-align">
<a href="{% url 'dashboard:shipping-methods' %}"
- class="btn-flat">{% trans "Cancel" %}</a>
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ class="btn-flat">{% trans "Cancel" context "Shipping method form action" %}</a>
+ <button type="submit" class="btn">{% trans "Update" context "Shipping method form action" %}
+ </button>
</div>
{% else %}
<div class="col s12 right-align">
<a href="{% url 'dashboard:shipping-methods' %}"
- class="btn-flat">{% trans "Cancel" %}</a>
- <button type="submit" class="btn">{% trans "Create" %}</button>
+ class="btn-flat">{% trans "Cancel" context "Shipping method form action" %}</a>
+ <button type="submit" class="btn">{% trans "Create" context "Shipping method form action" %}
+ </button>
</div>
{% endif %}
</div>
diff --git a/templates/dashboard/shipping/method_list.html b/templates/dashboard/shipping/method_list.html
index 6f5639cbef..b717e22888 100644
--- a/templates/dashboard/shipping/method_list.html
+++ b/templates/dashboard/shipping/method_list.html
@@ -3,7 +3,7 @@
{% load prices_i18n %}
{% load status %}
-{% block title %}{% trans "Shipping methods" %} - {{ block.super }}{% endblock %}
+{% block title %}{% trans "Shipping methods" context "Shipping method list page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-shipping-methods{% endblock %}
@@ -11,14 +11,14 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li class="visible-s">{% trans "Shipping methods" %}</li>
+ <li class="visible-s">{% trans "Shipping methods" context "Shipping method list breadcrumbs" %}</li>
</ul>
{% endblock %}
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
- title="{% trans "Add method" %}"
+ title="{% trans "Add method" context "Shipping method list add button text" %}"
href="{% url 'dashboard:shipping-method-add' %}">
<i class="material-icons">add</i>
</a>
@@ -32,9 +32,9 @@
<table class="bordered hoverable responsive data-table">
<thead>
<tr>
- <th>{% trans "Name" %}</th>
- <th>{% trans "Price range" %}</th>
- <th class="wide">{% trans "Countries" %}</th>
+ <th>{% trans "Name" context "Shipping methods table header" %}</th>
+ <th>{% trans "Price range" context "Shipping methods table header" %}</th>
+ <th class="wide">{% trans "Countries" context "Shipping methods table header" %}</th>
</tr>
</thead>
<tbody>
@@ -63,7 +63,7 @@
{% include "dashboard/includes/_pagination.html" %}
{% else %}
- <p>{% trans "No shipping methods found." %}</p>
+ <p>{% trans "No shipping methods found." context "Empty Shipping methods table" %}</p>
{% endif %}
{% endblock %}
diff --git a/templates/dashboard/sites/detail.html b/templates/dashboard/sites/detail.html
index c69fd9461d..a7a019924c 100644
--- a/templates/dashboard/sites/detail.html
+++ b/templates/dashboard/sites/detail.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load materializecss %}
-{% block title %}{% if site.pk %}{{ site }}{% else %}{% trans 'Add new site settings' %}{% endif %} - {% trans 'Site settings' %} - {{ block.super }}{% endblock %}
+{% block title %}{% if site.pk %}{{ site }}{% else %}{% trans "Add new site settings" context "Site settings page title" %}{% endif %} - {% trans "Site settings" context "Site settings page title" %} - {{ block.super }}{% endblock %}
{% block body_class %}body-settings{% endblock %}
@@ -10,9 +10,13 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url "dashboard:site-index" %}" class="breadcrumb">{% trans "Site settings" %}</a></li>
+ <li><a href="{% url "dashboard:site-index" %}" class="breadcrumb">
+ {% trans "Site settings" context "Site settings breadcrumbs" %}
+ </a></li>
<li class="back-mobile"><a href="{% url "dashboard:site-index" %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% if site.pk %}{{ site }}{% else %}{% trans 'Add new site settings' %}{% endif %}</span></li>
+ <li><span class="breadcrumbs--ellipsed-item">
+ {% if site.pk %}{{ site }}{% else %}{% trans "Add new site settings" context "Site settings breadcrumbs" %}{% endif %}
+ </span></li>
</ul>
{% endblock %}
@@ -32,7 +36,7 @@
<div class="row">
<div class="col s12 l8 right-align">
- <button type="submit" class="btn">{% trans "Update" %}</button>
+ <button type="submit" class="btn">{% trans "Update" context "Site settings action" %}</button>
</div>
</div>
</form>