Skip to content

Commit

Permalink
Change image download warning message to a list
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Dec 18, 2024
1 parent 0ea698b commit d74decf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/assets/javascripts/leaflet.share.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>")
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d74decf

Please sign in to comment.