feat(tours): a city walk's arrivals and opening hours for the day it is on, at each stop in the planner and the detail (CW-02, CW-04)

A city walk now shows, at each stop, when the walk gets there, until when
the stay lasts, and what the stop's opening hours say about that visit. The
same lines appear under each stop row in the planner and under each stop in
the walk's detail, in the user's 12 or 24 hour format. A conflict names the
stop, the arrival, the end of the stay and the hours it was checked against,
for instance "Lenbachhaus closes at 18:00, during the stay from 17:20 to
18:20 (open 10:00 to 18:00)", in the warning colour. Nothing is changed by
these hints: no stop, order or route moves.

The times belong to one day the walk is on. Opened from a day of the plan,
the detail keeps that day, and checking stops off stays bound to it.
Opened otherwise, and in the planner, a small pill above the stops names
the day and its start, and the walk's other days can be picked from it; it
starts on the first day with a start time. The pick is only what is looked
at and is never saved, and another day never takes over the times quietly.
Without a day, a date or a start time the line says what is missing and no
arrival is shown. TREK keeps no time zone on a trip, so start, arrivals and
opening hours are all read as the local time of the plan, and an arrival
after midnight is said to be on the next day without being checked.

Opening hours come from the trip place a stop stands for, as the travellers
entered them, and otherwise from OpenStreetMap; a pill at each stop names
the source, and a notice says the hours are a hint to check. A stop without
hours stays unknown and is never shown as open, hours that are not in a
plain form are shown as written, and an arrival that is only a lower bound,
because a stay before it is not entered yet, is not judged unless no later
arrival could escape the conflict. A trip place that a stop stands for also
gives the stop its name before "Stop N".

The arrival at a stop is found where the route passes it in the walk's
order, so the end of a loop and a stop passed on the way out and back get
the right time. The rules live once in the shared package, for the server
to give the same answers. The walk's detail reads its stops again after a
save, its own or a teammate's.
This commit is contained in:
Maurice
2026-10-20 03:22:11 +00:00
parent 0d7e3ceb3d
commit 2203ff3a2e
48 changed files with 2476 additions and 397 deletions
+22 -3
View File
@@ -531,12 +531,31 @@ const tours: TranslationStrings = {
'tours.walk.themeReason': 'Sugerido para {theme}',
'tours.walk.arrival': 'Chegada por volta de {time}',
'tours.walk.arrivalAtLeast': 'Chegada a partir de {time}',
'tours.walk.hours.closed': 'Fechado às {arrival} segundo o horário',
'tours.walk.hours.closes': 'Chegada {arrival}, permanência até {leave}, mas fecha às {closes}',
'tours.walk.hours.closed': '{name} está fechado às {arrival}, a permanência iria até {leave}; abre {window}',
'tours.walk.hours.closes': '{name} fecha às {closes}, durante a permanência das {arrival} às {leave} (abre {window})',
'tours.walk.hours.unread': 'Horário não lido aqui: {text}',
'tours.walk.hours.source':
'Horário como está no OpenStreetMap, comparado à chegada estimada; confira antes de ir. Uma parada sem horário é desconhecida, não aberta.',
'Horários do OpenStreetMap ou dos seus próprios lugares, comparados com a chegada estimada no horário local do plano; confira antes de ir. Uma parada sem horário é desconhecida, não aberta.',
'tours.walk.hours.noStart': 'Dê ao passeio um horário neste dia para ver chegadas e horários.',
'tours.walk.day.label': 'Horários para',
'tours.walk.day.start': '{day}, saída às {time}',
'tours.walk.day.noStart': '{day}, sem horário de saída',
'tours.walk.hours.noDate': 'Este dia não tem data, então chegadas e horários de funcionamento ficam de fora.',
'tours.walk.hours.noDay':
'Coloque o passeio em um dia com horário de saída para ver chegadas e horários de funcionamento.',
'tours.walk.hours.closedNoStay': '{name} está fechado às {arrival}; abre {window}',
'tours.walk.hours.closedAllDay': '{name} fica fechado o dia todo nesta data',
'tours.walk.hours.open': 'Aberto {window}',
'tours.walk.hours.window': 'das {from} às {to}',
'tours.walk.hours.uncertain': 'Horário não verificado: falta a permanência de uma parada anterior.',
'tours.walk.arrivalNextDay':
'Chegada por volta de {time} no dia seguinte; horários não são verificados depois da meia-noite.',
'tours.walk.arrivalStay': 'Chegada por volta de {arrival}, permanência até {leave}',
'tours.walk.arrivalStayAtLeast': 'Chegada a partir de {arrival}, permanência até {leave} ou mais',
'tours.walk.hours.sourceOsm': 'OpenStreetMap',
'tours.walk.hours.sourcePlace': 'Lugar da viagem',
'tours.walk.hours.sourceOsmHint': 'Encontrado com a parada no OpenStreetMap; pode estar desatualizado.',
'tours.walk.hours.sourcePlaceHint': 'Informado para este lugar da viagem.',
'tours.poi.categoriesNone': 'Nenhuma categoria escolhida',
'tours.poi.categoriesMore': '{first} +{more}',
'tours.planner.tourType': 'Tipo de passeio',