From 810e4da85ab65100d1d4d7ad6a302755da67b4d9 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 27 Jan 2021 13:48:54 +0000 Subject: [PATCH] Fix locate control popup on the main map to use new translations Fixes #3072 --- app/assets/javascripts/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 68beefeb6..10f28ef92 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -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); -- 2.39.5