Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

457 B
Raw Blame
import type { CollectionTourItem } from '@trek/shared';

/** Where a kept tour came from and who kept it, as one tooltip. */
export function sourceText(tour: CollectionTourItem, t: (key: string, params?: Record<string, unknown>) => string) {
  const source = t('tours.collection.source', { tour: tour.source.tourName, trip: tour.source.tripTitle });
  return tour.saved_by ? `${source}. ${t('tours.collection.keptBy', { name: tour.saved_by })}` : source;
}