mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 07:53:09 +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.6 KiB
TypeScript
100 lines
4.6 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
|
import { pluralForm } from '../plural';
|
|
|
|
const fr: NotificationLocale = {
|
|
email: {
|
|
footer: 'Vous recevez cet e-mail car les notifications sont activées dans TREK.',
|
|
manage: 'Gérer les préférences',
|
|
madeWith: 'Made with',
|
|
openTrek: 'Ouvrir TREK',
|
|
},
|
|
events: {
|
|
trip_invite: (p) => ({
|
|
title: `Invitation à "${p.trip}"`,
|
|
body: `${p.actor} a invité ${p.invitee || 'un membre'} au voyage "${p.trip}".`,
|
|
}),
|
|
booking_change: (p) => ({
|
|
title: `Nouvelle réservation : ${p.booking}`,
|
|
body: `${p.actor} a ajouté une réservation "${p.booking}" (${p.type}) à "${p.trip}".`,
|
|
}),
|
|
trip_reminder: (p) => ({
|
|
title: `Rappel de voyage : ${p.trip}`,
|
|
body: `Votre voyage "${p.trip}" approche !`,
|
|
}),
|
|
todo_due: (p) => ({
|
|
title: `Tâche à échéance : ${p.todo}`,
|
|
body: `"${p.todo}" dans "${p.trip}" est due le ${p.due}.`,
|
|
}),
|
|
vacay_invite: (p) => ({
|
|
title: 'Invitation Vacay Fusion',
|
|
body: `${p.actor} vous invite à fusionner les plans de vacances. Ouvrez TREK pour accepter ou refuser.`,
|
|
}),
|
|
vacay_share: (p) => ({
|
|
title: 'Calendrier Vacay partagé',
|
|
body: `${p.actor} a partagé son calendrier de vacances avec vous. Ouvrez TREK pour le consulter.`,
|
|
}),
|
|
collection_invite: (p) => ({
|
|
title: 'Invitation à une collection',
|
|
body: `${p.actor} vous invite à partager une collection. Ouvrez TREK pour accepter ou refuser.`,
|
|
}),
|
|
photos_shared: (p) => ({
|
|
title: pluralForm(p.count, 'fr', { one: `${p.count} photo partagée`, other: `${p.count} photos partagées` }),
|
|
body: pluralForm(p.count, 'fr', {
|
|
one: `${p.actor} a partagé ${p.count} photo dans "${p.trip}".`,
|
|
other: `${p.actor} a partagé ${p.count} photos dans "${p.trip}".`,
|
|
}),
|
|
}),
|
|
collab_message: (p) => ({
|
|
title: `Nouveau message dans "${p.trip}"`,
|
|
body: `${p.actor} : ${p.preview}`,
|
|
}),
|
|
packing_tagged: (p) => ({
|
|
title: `Bagages : ${p.category}`,
|
|
body: `${p.actor} vous a assigné à la catégorie "${p.category}" dans "${p.trip}".`,
|
|
}),
|
|
version_available: (p) => ({
|
|
title: 'Nouvelle version TREK disponible',
|
|
body: `TREK ${p.version} est maintenant disponible. Rendez-vous dans le panneau d'administration pour mettre à jour.`,
|
|
}),
|
|
replica_failure: (p) => ({
|
|
title: 'Échec de réplique de stockage',
|
|
body:
|
|
`Échec de l'écriture sur la réplique '${p.backend}' : ${p.op} de ${p.key} — ${p.error}.` +
|
|
(p.suppressed !== '0'
|
|
? pluralForm(p.suppressed, 'fr', {
|
|
one: ` ${p.suppressed} autre échec n'a pas été signalé depuis la dernière notification.`,
|
|
other: ` ${p.suppressed} autres échecs n'ont pas été signalés depuis la dernière notification.`,
|
|
})
|
|
: ''),
|
|
}),
|
|
paddle_region_requested: (p) => ({
|
|
title: 'Région de pagaie demandée',
|
|
body: `${p.actor} planifie une sortie en canoë dans ${p.region}. Charge ou refuse ses données d'eau dans l'administration, sous Modules.`,
|
|
}),
|
|
synology_session_cleared: () => ({
|
|
title: 'Session Synology effacée',
|
|
body: 'Votre compte ou URL Synology a changé. Vous avez été déconnecté de Synology Photos.',
|
|
}),
|
|
wanderer_source_hint: (p) => ({
|
|
title: `Sentier wanderer: ${p.tour}`,
|
|
body:
|
|
p.state === 'changed'
|
|
? `« ${p.tour} » dans « ${p.trip} » a été modifié dans wanderer. Ouvrez le parcours et vérifiez sa source pour voir tous les changements. Rien ne change de lui-même dans le voyage.`
|
|
: p.state === 'unverifiable'
|
|
? `« ${p.tour} » dans « ${p.trip} » ne peut plus être vérifié dans wanderer. Le parcours de votre voyage reste tel quel.`
|
|
: `« ${p.tour} » dans « ${p.trip} » a peut-être changé dans wanderer. Ouvrez le parcours et vérifiez sa source pour le savoir. Rien ne change de lui-même dans le voyage.`,
|
|
}),
|
|
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
|
|
},
|
|
passwordReset: {
|
|
subject: 'Réinitialisez votre mot de passe',
|
|
greeting: 'Bonjour',
|
|
body: 'Nous avons reçu une demande de réinitialisation du mot de passe de votre compte TREK. Cliquez sur le bouton ci-dessous pour définir un nouveau mot de passe.',
|
|
ctaIntro: 'Réinitialiser le mot de passe',
|
|
expiry: 'Ce lien expire dans 60 minutes.',
|
|
ignore: "Si vous n'êtes pas à l'origine de cette demande, ignorez cet e-mail — votre mot de passe ne changera pas.",
|
|
},
|
|
};
|
|
|
|
export default fr;
|