+ {/* Header with route summary */}
- Waypoints ({waypoints.length})
+ {t("planner.sidebar.waypoints")} ({waypoints.length})
+ {routeStats && routeStats.distance !== undefined && (
+
+ {(routeStats.distance / 1000).toFixed(1)} km
+ {routeStats.elevationGain !== undefined && ` · ↑${routeStats.elevationGain} m`}
+ {hasMultipleDays && ` · ${t("planner.multiDay.dayCount", { count: days.length })}`}
+
+ )}
+ {/* Waypoint list */}
{waypoints.length === 0 ? (
Click on the map to add waypoints
+ ) : hasMultipleDays ? (
+
+ {(_day, { start, end }) => (
+
+ {waypoints.slice(start, end + 1).map((wp, offset) => renderWaypointRow(wp, start + offset))}
+
+ )}
+
) : (
- {waypoints.map((wp, i) => (
- -
-
- {i + 1}
-
-
-
- {wp.name ?? `${wp.lat.toFixed(4)}, ${wp.lon.toFixed(4)}`}
-
-
-
- {i > 0 && (
-
- )}
- {i < waypoints.length - 1 && (
-
- )}
-
-
-
- ))}
+ {waypoints.map((wp, i) => renderWaypointRow(wp, i))}
)}
- {routeStats && routeStats.distance !== undefined && (
+ {/* Stats footer — only shown for single-day view (multi-day shows per-day stats inline) */}
+ {!hasMultipleDays && routeStats && routeStats.distance !== undefined && (
{(routeStats.distance / 1000).toFixed(1)} km
-
Distance
+
{t("planner.multiDay.distance")}
{routeStats.elevationGain !== undefined && (
↑ {routeStats.elevationGain} m
-
Ascent
+
{t("planner.multiDay.ascent")}
)}
{routeStats.elevationLoss !== undefined && (
@@ -140,7 +200,7 @@ export function WaypointSidebar({ yjs, routeStats }: WaypointSidebarProps) {
↓ {routeStats.elevationLoss} m
-
Descent
+
{t("planner.multiDay.descent")}
)}
diff --git a/openspec/changes/multi-day-routes/tasks.md b/openspec/changes/multi-day-routes/tasks.md
index 120db05..b7b8ae9 100644
--- a/openspec/changes/multi-day-routes/tasks.md
+++ b/openspec/changes/multi-day-routes/tasks.md
@@ -6,10 +6,10 @@
## 2. Sidebar Day Breakdown
-- [ ] 2.1 Create `DayBreakdown` component: renders collapsible day sections with per-day stats (distance, ascent, estimated time), Day 1 expanded by default
-- [ ] 2.2 Add overnight toggle button (moon icon) to each waypoint row in `WaypointSidebar` — amber styling when active, calls `setOvernight()`
-- [ ] 2.3 Integrate `DayBreakdown` into `WaypointSidebar`: show day-grouped view when any waypoint has overnight, flat list otherwise
-- [ ] 2.4 Add route summary header to sidebar: total distance, ascent, number of days (e.g. "Berlin -> Erfurt 343 km ^868m 2 days")
+- [x] 2.1 Create `DayBreakdown` component: renders collapsible day sections with per-day stats (distance, ascent, estimated time), Day 1 expanded by default
+- [x] 2.2 Add overnight toggle button (moon icon) to each waypoint row in `WaypointSidebar` — amber styling when active, calls `setOvernight()`
+- [x] 2.3 Integrate `DayBreakdown` into `WaypointSidebar`: show day-grouped view when any waypoint has overnight, flat list otherwise
+- [x] 2.4 Add route summary header to sidebar: total distance, ascent, number of days (e.g. "Berlin -> Erfurt 343 km ^868m 2 days")
## 3. Map Integration
@@ -37,7 +37,7 @@
## 7. i18n
-- [ ] 7.1 Add Planner translation keys for en + de: day labels ("Day 1", "Tag 1"), overnight toggle ("Mark as overnight stop" / "Als Übernachtung markieren"), per-day stats, route summary
+- [x] 7.1 Add Planner translation keys for en + de: day labels ("Day 1", "Tag 1"), overnight toggle ("Mark as overnight stop" / "Als Übernachtung markieren"), per-day stats, route summary
- [ ] 7.2 Add Journal translation keys for en + de: day breakdown header, per-day stats labels
## 8. Testing
diff --git a/packages/i18n/src/locales/de.ts b/packages/i18n/src/locales/de.ts
index 51f0a30..86c398d 100644
--- a/packages/i18n/src/locales/de.ts
+++ b/packages/i18n/src/locales/de.ts
@@ -58,6 +58,17 @@ export default {
waypoints: "Wegpunkte",
notes: "Notizen",
},
+ multiDay: {
+ dayLabel: "Tag {{n}}",
+ dayCount: "{{count}} Tage",
+ dayCount_one: "1 Tag",
+ overnight: "Übernachtung",
+ markOvernight: "Als Übernachtung markieren",
+ removeOvernight: "Übernachtung entfernen",
+ distance: "Distanz",
+ ascent: "Anstieg",
+ descent: "Abstieg",
+ },
noGoAreas: {
draw: "Sperrgebiet zeichnen",
cancel: "Sperrgebiet abbrechen",
diff --git a/packages/i18n/src/locales/en.ts b/packages/i18n/src/locales/en.ts
index 31490a8..e1ff75a 100644
--- a/packages/i18n/src/locales/en.ts
+++ b/packages/i18n/src/locales/en.ts
@@ -58,6 +58,17 @@ export default {
waypoints: "Waypoints",
notes: "Notes",
},
+ multiDay: {
+ dayLabel: "Day {{n}}",
+ dayCount: "{{count}} days",
+ dayCount_one: "1 day",
+ overnight: "Overnight",
+ markOvernight: "Mark as overnight stop",
+ removeOvernight: "Remove overnight stop",
+ distance: "Distance",
+ ascent: "Ascent",
+ descent: "Descent",
+ },
noGoAreas: {
draw: "Draw no-go area",
cancel: "Cancel no-go area",