mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +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.
106 lines
4.6 KiB
TypeScript
106 lines
4.6 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
|
import { pluralForm } from '../plural';
|
|
|
|
const sk: NotificationLocale = {
|
|
email: {
|
|
footer: 'Toto ste dostali, pretože máte v TREK povolené upozornenia.',
|
|
manage: 'Spravovať predvoľby v Nastaveniach',
|
|
madeWith: 'Made with',
|
|
openTrek: 'Otvoriť TREK',
|
|
},
|
|
events: {
|
|
trip_invite: (p) => ({
|
|
title: `Pozvánka na cestu: "${p.trip}"`,
|
|
body: `${p.actor} pozval(a) ${p.invitee || 'člena'} na cestu "${p.trip}".`,
|
|
}),
|
|
booking_change: (p) => ({
|
|
title: `Nová rezervácia: ${p.booking}`,
|
|
body: `${p.actor} pridal(a) novú rezerváciu ${p.type} "${p.booking}" do "${p.trip}".`,
|
|
}),
|
|
trip_reminder: (p) => ({
|
|
title: `Pripomienka cesty: ${p.trip}`,
|
|
body: `Vaša cesta "${p.trip}" sa čoskoro blíži!`,
|
|
}),
|
|
todo_due: (p) => ({
|
|
title: `Termín úlohy: ${p.todo}`,
|
|
body: `"${p.todo}" v "${p.trip}" má termín ${p.due}.`,
|
|
}),
|
|
vacay_invite: (p) => ({
|
|
title: 'Pozvánka Vacay Fusion',
|
|
body: `${p.actor} vás pozval(a) na spojenie plánov dovolenky. Otvorte TREK na prijatie alebo odmietnutie.`,
|
|
}),
|
|
vacay_share: (p) => ({
|
|
title: 'Kalendár Vacay zdieľaný',
|
|
body: `${p.actor} s vami zdieľal(a) svoj kalendár dovoleniek. Otvorte TREK na jeho zobrazenie.`,
|
|
}),
|
|
collection_invite: (p) => ({
|
|
title: 'Pozvánka do zbierky',
|
|
body: `${p.actor} vás pozval(a) na zdieľanie zbierky. Otvorte TREK na prijatie alebo odmietnutie.`,
|
|
}),
|
|
photos_shared: (p) => ({
|
|
title: pluralForm(p.count, 'sk', {
|
|
one: `${p.count} zdieľaná fotka`,
|
|
few: `${p.count} zdieľané fotky`,
|
|
other: `${p.count} zdieľaných fotiek`,
|
|
}),
|
|
body: pluralForm(p.count, 'sk', {
|
|
one: `${p.actor} zdieľal(a) ${p.count} fotku v "${p.trip}".`,
|
|
few: `${p.actor} zdieľal(a) ${p.count} fotky v "${p.trip}".`,
|
|
other: `${p.actor} zdieľal(a) ${p.count} fotiek v "${p.trip}".`,
|
|
}),
|
|
}),
|
|
collab_message: (p) => ({
|
|
title: `Nová správa v "${p.trip}"`,
|
|
body: `${p.actor}: ${p.preview}`,
|
|
}),
|
|
packing_tagged: (p) => ({
|
|
title: `Balenie: ${p.category}`,
|
|
body: `${p.actor} vás priradil(a) do kategórie balenia "${p.category}" v "${p.trip}".`,
|
|
}),
|
|
version_available: (p) => ({
|
|
title: 'Dostupná nová verzia TREK',
|
|
body: `TREK ${p.version} je teraz dostupný. Navštívte panel správcu na aktualizáciu.`,
|
|
}),
|
|
replica_failure: (p) => ({
|
|
title: 'Zlyhanie repliky úložiska',
|
|
body:
|
|
`Zápis do repliky zlyhal na '${p.backend}': ${p.op} ${p.key} — ${p.error}.` +
|
|
(p.suppressed !== '0'
|
|
? pluralForm(p.suppressed, 'sk', {
|
|
one: ` Od posledného upozornenia bolo potlačené ${p.suppressed} ďalšie zlyhanie.`,
|
|
few: ` Od posledného upozornenia boli potlačené ${p.suppressed} ďalšie zlyhania.`,
|
|
other: ` Od posledného upozornenia bolo potlačených ${p.suppressed} ďalších zlyhaní.`,
|
|
})
|
|
: ''),
|
|
}),
|
|
paddle_region_requested: (p) => ({
|
|
title: 'Vyžiadaný vodácky región',
|
|
body: `${p.actor} plánuje vodácku trasu v regióne ${p.region}. Načítaj alebo zamietni jeho vodné dáta v administrácii v časti Doplnky.`,
|
|
}),
|
|
synology_session_cleared: () => ({
|
|
title: 'Relácia Synology bola zrušená',
|
|
body: 'Váš účet alebo URL Synology sa zmenili. Boli ste odhlásení zo Synology Photos.',
|
|
}),
|
|
wanderer_source_hint: (p) => ({
|
|
title: `Trasa wanderer: ${p.tour}`,
|
|
body:
|
|
p.state === 'changed'
|
|
? `„${p.tour}“ v „${p.trip}“ bola vo wanderer zmenená. Otvorte túru a skontrolujte jej zdroj, aby ste videli všetky zmeny. V ceste sa nič nezmení samo.`
|
|
: p.state === 'unverifiable'
|
|
? `„${p.tour}“ v „${p.trip}“ sa už vo wanderer nedá overiť. Túra vo vašej ceste zostáva, ako je.`
|
|
: `„${p.tour}“ v „${p.trip}“ sa vo wanderer možno zmenila. Otvorte túru a skontrolujte jej zdroj. V ceste sa nič nezmení samo.`,
|
|
}),
|
|
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
|
|
},
|
|
passwordReset: {
|
|
subject: 'Obnovte si heslo',
|
|
greeting: 'Ahoj',
|
|
body: 'Dostali sme žiadosť o obnovenie hesla k vášmu účtu TREK. Kliknite na tlačidlo nižšie a nastavte si nové heslo.',
|
|
ctaIntro: 'Obnoviť heslo',
|
|
expiry: 'Tento odkaz vyprší za 60 minút.',
|
|
ignore: 'Ak ste o to nežiadali, tento e-mail môžete pokojne ignorovať — vaše heslo sa nezmení.',
|
|
},
|
|
};
|
|
|
|
export default sk;
|