]> git.openstreetmap.org Git - rails.git/commitdiff
Fix locate control popup on the main map to use new translations
authorTom Hughes <tom@compton.nu>
Wed, 27 Jan 2021 13:48:54 +0000 (13:48 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 27 Jan 2021 13:48:54 +0000 (13:48 +0000)
Fixes #3072

app/assets/javascripts/index.js

index 68beefeb6a7f4fa5122c2629c4254a8d01cc8f04..10f28ef9232b3c903aecd08d00fb725f9b6ad6b9 100644 (file)
@@ -108,9 +108,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);