mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 09:54:14 +00:00
feat(journey): keep the route recorded on a journey day from Dawarich, previewed first, with its gaps
A day header in the journey timeline now carries the Dawarich mark for an editor whose Dawarich answers (dimmed with the reason while offline). It opens a dialog that names the journey and the day and reads that one local day from the caller's own connection: a sketch of the route, distance, first and last time, pieces, gaps without recording, modes and whether tracks or thinned points answered. The day is cut in the zone Dawarich records in where its answer shows one, else in this device's, and a picker cuts it in any other. Nothing is kept before "Keep route". On a phone the same sheet opens from the journey's More options for the day of the card shown. What is kept is the preview that was seen: the save reads the day again and refuses with recording_changed when its hash moved, and the dialog shows the new version. The same day taken over twice keeps one version and announces nothing; a different version is replaced only on "Replace", never touching an entry or text. A failed read throws before any write, so the kept version stays. Gaps stay gaps: points are split where silence ends elsewhere, and no day is joined to the one before. The dialog says how many other people will see the route; editors may keep their own recording. Kept days show in the day header (distance, whose recording, since when, still running) and on the desktop and phone journey maps in the colour of their day's pins, winning over the live trail of their date, and stay drawn without Dawarich. A trip's GPX track is now drawn dashed as the plan, recorded routes solid. Shared links do not show recorded days. Remove route asks first and works without a connection. Server: migration 046160 adds journey_recorded_days (one row per journey, local day and source, segments as JSON, zone, window, fetch time, hash, importer kept past their account). The journey domain owns the rows through JourneyRecordedDaysService; the new journey-recordings domain takes a day over through DawarichTracksService.fetchDay, which reads past the cache, asks a window wide enough for every zone and refuses with DomainErrors. REST under /api/journeys/:id/recordings (list, preview, PUT and DELETE /:date) with @trek/shared contracts, and MCP list_journey_recorded_days, preview_journey_recorded_day, save_journey_recorded_day and delete_journey_recorded_day on the same service and access. A new user event journey:recording:updated keeps every open map current. JourneyTrack gains an optional kind. All 27 locales carry the strings; the Journey and Dawarich wiki pages and the MCP tool list say what it does.
This commit is contained in:
@@ -708,5 +708,68 @@ const journey: TranslationStrings = {
|
||||
'journey.settings.showWeather': 'Temps',
|
||||
'journey.entry.suggestion': 'Suggeriment',
|
||||
'journey.editor.addDetails': '+ Detalls',
|
||||
'journey.recording.mapLine': 'Enregistrat el {date}',
|
||||
'journey.recording.keptBy': 'Ruta enregistrada desada: {distance}, presa per {name} el {date}.',
|
||||
'journey.recording.keptOn': 'Ruta enregistrada desada: {distance}, presa el {date}.',
|
||||
'journey.recording.keptRunning': 'El dia encara no s’havia acabat.',
|
||||
'journey.recording.takeOver': 'Agafar l’enregistrament',
|
||||
'journey.recording.takeOverDay': 'Enregistrament del {date}',
|
||||
'journey.recording.sub': 'Només aquest dia, des del teu Dawarich. No es desa res fins que confirmis.',
|
||||
'journey.recording.zone': 'Fus horari del dia',
|
||||
'journey.recording.zoneHint': 'El dia va de mitjanit a mitjanit en aquest fus. Tria el fus on viatjaves.',
|
||||
'journey.recording.zoneSource': 'Segons Dawarich',
|
||||
'journey.recording.zoneDevice': 'Aquest dispositiu',
|
||||
'journey.recording.scope': 'Enregistrament',
|
||||
'journey.recording.loading': 'S’està llegint el dia de Dawarich…',
|
||||
'journey.recording.keptStays': 'La ruta que desa aquest viatge es queda com està.',
|
||||
'journey.recording.retry': 'Torna-ho a provar',
|
||||
'journey.recording.empty': 'Dawarich no va enregistrar res aquell dia en aquest fus horari.',
|
||||
'journey.recording.span': 'de {from} a {to}',
|
||||
'journey.recording.pieces': '{count} trams',
|
||||
'journey.recording.pieces.one': '{count} tram',
|
||||
'journey.recording.gaps': '{count} interrupcions',
|
||||
'journey.recording.gaps.one': '{count} interrupció',
|
||||
'journey.recording.gapsHint':
|
||||
'On l’enregistrament s’atura, la línia també. No es dibuixa cap camí que no s’hagi enregistrat.',
|
||||
'journey.recording.sourceHint':
|
||||
'Les rutes són trajectes que Dawarich ja ha dividit per mitjà. Els punts són les seves posicions en brut, reduïdes a 600 per dia.',
|
||||
'journey.recording.sourceTracks': 'Rutes',
|
||||
'journey.recording.sourcePoints': 'Punts',
|
||||
'journey.recording.changedSincePreview':
|
||||
'L’enregistrament ha canviat a Dawarich mentre el miraves. Revisa’l un cop més i després desa’l.',
|
||||
'journey.recording.truncated': 'Dawarich només ha enviat una part d’aquest dia, la ruta és incompleta.',
|
||||
'journey.recording.provisional':
|
||||
'Aquest dia encara no s’ha acabat en aquest fus. Més endavant pots substituir la ruta pel dia sencer.',
|
||||
'journey.recording.same': 'Aquest viatge ja desa exactament aquest enregistrament.',
|
||||
'journey.recording.differs':
|
||||
'Aquest viatge desa una altra versió del {date} ({distance}). Substituir-la no canvia cap entrada ni cap text.',
|
||||
'journey.recording.audience':
|
||||
'{count} persones més d’aquest viatge veuran la ruta al mapa. Els enllaços compartits no la mostren.',
|
||||
'journey.recording.audience.one':
|
||||
'{count} persona més d’aquest viatge veurà la ruta al mapa. Els enllaços compartits no la mostren.',
|
||||
'journey.recording.replace': 'Substitueix',
|
||||
'journey.recording.alreadyKept': 'Ja desada',
|
||||
'journey.recording.keep': 'Desa la ruta',
|
||||
'journey.recording.remove': 'Treu la ruta',
|
||||
'journey.recording.removeTitle': 'Vols treure la ruta desada?',
|
||||
'journey.recording.removeMessage':
|
||||
'La ruta d’aquest dia desapareix del mapa del viatge. Les entrades i els textos es queden, i Dawarich conserva el seu propi enregistrament.',
|
||||
'journey.recording.keptToast': 'Ruta desada al viatge',
|
||||
'journey.recording.replacedToast': 'Ruta substituïda',
|
||||
'journey.recording.removedToast': 'Ruta treta del viatge',
|
||||
'journey.recording.error.recording_exists': 'Aquest viatge ja desa un altre enregistrament d’aquell dia.',
|
||||
'journey.recording.error.recording_changed': 'L’enregistrament ha canviat des de la previsualització.',
|
||||
'journey.recording.error.recording_empty': 'Dawarich no va enregistrar res aquell dia.',
|
||||
'journey.recording.mode.walking': 'A peu',
|
||||
'journey.recording.mode.running': 'Córrer',
|
||||
'journey.recording.mode.cycling': 'Bicicleta',
|
||||
'journey.recording.mode.driving': 'Cotxe',
|
||||
'journey.recording.mode.motorcycle': 'Moto',
|
||||
'journey.recording.mode.bus': 'Autobús',
|
||||
'journey.recording.mode.train': 'Tren',
|
||||
'journey.recording.mode.flying': 'Vol',
|
||||
'journey.recording.mode.boat': 'Vaixell',
|
||||
'journey.recording.mode.stationary': 'Aturat',
|
||||
'journey.recording.mode.unknown': 'Mitjà desconegut',
|
||||
};
|
||||
export default journey;
|
||||
|
||||
Reference in New Issue
Block a user