From: Tom Hughes Date: Fri, 20 Mar 2020 14:28:51 +0000 (+0000) Subject: Fix lego translation with locate control X-Git-Tag: live~2797 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/587a1b07545027382041aa41fb74a8445d3fe90c?ds=sidebyside;hp=df229c208dd43c9af87b370f6e52342b1cba2e58 Fix lego translation with locate control Fixes #2564 --- 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