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

91 lines
3.9 KiB
TypeScript

import type { NotificationLocale } from '../externalNotifications/types';
const id: NotificationLocale = {
email: {
footer: 'Anda menerima ini karena Anda telah mengaktifkan notifikasi di TREK.',
manage: 'Kelola preferensi di Pengaturan',
madeWith: 'Dibuat dengan',
openTrek: 'Buka TREK',
},
events: {
trip_invite: (p) => ({
title: `Undangan perjalanan: "${p.trip}"`,
body: `${p.actor} mengundang ${p.invitee || 'seorang anggota'} ke perjalanan "${p.trip}".`,
}),
booking_change: (p) => ({
title: `Pemesanan baru: ${p.booking}`,
body: `${p.actor} menambahkan "${p.booking}" (${p.type}) baru ke "${p.trip}".`,
}),
trip_reminder: (p) => ({
title: `Pengingat perjalanan: ${p.trip}`,
body: `Perjalanan Anda "${p.trip}" akan segera tiba!`,
}),
todo_due: (p) => ({
title: `Tugas jatuh tempo: ${p.todo}`,
body: `"${p.todo}" di "${p.trip}" jatuh tempo pada ${p.due}.`,
}),
vacay_invite: (p) => ({
title: 'Undangan Penggabungan Vacay',
body: `${p.actor} mengundang Anda untuk menggabungkan rencana liburan. Buka TREK untuk menerima atau menolak.`,
}),
vacay_share: (p) => ({
title: 'Kalender Vacay Dibagikan',
body: `${p.actor} membagikan kalender cutinya dengan Anda. Buka TREK untuk melihatnya.`,
}),
collection_invite: (p) => ({
title: 'Undangan koleksi',
body: `${p.actor} mengundang Anda untuk berbagi koleksi. Buka TREK untuk menerima atau menolak.`,
}),
photos_shared: (p) => ({
title: `${p.count} foto dibagikan`,
body: `${p.actor} membagikan ${p.count} foto di "${p.trip}".`,
}),
collab_message: (p) => ({
title: `Pesan baru di "${p.trip}"`,
body: `${p.actor}: ${p.preview}`,
}),
packing_tagged: (p) => ({
title: `Pengepakan: ${p.category}`,
body: `${p.actor} menugaskan Anda ke kategori "${p.category}" di "${p.trip}".`,
}),
version_available: (p) => ({
title: 'Versi TREK baru tersedia',
body: `TREK ${p.version} sekarang tersedia. Kunjungi panel admin untuk memperbarui.`,
}),
replica_failure: (p) => ({
title: 'Kegagalan replika penyimpanan',
body:
`Penulisan replika gagal pada '${p.backend}': ${p.op} dari ${p.key} — ${p.error}.` +
(p.suppressed !== '0' ? ` ${p.suppressed} kegagalan lainnya tidak dilaporkan sejak notifikasi terakhir.` : ''),
}),
paddle_region_requested: (p) => ({
title: 'Wilayah dayung diminta',
body: `${p.actor} merencanakan tur dayung di ${p.region}. Muat atau tolak data airnya di area admin pada Add-on.`,
}),
synology_session_cleared: () => ({
title: 'Sesi Synology dihapus',
body: 'Akun atau URL Synology Anda berubah. Anda telah keluar dari Synology Photos.',
}),
wanderer_source_hint: (p) => ({
title: `Jalur wanderer: ${p.tour}`,
body:
p.state === 'changed'
? `“${p.tour}” di “${p.trip}” telah diubah di wanderer. Buka tur dan periksa sumbernya untuk melihat semua perubahan. Tidak ada yang berubah sendiri di perjalanan.`
: p.state === 'unverifiable'
? `“${p.tour}” di “${p.trip}” tidak dapat diperiksa lagi di wanderer. Tur di perjalanan Anda tetap seperti semula.`
: `“${p.tour}” di “${p.trip}” mungkin berubah di wanderer. Buka tur dan periksa sumbernya. Tidak ada yang berubah sendiri di perjalanan.`,
}),
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
},
passwordReset: {
subject: 'Setel ulang kata sandi Anda',
greeting: 'Halo',
body: 'Kami menerima permintaan untuk menyetel ulang kata sandi akun TREK Anda. Klik tombol di bawah untuk menetapkan kata sandi baru.',
ctaIntro: 'Setel ulang kata sandi',
expiry: 'Tautan ini kedaluwarsa dalam 60 menit.',
ignore: 'Jika Anda tidak meminta ini, Anda dapat mengabaikan email ini — kata sandi Anda tidak akan berubah.',
},
};
export default id;