mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
2e1dca9fe9
Settings, Integrations, wanderer gains an optional background check of the trails you imported, off until you switch it on. While on, TREK reads the short record of each such trail at most once a day (never its GPX file) and leaves a hint when the trail may have moved on: "may have changed" when only wanderer's change time moved, "changed" when its name or description proves it, and "not checkable" when the trail is gone, no longer yours or carries no change time. Nothing is ever said to be unchanged. A new hint arrives as a notification that opens the tour (a new ?place= link in the planner); the tour's provenance shows it with the source check right beside it, and the card lists all open hints in a dialog, each leading to its tour. The check reads the source in full as before and spends the hint; taking a change in stays the confirmed reimport. No tour is ever changed or deleted. The check only asks through your own connection, only about trails your account imported into trips you can still open, and stops when you switch it off, remove the connection, wanderer refuses the token (until a test passes or a new token is saved) or the admin switches wanderer off; hints and snapshots stay. A run asks at most 25 connections for at most 10 records each, one after another, and an instance that fails (an outage, a rate limit) is left alone for an hour, doubling up to two days. Server: migration 046120 adds the switch and the run bookkeeping to wanderer_connections and the tour_source_hints table (one row per snapshot, for its importer, gone with it). WandererWatchService and an hourly wanderer-watch job on the CronRegistrar live in the tours domain and read through WandererService; GET and PUT /api/integrations/wanderer/watch and GET /api/trips/:tripId/tours/wanderer/sources/:placeId/hint (place_edit, like the check) answer with @trek/shared contracts. A new user notification event, wanderer_source_hint, can be muted per channel. Saving a new token now clears what the last check said about the old one. There is no MCP tool, as for the rest of the personal wanderer connection. All 27 locales carry the strings, and the admin wiki page says what the check does.
40 lines
2.3 KiB
TypeScript
40 lines
2.3 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const wandererWatch: TranslationStrings = {
|
|
'wanderer.watch.label': 'Kontrolli minu radade muudatusi',
|
|
'wanderer.watch.hint': 'Teavitus, kui imporditud rada võib olla muutunud.',
|
|
'wanderer.watch.info':
|
|
'Kõige rohkem kord päevas loeb TREK iga imporditud raja lühikirjet, mitte kunagi selle GPX-faili. See ainult teavitab: kas muudatus üle võtta, otsustad ise matka allika kontrolliga.',
|
|
'wanderer.watch.notConnected': 'Ühenda esmalt wanderer',
|
|
'wanderer.watch.on': 'Taustakontroll on sisse lülitatud',
|
|
'wanderer.watch.off': 'Taustakontroll on välja lülitatud',
|
|
'wanderer.watch.failed': 'Taustakontrolli ei õnnestunud ümber lülitada',
|
|
'wanderer.watch.lastRun': 'Viimati kontrollitud {date}',
|
|
'wanderer.watch.neverRun': 'Veel kontrollimata',
|
|
'wanderer.watch.paused': 'Peatatud kuni {time}',
|
|
'wanderer.watch.pausedHint':
|
|
'wanderer ei vastanud. Pärast iga ebaõnnestumist ootab TREK kauem, enne kui uuesti küsib.',
|
|
'wanderer.watch.blocked': 'Tõend tagasi lükatud',
|
|
'wanderer.watch.blockedHint':
|
|
'wanderer lükkas API-tõendi tagasi. Kontroll jätkub, kui ühenduse test õnnestub või uus tõend salvestatakse.',
|
|
'wanderer.watch.hints': 'Vihjed',
|
|
'wanderer.watch.hintsCount': '{count} avatud vihjet',
|
|
'wanderer.watch.hintsCount.one': '{count} avatud vihje',
|
|
'wanderer.watch.empty': 'Avatud vihjeid pole',
|
|
'wanderer.watch.dialogTitle': 'Vihjed sinu radade kohta',
|
|
'wanderer.watch.openTour': 'Ava matk',
|
|
'wanderer.watch.checkedAt': 'Kontrollitud {date}',
|
|
'wanderer.watch.noticeLabel': 'Taustakontroll',
|
|
'wanderer.watch.state.possible_change': 'Võib olla muutunud',
|
|
'wanderer.watch.state.changed': 'Muudetud',
|
|
'wanderer.watch.state.unverifiable': 'Ei saa kontrollida',
|
|
'wanderer.watch.stateHint.possible_change':
|
|
'wanderer muutis raja ajatemplit. Ainult allika kontroll näitab, kas sisu erineb.',
|
|
'wanderer.watch.stateHint.changed':
|
|
'wanderer kirje näitab teist nime või kirjeldust. Allika kontroll näitab kõike, mis muutus.',
|
|
'wanderer.watch.stateHint.unverifiable': 'TREK ei saanud seda rada hinnata, seega muudatuse kohta ei öelda midagi.',
|
|
'wanderer.watch.reason.unavailable': 'Rada pole kättesaadav',
|
|
'wanderer.watch.reason.no_change_time': 'Ajatempel puudub',
|
|
};
|
|
export default wandererWatch;
|