summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2013-10-16 11:10:59 (GMT)
committerNathaniel Catchpole2013-10-16 11:10:59 (GMT)
commit24f3e119dd0beb41ad4b22329f19a170b62fd154 (patch)
tree6d1fc818c4c101af98fb8f59d94dfd10f675cdfb
parent1eb27ae08c38e4fc3b5df979486a555425fbcbd5 (diff)
Issue #2047227 by StephaneQ, SeanKelly, richardj: Update templates to leverage support for the Twig {% trans %} tag extension.
-rw-r--r--core/modules/aggregator/templates/aggregator-summary-items.html.twig2
-rw-r--r--core/modules/datetime/templates/datetime-wrapper.html.twig2
-rw-r--r--core/modules/forum/templates/forum-submitted.html.twig2
-rw-r--r--core/modules/locale/templates/locale-translation-last-check.html.twig2
-rw-r--r--core/modules/locale/templates/locale-translation-update-info.html.twig3
5 files changed, 6 insertions, 5 deletions
diff --git a/core/modules/aggregator/templates/aggregator-summary-items.html.twig b/core/modules/aggregator/templates/aggregator-summary-items.html.twig
index 01f36a3..0a6dd45 100644
--- a/core/modules/aggregator/templates/aggregator-summary-items.html.twig
+++ b/core/modules/aggregator/templates/aggregator-summary-items.html.twig
@@ -19,5 +19,5 @@
<h3>{{ title }}</h3>
{{ summary_list }}
<div class="links">
- <a href="{{ source_url }}">{{ 'More<span class="visually-hidden"> posts about %title</span>'|t({ '%title': title }) }}</a>
+ <a href="{{ source_url }}">{% trans %}More<span class="visually-hidden"> posts about {{ title|placeholder }}</span>{% endtrans %}</a>
</div>
diff --git a/core/modules/datetime/templates/datetime-wrapper.html.twig b/core/modules/datetime/templates/datetime-wrapper.html.twig
index 10e7376..a4acf70 100644
--- a/core/modules/datetime/templates/datetime-wrapper.html.twig
+++ b/core/modules/datetime/templates/datetime-wrapper.html.twig
@@ -17,7 +17,7 @@
#}
{% if title %}
<h4 class="label">
- {{ '!title!required'|t({ '!title': title, '!required': required }) }}
+ {% trans %}{{ title|passthrough }}{{ required|passthrough }}{% endtrans %}
</h4>
{% endif %}
{{ content }}
diff --git a/core/modules/forum/templates/forum-submitted.html.twig b/core/modules/forum/templates/forum-submitted.html.twig
index 5115b4c..f679363 100644
--- a/core/modules/forum/templates/forum-submitted.html.twig
+++ b/core/modules/forum/templates/forum-submitted.html.twig
@@ -17,7 +17,7 @@
*/
#}
{% if time %}
- <span class="submitted">{{ 'By !author @time ago'|t({'@time': time, '!author': author}) }}</span>
+ <span class="submitted">{% trans %}By {{ author|passthrough }} {{ time }} ago{% endtrans %}</span>
{% else %}
{{ 'n/a'|t }}
{% endif %}
diff --git a/core/modules/locale/templates/locale-translation-last-check.html.twig b/core/modules/locale/templates/locale-translation-last-check.html.twig
index 32cd899..a54574b 100644
--- a/core/modules/locale/templates/locale-translation-last-check.html.twig
+++ b/core/modules/locale/templates/locale-translation-last-check.html.twig
@@ -17,7 +17,7 @@
<div class="locale checked">
<p>
{% if last_checked %}
- {{ 'Last checked: @time ago'|t({'@time': time}) }}
+ {% trans %} Last checked: {{ time }} ago {% endtrans %}
{% else %}
{{ 'Last checked: never'|t }}
{% endif %}
diff --git a/core/modules/locale/templates/locale-translation-update-info.html.twig b/core/modules/locale/templates/locale-translation-update-info.html.twig
index 81cceb4..809028a 100644
--- a/core/modules/locale/templates/locale-translation-update-info.html.twig
+++ b/core/modules/locale/templates/locale-translation-update-info.html.twig
@@ -21,7 +21,8 @@
<div class="inner" tabindex="0" role="button">
<span class="update-description-prefix visually-hidden">Show description</span>
{% if modules %}
- <span class="text">{{ 'Updates for: @modules'|t({'@modules': modules|join(', ')}) }}</span>
+ {% set module_list = modules|join(', ') %}
+ <span class="text">{% trans %}Updates for: {{ module_list }}{% endtrans %}</span>
{% elseif missing_updates_status %}
<span class="text">{{ missing_updates_status }}</span>
{% endif %}