Skip to content
Snippets Groups Projects
Commit a0273f08 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2610436 by Gábor Hojtsy, Cottser, joelpittet, pp, xjm, alexpott: Twig...

Issue #2610436 by Gábor Hojtsy, Cottser, joelpittet, pp, xjm, alexpott: Twig templates incorrectly use % trans % with arbitrary filters
parent ecd6148e
No related branches found
No related tags found
No related merge requests found
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
*/ */
#} #}
{% if data.width and data.height -%} {% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }} {{ data.width }}×{{ data.height }}
{%- else -%} {%- else -%}
{% if data.width %} {% if data.width %}
{% trans %} {% trans %}
width {{ data.width|e }} width {{ data.width }}
{% endtrans %} {% endtrans %}
{% elseif data.height %} {% elseif data.height %}
{% trans %} {% trans %}
height {{ data.height|e }} height {{ data.height }}
{% endtrans %} {% endtrans %}
{% endif %} {% endif %}
{%- endif %} {%- endif %}
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
*/ */
#} #}
{% if data.width and data.height -%} {% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }} {{ data.width }}×{{ data.height }}
{%- else -%} {%- else -%}
{% if data.width %} {% if data.width %}
{% trans %} {% trans %}
width {{ data.width|e }} width {{ data.width }}
{% endtrans %} {% endtrans %}
{% elseif data.height %} {% elseif data.height %}
{% trans %} {% trans %}
height {{ data.height|e }} height {{ data.height }}
{% endtrans %} {% endtrans %}
{% endif %} {% endif %}
{%- endif %} {%- endif %}
...@@ -19,8 +19,9 @@ ...@@ -19,8 +19,9 @@
*/ */
#} #}
{% if data.random %} {% if data.random %}
{% set degrees = data.degrees|abs %}
{% trans %} {% trans %}
random between -{{ data.degrees|abs }}° and {{ data.degrees|abs }}° random between -{{ degrees }}° and {{ degrees }}°
{% endtrans %} {% endtrans %}
{% else %} {% else %}
{{ data.degrees }}° {{ data.degrees }}°
......
...@@ -17,15 +17,15 @@ ...@@ -17,15 +17,15 @@
*/ */
#} #}
{% if data.width and data.height -%} {% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }} {{ data.width }}×{{ data.height }}
{%- else -%} {%- else -%}
{% if data.width %} {% if data.width %}
{% trans %} {% trans %}
width {{ data.width|e }} width {{ data.width }}
{% endtrans %} {% endtrans %}
{% elseif data.height %} {% elseif data.height %}
{% trans %} {% trans %}
height {{ data.height|e }} height {{ data.height }}
{% endtrans %} {% endtrans %}
{% endif %} {% endif %}
{%- endif %} {%- endif %}
......
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
*/ */
#} #}
{% if data.width and data.height -%} {% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }} {{ data.width }}×{{ data.height }}
{%- else -%} {%- else -%}
{% if data.width %} {% if data.width %}
{% trans %} {% trans %}
width {{ data.width|e }} width {{ data.width }}
{% endtrans %} {% endtrans %}
{% elseif data.height %} {% elseif data.height %}
{% trans %} {% trans %}
height {{ data.height|e }} height {{ data.height }}
{% endtrans %} {% endtrans %}
{% endif %} {% endif %}
{%- endif %} {%- endif %}
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
*/ */
#} #}
{% if data.width and data.height -%} {% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }} {{ data.width }}×{{ data.height }}
{%- else -%} {%- else -%}
{% if data.width %} {% if data.width %}
{% trans %} {% trans %}
width {{ data.width|e }} width {{ data.width }}
{% endtrans %} {% endtrans %}
{% elseif data.height %} {% elseif data.height %}
{% trans %} {% trans %}
height {{ data.height|e }} height {{ data.height }}
{% endtrans %} {% endtrans %}
{% endif %} {% endif %}
{%- endif %} {%- endif %}
...@@ -17,8 +17,9 @@ ...@@ -17,8 +17,9 @@
*/ */
#} #}
{% if data.random %} {% if data.random %}
{% set degrees = data.degrees|abs %}
{% trans %} {% trans %}
random between -{{ data.degrees|abs }}° and {{ data.degrees|abs }}° random between -{{ degrees }}° and {{ degrees }}°
{% endtrans %} {% endtrans %}
{% else %} {% else %}
{{ data.degrees }}° {{ data.degrees }}°
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
*/ */
#} #}
{% if data.width and data.height -%} {% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }} {{ data.width }}×{{ data.height }}
{%- else -%} {%- else -%}
{% if data.width %} {% if data.width %}
{% trans %} {% trans %}
width {{ data.width|e }} width {{ data.width }}
{% endtrans %} {% endtrans %}
{% elseif data.height %} {% elseif data.height %}
{% trans %} {% trans %}
height {{ data.height|e }} height {{ data.height }}
{% endtrans %} {% endtrans %}
{% endif %} {% endif %}
{%- endif %} {%- endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment