From 587a1b07545027382041aa41fb74a8445d3fe90c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 20 Mar 2020 14:28:51 +0000 Subject: [PATCH] Fix lego translation with locate control Fixes #2564 --- app/assets/javascripts/user.js | 6 +++--- config/locales/en.yml | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 3839a18c2..b9518f10d 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -18,9 +18,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); diff --git a/config/locales/en.yml b/config/locales/en.yml index 173fc158e..2c31ba2d9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2472,9 +2472,12 @@ en: out: Zoom Out locate: title: Show My Location - metersUnit: meters - feetUnit: feet - popup: You are within {distance} {unit} of this point + metersPopup: + one: You are within one meter of this point + other: You are within %{count} meters of this point + feetPopup: + one: You are within one foot of this point + other: You are within %{count} feet of this point base: standard: Standard cycle_map: Cycle Map -- 2.43.2