]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5925'
authorTom Hughes <tom@compton.nu>
Sun, 13 Apr 2025 10:12:14 +0000 (11:12 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 13 Apr 2025 10:12:14 +0000 (11:12 +0100)
app/assets/javascripts/index/directions/fossgis_osrm.js
config/locales/en.yml

index 53043e06d35366df94da0505c333360f68d6bdf4..893e6cdc10439b6f44152ee4e23e854cf09b2451 100644 (file)
@@ -30,6 +30,7 @@
         "rotary": "roundabout",
         "exit roundabout": "exit_roundabout",
         "exit rotary": "exit_roundabout",
+        "ferry": "continue",
         "depart": "start",
         "arrive": "destination"
       };
     }
 
     function _processDirections(leg) {
-      function getManeuverId(maneuver) {
+      function getManeuverId({ maneuver, mode, intersections }) {
         // special case handling
+        if (mode === "ferry") return "ferry";
+        if (intersections.some(i => i.classes?.includes("ferry"))) return "ferry";
         switch (maneuver.type) {
           case "on ramp":
           case "off ramp":
         "rotary": "roundabout",
         "exit roundabout": "roundabout",
         "exit rotary": "roundabout",
+        "ferry": "ferry",
         "depart": "start",
         "arrive": "destination"
       };
 
-      for (const step of leg.steps) step.maneuverId = getManeuverId(step.maneuver);
+      for (const step of leg.steps) step.maneuverId = getManeuverId(step);
 
       const steps = leg.steps.map(step => [
         ICON_MAP[step.maneuverId],
index ddcc672cc17b26d84517d668418639f5ed19bc91..35ba0650bc2f6475d528e3ec37a3f50458e2c533 100644 (file)
@@ -3349,6 +3349,7 @@ en:
         roundabout_with_exit: At the roundabout take the exit %{exit} onto %{name}
         roundabout_with_exit_ordinal: At the roundabout take the %{exit} exit onto %{name}
         exit_roundabout: Exit the roundabout onto %{name}
+        ferry_without_exit: Take the ferry %{name}
         unnamed: "unnamed road"
         courtesy: "Directions courtesy of %{link}"
         exit_counts: