mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 03:50:30 +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.
109 lines
4.8 KiB
TypeScript
109 lines
4.8 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
|
import { pluralForm } from '../plural';
|
|
|
|
const pl: NotificationLocale = {
|
|
email: {
|
|
footer: 'Otrzymałeś/aś tę wiadomość, ponieważ masz włączone powiadomienia w TREK.',
|
|
manage: 'Zarządzaj preferencjami w ustawieniach',
|
|
madeWith: 'Made with',
|
|
openTrek: 'Otwórz TREK',
|
|
},
|
|
events: {
|
|
trip_invite: (p) => ({
|
|
title: `Zaproszenie do "${p.trip}"`,
|
|
body: `${p.actor} zaprosił ${p.invitee || 'członka'} do podróży "${p.trip}".`,
|
|
}),
|
|
booking_change: (p) => ({
|
|
title: `Nowa rezerwacja: ${p.booking}`,
|
|
body: `${p.actor} dodał rezerwację "${p.booking}" (${p.type}) do "${p.trip}".`,
|
|
}),
|
|
trip_reminder: (p) => ({
|
|
title: `Przypomnienie o podróży: ${p.trip}`,
|
|
body: `Twoja podróż "${p.trip}" zbliża się!`,
|
|
}),
|
|
todo_due: (p) => ({
|
|
title: `Zadanie z terminem: ${p.todo}`,
|
|
body: `"${p.todo}" w "${p.trip}" — termin ${p.due}.`,
|
|
}),
|
|
vacay_invite: (p) => ({
|
|
title: 'Zaproszenie Vacay Fusion',
|
|
body: `${p.actor} zaprosił Cię do połączenia planów urlopowych. Otwórz TREK, aby zaakceptować lub odrzucić.`,
|
|
}),
|
|
vacay_share: (p) => ({
|
|
title: 'Kalendarz Vacay udostępniony',
|
|
body: `${p.actor} udostępnił Ci swój kalendarz urlopów. Otwórz TREK, aby go zobaczyć.`,
|
|
}),
|
|
collection_invite: (p) => ({
|
|
title: 'Zaproszenie do kolekcji',
|
|
body: `${p.actor} zaprosił Cię do udostępnienia kolekcji. Otwórz TREK, aby zaakceptować lub odrzucić.`,
|
|
}),
|
|
photos_shared: (p) => ({
|
|
title: pluralForm(p.count, 'pl', {
|
|
one: `Udostępniono ${p.count} zdjęcie`,
|
|
few: `Udostępniono ${p.count} zdjęcia`,
|
|
many: `Udostępniono ${p.count} zdjęć`,
|
|
other: `Udostępniono ${p.count} zdjęcia`,
|
|
}),
|
|
body: pluralForm(p.count, 'pl', {
|
|
one: `${p.actor} udostępnił ${p.count} zdjęcie w "${p.trip}".`,
|
|
few: `${p.actor} udostępnił ${p.count} zdjęcia w "${p.trip}".`,
|
|
many: `${p.actor} udostępnił ${p.count} zdjęć w "${p.trip}".`,
|
|
other: `${p.actor} udostępnił ${p.count} zdjęcia w "${p.trip}".`,
|
|
}),
|
|
}),
|
|
collab_message: (p) => ({
|
|
title: `Nowa wiadomość w "${p.trip}"`,
|
|
body: `${p.actor}: ${p.preview}`,
|
|
}),
|
|
packing_tagged: (p) => ({
|
|
title: `Pakowanie: ${p.category}`,
|
|
body: `${p.actor} przypisał Cię do kategorii "${p.category}" w "${p.trip}".`,
|
|
}),
|
|
version_available: (p) => ({
|
|
title: 'Nowa wersja TREK dostępna',
|
|
body: `TREK ${p.version} jest teraz dostępny. Odwiedź panel administracyjny, aby zaktualizować.`,
|
|
}),
|
|
replica_failure: (p) => ({
|
|
title: 'Awaria repliki magazynu',
|
|
body:
|
|
`Zapis do repliki '${p.backend}' nie powiódł się: ${p.op} dla ${p.key} — ${p.error}.` +
|
|
(p.suppressed !== '0'
|
|
? pluralForm(p.suppressed, 'pl', {
|
|
one: ` Od ostatniego powiadomienia ukryto ${p.suppressed} kolejny błąd.`,
|
|
few: ` Od ostatniego powiadomienia ukryto ${p.suppressed} kolejne błędy.`,
|
|
many: ` Od ostatniego powiadomienia ukryto ${p.suppressed} kolejnych błędów.`,
|
|
other: ` Od ostatniego powiadomienia ukryto ${p.suppressed} kolejnego błędu.`,
|
|
})
|
|
: ''),
|
|
}),
|
|
paddle_region_requested: (p) => ({
|
|
title: 'Prośba o region wodny',
|
|
body: `${p.actor} planuje spływ w regionie ${p.region}. Wczytaj lub odrzuć jego dane wodne w panelu administratora w sekcji Dodatki.`,
|
|
}),
|
|
synology_session_cleared: () => ({
|
|
title: 'Sesja Synology wyczyszczona',
|
|
body: 'Twoje konto lub URL Synology uległo zmianie. Zostałeś wylogowany z Synology Photos.',
|
|
}),
|
|
wanderer_source_hint: (p) => ({
|
|
title: `Szlak wanderer: ${p.tour}`,
|
|
body:
|
|
p.state === 'changed'
|
|
? `„${p.tour}” w „${p.trip}” został zmieniony w wanderer. Otwórz trasę i sprawdź jej źródło, aby zobaczyć wszystkie zmiany. W podróży nic nie zmienia się samo.`
|
|
: p.state === 'unverifiable'
|
|
? `„${p.tour}” w „${p.trip}” nie da się już sprawdzić w wanderer. Trasa w twojej podróży pozostaje bez zmian.`
|
|
: `„${p.tour}” w „${p.trip}” mógł się zmienić w wanderer. Otwórz trasę i sprawdź jej źródło. W podróży nic nie zmienia się samo.`,
|
|
}),
|
|
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
|
|
},
|
|
passwordReset: {
|
|
subject: 'Zresetuj hasło',
|
|
greeting: 'Cześć',
|
|
body: 'Otrzymaliśmy prośbę o zresetowanie hasła do Twojego konta TREK. Kliknij przycisk poniżej, aby ustawić nowe hasło.',
|
|
ctaIntro: 'Zresetuj hasło',
|
|
expiry: 'Link wygaśnie za 60 minut.',
|
|
ignore: 'Jeśli to nie Ty, zignoruj tę wiadomość — Twoje hasło pozostanie bez zmian.',
|
|
},
|
|
};
|
|
|
|
export default pl;
|