From 8ac2302837606626cdd4b2acbad90ac896314e94 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 21 Jan 2021 17:15:27 +0000 Subject: [PATCH] Avoid concatenating text to a translation Fixes #3064 --- app/assets/javascripts/leaflet.share.js | 7 ++++++- config/locales/en.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index c4a5d0265..8705f47ff 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -222,9 +222,14 @@ L.OSM.share = function (options) { .attr("type", "hidden") .appendTo($form); + var args = { + width: "", + height: "" + }; + $("

") .attr("class", "text-muted") - .html(I18n.t("javascripts.share.image_size") + " x ") + .html(I18n.t("javascripts.share.image_dimensions", args)) .appendTo($form); $("") diff --git a/config/locales/en.yml b/config/locales/en.yml index 24f2348c1..ea24854c6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2667,7 +2667,7 @@ en: custom_dimensions: "Set custom dimensions" format: "Format:" scale: "Scale:" - image_size: "Image will show standard layer at " + image_dimensions: "Image will show standard layer at %{width} x %{height}" download: "Download" short_url: "Short URL" include_marker: "Include marker" -- 2.39.5