]> git.openstreetmap.org Git - rails.git/commitdiff
Avoid concatenating text to a translation
authorTom Hughes <tom@compton.nu>
Thu, 21 Jan 2021 17:15:27 +0000 (17:15 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 21 Jan 2021 17:15:27 +0000 (17:15 +0000)
Fixes #3064

app/assets/javascripts/leaflet.share.js
config/locales/en.yml

index c4a5d026580df296205c3c2bb86799bd292b773e..8705f47ffa3a96e321598d8ace9a18d0c99c5606 100644 (file)
@@ -222,9 +222,14 @@ L.OSM.share = function (options) {
       .attr("type", "hidden")
       .appendTo($form);
 
+    var args = {
+      width: "<span id=\"mapnik_image_width\"></span>",
+      height: "<span id=\"mapnik_image_height\"></span>"
+    };
+
     $("<p>")
       .attr("class", "text-muted")
-      .html(I18n.t("javascripts.share.image_size") + " <span id=\"mapnik_image_width\"></span> x <span id=\"mapnik_image_height\"></span>")
+      .html(I18n.t("javascripts.share.image_dimensions", args))
       .appendTo($form);
 
     $("<input>")
index 24f2348c160d150457b5c221c69ecd92995ed8cb..ea24854c66db2c3d51c5cf8e4719243fac079c52 100644 (file)
@@ -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"