]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/user.js
Replace use of I18n in javascript with OSM.i18n
[rails.git] / app / assets / javascripts / user.js
index f3fe02e0c55ac714435ca5b04046385e44b2da29..77a71097b1d41d899372c043e5341ba8f1ce2e27 100644 (file)
@@ -26,9 +26,9 @@ $(function () {
       icon: "icon geolocate",
       iconLoading: "icon geolocate",
       strings: {
       icon: "icon geolocate",
       iconLoading: "icon geolocate",
       strings: {
-        title: I18n.t("javascripts.map.locate.title"),
+        title: OSM.i18n.t("javascripts.map.locate.title"),
         popup: function (options) {
         popup: function (options) {
-          return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance });
+          return OSM.i18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance });
         }
       }
     }).addTo(map);
         }
       }
     }).addTo(map);
@@ -210,7 +210,7 @@ $(function () {
   });
 
   $("input[name=legale]").change(function () {
   });
 
   $("input[name=legale]").change(function () {
-    $("#contributorTerms").html("<div class='spinner-border' role='status'><span class='visually-hidden'>" + I18n.t("browse.start_rjs.loading") + "</span></div>");
+    $("#contributorTerms").html("<div class='spinner-border' role='status'><span class='visually-hidden'>" + OSM.i18n.t("browse.start_rjs.loading") + "</span></div>");
     fetch($(this).data("url"))
       .then(r => r.text())
       .then(html => { $("#contributorTerms").html(html); });
     fetch($(this).data("url"))
       .then(r => r.text())
       .then(html => { $("#contributorTerms").html(html); });