Files
TREK/shared/src/i18n/es/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

100 lines
4.3 KiB
TypeScript

import type { NotificationLocale } from '../externalNotifications/types';
import { pluralForm } from '../plural';
const es: NotificationLocale = {
email: {
footer: 'Recibiste esto porque tienes las notificaciones activadas en TREK.',
manage: 'Gestionar preferencias',
madeWith: 'Made with',
openTrek: 'Abrir TREK',
},
events: {
trip_invite: (p) => ({
title: `Invitación a "${p.trip}"`,
body: `${p.actor} invitó a ${p.invitee || 'un miembro'} al viaje "${p.trip}".`,
}),
booking_change: (p) => ({
title: `Nueva reserva: ${p.booking}`,
body: `${p.actor} añadió una reserva "${p.booking}" (${p.type}) a "${p.trip}".`,
}),
trip_reminder: (p) => ({
title: `Recordatorio: ${p.trip}`,
body: `¡Tu viaje "${p.trip}" se acerca!`,
}),
todo_due: (p) => ({
title: `Tarea pendiente: ${p.todo}`,
body: `"${p.todo}" en "${p.trip}" vence el ${p.due}.`,
}),
vacay_invite: (p) => ({
title: 'Invitación Vacay Fusion',
body: `${p.actor} te invitó a fusionar planes de vacaciones. Abre TREK para aceptar o rechazar.`,
}),
vacay_share: (p) => ({
title: 'Calendario Vacay compartido',
body: `${p.actor} compartió su calendario de vacaciones contigo. Abre TREK para verlo.`,
}),
collection_invite: (p) => ({
title: 'Invitación a colección',
body: `${p.actor} te invitó a compartir una colección. Abre TREK para aceptar o rechazar.`,
}),
photos_shared: (p) => ({
title: pluralForm(p.count, 'es', { one: `${p.count} foto compartida`, other: `${p.count} fotos compartidas` }),
body: pluralForm(p.count, 'es', {
one: `${p.actor} compartió ${p.count} foto en "${p.trip}".`,
other: `${p.actor} compartió ${p.count} fotos en "${p.trip}".`,
}),
}),
collab_message: (p) => ({
title: `Nuevo mensaje en "${p.trip}"`,
body: `${p.actor}: ${p.preview}`,
}),
packing_tagged: (p) => ({
title: `Equipaje: ${p.category}`,
body: `${p.actor} te asignó a la categoría "${p.category}" en "${p.trip}".`,
}),
version_available: (p) => ({
title: 'Nueva versión de TREK disponible',
body: `TREK ${p.version} ya está disponible. Visita el panel de administración para actualizar.`,
}),
replica_failure: (p) => ({
title: 'Fallo de réplica de almacenamiento',
body:
`Error al escribir en la réplica '${p.backend}': ${p.op} de ${p.key} — ${p.error}.` +
(p.suppressed !== '0'
? pluralForm(p.suppressed, 'es', {
one: ` Se suprimió ${p.suppressed} error más desde la última notificación.`,
other: ` Se suprimieron ${p.suppressed} errores más desde la última notificación.`,
})
: ''),
}),
paddle_region_requested: (p) => ({
title: 'Región de kayak pedida',
body: `${p.actor} está planificando una ruta en kayak en ${p.region}. Carga o rechaza sus datos de agua en la administración, en Complementos.`,
}),
synology_session_cleared: () => ({
title: 'Sesión de Synology cerrada',
body: 'Tu cuenta o URL de Synology ha cambiado. Has cerrado sesión en Synology Photos.',
}),
wanderer_source_hint: (p) => ({
title: `Ruta de wanderer: ${p.tour}`,
body:
p.state === 'changed'
? `«${p.tour}» en «${p.trip}» se cambió en wanderer. Abre el recorrido y comprueba su fuente para ver todos los cambios. Nada del viaje cambia por sí solo.`
: p.state === 'unverifiable'
? `«${p.tour}» en «${p.trip}» ya no se puede comprobar en wanderer. El recorrido de tu viaje se queda como está.`
: `«${p.tour}» en «${p.trip}» puede haber cambiado en wanderer. Abre el recorrido y comprueba su fuente para saberlo. Nada del viaje cambia por sí solo.`,
}),
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
},
passwordReset: {
subject: 'Restablecer tu contraseña',
greeting: 'Hola',
body: 'Recibimos una solicitud para restablecer la contraseña de tu cuenta de TREK. Haz clic en el botón de abajo para establecer una nueva contraseña.',
ctaIntro: 'Restablecer contraseña',
expiry: 'Este enlace caduca en 60 minutos.',
ignore: 'Si no solicitaste esto, puedes ignorar este correo — tu contraseña no cambiará.',
},
};
export default es;