[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 'stdgrid.html.twig' %}
|
||||
{% block title %}{{ 'Create a blog post' | trans }}{% endblock %}
|
||||
{% block title %}{% trans %}Create a blog post{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{{ parent() }}
|
||||
<section class="frame-section frame-section-padding">
|
||||
<h1>{{ 'Create a blog post' | trans }}</h1>
|
||||
<h1>{% trans %}Create a blog post{% endtrans %}</h1>
|
||||
{{ form(blog_entry_form) }}
|
||||
</section>
|
||||
{% endblock body %}
|
||||
|
@@ -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>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h3>{{ 'Put the languages in the order you\'d like to see them in your language selection dropdown, when posting' | trans}}</h3>
|
||||
{{ form(form) }}
|
||||
</div>
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h3>{% trans %}Put the languages in the order you'd like to see them in your language selection dropdown, when posting{% endtrans %}</h3>
|
||||
{{ form(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
{% block body %}
|
||||
<div class="frame-section">
|
||||
<form class="section-form" action="{{ path('edit_feeds') }}" method="post">
|
||||
<h1 class="frame-section-title">{{ "Edit feed navigation links" | trans }}</h1>
|
||||
<h1 class="frame-section-title">{% trans %}Edit feed navigation links{% endtrans %}</h1>
|
||||
{# Since the form is not separated into individual groups, this happened #}
|
||||
{{ form_start(edit_feeds) }}
|
||||
{{ form_errors(edit_feeds) }}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
{% block leftpanel %}
|
||||
<label class="panel-left-icon" for="toggle-panel-left" tabindex="-1">{{ icon('menu', 'icon icon-left') | raw }}</label>
|
||||
<a id="anchor-left-panel" class="anchor-hidden" tabindex="0" title="{{ 'Press tab followed by a space to access left panel' | trans }}"></a>
|
||||
<input type="checkbox" id="toggle-panel-left" tabindex="0" title="{{ 'Open left panel' | trans }}">
|
||||
<a id="anchor-left-panel" class="anchor-hidden" tabindex="0" title="{% trans %}Press tab followed by a space to access left panel{% endtrans %}"></a>
|
||||
<input type="checkbox" id="toggle-panel-left" tabindex="0" title="{% trans %}Open left panel{% endtrans %}">
|
||||
|
||||
<aside class="section-panel section-panel-left">
|
||||
<section class="panel-content accessibility-target">
|
||||
{% if app.user %}
|
||||
<section class='frame-section frame-section-padding' title="{{ 'Your profile information.' | trans }}">
|
||||
<section class='frame-section frame-section-padding' title="{% trans %}Your profile information{% endtrans %}">
|
||||
{% block profile_view %}{% include 'cards/blocks/profile.html.twig' with { actor: current_actor } %}{% endblock profile_view %}
|
||||
{{ block("profile_current_actor", "cards/blocks/navigation.html.twig") }}
|
||||
</section>
|
||||
|
@@ -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">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<section class="section-form form-search" title="{{ 'Search for notes, actors, and beyond' | trans }}">
|
||||
<section class="section-form form-search" title="{% trans %}Search for notes, actors, and beyond{% endtrans %}">
|
||||
{{ form_start(search) }}
|
||||
<span>{{ form_row(search.search_query) }}{{ form_row(search.submit_search) }}</span>
|
||||
{{ form_rest(search) }}
|
||||
|
Reference in New Issue
Block a user