Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: label should be translatable #226

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions webshop/templates/includes/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ <h2 style="font-size: 2rem;">
{%- set item_field = field_filter[0] %}
{%- set values = field_filter[1] %}
<div class="mb-4 filter-block pb-5">
<div class="filter-label mb-3">{{ item_field.label }}</div>
<div class="filter-label mb-3">{{ _(item_field.label) }}</div>

{% if values | len > 20 %}
<!-- show inline filter if values more than 20 -->
<input type="text" class="form-control form-control-sm mb-2 filter-lookup-input" placeholder="Search {{ item_field.label + 's' }}"/>
<input type="text" class="form-control form-control-sm mb-2 filter-lookup-input" placeholder="_('Search') {{ item_field.label + 's' }}"/>
{% endif %}

{% if values %}
Expand All @@ -316,7 +316,7 @@ <h2 style="font-size: 2rem;">
data-filter-name="{{ item_field.fieldname }}"
data-filter-value="{{ value }}"
style="width: 14px !important">
<span class="label-area">{{ value }}</span>
<span class="label-area">{{ _(value) }}</span>
</label>
</div>
{% endfor %}
Expand All @@ -331,10 +331,10 @@ <h2 style="font-size: 2rem;">
{%- macro attribute_filter_section(filters)-%}
{% for attribute in filters %}
<div class="mb-4 filter-block pb-5">
<div class="filter-label mb-3">{{ attribute.name }}</div>
<div class="filter-label mb-3">{{ _(attribute.name) }}</div>
{% if attribute.item_attribute_values | len > 20 %}
<!-- show inline filter if values more than 20 -->
<input type="text" class="form-control form-control-sm mb-2 filter-lookup-input" placeholder="Search {{ attribute.name + 's' }}"/>
<input type="text" class="form-control form-control-sm mb-2 filter-lookup-input" placeholder="_('Search') {{ attribute.name + 's' }}"/>
{% endif %}

{% if attribute.item_attribute_values %}
Expand All @@ -349,7 +349,7 @@ <h2 style="font-size: 2rem;">
data-attribute-value="{{ attr_value }}"
style="width: 14px !important"
{% if attr_value.checked %} checked {% endif %}>
<span class="label-area">{{ attr_value }}</span>
<span class="label-area">{{ _(attr_value) }}</span>
</label>
</div>
{% endfor %}
Expand Down
Loading