mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-14 00:01:03 +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.
38 lines
4.0 KiB
TypeScript
38 lines
4.0 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const wandererWatch: TranslationStrings = {
|
|
'wanderer.watch.label': 'ตรวจการเปลี่ยนแปลงของเส้นทางของฉัน',
|
|
'wanderer.watch.hint': 'แจ้งเตือนเมื่อเส้นทางที่นำเข้าอาจมีการเปลี่ยนแปลง',
|
|
'wanderer.watch.info':
|
|
'TREK อ่านบันทึกสั้น ๆ ของแต่ละเส้นทางที่คุณนำเข้าอย่างมากวันละครั้ง และไม่อ่านไฟล์ GPX เลย TREK แค่แจ้งเตือน ส่วนจะรับการเปลี่ยนแปลงหรือไม่ คุณตัดสินใจเองผ่านการตรวจแหล่งที่มาของทัวร์',
|
|
'wanderer.watch.notConnected': 'เชื่อมต่อ wanderer ก่อน',
|
|
'wanderer.watch.on': 'เปิดการตรวจเบื้องหลังแล้ว',
|
|
'wanderer.watch.off': 'ปิดการตรวจเบื้องหลังแล้ว',
|
|
'wanderer.watch.failed': 'สลับการตรวจเบื้องหลังไม่สำเร็จ',
|
|
'wanderer.watch.lastRun': 'ตรวจล่าสุด {date}',
|
|
'wanderer.watch.neverRun': 'ยังไม่ได้ตรวจ',
|
|
'wanderer.watch.paused': 'หยุดชั่วคราวถึง {time}',
|
|
'wanderer.watch.pausedHint': 'wanderer ไม่ตอบกลับ หลังความล้มเหลวแต่ละครั้ง TREK จะรอนานขึ้นก่อนถามอีกครั้ง',
|
|
'wanderer.watch.blocked': 'โทเค็นถูกปฏิเสธ',
|
|
'wanderer.watch.blockedHint':
|
|
'wanderer ปฏิเสธโทเค็น API การตรวจจะทำต่อเมื่อการทดสอบการเชื่อมต่อผ่านหรือบันทึกโทเค็นใหม่',
|
|
'wanderer.watch.hints': 'ข้อสังเกต',
|
|
'wanderer.watch.hintsCount': 'ข้อสังเกตที่เปิดอยู่ {count} รายการ',
|
|
'wanderer.watch.empty': 'ไม่มีข้อสังเกตที่เปิดอยู่',
|
|
'wanderer.watch.dialogTitle': 'ข้อสังเกตเกี่ยวกับเส้นทางของคุณ',
|
|
'wanderer.watch.openTour': 'เปิดทัวร์',
|
|
'wanderer.watch.checkedAt': 'ตรวจเมื่อ {date}',
|
|
'wanderer.watch.noticeLabel': 'การตรวจเบื้องหลัง',
|
|
'wanderer.watch.state.possible_change': 'อาจมีการเปลี่ยนแปลง',
|
|
'wanderer.watch.state.changed': 'เปลี่ยนแปลงแล้ว',
|
|
'wanderer.watch.state.unverifiable': 'ตรวจไม่ได้',
|
|
'wanderer.watch.stateHint.possible_change':
|
|
'wanderer เปลี่ยนเวลาประทับของเส้นทาง มีเพียงการตรวจแหล่งที่มาที่บอกได้ว่าเนื้อหาต่างกันหรือไม่',
|
|
'wanderer.watch.stateHint.changed':
|
|
'บันทึกใน wanderer แสดงชื่อหรือคำอธิบายอื่น การตรวจแหล่งที่มาจะแสดงทุกอย่างที่เปลี่ยน',
|
|
'wanderer.watch.stateHint.unverifiable': 'TREK ประเมินเส้นทางนี้ไม่ได้ จึงไม่บอกอะไรเกี่ยวกับการเปลี่ยนแปลง',
|
|
'wanderer.watch.reason.unavailable': 'เข้าถึงเส้นทางไม่ได้',
|
|
'wanderer.watch.reason.no_change_time': 'ไม่มีเวลาประทับ',
|
|
};
|
|
export default wandererWatch;
|