mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 15:51:00 +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.
100 lines
4.5 KiB
TypeScript
100 lines
4.5 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
|
import { pluralForm } from '../plural';
|
|
|
|
const de: NotificationLocale = {
|
|
email: {
|
|
footer: 'Du erhältst diese E-Mail, weil du Benachrichtigungen in TREK aktiviert hast.',
|
|
manage: 'Einstellungen verwalten',
|
|
madeWith: 'Made with',
|
|
openTrek: 'TREK öffnen',
|
|
},
|
|
events: {
|
|
trip_invite: (p) => ({
|
|
title: `Einladung zu "${p.trip}"`,
|
|
body: `${p.actor} hat ${p.invitee || 'ein Mitglied'} zur Reise "${p.trip}" eingeladen.`,
|
|
}),
|
|
booking_change: (p) => ({
|
|
title: `Neue Buchung: ${p.booking}`,
|
|
body: `${p.actor} hat eine neue Buchung "${p.booking}" (${p.type}) zu "${p.trip}" hinzugefügt.`,
|
|
}),
|
|
trip_reminder: (p) => ({
|
|
title: `Reiseerinnerung: ${p.trip}`,
|
|
body: `Deine Reise "${p.trip}" steht bald an!`,
|
|
}),
|
|
todo_due: (p) => ({
|
|
title: `Aufgabe fällig: ${p.todo}`,
|
|
body: `"${p.todo}" in "${p.trip}" ist am ${p.due} fällig.`,
|
|
}),
|
|
vacay_invite: (p) => ({
|
|
title: 'Vacay Fusion-Einladung',
|
|
body: `${p.actor} hat dich eingeladen, Urlaubspläne zu fusionieren. Öffne TREK um anzunehmen oder abzulehnen.`,
|
|
}),
|
|
vacay_share: (p) => ({
|
|
title: 'Vacay Kalender geteilt',
|
|
body: `${p.actor} hat den eigenen Urlaubskalender mit dir geteilt. Öffne TREK um ihn anzusehen.`,
|
|
}),
|
|
collection_invite: (p) => ({
|
|
title: 'Sammlungs-Einladung',
|
|
body: `${p.actor} hat dich eingeladen, eine Sammlung zu teilen. Öffne TREK um anzunehmen oder abzulehnen.`,
|
|
}),
|
|
photos_shared: (p) => ({
|
|
title: pluralForm(p.count, 'de', { one: `${p.count} Foto geteilt`, other: `${p.count} Fotos geteilt` }),
|
|
body: pluralForm(p.count, 'de', {
|
|
one: `${p.actor} hat ${p.count} Foto in "${p.trip}" geteilt.`,
|
|
other: `${p.actor} hat ${p.count} Fotos in "${p.trip}" geteilt.`,
|
|
}),
|
|
}),
|
|
collab_message: (p) => ({
|
|
title: `Neue Nachricht in "${p.trip}"`,
|
|
body: `${p.actor}: ${p.preview}`,
|
|
}),
|
|
packing_tagged: (p) => ({
|
|
title: `Packliste: ${p.category}`,
|
|
body: `${p.actor} hat dich der Kategorie "${p.category}" in der Packliste von "${p.trip}" zugewiesen.`,
|
|
}),
|
|
version_available: (p) => ({
|
|
title: 'Neue TREK-Version verfügbar',
|
|
body: `TREK ${p.version} ist jetzt verfügbar. Besuche das Admin-Panel zum Aktualisieren.`,
|
|
}),
|
|
replica_failure: (p) => ({
|
|
title: 'Speicher-Replik-Fehler',
|
|
body:
|
|
`Schreibvorgang auf Replik '${p.backend}' fehlgeschlagen: ${p.op} von ${p.key} — ${p.error}.` +
|
|
(p.suppressed !== '0'
|
|
? pluralForm(p.suppressed, 'de', {
|
|
one: ` Seit der letzten Benachrichtigung wurde ${p.suppressed} weiterer Fehler unterdrückt.`,
|
|
other: ` Seit der letzten Benachrichtigung wurden ${p.suppressed} weitere Fehler unterdrückt.`,
|
|
})
|
|
: ''),
|
|
}),
|
|
paddle_region_requested: (p) => ({
|
|
title: 'Paddel-Region angefragt',
|
|
body: `${p.actor} plant eine Paddeltour in ${p.region}. Im Admin-Bereich unter Addons kannst du die Gewässerdaten laden oder ablehnen.`,
|
|
}),
|
|
synology_session_cleared: () => ({
|
|
title: 'Synology-Sitzung beendet',
|
|
body: 'Dein Synology-Konto oder die URL hat sich geändert. Du wurdest von Synology Photos abgemeldet.',
|
|
}),
|
|
wanderer_source_hint: (p) => ({
|
|
title: `wanderer-Trail: ${p.tour}`,
|
|
body:
|
|
p.state === 'changed'
|
|
? `„${p.tour}“ in „${p.trip}“ wurde in wanderer geändert. Öffne die Tour und prüfe ihre Quelle, um alle Änderungen zu sehen. In der Reise ändert sich nichts von selbst.`
|
|
: p.state === 'unverifiable'
|
|
? `„${p.tour}“ in „${p.trip}“ lässt sich in wanderer nicht mehr prüfen. Die Tour in deiner Reise bleibt, wie sie ist.`
|
|
: `„${p.tour}“ in „${p.trip}“ hat sich in wanderer möglicherweise geändert. Öffne die Tour und prüfe ihre Quelle, um es zu sehen. In der Reise ändert sich nichts von selbst.`,
|
|
}),
|
|
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
|
|
},
|
|
passwordReset: {
|
|
subject: 'Passwort zurücksetzen',
|
|
greeting: 'Hallo',
|
|
body: 'Wir haben eine Anfrage erhalten, das Passwort für dein TREK-Konto zurückzusetzen. Klicke auf den Button unten, um ein neues Passwort festzulegen.',
|
|
ctaIntro: 'Passwort zurücksetzen',
|
|
expiry: 'Dieser Link ist 60 Minuten gültig.',
|
|
ignore: 'Wenn du das nicht warst, ignoriere diese E-Mail — dein Passwort bleibt unverändert.',
|
|
},
|
|
};
|
|
|
|
export default de;
|