From a0273f0870d818355a70e7e47ff153b8a1e45d23 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Thu, 27 Oct 2016 22:05:30 -0700 Subject: [PATCH] =?UTF-8?q?Issue=20#2610436=20by=20G=C3=A1bor=20Hojtsy,=20?= =?UTF-8?q?Cottser,=20joelpittet,=20pp,=20xjm,=20alexpott:=20Twig=20templa?= =?UTF-8?q?tes=20incorrectly=20use=20%=20trans=20%=20with=20arbitrary=20fi?= =?UTF-8?q?lters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/modules/image/templates/image-crop-summary.html.twig | 6 +++--- core/modules/image/templates/image-resize-summary.html.twig | 6 +++--- core/modules/image/templates/image-rotate-summary.html.twig | 3 ++- core/modules/image/templates/image-scale-summary.html.twig | 6 +++--- .../stable/templates/admin/image-crop-summary.html.twig | 6 +++--- .../stable/templates/admin/image-resize-summary.html.twig | 6 +++--- .../stable/templates/admin/image-rotate-summary.html.twig | 3 ++- .../stable/templates/admin/image-scale-summary.html.twig | 6 +++--- 8 files changed, 22 insertions(+), 20 deletions(-) diff --git a/core/modules/image/templates/image-crop-summary.html.twig b/core/modules/image/templates/image-crop-summary.html.twig index fc991b65ef2a..7abcc0779c69 100644 --- a/core/modules/image/templates/image-crop-summary.html.twig +++ b/core/modules/image/templates/image-crop-summary.html.twig @@ -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 %} diff --git a/core/modules/image/templates/image-resize-summary.html.twig b/core/modules/image/templates/image-resize-summary.html.twig index f4084ef518e6..71c7ab335be5 100644 --- a/core/modules/image/templates/image-resize-summary.html.twig +++ b/core/modules/image/templates/image-resize-summary.html.twig @@ -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 %} diff --git a/core/modules/image/templates/image-rotate-summary.html.twig b/core/modules/image/templates/image-rotate-summary.html.twig index 705a0eb03d3b..f837efa1a0d1 100644 --- a/core/modules/image/templates/image-rotate-summary.html.twig +++ b/core/modules/image/templates/image-rotate-summary.html.twig @@ -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 }}° diff --git a/core/modules/image/templates/image-scale-summary.html.twig b/core/modules/image/templates/image-scale-summary.html.twig index 32d75cc336fa..33d0ee1332a3 100644 --- a/core/modules/image/templates/image-scale-summary.html.twig +++ b/core/modules/image/templates/image-scale-summary.html.twig @@ -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 %} diff --git a/core/themes/stable/templates/admin/image-crop-summary.html.twig b/core/themes/stable/templates/admin/image-crop-summary.html.twig index 6f3b0fcb3e4d..e401f2423383 100644 --- a/core/themes/stable/templates/admin/image-crop-summary.html.twig +++ b/core/themes/stable/templates/admin/image-crop-summary.html.twig @@ -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 %} diff --git a/core/themes/stable/templates/admin/image-resize-summary.html.twig b/core/themes/stable/templates/admin/image-resize-summary.html.twig index fde09d23ac2c..dc0ba198fd96 100644 --- a/core/themes/stable/templates/admin/image-resize-summary.html.twig +++ b/core/themes/stable/templates/admin/image-resize-summary.html.twig @@ -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 %} diff --git a/core/themes/stable/templates/admin/image-rotate-summary.html.twig b/core/themes/stable/templates/admin/image-rotate-summary.html.twig index 542f2df80dfc..c3f446e52147 100644 --- a/core/themes/stable/templates/admin/image-rotate-summary.html.twig +++ b/core/themes/stable/templates/admin/image-rotate-summary.html.twig @@ -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 }}° diff --git a/core/themes/stable/templates/admin/image-scale-summary.html.twig b/core/themes/stable/templates/admin/image-scale-summary.html.twig index bf54445a0829..5b7c6864c548 100644 --- a/core/themes/stable/templates/admin/image-scale-summary.html.twig +++ b/core/themes/stable/templates/admin/image-scale-summary.html.twig @@ -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 %} -- GitLab