X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7a81258ddc7ece9e9f641083acfbc555bdedc009..bab39572a17146d5b6e696f0ba584a89daac10c7:/app/assets/javascripts/user.js diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 3839a18c2..3bdb35470 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -1,4 +1,4 @@ -//= require leaflet.locate +//= require leaflet.locatecontrol/src/L.Control.Locate $(document).ready(function () { if ($("#map").length) { @@ -18,9 +18,9 @@ $(document).ready(function () { iconLoading: "icon geolocate", strings: { title: I18n.t("javascripts.map.locate.title"), - metersUnit: I18n.t("javascripts.map.locate.metersUnit"), - feetUnit: I18n.t("javascripts.map.locate.feetUnit"), - popup: I18n.t("javascripts.map.locate.popup") + popup: function (options) { + return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance }); + } } }).addTo(map);