From b3ab0b482a05e694d0d4e5c36a194b2a56cfb043 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sun, 23 Jun 2024 13:08:18 +0200 Subject: [PATCH] fix: login and translation in macros.html fix: login and translation in macros.html --- webshop/templates/includes/macros.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/webshop/templates/includes/macros.html b/webshop/templates/includes/macros.html index 23905a89b7..239fa9f75c 100644 --- a/webshop/templates/includes/macros.html +++ b/webshop/templates/includes/macros.html @@ -39,19 +39,19 @@ {{ section.section_html }} {% elif section.section_based_on == 'Cards' %}
-

{{ section.name }}

+

{{ _(section.name) }}

{% for card in section.section_cards %}
{% if card.image %} - {{ card.title }} + {{ _(card.title) }} {% endif %}
-
{{ card.title }}
-

{{ card.subtitle or '' }}

-

{{ card.content or '' | truncate(140, True) }}

+
{{ _(card.title) }}
+

{{ _(card.subtitle) or '' }}

+

{{ _(card.content) or '' | truncate(140, True) }}

{{ _('More details') }} @@ -128,17 +128,17 @@
{{ card.title }}
{% if is_featured %}
- {{ description or '' }} + {{ _(description) or '' }}
{% else %} {% if template != "Product Card" %} -
{{ item.item_group or '' }}
+
{{ _(item.item_group) or '' }}
{% endif %} {% endif %}
@@ -233,23 +233,23 @@

{{ average_rating or 0 }}

- {{ frappe.utils.cstr(total_reviews or 0) + " " + _("ratings") }} + {{ frappe.utils.cstr(total_reviews or 0) }} {{ _("ratings") }}
{% if reviews %} - {% set rating_title = frappe.utils.cstr(average_rating) + " " + _("out of 5") if not for_summary else ''%} + {% set rating_title = frappe.utils.cstr(average_rating) }} {{ _("out of 5") if not for_summary else ''%} {{ ratings_with_title(average_whole_rating, rating_title, "md", "rating-summary-title", for_summary) }} {% endif %} -
{{ frappe.utils.cstr(average_rating or 0) + " " + _("out of 5") }}
+
{{ frappe.utils.cstr(average_rating or 0) }} {{ _("out of 5") }}
{% for percent in reviews_per_rating %}
- {{ loop.index }} star + {{ loop.index }} {{ _("star") }}
@@ -298,7 +298,7 @@

{%- set item_field = field_filter[0] %} {%- set values = field_filter[1] %}
-
{{ item_field.label }}
+
{{ _(item_field.label) }}
{% if values | len > 20 %}