]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/diary_entry.js
Replace use of I18n in javascript with OSM.i18n
[rails.git] / app / assets / javascripts / diary_entry.js
index e55d0900d0b13a9e7d6081a6998043fa74784aeb..bfc3fc0128a70470324f68117f7789d1316d8584 100644 (file)
@@ -1,4 +1,4 @@
-$(document).ready(function () {
+$(function () {
   let marker, map;
 
   function setLocation(e) {
@@ -12,7 +12,7 @@ $(document).ready(function () {
     }
 
     marker = L.marker(e.latlng, { icon: OSM.getUserIcon() }).addTo(map)
-      .bindPopup(I18n.t("diary_entries.edit.marker_text"));
+      .bindPopup(OSM.i18n.t("diary_entries.edit.marker_text"));
   }
 
   $("#usemap").click(function (e) {
@@ -37,7 +37,7 @@ $(document).ready(function () {
 
     if ($("#latitude").val() && $("#longitude").val()) {
       marker = L.marker(centre, { icon: OSM.getUserIcon() }).addTo(map)
-        .bindPopup(I18n.t("diary_entries.edit.marker_text"));
+        .bindPopup(OSM.i18n.t("diary_entries.edit.marker_text"));
     }
 
     map.on("click", setLocation);