]> git.openstreetmap.org Git - rails.git/commitdiff
Change image download warning message to a list
authorAnton Khorev <tony29@yandex.ru>
Wed, 18 Dec 2024 16:55:45 +0000 (19:55 +0300)
committerAnton Khorev <tony29@yandex.ru>
Thu, 19 Dec 2024 15:58:32 +0000 (18:58 +0300)
app/assets/javascripts/leaflet.share.js
config/locales/en.yml

index 2faa5a2a1fa64f28cd6ab930d1525ccd0a327dea..7713a6b147228d66f2ab1d426188dd6740af7a53 100644 (file)
@@ -130,7 +130,12 @@ L.OSM.share = function (options) {
     $("<div>")
       .attr("id", "export-warning")
       .attr("class", "text-body-secondary")
-      .text(I18n.t("javascripts.share.only_standard_layer"))
+      .text(I18n.t("javascripts.share.only_layers_exported_as_image"))
+      .append(
+        $("<ul>").append(
+          map.baseLayers
+            .filter(layer => layer.options.canDownloadImage)
+            .map(layer => $("<li>").text(layer.options.name))))
       .appendTo($imageSection);
 
     $form = $("<form>")
index 0e7946c0faa89954dd1c185023296859fbcc4274..7faf3bebcf1e42b35eef23a245fbc7e557828243 100644 (file)
@@ -3105,7 +3105,7 @@ en:
       center_marker: "Center map on marker"
       paste_html: "Paste HTML to embed in website"
       view_larger_map: "View Larger Map"
-      only_standard_layer: "Only the Standard, Cycle Map and Transport layers can be exported as an image"
+      only_layers_exported_as_image: "Only the following layers can be exported as an image:"
     embed:
       report_problem: "Report a problem"
     key: