From: Tom Hughes Date: Wed, 27 Jan 2021 13:48:54 +0000 (+0000) Subject: Fix locate control popup on the main map to use new translations X-Git-Tag: live~2299 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/810e4da85ab65100d1d4d7ad6a302755da67b4d9 Fix locate control popup on the main map to use new translations Fixes #3072 --- 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);