Files
TREK/shared/src/i18n/cs/externalNotifications.ts
T
Maurice 2e1dca9fe9 feat(tours): let a background check hint at changes of your own wanderer trails
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.
2026-10-20 15:35:32 +02:00

106 lines
4.5 KiB
TypeScript

import type { NotificationLocale } from '../externalNotifications/types';
import { pluralForm } from '../plural';
const cs: NotificationLocale = {
email: {
footer: 'Toto jsi obdržel/a, protože máš povoleny upozornění v TREK.',
manage: 'Spravovat předvolby v nastavení',
madeWith: 'Made with',
openTrek: 'Otevřít TREK',
},
events: {
trip_invite: (p) => ({
title: `Pozvánka do "${p.trip}"`,
body: `${p.actor} pozval ${p.invitee || 'člena'} na výlet "${p.trip}".`,
}),
booking_change: (p) => ({
title: `Nová rezervace: ${p.booking}`,
body: `${p.actor} přidal rezervaci "${p.booking}" (${p.type}) k "${p.trip}".`,
}),
trip_reminder: (p) => ({
title: `Připomínka výletu: ${p.trip}`,
body: `Váš výlet "${p.trip}" se blíží!`,
}),
todo_due: (p) => ({
title: `Úkol se blíží: ${p.todo}`,
body: `"${p.todo}" ve výletě "${p.trip}" má termín ${p.due}.`,
}),
vacay_invite: (p) => ({
title: 'Pozvánka Vacay Fusion',
body: `${p.actor} vás pozval ke spojení dovolenkových plánů. Otevřete TREK pro přijetí nebo odmítnutí.`,
}),
vacay_share: (p) => ({
title: 'Kalendář Vacay sdílen',
body: `${p.actor} s vámi sdílel svůj kalendář dovolených. Otevřete TREK pro zobrazení.`,
}),
collection_invite: (p) => ({
title: 'Pozvánka do sbírky',
body: `${p.actor} vás pozval ke sdílení sbírky. Otevřete TREK pro přijetí nebo odmítnutí.`,
}),
photos_shared: (p) => ({
title: pluralForm(p.count, 'cs', {
one: `${p.count} sdílená fotka`,
few: `${p.count} sdílené fotky`,
other: `${p.count} sdílených fotek`,
}),
body: pluralForm(p.count, 'cs', {
one: `${p.actor} sdílel ${p.count} fotku v "${p.trip}".`,
few: `${p.actor} sdílel ${p.count} fotky v "${p.trip}".`,
other: `${p.actor} sdílel ${p.count} fotek v "${p.trip}".`,
}),
}),
collab_message: (p) => ({
title: `Nová zpráva v "${p.trip}"`,
body: `${p.actor}: ${p.preview}`,
}),
packing_tagged: (p) => ({
title: `Balení: ${p.category}`,
body: `${p.actor} vás přiřadil do kategorie "${p.category}" v "${p.trip}".`,
}),
version_available: (p) => ({
title: 'Nová verze TREK dostupná',
body: `TREK ${p.version} je nyní dostupný. Navštivte administrátorský panel pro aktualizaci.`,
}),
replica_failure: (p) => ({
title: 'Selhání repliky úložiště',
body:
`Zápis do repliky '${p.backend}' selhal: ${p.op} u ${p.key} — ${p.error}.` +
(p.suppressed !== '0'
? pluralForm(p.suppressed, 'cs', {
one: ` Od poslední notifikace bylo potlačeno ${p.suppressed} další selhání.`,
few: ` Od poslední notifikace byla potlačena ${p.suppressed} další selhání.`,
other: ` Od poslední notifikace bylo potlačeno ${p.suppressed} dalších selhání.`,
})
: ''),
}),
paddle_region_requested: (p) => ({
title: 'Vyžádán vodácký region',
body: `${p.actor} plánuje vodáckou trasu v regionu ${p.region}. Načti nebo zamítni jeho vodní data v administraci v části Doplňky.`,
}),
synology_session_cleared: () => ({
title: 'Relace Synology byla zrušena',
body: 'Váš účet nebo URL Synology se změnil. Byli jste odhlášeni ze Synology Photos.',
}),
wanderer_source_hint: (p) => ({
title: `Trasa wanderer: ${p.tour}`,
body:
p.state === 'changed'
? `„${p.tour}“ v „${p.trip}“ byla ve wanderer změněna. Otevřete túru a zkontrolujte její zdroj, abyste viděli všechny změny. V cestě se nic nezmění samo.`
: p.state === 'unverifiable'
? `„${p.tour}“ v „${p.trip}“ už nelze ve wanderer ověřit. Túra ve vaší cestě zůstává, jak je.`
: `„${p.tour}“ v „${p.trip}“ se ve wanderer možná změnila. Otevřete túru a zkontrolujte její zdroj. V cestě se nic nezmění samo.`,
}),
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
},
passwordReset: {
subject: 'Obnovení hesla',
greeting: 'Ahoj',
body: 'Obdrželi jsme žádost o obnovení hesla k tvému účtu TREK. Klikni na tlačítko níže a nastav nové heslo.',
ctaIntro: 'Obnovit heslo',
expiry: 'Odkaz vyprší za 60 minut.',
ignore: 'Pokud jsi o obnovení nežádal/a, tento e-mail ignoruj — heslo zůstane beze změny.',
},
};
export default cs;