Issue #2610436 by Gábor Hojtsy, Cottser, joelpittet, pp, xjm, alexpott: Twig templates incorrectly use % trans % with arbitrary filters

8.3.x
Alex Pott 2016-10-27 22:05:30 -07:00
parent ecd6148ee5
commit a0273f0870
8 changed files with 22 additions and 20 deletions

View File

@ -18,15 +18,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View File

@ -16,15 +16,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View File

@ -19,8 +19,9 @@
*/
#}
{% if data.random %}
{% set degrees = data.degrees|abs %}
{% trans %}
random between -{{ data.degrees|abs }}° and {{ data.degrees|abs }}°
random between -{{ degrees }}° and {{ degrees }}°
{% endtrans %}
{% else %}
{{ data.degrees }}°

View File

@ -17,15 +17,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View File

@ -16,15 +16,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View File

@ -14,15 +14,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View File

@ -17,8 +17,9 @@
*/
#}
{% if data.random %}
{% set degrees = data.degrees|abs %}
{% trans %}
random between -{{ data.degrees|abs }}° and {{ data.degrees|abs }}°
random between -{{ degrees }}° and {{ degrees }}°
{% endtrans %}
{% else %}
{{ data.degrees }}°

View File

@ -15,15 +15,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}