]> git.openstreetmap.org Git - rails.git/commitdiff
Fix directions for roundabout without exit number
authorJamie Guthrie <jamie.guthrie@gmail.com>
Thu, 15 Feb 2018 09:53:00 +0000 (09:53 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 15 Feb 2018 17:53:54 +0000 (17:53 +0000)
Closes #1756

app/assets/javascripts/index/directions/osrm.js
config/locales/en.yml

index 5c29f6c4d4a55cf758309860baccb2bd00e957d2..e31c053ef7877bb62b5469c3dcbd83e71df147a5 100644 (file)
@@ -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) {
index 838e657d7591f76c896e089812542cf132e39243..2412a2b9c27e1baddccffddaab032a452b4d0143 100644 (file)
@@ -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}