[TEMPLATES][I18N] Fixup use of trans filter, in favour of trans tags. These are much more flexible and facilitate parameterized translations, rather than using concats. The only appropriate use of the trans filter is when a whole string in a variable needs to be translated (which should probably be avoided anyway)

This commit is contained in:
2022-03-01 11:27:19 +00:00
parent 0b864e85fd
commit b3374333f3
25 changed files with 93 additions and 87 deletions

View File

@@ -13,7 +13,7 @@
<details class="section-details-subtitle frame-section">
<summary class="details-summary-subtitle">
<strong>
{{ "Additional options" | trans }}
{% trans %}Additional options{% endtrans %}
</strong>
</summary>
<section class="section-form">
@@ -27,12 +27,12 @@
{% endmacro %}
{% macro posting_section_vanilla(widget) %}
<section class="frame-section" title="{{ 'Create a new note.' | trans }}">
<section class="frame-section" title="{% trans %}Create a new note{% endtrans %}">
<details class="section-details-title" open="open"
title="{{ 'Expand if you want to access more options.' | trans }}">
title="{% trans %}Expand if you want to access more options{% endtrans %}">
<summary class="details-summary-title">
<span>
{{ "Create a note" | trans }}
{% trans %}Create a note{% endtrans %}
</span>
</summary>
@@ -43,12 +43,12 @@
{% endmacro %}
{% macro posting_section_reply(widget, extra) %}
<section class="frame-section" title="{{ 'Create a new note.' | trans }}">
<section class="frame-section" title="{% trans %}Create a new note{% endtrans %}">
<details class="section-details-title" open="open"
title="{{ 'Expand if you want to access more options.' | trans }}">
title="{% trans %}Expand if you want to access more options{% endtrans %}">
<summary class="details-summary-title">
<span>
{{ "Reply to note" | trans }}
{% trans %}Reply to note{% endtrans %}
</span>
</summary>
@@ -69,8 +69,8 @@
<label class="panel-right-icon" for="toggle-panel-right"
tabindex="-1">{{ icon('chevron-left', 'icon icon-right') | raw }}</label>
<a id="anchor-right-panel" class="anchor-hidden" tabindex="0"
title="{{ 'Press tab followed by a space to access right panel' | trans }}"></a>
<input type="checkbox" id="toggle-panel-right" tabindex="0" title="{{ 'Open right panel' | trans }}"
title="{% trans %}Press tab followed by a space to access right panel{% endtrans %}"></a>
<input type="checkbox" id="toggle-panel-right" tabindex="0" title="{% trans %}Open right panel{% endtrans %}"
{% if app.request.get('_route') == 'conversation_reply_to' %}checked{% endif %}>
<aside class="section-panel section-panel-right">