From: Jamie Guthrie Date: Thu, 15 Feb 2018 09:53:00 +0000 (+0000) Subject: Fix directions for roundabout without exit number X-Git-Tag: live~3102 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4a9f20a4858f6f647bb72128406163d93eccb720 Fix directions for roundabout without exit number Closes #1756 --- diff --git a/app/assets/javascripts/index/directions/osrm.js b/app/assets/javascripts/index/directions/osrm.js index 5c29f6c4d..e31c053ef 100644 --- a/app/assets/javascripts/index/directions/osrm.js +++ b/app/assets/javascripts/index/directions/osrm.js @@ -111,7 +111,11 @@ function OSRMEngine() { } if (step.maneuver.type.match(/rotary|roundabout/)) { - instText += I18n.t(template + '_with_exit', { exit: step.maneuver.exit, name: name } ); + if (step.maneuver.exit) { + instText += I18n.t(template + '_with_exit', { exit: step.maneuver.exit, name: name } ); + } else { + instText += I18n.t(template + '_without_exit', { name: name } ); + } } else if (step.maneuver.type.match(/on ramp|off ramp/)) { if (step.destinations) { if (namedRoad) { diff --git a/config/locales/en.yml b/config/locales/en.yml index 838e657d7..2412a2b9c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2360,7 +2360,7 @@ en: slight_left_without_exit: Slight left onto %{name} via_point_without_exit: (via point) follow_without_exit: Follow %{name} - roundabout_without_exit: At roundabout take %{name} + roundabout_without_exit: At roundabout take exit onto %{name} leave_roundabout_without_exit: Leave roundabout - %{name} stay_roundabout_without_exit: Stay on roundabout - %{name} start_without_exit: Start on %{name}