From 7a81258ddc7ece9e9f641083acfbc555bdedc009 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 24 Dec 2019 00:29:30 +0100 Subject: [PATCH] Translate units used by leaflet-locatecontrol --- app/assets/javascripts/index.js | 2 ++ app/assets/javascripts/user.js | 2 ++ config/locales/en.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 704016c66..6584864d5 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -109,6 +109,8 @@ $(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") } }).addTo(map); diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 7cbdb1e11..3839a18c2 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -18,6 +18,8 @@ $(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") } }).addTo(map); diff --git a/config/locales/en.yml b/config/locales/en.yml index b99e068b8..7c3aef4aa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2472,6 +2472,8 @@ en: out: Zoom Out locate: title: Show My Location + metersUnit: meters + feetUnit: feet popup: You are within {distance} {unit} of this point base: standard: Standard -- 2.39.5