[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:
@@ -1,10 +1,10 @@
|
||||
{% extends '/collection/notes.html.twig' %}
|
||||
|
||||
{% block title %}{{ page_title | trans }}{% endblock %}
|
||||
{% block title %}{% trans %}%page_title%{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h2 class="frame-section-title">{{ page_title | trans }}</h2>
|
||||
<h2 class="frame-section-title">{% trans %}%page_title%{% endtrans %}</h2>
|
||||
{% block collection_items %}
|
||||
{% endblock collection_items %}
|
||||
</div>
|
||||
|
@@ -1,17 +1,17 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
|
||||
{% block title %}{{ page_title | trans }}{% endblock %}
|
||||
{% block title %}{% trans %}%page_title%{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h2 class="frame-section-title">{{ page_title | trans }}</h2>
|
||||
<h2 class="frame-section-title">{% trans %}%page_title%{% endtrans %}</h2>
|
||||
{% if add_collection %}
|
||||
<div class="frame-section section-form">
|
||||
{{ form(add_collection) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="frame-section collections-list">
|
||||
<h3>{{ list_title | trans }}</h3>
|
||||
<h3>{% trans %}%list_title%{% endtrans %}</h3>
|
||||
{% for col in collections %}
|
||||
<div class="collection-item">
|
||||
<a class="name" href="{{ fn.getUrl(col.id) }}">{{ col.name }}</a>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import '/cards/macros/note/factory.html.twig' as NoteFactory %}
|
||||
|
||||
{% block title %}{% if page_title is defined %}{{ page_title | trans }}{% endif %}{% endblock %}
|
||||
{% block title %}{% if page_title is defined %}{% trans %}%page_title%{% endtrans %}{% endif %}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
@@ -19,7 +19,7 @@
|
||||
{% if notes_feed_title is defined %}
|
||||
{{ notes_feed_title.getHtml() }}
|
||||
{% endif %}
|
||||
<nav class="feed-actions" title="{{ 'Actions that change how the feed behaves' | trans }}">
|
||||
<nav class="feed-actions" title="{% trans %}Actions that change how the feed behaves{% endtrans %}">
|
||||
<details class="feed-actions-details" role="group">
|
||||
<summary>
|
||||
{{ icon('filter', 'icon icon-feed-actions') | raw }} {# button-container #}
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
{% if notes is not empty %}
|
||||
{# Backwards compatibility with hAtom 0.1 #}
|
||||
<section class="feed h-feed hfeed notes" role="feed" aria-busy="false" title="{{ 'Feed content' | trans }}">
|
||||
<section class="feed h-feed hfeed notes" role="feed" aria-busy="false" title="{% trans %}Feed content{% endtrans %}">
|
||||
{% for conversation in notes %}
|
||||
{% block current_note %}
|
||||
{% if conversation is instanceof('array') %}
|
||||
@@ -45,7 +45,7 @@
|
||||
{% set args = { 'type': 'vanilla_full', 'note': conversation, 'extra': { 'depth': 0 } } %}
|
||||
{{ NoteFactory.constructor(args) }}#}
|
||||
{% endif %}
|
||||
<hr class="hr-replies-end" role="separator" aria-label="{{ 'Marks the end of previous conversation\'s initial note' | trans }}">
|
||||
<hr class="hr-replies-end" role="separator" aria-label="{% trans %}Marks the end of previous conversation's initial note{% endtrans %}">
|
||||
{% endblock current_note %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user