mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 05:21:15 +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.
103 lines
4.5 KiB
TypeScript
103 lines
4.5 KiB
TypeScript
import type { NotificationLocale } from '../externalNotifications/types';
|
||
import { pluralForm } from '../plural';
|
||
|
||
const tr: NotificationLocale = {
|
||
email: {
|
||
footer: "TREK'te bildirimleri etkinleştirdiğiniz için bunu aldınız.",
|
||
manage: 'Ayarlarda tercihleri yönetin',
|
||
madeWith: 'Made with',
|
||
openTrek: "TREK'i aç",
|
||
},
|
||
events: {
|
||
trip_invite: (p) => ({
|
||
title: `"${p.trip}" seyahatine davet`,
|
||
body: `${p.actor}, ${p.invitee || 'bir üyeyi'} "${p.trip}" seyahatine davet etti.`,
|
||
}),
|
||
booking_change: (p) => ({
|
||
title: `Yeni rezervasyon: ${p.booking}`,
|
||
body: `${p.actor}, "${p.trip}" seyahatine "${p.booking}" (${p.type}) rezervasyonu ekledi.`,
|
||
}),
|
||
trip_reminder: (p) => ({
|
||
title: `Seyahat hatırlatıcısı: ${p.trip}`,
|
||
body: `"${p.trip}" seyahatiniz yaklaşıyor!`,
|
||
}),
|
||
todo_due: (p) => ({
|
||
title: `Görev süresi dolmak üzere: ${p.todo}`,
|
||
body: `"${p.trip}" içindeki "${p.todo}" görevi ${p.due} tarihinde bitiyor.`,
|
||
}),
|
||
vacay_invite: (p) => ({
|
||
title: 'Vacay Fusion Daveti',
|
||
body: `${p.actor} sizi tatil planlarını birleştirmeye davet etti. Kabul etmek veya reddetmek için TREK'i açın.`,
|
||
}),
|
||
vacay_share: (p) => ({
|
||
title: 'Vacay Takvimi Paylaşıldı',
|
||
body: `${p.actor} tatil takvimini sizinle paylaştı. Görüntülemek için TREK'i açın.`,
|
||
}),
|
||
collection_invite: (p) => ({
|
||
title: 'Koleksiyon daveti',
|
||
body: `${p.actor} sizi bir koleksiyonu paylaşmaya davet etti. Kabul etmek veya reddetmek için TREK’i açın.`,
|
||
}),
|
||
photos_shared: (p) => ({
|
||
title: pluralForm(p.count, 'tr', {
|
||
one: `${p.count} fotoğraf paylaşıldı`,
|
||
other: `${p.count} fotoğraf paylaşıldı`,
|
||
}),
|
||
body: pluralForm(p.count, 'tr', {
|
||
one: `${p.actor}, "${p.trip}" içinde ${p.count} fotoğraf paylaştı.`,
|
||
other: `${p.actor}, "${p.trip}" içinde ${p.count} fotoğraf paylaştı.`,
|
||
}),
|
||
}),
|
||
collab_message: (p) => ({
|
||
title: `"${p.trip}" içinde yeni mesaj`,
|
||
body: `${p.actor}: ${p.preview}`,
|
||
}),
|
||
packing_tagged: (p) => ({
|
||
title: `Bagaj: ${p.category}`,
|
||
body: `${p.actor}, sizi "${p.trip}" içindeki "${p.category}" bagaj kategorisine atadı.`,
|
||
}),
|
||
version_available: (p) => ({
|
||
title: 'Yeni TREK sürümü mevcut',
|
||
body: `TREK ${p.version} artık mevcut. Güncellemek için yönetici panelini ziyaret edin.`,
|
||
}),
|
||
replica_failure: (p) => ({
|
||
title: 'Depolama kopyası hatası',
|
||
body:
|
||
`'${p.backend}' kopyasına yazma başarısız oldu: ${p.op} (${p.key}) — ${p.error}.` +
|
||
(p.suppressed !== '0'
|
||
? pluralForm(p.suppressed, 'tr', {
|
||
one: ` Son bildirimden bu yana ${p.suppressed} hata daha bastırıldı.`,
|
||
other: ` Son bildirimden bu yana ${p.suppressed} hata daha bastırıldı.`,
|
||
})
|
||
: ''),
|
||
}),
|
||
paddle_region_requested: (p) => ({
|
||
title: 'Kürek bölgesi istendi',
|
||
body: `${p.actor}, ${p.region} bölgesinde kürek turu planlıyor. Su verisini yönetim alanında Eklentiler altında yükle ya da reddet.`,
|
||
}),
|
||
synology_session_cleared: () => ({
|
||
title: 'Synology oturumu temizlendi',
|
||
body: 'Synology hesabınız veya URL değişti. Synology Photos oturumunuz kapatıldı.',
|
||
}),
|
||
wanderer_source_hint: (p) => ({
|
||
title: `wanderer rotası: ${p.tour}`,
|
||
body:
|
||
p.state === 'changed'
|
||
? `"${p.trip}" içindeki "${p.tour}" wanderer'da değiştirildi. Tüm değişiklikleri görmek için turu aç ve kaynağını denetle. Gezide hiçbir şey kendiliğinden değişmez.`
|
||
: p.state === 'unverifiable'
|
||
? `"${p.trip}" içindeki "${p.tour}" artık wanderer'da denetlenemiyor. Gezindeki tur olduğu gibi kalır.`
|
||
: `"${p.trip}" içindeki "${p.tour}" wanderer'da değişmiş olabilir. Turu aç ve kaynağını denetle. Gezide hiçbir şey kendiliğinden değişmez.`,
|
||
}),
|
||
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
|
||
},
|
||
passwordReset: {
|
||
subject: 'Şifrenizi sıfırlayın',
|
||
greeting: 'Merhaba',
|
||
body: 'TREK hesabınızın şifresini sıfırlamak için bir istek aldık. Yeni bir şifre belirlemek için aşağıdaki butona tıklayın.',
|
||
ctaIntro: 'Şifreyi sıfırla',
|
||
expiry: 'Bu bağlantı 60 dakika içinde sona erer.',
|
||
ignore: 'Bu isteği siz yapmadıysanız, bu e-postayı güvenle yok sayabilirsiniz — şifreniz değişmeyecektir.',
|
||
},
|
||
};
|
||
|
||
export default tr;
|