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.

feat: quality of life sweep from the feature discussions

Maurice8fd46c4c188d
diff --git a/client/src/api/client.ts b/client/src/api/client.ts
index 91191a218..1b4e0af41 100644
--- a/client/src/api/client.ts
+++ b/client/src/api/client.ts
@@ -2,7 +2,7 @@ import { isEffectivelyOffline } from '../sync/networkMode'
import axios, { AxiosInstance } from 'axios'
import type { z } from 'zod'
import type { Day, Place, Trip } from '../types'
-import type { TransitProvider } from '@trek/shared'
+import type { MapsNearbyRequest, JourneyReorderEntryPhotosRequest, TransitProvider } from '@trek/shared'
import { randomId } from '../utils/randomId'
import { postProviderPhotosInBatches } from './providerPhotoBatches'
import {
@@ -28,13 +28,13 @@ import {
type PackingReorderRequest, type PackingCreateBagRequest, type TodoReorderRequest,
type TripCreateRequest, type TripUpdateRequest, type TripCopyRequest, type ActiveTripResponse,
type DayCreateRequest, type DayUpdateRequest, type DayReorderRequest,
- type PlaceCreateRequest, type PlaceUpdateRequest,
+ type PlaceCreateRequest, type PlaceUpdateRequest, type PlaceImageFromFileRequest,
type ReservationCreateRequest, type ReservationUpdateRequest,
type AccommodationCreateRequest, type AccommodationUpdateRequest,
type BudgetCreateItemRequest, type BudgetUpdateItemRequest,
type PackingCreateItemRequest, type PackingUpdateItemRequest, type PackingSetSharingRequest,
type TodoCreateItemRequest, type TodoUpdateItemRequest,
- type AssignmentCreateRequest, type AssignmentNotesRequest, type AssignmentParticipantsRequest, type AssignmentTimeRequest, type AssignmentTransportRequest,
+ type AssignmentCreateRequest, type AssignmentNotesRequest, type AssignmentParticipantsRequest, type AssignmentRouteRequest, type AssignmentTimeRequest, type AssignmentTransportRequest,
type PlaceBulkDeleteRequest,
type PlaceBulkUpdateRequest,
type DayNoteCreateRequest, type DayNoteUpdateRequest,
@@ -471,23 +471,28 @@ export const placesApi = {
fd.append('image', file)
return postMultipart<{ place: Place }>(`/trips/${tripId}/places/${id}/image`, fd)
},
+ // A picture already attached in the trip, copied in as the place's image (#1242).
+ imageFromFile: (tripId: number | string, id: number | string, fileId: number): Promise<{ place: Place }> =>
+ apiClient.put(`/trips/${tripId}/places/${id}/image/from-file`, { file_id: fileId } satisfies PlaceImageFromFileRequest).then(r => r.data),
rate: (tripId: number | string, id: number | string, rating: number | null): Promise<{ place: Place }> =>
rating === null
? apiClient.delete(`/trips/${tripId}/places/${id}/rating`).then(r => r.data)
: apiClient.put(`/trips/${tripId}/places/${id}/rating`, { rating }).then(r => r.data),
- importGpx: (tripId: number | string, file: File, opts?: { waypoints?: boolean; routes?: boolean; tracks?: boolean }) => {
+ importGpx: (tripId: number | string, file: File, opts?: { waypoints?: boolean; routes?: boolean; tracks?: boolean; enrich?: boolean }) => {
const fd = new FormData()
fd.append('file', file)
if (opts?.waypoints !== undefined) fd.append('importWaypoints', String(opts.waypoints))
if (opts?.routes !== undefined) fd.append('importRoutes', String(opts.routes))
if (opts?.tracks !== undefined) fd.append('importTracks', String(opts.tracks))
+ if (opts?.enrich) fd.append('enrich', 'true')
return postMultipart(`/trips/${tripId}/places/import/gpx`, fd)
},
- importMapFile: (tripId: number | string, file: File, opts?: { points?: boolean; paths?: boolean }) => {
+ importMapFile: (tripId: number | string, file: File, opts?: { points?: boolean; paths?: boolean; enrich?: boolean }) => {
const fd = new FormData()
fd.append('file', file)
if (opts?.points !== undefined) fd.append('importPoints', String(opts.points))
if (opts?.paths !== undefined) fd.append('importPaths', String(opts.paths))
+ if (opts?.enrich) fd.append('enrich', 'true')
return postMultipart(`/trips/${tripId}/places/import/map`, fd)
},
// A longer timeout than the shared 8 s, like the other routes here that wait
@@ -511,12 +516,16 @@ export const assignmentsApi = {
list: (tripId: number | string, dayId: number | string) => apiClient.get(`/trips/${tripId}/days/${dayId}/assignments`).then(r => r.data),
create: (tripId: number | string, dayId: number | string, data: AssignmentCreateRequest) => apiClient.post(`/trips/${tripId}/days/${dayId}/assignments`, data).then(r => r.data),
delete: (tripId: number | string, dayId: number | string, id: number) => apiClient.delete(`/trips/${tripId}/days/${dayId}/assignments/${id}`).then(r => r.data),
+ // Takes every place off the day at once; the day, its notes and bookings stay (#2470).
+ clearDay: (tripId: number | string, dayId: number | string) => apiClient.delete(`/trips/${tripId}/days/${dayId}/assignments`).then(r => r.data as { success: true; removedIds: number[] }),
reorder: (tripId: number | string, dayId: number | string, orderedIds: number[]) => apiClient.put(`/trips/${tripId}/days/${dayId}/assignments/reorder`, { orderedIds } satisfies AssignmentReorderRequest).then(r => r.data),
move: (tripId: number | string, assignmentId: number, newDayId: number | string, orderIndex: number | null) => apiClient.put(`/trips/${tripId}/assignments/${assignmentId}/move`, { new_day_id: newDayId, order_index: orderIndex }).then(r => r.data),
update: (tripId: number | string, dayId: number | string, id: number, data: Record<string, unknown>) => apiClient.put(`/trips/${tripId}/days/${dayId}/assignments/${id}`, data).then(r => r.data),
getParticipants: (tripId: number | string, id: number) => apiClient.get(`/trips/${tripId}/assignments/${id}/participants`).then(r => r.data),
setParticipants: (tripId: number | string, id: number, userIds: number[]) => apiClient.put(`/trips/${tripId}/assignments/${id}/participants`, { user_ids: userIds } satisfies AssignmentParticipantsRequest).then(r => r.data),
updateTime: (tripId: number | string, id: number, times: AssignmentTimeRequest) => apiClient.put(`/trips/${tripId}/assignments/${id}/time`, times).then(r => r.data),
+ // Keeps the stop on the day but out of its route (#2532).
+ setRouteExcluded: (tripId: number | string, id: number, excluded: boolean) => apiClient.put(`/trips/${tripId}/assignments/${id}/route`, { excluded } satisfies AssignmentRouteRequest).then(r => r.data),
// Day-specific note on an assignment (#2163) — null clears it.
updateNotes: (tripId: number | string, id: number, data: AssignmentNotesRequest) => apiClient.put(`/trips/${tripId}/assignments/${id}/notes`, data).then(r => r.data),
// Per-segment travel mode (#1281): mode of the leg leaving this stop (null = inherit day default).
@@ -1033,6 +1042,8 @@ export const journeyApi = {
unlinkPhoto: (entryId: number, journeyPhotoId: number) => apiClient.delete(`/journeys/entries/${entryId}/photos/${journeyPhotoId}`).then(r => r.data),
deleteGalleryPhoto: (journeyId: number, journeyPhotoId: number) => apiClient.delete(`/journeys/${journeyId}/gallery/${journeyPhotoId}`).then(r => r.data),
updatePhoto: (photoId: number, data: Record<string, unknown>) => apiClient.patch(`/journeys/photos/${photoId}`, data).then(r => r.data),
+ // The photos of one entry in their new order, in one request (#824).
+ reorderEntryPhotos: (entryId: number, orderedIds: number[]) => apiClient.put(`/journeys/entries/${entryId}/photos/reorder`, { orderedIds } satisfies JourneyReorderEntryPhotosRequest).then(r => r.data),
deletePhoto: (photoId: number) => apiClient.delete(`/journeys/photos/${photoId}`).then(r => r.data),
// Cover
@@ -1253,6 +1264,9 @@ export const mapsApi = {
const from = [...new Set(extra.map(p => String(p.source ?? 'plugin')))].join('+')
return { places: [...core.places, ...extra], source: `${core.source}+${from}` }
}),
+ /** Places of any kind around a point, nearest first, each with `distance_m` (#976). */
+ nearby: (lat: number, lng: number, lang?: string) =>
+ apiClient.post(`/maps/nearby?lang=${lang || 'en'}`, { lat, lng } satisfies MapsNearbyRequest).then(r => checkInDev(mapsSearchResultSchema, r.data, 'maps.nearby')),
autocomplete: (input: string, lang?: string, locationBias?: { low: { lat: number; lng: number }; high: { lat: number; lng: number } }, signal?: AbortSignal, sessionToken?: string) =>
withCachedPlaces(
input,
diff --git a/client/src/components/Atlas/AtlasCountryPlaces.test.tsx b/client/src/components/Atlas/AtlasCountryPlaces.test.tsx
new file mode 100644
index 000000000..17501d774
--- /dev/null
+++ b/client/src/components/Atlas/AtlasCountryPlaces.test.tsx
@@ -0,0 +1,32 @@
+// FE-ATLAS-PLACES-001 to FE-ATLAS-PLACES-002 (#2174)
+import { vi } from 'vitest'
+import { render, screen, fireEvent } from '../../../tests/helpers/render'
+import AtlasCountryPlaces from './AtlasCountryPlaces'
+
+const detail = {
+ trips: [{ id: 1, title: 'Berlin 2026' }],
+ places: Array.from({ length: 8 }, (_, i) => ({ id: i + 1, name: `Place ${i + 1}`, lat: 0, lng: 0, trip_id: 1, address: i === 0 ? 'Pariser Platz' : null })),
+}
+
+describe('AtlasCountryPlaces', () => {
+ it('FE-ATLAS-PLACES-001: lists the places under their trip and opens the trip on a click', () => {
+ const onOpenTrip = vi.fn()
+ render(<AtlasCountryPlaces detail={detail} onOpenTrip={onOpenTrip} />)
+ expect(screen.getByText('Berlin 2026')).toBeInTheDocument()
+ expect(screen.getByText('Pariser Platz')).toBeInTheDocument()
+ fireEvent.click(screen.getByText('Place 3'))
+ expect(onOpenTrip).toHaveBeenCalledWith(1)
+ })
+
+ it('FE-ATLAS-PLACES-002: narrows a long list and says when nothing matches', () => {
+ render(<AtlasCountryPlaces detail={detail} onOpenTrip={() => {}} variant="mobile" />)
+ const search = screen.getByRole('textbox', { name: 'Search places' })
+ fireEvent.change(search, { target: { value: 'Place 2' } })
+ expect(screen.getByText('Place 2')).toBeInTheDocument()
+ expect(screen.queryByText('Place 3')).toBeNull()
+ fireEvent.change(search, { target: { value: 'zzz' } })
+ expect(screen.getByText('No place matches')).toBeInTheDocument()
+ fireEvent.click(screen.getByRole('button', { name: 'Clear' }))
+ expect(screen.getByText('Place 3')).toBeInTheDocument()
+ })
+})
diff --git a/client/src/components/Atlas/AtlasCountryPlaces.tsx b/client/src/components/Atlas/AtlasCountryPlaces.tsx
new file mode 100644
index 000000000..bf05517c8
--- /dev/null
+++ b/client/src/components/Atlas/AtlasCountryPlaces.tsx
@@ -0,0 +1,85 @@
+import { useState } from 'react'
+import { Briefcase, ChevronRight, MapPin, Search, X } from 'lucide-react'
+import { useTranslation } from '../../i18n'
+import { groupCountryPlaces, type CountryDetail } from '../../pages/atlas/atlasModel'
+
+interface AtlasCountryPlacesProps {
+ detail: Pick<CountryDetail, 'places' | 'trips'>
+ onOpenTrip: (tripId: number) => void
+ /** Phone sheets use their own tokens; the desktop dialog reads the planner's. */
+ variant?: 'desktop' | 'mobile'
+}
+
+/**
+ * Every place counted for a country, by trip (#2174), so an old trip imported into
+ * the wrong country, or a place that is missing, can be found and opened. A search
+ * narrows long lists; a click opens the trip the place belongs to.
+ */
+export default function AtlasCountryPlaces({ detail, onOpenTrip, variant = 'desktop' }: AtlasCountryPlacesProps) {
+ const { t, locale } = useTranslation()
+ const [query, setQuery] = useState('')
+ const groups = groupCountryPlaces(detail, query, locale)
+ const mobile = variant === 'mobile'
+ const ink = mobile ? 'text-m-ink' : 'text-content'
+ const muted = mobile ? 'text-m-muted' : 'text-content-muted'
+ const faint = mobile ? 'text-m-faint' : 'text-content-faint'
+ const rowHover = mobile ? 'active:bg-[color:var(--m-ic)]' : 'hover:bg-surface-hover'
+ const placeholder = mobile ? 'placeholder:text-m-faint' : 'placeholder:text-content-faint'
+
+ return (
+ <div className="flex min-h-0 flex-col gap-3">
+ {detail.places.length > 6 && (
+ <div className={`flex h-9 flex-none items-center gap-2 rounded-[10px] px-3 ${mobile ? 'bg-[color:var(--m-ic)]' : 'border border-edge bg-surface-input'} ${faint}`}>
+ <Search size={14} strokeWidth={2} className="flex-none" />
+ <input
+ value={query}
+ onChange={e => setQuery(e.target.value)}
+ placeholder={t('atlas.placesSearch')}
+ aria-label={t('atlas.placesSearch')}
+ className={`min-w-0 flex-1 border-0 bg-transparent text-[0.8125rem] outline-none ${ink} ${placeholder}`}
+ />
+ {query && (
+ <button type="button" onClick={() => setQuery('')} aria-label={t('common.clear')} className={`flex-none ${faint}`}>
+ <X size={13} />
+ </button>
+ )}
+ </div>
+ )}
+
+ {groups.length === 0 ? (
+ <p className={`m-0 py-4 text-center text-[0.8125rem] ${faint}`}>{t('atlas.placesNone')}</p>
+ ) : (
+ <div className="flex flex-col gap-3">
+ {groups.map(({ trip, places }) => (
+ <section key={trip.id} className="flex flex-col gap-0.5">
+ <button
+ type="button"
+ onClick={() => onOpenTrip(trip.id)}
+ className={`group flex items-center gap-2 rounded-[10px] px-2 py-1.5 text-left ${rowHover}`}
+ >
+ <Briefcase size={13} strokeWidth={2} className={`flex-none ${muted}`} />
+ <span className={`min-w-0 flex-1 truncate text-[0.8125rem] font-bold ${ink}`}>{trip.title}</span>
+ <span className={`flex-none rounded-full px-1.5 text-[0.6875rem] font-semibold tabular-nums ${mobile ? 'bg-[color:var(--m-ic)]' : 'bg-surface-tertiary'} ${muted}`}>{places.length}</span>
+ <ChevronRight size={14} strokeWidth={2} className={`flex-none ${faint}`} />
+ </button>
+ {places.map(place => (
+ <button
+ key={place.id}
+ type="button"
+ onClick={() => onOpenTrip(trip.id)}
+ className={`flex items-start gap-2 rounded-[10px] py-1.5 pl-7 pr-2 text-left ${rowHover}`}
+ >
+ <MapPin size={12} strokeWidth={2} className={`mt-[3px] flex-none ${faint}`} />
+ <span className="min-w-0 flex-1">
+ <span className={`block truncate text-[0.8125rem] font-medium ${ink}`}>{place.name}</span>
+ {place.address && <span className={`block truncate text-[0.6875rem] ${faint}`}>{place.address}</span>}
+ </span>
+ </button>
+ ))}
+ </section>
+ ))}
+ </div>
+ )}
+ </div>
+ )
+}
diff --git a/client/src/components/Budget/CostsPanel.tsx b/client/src/components/Budget/CostsPanel.tsx
index d0ed712e3..4cdcdfe34 100644
--- a/client/src/components/Budget/CostsPanel.tsx
+++ b/client/src/components/Budget/CostsPanel.tsx
@@ -58,6 +58,8 @@ interface Settlement {
// was recorded). Null/absent on rows predating this field — settlementDate()
// falls back to created_at for those.
settled_at?: string | null
+ /** A free-text note on the payment (#2340). */
+ note?: string | null
from_username?: string
to_username?: string
}
@@ -117,7 +119,8 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
const [previewReceipts, setPreviewReceipts] = useState<{ receipts: BudgetItemReceipt[]; initialIndex: number } | null>(null)
// One note open at a time: two expanded rows next to each other read as a mess,
// and the point of the collapse is that the list stays scannable.
- const [expandedNoteId, setExpandedNoteId] = useState<number | null>(null)
+ // Keyed 'e<id>' for an expense and 's<id>' for a payment, whose ids are counted apart.
+ const [expandedNoteId, setExpandedNoteId] = useState<string | null>(null)
// One open final-budget breakdown at a time, for the same reason a single note
// is expanded at a time: the card is a sidebar, not a report.
const [expandedFinalId, setExpandedFinalId] = useState<number | null>(null)
@@ -798,7 +801,6 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
const net = round2(myPaidOf(e) - myShareOf(e))
const unfinished = isUnfinished(e)
const note = readUserNote(e)
- const open = expandedNoteId === e.id
// Fixed columns, identical on every row, so the eye can run down the list
// instead of re-finding each field on each line. A row without a note leaves
@@ -891,21 +893,7 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
{/* The note, marked by a rule in the category colour instead of a box, so
it reads as part of the row rather than something dropped onto it. */}
- {!isMobile && (
- note ? (
- <Tooltip label={open ? t('costs.hideNote') : t('costs.showNote')}>
- <button type="button" onClick={() => setExpandedNoteId(open ? null : e.id)}
- aria-expanded={open}
- className="bg-surface-card border border-edge-faint text-content-muted hover:text-content hover:border-content-faint transition-colors exp-note-btn"
- style={{ display: 'flex', alignItems: open ? 'flex-start' : 'center', gap: 9, minWidth: 0, width: '100%', padding: open ? '10px 14px 11px 13px' : '7px 12px 7px 11px', borderRadius: open ? 14 : 999, borderLeft: '3px solid ' + c.color, cursor: 'pointer', fontFamily: 'inherit', fontSize: 'calc(12.5px * var(--fs-scale-body, 1))', lineHeight: 1.5, textAlign: 'left' }}>
- <span style={open
- ? { whiteSpace: 'pre-wrap', overflowWrap: 'anywhere', minWidth: 0, flex: 1 }
- : { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', minWidth: 0, flex: 1 }}>{note}</span>
- <ChevronDown size={13} style={{ flexShrink: 0, marginTop: open ? 3 : 0, transition: 'transform .18s ease', transform: open ? 'rotate(180deg)' : 'none' }} />
- </button>
- </Tooltip>
- ) : <span />
- )}
+ {!isMobile && NoteCell({ note, noteKey: 'e' + e.id, color: c.color })}
{/* The money, and what to do with it. */}
<div style={{ display: 'flex', alignItems: 'center', gap: 10, alignSelf: 'center' }}>
@@ -924,6 +912,25 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
)
}
+ // A row's note as a pill that opens in place; an empty one keeps the column.
+ function NoteCell({ note, noteKey, color }: { note: string; noteKey: string; color: string }) {
+ if (!note) return <span />
+ const open = expandedNoteId === noteKey
+ return (
+ <Tooltip label={open ? t('costs.hideNote') : t('costs.showNote')}>
+ <button type="button" onClick={() => setExpandedNoteId(open ? null : noteKey)}
+ aria-expanded={open}
+ className="bg-surface-card border border-edge-faint text-content-muted hover:text-content hover:border-content-faint transition-colors exp-note-btn"
+ style={{ display: 'flex', alignItems: open ? 'flex-start' : 'center', gap: 9, minWidth: 0, width: '100%', padding: open ? '10px 14px 11px 13px' : '7px 12px 7px 11px', borderRadius: open ? 14 : 999, borderLeft: '3px solid ' + color, cursor: 'pointer', fontFamily: 'inherit', fontSize: 'calc(12.5px * var(--fs-scale-body, 1))', lineHeight: 1.5, textAlign: 'left' }}>
+ <span style={open
+ ? { whiteSpace: 'pre-wrap', overflowWrap: 'anywhere', minWidth: 0, flex: 1 }
+ : { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', minWidth: 0, flex: 1 }}>{note}</span>
+ <ChevronDown size={13} style={{ flexShrink: 0, marginTop: open ? 3 : 0, transition: 'transform .18s ease', transform: open ? 'rotate(180deg)' : 'none' }} />
+ </button>
+ </Tooltip>
+ )
+ }
+
// A settle-up payment as a ledger row — visually distinct from an expense, with
// inline edit + undo (reuses deleteSettlement) so it isn't buried in a modal.
function SettlementRow({ s }: { s: Settlement }) {
@@ -947,9 +954,9 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
</div>
</Tooltip>
</div>
- {/* A payment carries no note, but it keeps the column so its amount lands
- on the same axis as every expense above it. */}
- {!isMobile && <span />}
+ {/* The payment's note (#2340), in the column every expense keeps for its own,
+ so its amount lands on the same axis as every expense above it. */}
+ {!isMobile && NoteCell({ note: s.note || '', noteKey: 's' + s.id, color: '#16a34a' })}
<div style={{ display: 'flex', alignItems: 'center', gap: 10, alignSelf: 'center' }}>
<span className="bg-surface-card border border-edge-faint text-content" style={{ display: 'inline-flex', alignItems: 'center', padding: '6px 13px', borderRadius: 999, fontSize: 'calc(15px * var(--fs-scale-subtitle, 1))', fontWeight: 700, whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums' }}>{fmt(settled(s))}</span>
</div>
@@ -1220,6 +1227,7 @@ function SettlementModal({ tripId, people, me, editing, currency, tripCurrency,
const [amount, setAmount] = useState<string>(editing ? amountToInputString(editing.amount, (editing.currency || currency).toUpperCase()) : '')
const [cur, setCur] = useState<string>((editing?.currency || currency).toUpperCase())
const [day, setDay] = useState(editing ? settlementDate(editing) : localToday())
+ const [note, setNote] = useState(editing?.note || '')
const [saving, setSaving] = useState(false)
const amt = Number.parseFloat(amount) || 0
@@ -1229,7 +1237,7 @@ function SettlementModal({ tripId, people, me, editing, currency, tripCurrency,
const save = async () => {
if (!valid) return
setSaving(true)
- const data = withFallbackFx({ from_user_id: Number(fromId), to_user_id: Number(toId), amount: amt, currency: cur, settled_at: day }, tripCurrency)
+ const data = withFallbackFx({ from_user_id: Number(fromId), to_user_id: Number(toId), amount: amt, currency: cur, settled_at: day, note: note.trim() || null }, tripCurrency)
try {
if (editing) await budgetApi.updateSettlement(tripId, editing.id, data)
else await budgetApi.createSettlement(tripId, data)
@@ -1294,6 +1302,10 @@ function SettlementModal({ tripId, people, me, editing, currency, tripCurrency,
<EditorField label={t('costs.day')}>
<CustomDatePicker value={day} onChange={setDay} style={{ width: '100%' }} />
</EditorField>
+ <EditorField label={t('costs.note')} htmlFor="payment-note">
+ <textarea id="payment-note" value={note} onChange={e => setNote(e.target.value)} rows={2}
+ placeholder={t('costs.paymentNotePlaceholder')} maxLength={NOTE_MAX} className={`${TEXTAREA} resize-y`} />
+ </EditorField>
</DialogShell>
)
}
diff --git a/client/src/components/Budget/costsCategories.tsx b/client/src/components/Budget/costsCategories.tsx
index 16c49bd39..21dfc4834 100644
--- a/client/src/components/Budget/costsCategories.tsx
+++ b/client/src/components/Budget/costsCategories.tsx
@@ -42,7 +42,7 @@ export const COST_CATEGORY_LIST: CostCategoryMeta[] = COST_CATEGORIES.map(k => C
const LEGACY_CATEGORY_MAP: Record<string, CostCategory> = {
flight: 'flights', flights: 'flights', plane: 'flights', flug: 'flights',
train: 'transport', bus: 'transport', car: 'transport', 'car rental': 'transport',
- ferry: 'transport', boat: 'transport', taxi: 'transport', transfer: 'transport',
+ ferry: 'transport', boat: 'transport', taxi: 'transport', transfer: 'transport', cable_car: 'transport',
transport: 'transport', transportation: 'transport',
hotel: 'accommodation', accommodation: 'accommodation', lodging: 'accommodation', hostel: 'accommodation',
restaurant: 'food', food: 'food', dining: 'food', meal: 'food', meals: 'food',
diff --git a/client/src/components/Collections/AddPlaceToCollectionModal.tsx b/client/src/components/Collections/AddPlaceToCollectionModal.tsx
index bcdcf929e..230207e00 100644
--- a/client/src/components/Collections/AddPlaceToCollectionModal.tsx
+++ b/client/src/components/Collections/AddPlaceToCollectionModal.tsx
@@ -17,6 +17,7 @@ import { getApiErrorMessage } from '../../types'
import { normalizeLinkUrl, STATUS_META, STATUS_ORDER } from '../../pages/collections/collectionsModel'
import type { Category, TranslationFn } from '../../types'
import type { CollectionLink, CollectionStatus } from '@trek/shared'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
type MapsPlace = Record<string, unknown>
const str = (v: unknown): string | undefined => (typeof v === 'string' && v ? v : undefined)
@@ -54,6 +55,7 @@ interface AddPlaceToCollectionModalProps {
*/
export default function AddPlaceToCollectionModal({ isOpen, collectionId, collectionName, categories, onClose, onAdded, t }: AddPlaceToCollectionModalProps): React.ReactElement {
const { language } = useTranslation()
+ const placeLang = usePlaceLanguage()
const toast = useToast()
const [query, setQuery] = useState('')
const [results, setResults] = useState<MapsPlace[]>([])
@@ -87,7 +89,7 @@ export default function AddPlaceToCollectionModal({ isOpen, collectionId, collec
setSearching(true)
setNoResults(false)
try {
- const res = await mapsApi.search(query, language)
+ const res = await mapsApi.search(query, placeLang)
const places = (res.places as MapsPlace[]) || []
setResults(places)
setNoResults(places.length === 0)
diff --git a/client/src/components/Collections/CollectionPlaceDetail.tsx b/client/src/components/Collections/CollectionPlaceDetail.tsx
index 7574c95ef..db1fdbec2 100644
--- a/client/src/components/Collections/CollectionPlaceDetail.tsx
+++ b/client/src/components/Collections/CollectionPlaceDetail.tsx
@@ -12,7 +12,7 @@ import { mapsApi } from '../../api/client'
import { entityGradient } from '../../utils/gradients'
import { getCategoryIcon } from '../shared/categoryIcons'
import { NavigationMenu } from '../shared/NavigationMenu'
-import { getNavigationTargets, openNavigationTarget } from '../Planner/placeNavigation'
+import { navigationTargetLabel, getNavigationTargets, openNavigationTarget } from '../Planner/placeNavigation'
import { STATUS_META, STATUS_ORDER, normalizeLinkUrl } from '../../pages/collections/collectionsModel'
import { useToast } from '../shared/Toast'
import { Tooltip } from '../shared/Tooltip'
@@ -373,7 +373,7 @@ export default function CollectionPlaceDetail({
}}
>
<Navigation size={14} />
- {navigationTargets.length === 1 ? navigationTargets[0].label : t('inspector.navigation')}
+ {navigationTargets.length === 1 ? navigationTargetLabel(navigationTargets[0], t) : t('inspector.navigation')}
</button>
{navOpen && (
<NavigationMenu
diff --git a/client/src/components/Files/FileManager.constants.ts b/client/src/components/Files/FileManager.constants.ts
index acc21981a..51cdfefa8 100644
--- a/client/src/components/Files/FileManager.constants.ts
+++ b/client/src/components/Files/FileManager.constants.ts
@@ -1 +1 @@
-export const TRANSPORT_TYPES = new Set(['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other'])
+export const TRANSPORT_TYPES = new Set(['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other'])
diff --git a/client/src/components/Files/FileManager.helpers.ts b/client/src/components/Files/FileManager.helpers.ts
index 747f8fc0e..c93a9d59b 100644
--- a/client/src/components/Files/FileManager.helpers.ts
+++ b/client/src/components/Files/FileManager.helpers.ts
@@ -1,4 +1,4 @@
-import { FileText, FileImage, File, FileVideo, Plane, Train, Car, Ship, Bus, Sailboat, Bike, CarTaxiFront, Route } from 'lucide-react'
+import { FileText, FileImage, File, FileVideo, Plane, Train, Car, Ship, Bus, Sailboat, CableCar, Bike, CarTaxiFront, Route } from 'lucide-react'
import { downloadFile } from '../../utils/fileDownload'
export function isImage(mimeType?: string | null) {
@@ -72,6 +72,7 @@ export function transportIcon(type: string) {
if (type === 'bicycle') return Bike
if (type === 'cruise') return Ship
if (type === 'ferry') return Sailboat
+ if (type === 'cable_car') return CableCar
if (type === 'transport_other') return Route
return Plane
}
diff --git a/client/src/components/Journey/JourneyDayJump.test.tsx b/client/src/components/Journey/JourneyDayJump.test.tsx
new file mode 100644
index 000000000..38a89c175
--- /dev/null
+++ b/client/src/components/Journey/JourneyDayJump.test.tsx
@@ -0,0 +1,46 @@
+// FE-JOURNEY-DAYJUMP-001 to FE-JOURNEY-DAYJUMP-003 (#1243)
+import { vi } from 'vitest'
+import { createRef } from 'react'
+import { render, screen, fireEvent } from '../../../tests/helpers/render'
+import JourneyDayJump from './JourneyDayJump'
+
+const days = [
+ { date: '2026-06-02', color: '#6366f1', entries: [{ id: 1, title: 'Arrival' }] },
+ { date: '2026-06-03', color: '#f97316', entries: [{ id: 2, title: 'City walk' }, { id: 3, title: 'Dinner' }] },
+]
+
+function setup() {
+ const feed = document.createElement('div')
+ feed.innerHTML = '<div data-day="2026-06-03"></div><div data-entry-id="3"></div>'
+ document.body.appendChild(feed)
+ const scroll = vi.fn()
+ Element.prototype.scrollIntoView = scroll
+ const ref = createRef<HTMLDivElement>()
+ ;(ref as { current: HTMLDivElement }).current = feed
+ render(<JourneyDayJump days={days} feedRef={ref} />)
+ return { scroll }
+}
+
+describe('JourneyDayJump', () => {
+ it('FE-JOURNEY-DAYJUMP-001: opens every day and scrolls the feed to the one picked', () => {
+ const { scroll } = setup()
+ fireEvent.click(screen.getByRole('button', { name: 'Jump to a day' }))
+ expect(screen.getAllByRole('menuitem')).toHaveLength(2)
+ fireEvent.click(screen.getAllByRole('menuitem')[1])
+ expect(scroll).toHaveBeenCalledTimes(1)
+ expect(screen.queryByRole('menu')).toBeNull()
+ })
+
+ it('FE-JOURNEY-DAYJUMP-002: a day opens onto its entries, and an entry is a jump too', () => {
+ const { scroll } = setup()
+ fireEvent.click(screen.getByRole('button', { name: 'Jump to a day' }))
+ fireEvent.click(screen.getAllByRole('button', { name: 'Expand' })[1])
+ fireEvent.click(screen.getByRole('menuitem', { name: /Dinner/ }))
+ expect(scroll).toHaveBeenCalledTimes(1)
+ })
+
+ it('FE-JOURNEY-DAYJUMP-003: a single day needs no jump', () => {
+ const { container } = render(<JourneyDayJump days={[days[0]]} feedRef={createRef()} />)
+ expect(container.innerHTML).toBe('')
+ })
+})
diff --git a/client/src/components/Journey/JourneyDayJump.tsx b/client/src/components/Journey/JourneyDayJump.tsx
new file mode 100644
index 000000000..ac3d6e845
--- /dev/null
+++ b/client/src/components/Journey/JourneyDayJump.tsx
@@ -0,0 +1,90 @@
+import { useEffect, useRef, useState, type RefObject } from 'react'
+import { CalendarDays, ChevronDown, ChevronRight } from 'lucide-react'
+import { useTranslation } from '../../i18n'
+import { Tooltip } from '../shared/Tooltip'
+
+export interface JumpDay {
+ date: string
+ color: string
+ entries: { id: number; title: string }[]
+}
+
+/** Scrolls the feed to a day header or an entry card, by the marks the timeline puts on them. */
+function scrollFeedTo(feed: HTMLElement | null, selector: string) {
+ feed?.querySelector(selector)?.scrollIntoView({ behavior: 'smooth', block: 'start' })
+}
+
+/**
+ * Where the desktop journal is, and a way to anywhere else in it (#1243): a pill
+ * among the jump buttons that opens every day, each day opening onto its entries.
+ * Picking one scrolls the feed there, so a long journey no longer means scrolling
+ * past every photo to reach the day being written up.
+ */
+export default function JourneyDayJump({ days, feedRef }: { days: JumpDay[]; feedRef: RefObject<HTMLDivElement | null> }) {
+ const { t, locale } = useTranslation()
+ const [open, setOpen] = useState(false)
+ const [expanded, setExpanded] = useState<string | null>(null)
+ const boxRef = useRef<HTMLDivElement>(null)
+
+ useEffect(() => {
+ if (!open) return
+ const onDown = (e: MouseEvent) => { if (!boxRef.current?.contains(e.target as Node)) setOpen(false) }
+ const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') setOpen(false) }
+ document.addEventListener('mousedown', onDown)
+ document.addEventListener('keydown', onKey)
+ return () => { document.removeEventListener('mousedown', onDown); document.removeEventListener('keydown', onKey) }
+ }, [open])
+
+ if (days.length < 2) return null
+ const dateLabel = (date: string) => new Date(`${date}T00:00:00`).toLocaleDateString(locale, { weekday: 'short', day: 'numeric', month: 'short' })
+
+ const goDay = (date: string) => { setOpen(false); scrollFeedTo(feedRef.current, `[data-day="${date}"]`) }
+ const goEntry = (id: number) => { setOpen(false); scrollFeedTo(feedRef.current, `[data-entry-id="${id}"]`) }
+
+ return (
+ <div ref={boxRef} className="relative">
+ <Tooltip label={t('journey.detail.dayJump')} placement="top" disabled={open}>
+ <button type="button" onClick={() => setOpen(o => !o)} aria-expanded={open} aria-label={t('journey.detail.dayJump')}
+ className="h-8 rounded-full px-3 inline-flex items-center gap-1.5 shadow-md text-[12px] font-semibold"
+ style={{ background: 'var(--vg-surf)', border: '1px solid var(--vg-line)', color: 'var(--vg-ink)' }}>
+ <CalendarDays size={14} strokeWidth={2.2} />
+ {t('journey.detail.dayJumpCount', { count: days.length })}
+ </button>
+ </Tooltip>
+ {open && (
+ <div role="menu" className="absolute bottom-10 left-1/2 -translate-x-1/2 w-[300px] max-h-[60vh] overflow-y-auto rounded-2xl p-1.5 shadow-xl"
+ style={{ background: 'var(--vg-surf)', border: '1px solid var(--vg-line)' }}>
+ {days.map((day, i) => {
+ const isOpen = expanded === day.date
+ return (
+ <div key={day.date}>
+ <div className="flex items-center gap-1">
+ <button type="button" role="menuitem" onClick={() => goDay(day.date)}
+ className="flex min-w-0 flex-1 items-center gap-2.5 rounded-xl px-2 py-1.5 text-left hover:bg-[color:var(--vg-surf2)]">
+ <span className="grid h-6 w-6 flex-none place-items-center rounded-lg text-[11px] font-bold text-white" style={{ background: day.color }}>{i + 1}</span>
+ <span className="min-w-0 flex-1 truncate text-[12.5px] font-semibold" style={{ color: 'var(--vg-ink)' }}>{dateLabel(day.date)}</span>
+ <span className="flex-none rounded-full px-1.5 text-[10px] font-bold tabular-nums" style={{ background: 'var(--vg-surf2)', color: 'var(--vg-ink3)' }}>{day.entries.length}</span>
+ </button>
+ {day.entries.length > 0 && (
+ <button type="button" onClick={() => setExpanded(isOpen ? null : day.date)} aria-expanded={isOpen}
+ aria-label={isOpen ? t('common.collapse') : t('common.expand')}
+ className="grid h-7 w-7 flex-none place-items-center rounded-full hover:bg-[color:var(--vg-surf2)]" style={{ color: 'var(--vg-ink3)' }}>
+ {isOpen ? <ChevronDown size={14} /> : <ChevronRight size={14} />}
+ </button>
+ )}
+ </div>
+ {isOpen && day.entries.map(entry => (
+ <button key={entry.id} type="button" role="menuitem" onClick={() => goEntry(entry.id)}
+ className="flex w-full items-center gap-2 rounded-lg py-1 pl-11 pr-2 text-left text-[12px] hover:bg-[color:var(--vg-surf2)]" style={{ color: 'var(--vg-ink2)' }}>
+ <span className="h-1.5 w-1.5 flex-none rounded-full" style={{ background: day.color }} />
+ <span className="min-w-0 truncate">{entry.title}</span>
+ </button>
+ ))}
+ </div>
+ )
+ })}
+ </div>
+ )}
+ </div>
+ )
+}
diff --git a/client/src/components/Journey/JourneyDetailPageEntryCard.test.tsx b/client/src/components/Journey/JourneyDetailPageEntryCard.test.tsx
index e758066ff..f3751cc73 100644
--- a/client/src/components/Journey/JourneyDetailPageEntryCard.test.tsx
+++ b/client/src/components/Journey/JourneyDetailPageEntryCard.test.tsx
@@ -209,6 +209,15 @@ describe('EntryCard', () => {
expect(screen.queryByText('Off route')).not.toBeInTheDocument()
})
+
+ it('FE-JRN-CARD-020: marks a draft on the header and on the hero (#696)', () => {
+ const { unmount } = mountCard(buildEntry({ is_draft: true }))
+ expect(screen.getByText('Draft')).toBeInTheDocument()
+ unmount()
+
+ mountCard(buildEntry({ is_draft: true, photos: [buildPhoto(100)] }))
+ expect(screen.getByText('Draft')).toBeInTheDocument()
+ })
})
describe('SkeletonCard', () => {
diff --git a/client/src/components/Journey/JourneyDetailPageEntryCard.tsx b/client/src/components/Journey/JourneyDetailPageEntryCard.tsx
index 3561e26dd..d7b56d441 100644
--- a/client/src/components/Journey/JourneyDetailPageEntryCard.tsx
+++ b/client/src/components/Journey/JourneyDetailPageEntryCard.tsx
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
-import { MapPin, Clock, Pencil, Trash2, Plus, RouteOff, X } from 'lucide-react'
+import { MapPin, Clock, Pencil, Trash2, Plus, PencilLine, RouteOff, X } from 'lucide-react'
import { formatLocationName } from '../../utils/formatters'
import { useTranslation } from '../../i18n'
import { pluginsApi } from '../../api/client'
@@ -79,6 +79,13 @@ export function EntryCard({ entry, readOnly, onEdit, onDelete, onPhotoClick }: {
{t('journey.entry.offRoute')}
</span>
)}
+ {/* A draft (#696) is the contributors' own until it is published. */}
+ {entry.is_draft && (
+ <span className="inline-flex items-center gap-1 px-2.5 py-1 bg-black/40 backdrop-blur-sm rounded-full text-[10px] font-semibold text-white tracking-wide">
+ <PencilLine size={10} />
+ {t('journey.entry.draft')}
+ </span>
+ )}
</div>
{/* Menu top-right, raised on the card colour so it reads on any photo */}
@@ -114,6 +121,11 @@ export function EntryCard({ entry, readOnly, onEdit, onDelete, onPhotoClick }: {
<RouteOff size={10} /> {t('journey.entry.offRoute')}
</span>
)}
+ {entry.is_draft && (
+ <span className="inline-flex items-center gap-1 px-2 py-0.5 bg-zinc-100 dark:bg-zinc-800 rounded-full text-[10px] font-semibold text-zinc-500">
+ <PencilLine size={10} /> {t('journey.entry.draft')}
+ </span>
+ )}
</div>
{!readOnly && <MoreButton label={t('files.menu')} items={menuItems} size={28} alwaysVisible />}
</div>
diff --git a/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx b/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx
index c69bedbb7..3321c9fc5 100644
--- a/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx
+++ b/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx
@@ -1,6 +1,6 @@
import { useEffect, useId, useMemo, useState, useRef, type SyntheticEvent } from 'react'
import { localIsoDate } from '../../utils/localDate'
-import { X, Plus, Image, Minus, Check, MapPin, Locate, Camera, Play, Loader2, NotebookPen } from 'lucide-react'
+import { Briefcase, X, Plus, Image, Minus, Check, MapPin, Locate, Camera, Play, Loader2, NotebookPen } from 'lucide-react'
import { normalizeImageFiles } from '../../utils/convertHeic'
import { isVideoFile } from '../../utils/videoPoster'
import { type ResilientResult, type UploadProgress } from '../../utils/uploadQueue'
@@ -22,6 +22,9 @@ import ConfirmDialog from '../shared/ConfirmDialog'
import { DialogButton, DialogFooter, DialogHeader, DialogSection, DialogShell, DialogTile, FooterSpacer, NEUTRAL_TINT, fs } from '../shared/DialogShell'
import { AddRowButton, EditorField, INPUT } from '../shared/dialogParts'
import { Tooltip } from '../shared/Tooltip'
+import { useJourneyTripSuggestion } from './useJourneyTripSuggestion'
+import { useEntryPhotoOrder } from './useEntryPhotoOrder'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
type PendingProviderGroup = ProviderPhotoGroup & { provider: string }
@@ -144,6 +147,7 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
onDone: () => void
}) {
const { t, language } = useTranslation()
+ const placeLang = usePlaceLanguage()
const toast = useToast()
const [title, setTitle] = useState(entry.title || '')
const [story, setStory] = useState(entry.story || '')
@@ -161,11 +165,17 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
const [mood, setMood] = useState(entry.mood || '')
const [weather, setWeather] = useState(entry.weather || '')
const [statsExcluded, setStatsExcluded] = useState(entry.stats_excluded ?? false)
+ // The trip this day belongs to, when the journey does not follow it yet (#2265).
+ const tripSuggestion = useJourneyTripSuggestion(journeyId, trips.map(tr => tr.trip_id), entryDate, true)
+ const [isDraft, setIsDraft] = useState(entry.is_draft ?? false)
const [pros, setPros] = useState<string[]>(entry.pros_cons?.pros?.length ? entry.pros_cons.pros : [''])
const [cons, setCons] = useState<string[]>(entry.pros_cons?.cons?.length ? entry.pros_cons.cons : [''])
const [saving, setSaving] = useState(false)
const [uploadProgress, setUploadProgress] = useState<{ done: number; total: number } | null>(null)
const [photos, setPhotos] = useState<(JourneyPhoto | GalleryPhoto)[]>(entry.photos || [])
+ // Drag a photo onto another's place, or send it to the front (#824).
+ const photoOrder = useEntryPhotoOrder(entry.id, photos, setPhotos)
+ const canReorder = entry.id > 0 && photos.length > 1
const [pendingFiles, setPendingFiles] = useState<File[]>([])
// Minting the preview URL inline in the JSX would hand out a fresh blob on
// every keystroke in the story field and never give one back.
@@ -206,6 +216,7 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
mood !== (entry.mood || '') ||
weather !== (entry.weather || '') ||
statsExcluded !== (entry.stats_excluded ?? false) ||
+ isDraft !== (entry.is_draft ?? false) ||
pros.filter(p => p.trim()).join('\n') !== originalPros ||
cons.filter(c => c.trim()).join('\n') !== originalCons ||
pendingFiles.length > 0 ||
@@ -331,6 +342,7 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
location_lat: locationLat,
location_lng: locationLng,
stats_excluded: offersStatsToggle ? statsExcluded : undefined,
+ is_draft: isDraft,
mood: mood || null,
weather: weather || null,
pros_cons: { pros: pros.filter(p => p.trim()), cons: cons.filter(c => c.trim()) },
@@ -420,7 +432,7 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
setLocationResults([])
setShowLocationResults(false)
try {
- const data = await mapsApi.reverse(pos.lat, pos.lng, language)
+ const data = await mapsApi.reverse(pos.lat, pos.lng, placeLang)
const name = data.name || data.address
// Only replace the coordinate fallback — don't clobber a search
// result the user may have picked while the reverse call was in flight.
@@ -637,7 +649,10 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
{(photos.length > 0 || pendingFiles.length > 0) && (
<div className="mt-3 flex flex-wrap gap-2">
{photos.map((p, idx) => (
- <div key={p.id} className={`group relative h-20 w-20 overflow-hidden rounded-[12px] ${idx === 0 && photos.length > 1 ? 'ring-2 ring-accent ring-offset-1 ring-offset-surface-card' : ''}`}>
+ <div key={p.id}
+ {...(canReorder ? photoOrder.dragProps(idx) : {})}
+ className={`group relative h-20 w-20 overflow-hidden rounded-[12px] ${canReorder ? 'cursor-grab active:cursor-grabbing' : ''} ${idx === 0 && photos.length > 1 ? 'ring-2 ring-accent ring-offset-1 ring-offset-surface-card' : ''} ${photoOrder.overIndex === idx && photoOrder.dragIndex !== idx ? 'outline outline-2 outline-offset-2 outline-[color:var(--accent)]' : ''}`}
+ style={photoOrder.dragIndex === idx ? { opacity: 0.4 } : undefined}>
{posterlessVideo(p) ? (
<ClipTile />
) : (
@@ -648,28 +663,7 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
)}
{idx > 0 && photos.length > 1 && (
<button type="button"
- onClick={e => {
- e.stopPropagation()
- const prevOrder = photos
- const next = [...photos]
- const [moved] = next.splice(idx, 1)
- next.unshift(moved)
- setPhotos(next)
- // The order is shared: other members, the share view and the
- // PDF all read it, so a rejected write has to go back. Every
- // write is awaited first: snapping back on the first
- // rejection would do it while the rest are still landing.
- void (async () => {
- const results = await Promise.allSettled(next.map((ph, i) => journeyApi.updatePhoto(ph.id, { sort_order: i })))
- const rejected = results.filter(r => r.status === 'rejected') as PromiseRejectedResult[]
- if (rejected.length === 0) return
- toast.error(getApiErrorMessage(rejected[0].reason, t('common.error')))
- // Only a run where nothing landed can be put back: with a
- // partial one the server already holds part of the new
- // order, and hiding that would be the worse lie.
- if (rejected.length === results.length) setPhotos(prevOrder)
- })()
- }}
+ onClick={e => { e.stopPropagation(); photoOrder.makeFirst(idx) }}
className={`absolute bottom-0.5 left-0.5 rounded px-1.5 py-0.5 font-semibold opacity-0 transition-opacity group-hover:opacity-100 ${ON_PHOTO}`}
style={fs(8)}
>
@@ -787,6 +781,22 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
</EditorField>
</div>
+ {tripSuggestion.trip && (
+ <div className="flex flex-col gap-2.5 rounded-[14px] border border-edge-faint bg-surface-secondary px-3 py-2.5">
+ <div className="flex items-start gap-3">
+ <span className="grid h-8 w-8 flex-none place-items-center rounded-[10px] bg-surface-card text-content-muted shadow-sm"><Briefcase size={15} /></span>
+ <div className="min-w-0 flex-1">
+ <div className="font-semibold text-content [overflow-wrap:anywhere]" style={fs(12.5, 'body')}>{tripSuggestion.trip.title}</div>
+ <div className="mt-0.5 leading-snug text-content-muted" style={fs(11)}>{t('journey.editor.tripSuggestionHint')}</div>
+ </div>
+ </div>
+ <div className="flex justify-end gap-2">
+ <DialogButton onClick={tripSuggestion.dismiss}>{t('journey.editor.tripSuggestionLater')}</DialogButton>
+ <DialogButton variant="primary" onClick={() => void tripSuggestion.link()} disabled={tripSuggestion.linking}>{t('journey.trips.linkTrip')}</DialogButton>
+ </div>
+ </div>
+ )}
+
{/* The location is a free-text search, so it gets the whole width. */}
<EditorField label={t('journey.editor.location')} htmlFor={`${labelId}-location`} className="relative">
<div className="relative">
@@ -802,7 +812,7 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
locationTimerRef.current = setTimeout(async () => {
setLocationSearching(true)
try {
- const res = await mapsApi.search(q)
+ const res = await mapsApi.search(q, placeLang)
setLocationResults((res.places || []).slice(0, 6).map((p: any) => ({
name: p.name, address: p.address, lat: Number(p.lat), lng: Number(p.lng),
})))
@@ -876,6 +886,15 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips,
</div>
)}
+ {/* A draft stays among the contributors until it is ready (#696). */}
+ <div className="flex items-center gap-3 rounded-[14px] border border-edge-faint bg-surface-secondary px-3 py-2.5">
+ <div className="min-w-0 flex-1">
+ <div className="font-semibold text-content" style={fs(12.5, 'body')}>{t('journey.editor.draft')}</div>
+ <div className="mt-0.5 leading-snug text-content-muted" style={fs(11)}>{t('journey.editor.draftHint')}</div>
+ </div>
+ <ToggleSwitch on={isDraft} onToggle={() => setIsDraft(v => !v)} label={t('journey.editor.draft')} />
+ </div>
+
{/* The size sits on the rows rather than on each chip, so a chip at rest
carries no inline style and only a picked mood wears its palette. */}
{showMood && (
diff --git a/client/src/components/Journey/PhotoLightbox.test.tsx b/client/src/components/Journey/PhotoLightbox.test.tsx
index e66f821c1..1eb88a373 100644
--- a/client/src/components/Journey/PhotoLightbox.test.tsx
+++ b/client/src/components/Journey/PhotoLightbox.test.tsx
@@ -1,4 +1,4 @@
-// FE-COMP-LIGHTBOX-001 to FE-COMP-LIGHTBOX-017
+// FE-COMP-LIGHTBOX-001 to FE-COMP-LIGHTBOX-020
// Plyr needs a real media pipeline, so the player is stubbed here.
vi.mock('./VideoPlayer', () => ({
@@ -94,10 +94,7 @@ describe('PhotoLightbox', () => {
it('FE-COMP-LIGHTBOX-008: calls onClose when close button clicked', () => {
const onClose = vi.fn();
render(<PhotoLightbox photos={samplePhotos} onClose={onClose} />);
- // The close button is in the top bar — find the button and click it
- const buttons = screen.getAllByRole('button');
- // The first button in the top bar is the close (X) button
- buttons[0].click();
+ screen.getByRole('button', { name: 'Close' }).click();
expect(onClose).toHaveBeenCalled();
});
@@ -110,15 +107,15 @@ describe('PhotoLightbox', () => {
it('FE-COMP-LIGHTBOX-010: only offers the arrows that lead somewhere', () => {
render(<PhotoLightbox photos={samplePhotos} onClose={vi.fn()} />);
- // First photo: close + next.
- expect(screen.getAllByRole('button')).toHaveLength(2);
+ // First photo: the two zoom buttons, close and next.
+ expect(screen.getAllByRole('button')).toHaveLength(4);
fireEvent.keyDown(window, { key: 'ArrowRight' });
- expect(screen.getAllByRole('button')).toHaveLength(3);
+ expect(screen.getAllByRole('button')).toHaveLength(5);
fireEvent.keyDown(window, { key: 'ArrowRight' });
- // Last photo: close + prev.
- expect(screen.getAllByRole('button')).toHaveLength(2);
+ // Last photo: zoom, close and prev.
+ expect(screen.getAllByRole('button')).toHaveLength(4);
fireEvent.keyDown(window, { key: 'ArrowRight' });
expect(screen.getByText('3 / 3')).toBeInTheDocument();
@@ -126,12 +123,12 @@ describe('PhotoLightbox', () => {
it('FE-COMP-LIGHTBOX-011: navigates with the on-screen arrows', () => {
render(<PhotoLightbox photos={samplePhotos} startIndex={1} onClose={vi.fn()} />);
- const [, prev, next] = screen.getAllByRole('button');
+ const [, , , prev, next] = screen.getAllByRole('button');
fireEvent.click(next);
expect(screen.getByText('3 / 3')).toBeInTheDocument();
- fireEvent.click(screen.getAllByRole('button')[1]);
+ fireEvent.click(screen.getAllByRole('button')[3]);
expect(screen.getByText('2 / 3')).toBeInTheDocument();
expect(prev).toBeInTheDocument();
});
@@ -197,4 +194,46 @@ describe('PhotoLightbox', () => {
expect(onClose).not.toHaveBeenCalled();
expect(screen.getByText('1 / 3')).toBeInTheDocument();
});
+
+ it('FE-COMP-LIGHTBOX-018: zooms with the buttons and a double click, and starts over on the next photo (#1484)', () => {
+ render(<PhotoLightbox photos={samplePhotos} onClose={vi.fn()} />);
+ const img = screen.getByRole('img');
+ expect(screen.getByRole('button', { name: 'Zoom out' })).toBeDisabled();
+
+ fireEvent.click(screen.getByRole('button', { name: 'Zoom in' }));
+ expect(img.style.transform).toContain('scale(1.5)');
+ expect(screen.getByRole('button', { name: 'Back to full photo' })).toHaveTextContent('150%');
+
+ fireEvent.click(screen.getByRole('button', { name: 'Back to full photo' }));
+ expect(img.style.transform).toBe('translate(0px, 0px) scale(1)');
+
+ fireEvent.doubleClick(img);
+ expect(img.style.transform).toContain('scale(2.5)');
+ fireEvent.keyDown(window, { key: 'ArrowRight' });
+ expect(screen.getByRole('img').style.transform).toBe('translate(0px, 0px) scale(1)');
+ });
+
+ it('FE-COMP-LIGHTBOX-019: a swipe on an enlarged photo pans instead of turning the page', () => {
+ const onClose = vi.fn();
+ render(<PhotoLightbox photos={samplePhotos} onClose={onClose} />);
+ fireEvent.click(screen.getByRole('button', { name: 'Zoom in' }));
+ const overlay = screen.getByRole('img').closest('div[style*="position: fixed"]') as HTMLElement;
+ fireEvent.touchStart(overlay, { touches: [{ clientX: 200, clientY: 200 }] });
+ fireEvent.touchMove(overlay, { touches: [{ clientX: 80, clientY: 320 }] });
+ fireEvent.touchEnd(overlay, { touches: [], changedTouches: [{ clientX: 80, clientY: 320 }] });
+ expect(screen.getByText('1 / 3')).toBeInTheDocument();
+ expect(onClose).not.toHaveBeenCalled();
+ });
+
+ it('FE-COMP-LIGHTBOX-020: a pinch zooms in without closing', () => {
+ const onClose = vi.fn();
+ render(<PhotoLightbox photos={samplePhotos} onClose={onClose} />);
+ const img = screen.getByRole('img');
+ const overlay = img.closest('div[style*="position: fixed"]') as HTMLElement;
+ fireEvent.touchStart(overlay, { touches: [{ clientX: 100, clientY: 100 }, { clientX: 200, clientY: 100 }] });
+ fireEvent.touchMove(overlay, { touches: [{ clientX: 50, clientY: 100 }, { clientX: 250, clientY: 100 }] });
+ fireEvent.touchEnd(overlay, { touches: [], changedTouches: [{ clientX: 250, clientY: 100 }] });
+ expect(img.style.transform).toContain('scale(2)');
+ expect(onClose).not.toHaveBeenCalled();
+ });
});
diff --git a/client/src/components/Journey/PhotoLightbox.tsx b/client/src/components/Journey/PhotoLightbox.tsx
index f8919552d..619d13df0 100644
--- a/client/src/components/Journey/PhotoLightbox.tsx
+++ b/client/src/components/Journey/PhotoLightbox.tsx
@@ -1,6 +1,9 @@
import { useState, useEffect, useCallback, useRef } from 'react'
-import { ChevronLeft, ChevronRight, X } from 'lucide-react'
+import { ChevronLeft, ChevronRight, X, ZoomIn, ZoomOut } from 'lucide-react'
import VideoPlayer from './VideoPlayerLazy'
+import { usePhotoZoom } from './usePhotoZoom'
+import { Tooltip } from '../shared/Tooltip'
+import { useTranslation } from '../../i18n'
interface LightboxPhoto {
id: string
@@ -18,11 +21,22 @@ interface Props {
onClose: () => void
}
+/** The round glass buttons of the top bar. */
+const ROUND_BTN: React.CSSProperties = {
+ background: 'rgba(255,255,255,0.1)', border: 'none', borderRadius: '50%',
+ width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center',
+ color: '#fff', cursor: 'pointer',
+}
+
export default function PhotoLightbox({ photos, startIndex = 0, onClose }: Props) {
const [idx, setIdx] = useState(startIndex)
const touchStart = useRef<{ x: number; y: number } | null>(null)
+ const { t } = useTranslation()
const photo = photos[idx]
+ // Zoom starts over on every photo (#1484).
+ const zoom = usePhotoZoom(photo?.id)
+ const isImage = !!photo && photo.mediaType !== 'video'
const hasPrev = idx > 0
const hasNext = idx < photos.length - 1
@@ -39,12 +53,20 @@ export default function PhotoLightbox({ photos, startIndex = 0, onClose }: Props
return () => window.removeEventListener('keydown', onKey)
}, [prev, next, onClose])
+ // A pinch, a double tap or a pan of an enlarged photo belongs to the zoom; only
+ // the rest is a swipe that turns the page or closes the lightbox.
const onTouchStart = (e: React.TouchEvent) => {
+ if (isImage && zoom.touchStart(e)) { touchStart.current = null; return }
const t = e.touches[0]
touchStart.current = { x: t.clientX, y: t.clientY }
}
+ const onTouchMove = (e: React.TouchEvent) => {
+ if (isImage && zoom.touchMove(e)) touchStart.current = null
+ }
+
const onTouchEnd = (e: React.TouchEvent) => {
+ if (isImage && zoom.touchEnd(e)) { touchStart.current = null; return }
if (!touchStart.current) return
const t = e.changedTouches[0]
const dx = t.clientX - touchStart.current.x
@@ -74,6 +96,7 @@ export default function PhotoLightbox({ photos, startIndex = 0, onClose }: Props
paddingBottom: 'var(--bottom-nav-h)',
}}
onTouchStart={onTouchStart}
+ onTouchMove={onTouchMove}
onTouchEnd={onTouchEnd}
>
{/* Photo area — centered with nav overlays */}
@@ -86,13 +109,37 @@ export default function PhotoLightbox({ photos, startIndex = 0, onClose }: Props
<span style={{ color: 'rgba(255,255,255,0.5)', fontSize: 'calc(13px * var(--fs-scale-body, 1))', fontWeight: 500 }}>
{idx + 1} / {photos.length}
</span>
- <button type="button" onClick={onClose} style={{
+ <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
+ {isImage && (
+ <>
+ <Tooltip label={t('journey.lightbox.zoomOut')}>
+ <button type="button" onClick={zoom.zoomOut} disabled={!zoom.zoomed} aria-label={t('journey.lightbox.zoomOut')} style={{ ...ROUND_BTN, opacity: zoom.zoomed ? 1 : 0.4 }}>
+ <ZoomOut size={17} />
+ </button>
+ </Tooltip>
+ {zoom.zoomed && (
+ <Tooltip label={t('journey.lightbox.zoomReset')}>
+ <button type="button" onClick={zoom.reset} aria-label={t('journey.lightbox.zoomReset')}
+ style={{ ...ROUND_BTN, width: 'auto', borderRadius: 99, padding: '0 12px', fontSize: 'calc(12px * var(--fs-scale-caption, 1))', fontWeight: 600, fontVariantNumeric: 'tabular-nums' }}>
+ {Math.round(zoom.zoom.scale * 100)}%
+ </button>
+ </Tooltip>
+ )}
+ <Tooltip label={t('journey.lightbox.zoomIn')}>
+ <button type="button" onClick={zoom.zoomIn} disabled={!zoom.canZoomIn} aria-label={t('journey.lightbox.zoomIn')} style={{ ...ROUND_BTN, opacity: zoom.canZoomIn ? 1 : 0.4 }}>
+ <ZoomIn size={17} />
+ </button>
+ </Tooltip>
+ </>
+ )}
+ <button type="button" onClick={onClose} aria-label={t('common.close')} style={{
background: 'rgba(255,255,255,0.1)', border: 'none', borderRadius: '50%',
width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center',
color: '#fff', cursor: 'pointer',
}}>
<X size={18} />
</button>
+ </div>
</div>
{/* Prev button — visible on hover (desktop), always visible (mobile) */}
@@ -115,12 +162,17 @@ export default function PhotoLightbox({ photos, startIndex = 0, onClose }: Props
) : (
<img
key={photo.id}
+ ref={zoom.imgRef}
src={photo.src}
alt={photo.caption || ''}
+ draggable={false}
+ {...zoom.mouse}
style={{
maxWidth: '92vw', maxHeight: '92vh',
objectFit: 'contain', borderRadius: 4,
animation: 'fadeIn 0.15s ease',
+ userSelect: 'none',
+ ...zoom.style,
}}
/>
)}
diff --git a/client/src/components/Journey/photoZoom.test.ts b/client/src/components/Journey/photoZoom.test.ts
new file mode 100644
index 000000000..ff8f98547
--- /dev/null
+++ b/client/src/components/Journey/photoZoom.test.ts
@@ -0,0 +1,21 @@
+// FE-JOURNEY-ZOOM-001 to FE-JOURNEY-ZOOM-004 (#1484)
+import { describe, it, expect } from 'vitest'
+import { clampOffset, NO_ZOOM, panBy, toggleZoom, zoomAt } from './photoZoom'
+
+describe('photoZoom', () => {
+ it('FE-JOURNEY-ZOOM-001: zooms into the point under the pointer and stays within 1x to 4x', () => {
+ expect(zoomAt(NO_ZOOM, 2, 50, 20, 400, 300)).toEqual({ scale: 2, x: -50, y: -20 })
+ expect(zoomAt(NO_ZOOM, 9, 0, 0, 400, 300).scale).toBe(4)
+ expect(zoomAt({ scale: 2, x: 30, y: 0 }, 0.5, 0, 0, 400, 300)).toEqual(NO_ZOOM)
+ })
+
+ it('FE-JOURNEY-ZOOM-002: never lets the photo slide off its own place', () => {
+ expect(clampOffset({ scale: 2, x: 999, y: -999 }, 400, 300)).toEqual({ scale: 2, x: 200, y: -150 })
+ expect(panBy({ scale: 2, x: 0, y: 0 }, 30, 40, 400, 300)).toEqual({ scale: 2, x: 30, y: 40 })
+ })
+
+ it('FE-JOURNEY-ZOOM-003: a double click goes in, and back out from anywhere', () => {
+ expect(toggleZoom(NO_ZOOM, 0, 0, 400, 300).scale).toBe(2.5)
+ expect(toggleZoom({ scale: 3.2, x: 10, y: 10 }, 0, 0, 400, 300)).toEqual(NO_ZOOM)
+ })
+})
diff --git a/client/src/components/Journey/photoZoom.ts b/client/src/components/Journey/photoZoom.ts
new file mode 100644
index 000000000..fe28d7c5f
--- /dev/null
+++ b/client/src/components/Journey/photoZoom.ts
@@ -0,0 +1,47 @@
+/**
+ * The zoom of a photo in the lightbox (#1484), as plain arithmetic so it can be
+ * tested without a browser: a scale and how far the photo is moved off centre.
+ */
+export interface ZoomState {
+ scale: number
+ x: number
+ y: number
+}
+
+export const MIN_ZOOM = 1
+export const MAX_ZOOM = 4
+/** What a double click or a double tap jumps to. */
+export const TAP_ZOOM = 2.5
+
+export const NO_ZOOM: ZoomState = { scale: 1, x: 0, y: 0 }
+
+/** The photo may move only as far as its enlarged edge still covers where it sat. */
+export function clampOffset(state: ZoomState, width: number, height: number): ZoomState {
+ if (state.scale <= MIN_ZOOM) return NO_ZOOM
+ const maxX = ((state.scale - 1) * width) / 2
+ const maxY = ((state.scale - 1) * height) / 2
+ return {
+ scale: state.scale,
+ x: Math.max(-maxX, Math.min(maxX, state.x)),
+ y: Math.max(-maxY, Math.min(maxY, state.y)),
+ }
+}
+
+/**
+ * Zoom to `nextScale` keeping the point under the finger or the pointer where it
+ * is. `px`/`py` are measured from the photo's centre, in screen pixels.
+ */
+export function zoomAt(state: ZoomState, nextScale: number, px: number, py: number, width: number, height: number): ZoomState {
+ const scale = Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, nextScale))
+ const ratio = scale / state.scale
+ return clampOffset({ scale, x: px - (px - state.x) * ratio, y: py - (py - state.y) * ratio }, width, height)
+}
+
+/** A double click: in to the tapped spot from rest, back to rest from anywhere else. */
+export function toggleZoom(state: ZoomState, px: number, py: number, width: number, height: number): ZoomState {
+ return state.scale > MIN_ZOOM ? NO_ZOOM : zoomAt(state, TAP_ZOOM, px, py, width, height)
+}
+
+export function panBy(state: ZoomState, dx: number, dy: number, width: number, height: number): ZoomState {
+ return clampOffset({ scale: state.scale, x: state.x + dx, y: state.y + dy }, width, height)
+}
diff --git a/client/src/components/Journey/useEntryPhotoOrder.test.ts b/client/src/components/Journey/useEntryPhotoOrder.test.ts
new file mode 100644
index 000000000..82a74c20e
--- /dev/null
+++ b/client/src/components/Journey/useEntryPhotoOrder.test.ts
@@ -0,0 +1,13 @@
+// FE-JOURNEY-PHOTOORDER-001 (#824)
+import { describe, it, expect } from 'vitest'
+import { movedTo } from './useEntryPhotoOrder'
+
+describe('movedTo', () => {
+ it('FE-JOURNEY-PHOTOORDER-001: moves an item to a new place and leaves the list alone otherwise', () => {
+ expect(movedTo(['a', 'b', 'c', 'd'], 3, 0)).toEqual(['d', 'a', 'b', 'c'])
+ expect(movedTo(['a', 'b', 'c', 'd'], 0, 2)).toEqual(['b', 'c', 'a', 'd'])
+ const same = ['a', 'b']
+ expect(movedTo(same, 1, 1)).toBe(same)
+ expect(movedTo(same, 5, 0)).toBe(same)
+ })
+})
diff --git a/client/src/components/Journey/useEntryPhotoOrder.ts b/client/src/components/Journey/useEntryPhotoOrder.ts
new file mode 100644
index 000000000..90e57cf05
--- /dev/null
+++ b/client/src/components/Journey/useEntryPhotoOrder.ts
@@ -0,0 +1,53 @@
+import { useState, type DragEvent } from 'react'
+import { journeyApi } from '../../api/client'
+import { getApiErrorMessage } from '../../types'
+import { useToast } from '../shared/Toast'
+import { useTranslation } from '../../i18n'
+
+/** The list with the item at `from` taken out and put back at `to`. */
+export function movedTo<T>(list: T[], from: number, to: number): T[] {
+ if (from === to || from < 0 || from >= list.length) return list
+ const next = [...list]
+ const [item] = next.splice(from, 1)
+ next.splice(Math.max(0, Math.min(to, next.length)), 0, item)
+ return next
+}
+
+/**
+ * The order of an entry's photos (#824): drag one onto another's place, or send
+ * one to the front. One request for the whole order; the order is shared with the
+ * other members, the share page and the PDF, so a refused write goes back.
+ */
+export function useEntryPhotoOrder<T extends { id: number }>(entryId: number, photos: T[], setPhotos: (next: T[]) => void) {
+ const { t } = useTranslation()
+ const toast = useToast()
+ const [dragIndex, setDragIndex] = useState<number | null>(null)
+ const [overIndex, setOverIndex] = useState<number | null>(null)
+
+ const commit = (next: T[]) => {
+ if (next === photos) return
+ const before = photos
+ setPhotos(next)
+ journeyApi.reorderEntryPhotos(entryId, next.map(p => p.id)).catch((err: unknown) => {
+ toast.error(getApiErrorMessage(err, t('common.error')))
+ setPhotos(before)
+ })
+ }
+
+ const reset = () => { setDragIndex(null); setOverIndex(null) }
+
+ const dragProps = (index: number) => ({
+ draggable: true,
+ onDragStart: (e: DragEvent) => { e.dataTransfer.effectAllowed = 'move'; setDragIndex(index) },
+ onDragOver: (e: DragEvent) => { if (dragIndex === null) return; e.preventDefault(); e.dataTransfer.dropEffect = 'move'; setOverIndex(index) },
+ onDrop: (e: DragEvent) => { e.preventDefault(); if (dragIndex !== null) commit(movedTo(photos, dragIndex, index)); reset() },
+ onDragEnd: reset,
+ })
+
+ return {
+ makeFirst: (index: number) => commit(movedTo(photos, index, 0)),
+ dragProps,
+ dragIndex,
+ overIndex,
+ }
+}
diff --git a/client/src/components/Journey/useJourneyTripSuggestion.test.ts b/client/src/components/Journey/useJourneyTripSuggestion.test.ts
new file mode 100644
index 000000000..58f6333a7
--- /dev/null
+++ b/client/src/components/Journey/useJourneyTripSuggestion.test.ts
@@ -0,0 +1,20 @@
+// FE-JOURNEY-TRIPSUGGEST-001 (#2265)
+import { describe, it, expect } from 'vitest'
+import { tripForDate } from './useJourneyTripSuggestion'
+
+const trips = [
+ { id: 1, title: 'Summer', start_date: '2026-07-01', end_date: '2026-07-31' },
+ { id: 2, title: 'Berlin weekend', start_date: '2026-07-10', end_date: '2026-07-12' },
+ { id: 3, title: 'Undated' },
+]
+
+describe('tripForDate', () => {
+ it('FE-JOURNEY-TRIPSUGGEST-001: picks the shortest unlinked trip that takes in the day', () => {
+ expect(tripForDate(trips, '2026-07-11', new Set())?.id).toBe(2)
+ expect(tripForDate(trips, '2026-07-11T09:00', new Set([2]))?.id).toBe(1)
+ expect(tripForDate(trips, '2026-07-02', new Set())?.id).toBe(1)
+ expect(tripForDate(trips, '2026-08-01', new Set())).toBeNull()
+ expect(tripForDate(trips, null, new Set())).toBeNull()
+ expect(tripForDate(trips, '2026-07-31', new Set([1]))).toBeNull()
+ })
+})
diff --git a/client/src/components/Journey/useJourneyTripSuggestion.ts b/client/src/components/Journey/useJourneyTripSuggestion.ts
new file mode 100644
index 000000000..c3e82957c
--- /dev/null
+++ b/client/src/components/Journey/useJourneyTripSuggestion.ts
@@ -0,0 +1,71 @@
+import { useEffect, useState } from 'react'
+import { journeyApi } from '../../api/client'
+import { useJourneyStore } from '../../store/journeyStore'
+import { useToast } from '../shared/Toast'
+import { useTranslation } from '../../i18n'
+
+export interface SuggestableTrip {
+ id: number
+ title: string
+ start_date?: string | null
+ end_date?: string | null
+}
+
+/**
+ * The trip a journal day belongs to (#2265): one of the user's trips whose dates
+ * take in `date` and that the journey does not follow yet. When several do, the
+ * shortest one wins, the weekend inside a long holiday being the likelier match.
+ */
+export function tripForDate(trips: SuggestableTrip[], date: string | null | undefined, linkedIds: ReadonlySet<number>): SuggestableTrip | null {
+ if (!date) return null
+ const day = date.slice(0, 10)
+ const span = (t: SuggestableTrip) => Date.parse(t.end_date!) - Date.parse(t.start_date!)
+ return trips
+ .filter(t => !linkedIds.has(t.id) && !!t.start_date && !!t.end_date && t.start_date <= day && day <= t.end_date)
+ .sort((a, b) => span(a) - span(b))[0] ?? null
+}
+
+/**
+ * Offers to link the trip an entry's date falls in (#2265), the reverse of the
+ * "trip just ended, make a journey" prompt. Asks the server for the user's trips
+ * once, and only for someone who may change the journey.
+ */
+export function useJourneyTripSuggestion(journeyId: number, linkedTripIds: number[], date: string | null | undefined, enabled: boolean) {
+ const { t } = useTranslation()
+ const toast = useToast()
+ const [trips, setTrips] = useState<SuggestableTrip[]>([])
+ const [dismissed, setDismissed] = useState<number | null>(null)
+ const [linking, setLinking] = useState(false)
+
+ useEffect(() => {
+ if (!enabled) return
+ let cancelled = false
+ journeyApi.availableTrips()
+ .then(d => { if (!cancelled) setTrips(d.trips || []) })
+ .catch(() => { /* No suggestion is the quiet fallback: the entry saves either way. */ })
+ return () => { cancelled = true }
+ }, [enabled])
+
+ const suggestion = enabled ? tripForDate(trips, date, new Set(linkedTripIds)) : null
+
+ const link = async () => {
+ if (!suggestion || linking) return
+ setLinking(true)
+ try {
+ await journeyApi.addTrip(journeyId, suggestion.id)
+ toast.success(t('journey.trips.tripLinked'))
+ await useJourneyStore.getState().loadJourney(journeyId)
+ } catch {
+ toast.error(t('journey.trips.linkFailed'))
+ } finally {
+ setLinking(false)
+ }
+ }
+
+ return {
+ trip: suggestion && suggestion.id !== dismissed ? suggestion : null,
+ linking,
+ link,
+ dismiss: () => setDismissed(suggestion?.id ?? null),
+ }
+}
diff --git a/client/src/components/Journey/usePhotoZoom.ts b/client/src/components/Journey/usePhotoZoom.ts
new file mode 100644
index 000000000..4f6eaa0a7
--- /dev/null
+++ b/client/src/components/Journey/usePhotoZoom.ts
@@ -0,0 +1,146 @@
+import { useCallback, useEffect, useRef, useState, type CSSProperties } from 'react'
+import { MAX_ZOOM, NO_ZOOM, panBy, toggleZoom, zoomAt, type ZoomState } from './photoZoom'
+
+const STEP = 1.5
+const DOUBLE_TAP_MS = 300
+
+/**
+ * Zoom and pan for one photo of the lightbox (#1484): the wheel and a double click
+ * on a desktop, a pinch and a double tap on a phone, and dragging once it is
+ * enlarged. Starts over whenever `resetKey` changes, which is the photo shown.
+ */
+export function usePhotoZoom(resetKey: unknown) {
+ const [zoom, setZoom] = useState<ZoomState>(NO_ZOOM)
+ const imgRef = useRef<HTMLImageElement | null>(null)
+ const zoomRef = useRef(zoom)
+ zoomRef.current = zoom
+ const pinch = useRef<{ dist: number; scale: number } | null>(null)
+ const drag = useRef<{ x: number; y: number } | null>(null)
+ const lastTap = useRef(0)
+
+ useEffect(() => { setZoom(NO_ZOOM) }, [resetKey])
+
+ /** The photo's size at rest, and a point as measured from its centre. */
+ const measure = useCallback((clientX?: number, clientY?: number) => {
+ const img = imgRef.current
+ const z = zoomRef.current
+ if (!img) return null
+ const rect = img.getBoundingClientRect()
+ const width = rect.width / z.scale
+ const height = rect.height / z.scale
+ const cx = rect.left + rect.width / 2 - z.x
+ const cy = rect.top + rect.height / 2 - z.y
+ return { width, height, px: clientX == null ? 0 : clientX - cx, py: clientY == null ? 0 : clientY - cy }
+ }, [])
+
+ const scaleBy = useCallback((factor: number, clientX?: number, clientY?: number) => {
+ const m = measure(clientX, clientY)
+ if (!m) return
+ setZoom(z => zoomAt(z, z.scale * factor, m.px, m.py, m.width, m.height))
+ }, [measure])
+
+ const toggleAt = useCallback((clientX: number, clientY: number) => {
+ const m = measure(clientX, clientY)
+ if (!m) return
+ setZoom(z => toggleZoom(z, m.px, m.py, m.width, m.height))
+ }, [measure])
+
+ const onWheel = useCallback((e: React.WheelEvent) => {
+ scaleBy(Math.exp(-e.deltaY * 0.002), e.clientX, e.clientY)
+ }, [scaleBy])
+
+ const onDoubleClick = useCallback((e: React.MouseEvent) => toggleAt(e.clientX, e.clientY), [toggleAt])
+
+ const onMouseDown = useCallback((e: React.MouseEvent) => {
+ if (zoomRef.current.scale <= 1) return
+ e.preventDefault()
+ drag.current = { x: e.clientX, y: e.clientY }
+ }, [])
+
+ const onMouseMove = useCallback((e: React.MouseEvent) => {
+ if (!drag.current) return
+ const m = measure()
+ if (!m) return
+ const dx = e.clientX - drag.current.x
+ const dy = e.clientY - drag.current.y
+ drag.current = { x: e.clientX, y: e.clientY }
+ setZoom(z => panBy(z, dx, dy, m.width, m.height))
+ }, [measure])
+
+ const endDrag = useCallback(() => { drag.current = null }, [])
+
+ /**
+ * Touch goes through here before the lightbox's swipes. Answers true when the
+ * gesture was a zoom or a pan, so a pinch never also turns the page.
+ */
+ const touchStart = useCallback((e: React.TouchEvent): boolean => {
+ if (e.touches.length === 2) {
+ const [a, b] = [e.touches[0], e.touches[1]]
+ pinch.current = { dist: Math.hypot(a.clientX - b.clientX, a.clientY - b.clientY), scale: zoomRef.current.scale }
+ return true
+ }
+ if (e.touches.length === 1 && zoomRef.current.scale > 1) {
+ drag.current = { x: e.touches[0].clientX, y: e.touches[0].clientY }
+ return true
+ }
+ return false
+ }, [])
+
+ const touchMove = useCallback((e: React.TouchEvent): boolean => {
+ const m = measure()
+ if (!m) return false
+ if (pinch.current && e.touches.length === 2) {
+ const [a, b] = [e.touches[0], e.touches[1]]
+ const dist = Math.hypot(a.clientX - b.clientX, a.clientY - b.clientY)
+ const mid = measure((a.clientX + b.clientX) / 2, (a.clientY + b.clientY) / 2)
+ if (!mid) return true
+ const target = (pinch.current.scale * dist) / pinch.current.dist
+ setZoom(z => zoomAt(z, target, mid.px, mid.py, m.width, m.height))
+ return true
+ }
+ if (drag.current && e.touches.length === 1) {
+ const t = e.touches[0]
+ const dx = t.clientX - drag.current.x
+ const dy = t.clientY - drag.current.y
+ drag.current = { x: t.clientX, y: t.clientY }
+ setZoom(z => panBy(z, dx, dy, m.width, m.height))
+ return true
+ }
+ return false
+ }, [measure])
+
+ const touchEnd = useCallback((e: React.TouchEvent): boolean => {
+ const wasGesture = !!pinch.current || !!drag.current
+ if (e.touches.length < 2) pinch.current = null
+ if (e.touches.length === 0) drag.current = null
+ // A double tap zooms in on the tapped spot, or back out.
+ if (!wasGesture && e.changedTouches.length === 1) {
+ const now = Date.now()
+ if (now - lastTap.current < DOUBLE_TAP_MS) {
+ lastTap.current = 0
+ toggleAt(e.changedTouches[0].clientX, e.changedTouches[0].clientY)
+ return true
+ }
+ lastTap.current = now
+ }
+ return wasGesture || zoomRef.current.scale > 1
+ }, [toggleAt])
+
+ const zoomed = zoom.scale > 1
+ const style: CSSProperties = {
+ transform: `translate(${zoom.x}px, ${zoom.y}px) scale(${zoom.scale})`,
+ transition: drag.current || pinch.current ? 'none' : 'transform 160ms ease',
+ cursor: zoomed ? (drag.current ? 'grabbing' : 'grab') : 'zoom-in',
+ touchAction: 'none',
+ }
+
+ return {
+ zoom, zoomed, imgRef, style,
+ canZoomIn: zoom.scale < MAX_ZOOM,
+ zoomIn: () => scaleBy(STEP),
+ zoomOut: () => scaleBy(1 / STEP),
+ reset: () => setZoom(NO_ZOOM),
+ mouse: { onWheel, onDoubleClick, onMouseDown, onMouseMove, onMouseUp: endDrag, onMouseLeave: endDrag },
+ touchStart, touchMove, touchEnd,
+ }
+}
diff --git a/client/src/components/Map/MapLockPill.tsx b/client/src/components/Map/MapLockPill.tsx
new file mode 100644
index 000000000..48e1a3320
--- /dev/null
+++ b/client/src/components/Map/MapLockPill.tsx
@@ -0,0 +1,21 @@
+import { Lock, Unlock } from 'lucide-react'
+import { useTranslation } from '../../i18n'
+import { MapTogglePill } from './MapTogglePill'
+
+/**
+ * Locks the map view (#2010): picking days and places then leaves the camera where it is.
+ * Sits on top of the base-layer switcher, the other control about the view itself.
+ */
+export function MapLockPill({ locked, onToggle }: { locked: boolean; onToggle: () => void }) {
+ const { t } = useTranslation()
+ return (
+ <MapTogglePill
+ active={locked}
+ onToggle={onToggle}
+ label={locked ? t('map.lock.unlock') : t('map.lock.lock')}
+ testId="map-lock-pill"
+ tooltipPlacement="right"
+ icon={locked ? <Lock size={16} strokeWidth={2} /> : <Unlock size={16} strokeWidth={2} />}
+ />
+ )
+}
diff --git a/client/src/components/Map/MapTogglePill.tsx b/client/src/components/Map/MapTogglePill.tsx
new file mode 100644
index 000000000..8d6493480
--- /dev/null
+++ b/client/src/components/Map/MapTogglePill.tsx
@@ -0,0 +1,50 @@
+import type { ReactNode } from 'react'
+import { Tooltip } from '../shared/Tooltip'
+import { MAP_CONTROL_SHADOW } from './mapControlShadow'
+
+/**
+ * One round on/off control in the frosted shell every map control wears, so a new
+ * one lines up with the compass, the layer switcher and the overview toggle.
+ */
+export function MapTogglePill({ active, onToggle, label, icon, testId, tooltipPlacement = 'left' }: {
+ active: boolean
+ onToggle: () => void
+ label: string
+ icon: ReactNode
+ testId?: string
+ /** Away from the edge the control hugs: left on the right edge, right on the left one. */
+ tooltipPlacement?: 'left' | 'right'
+}) {
+ return (
+ <div style={{
+ display: 'inline-flex', alignItems: 'center', padding: 4, borderRadius: 999, pointerEvents: 'auto',
+ background: 'var(--sidebar-bg)',
+ backdropFilter: 'blur(20px) saturate(180%)',
+ WebkitBackdropFilter: 'blur(20px) saturate(180%)',
+ boxShadow: MAP_CONTROL_SHADOW,
+ }}>
+ {/* TREK's own tooltip, not the browser's: the native one ignores the colour
+ scheme, waits a second and a half, and cannot be read on a touch device. */}
+ <Tooltip label={label} placement={tooltipPlacement}>
+ <button
+ type="button"
+ onClick={onToggle}
+ aria-label={label}
+ aria-pressed={active}
+ data-testid={testId}
+ className={active ? 'text-accent' : 'text-content-muted'}
+ style={{
+ display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
+ width: 34, height: 34, borderRadius: 999, border: 'none', cursor: 'pointer',
+ background: 'transparent', padding: 0,
+ transition: 'background 0.14s, color 0.14s',
+ }}
+ onMouseEnter={e => { e.currentTarget.style.background = 'var(--bg-hover)' }}
+ onMouseLeave={e => { e.currentTarget.style.background = 'transparent' }}
+ >
+ {icon}
+ </button>
+ </Tooltip>
+ </div>
+ )
+}
diff --git a/client/src/components/Map/MapView.tsx b/client/src/components/Map/MapView.tsx
index 6f434dcf1..f931742b1 100644
--- a/client/src/components/Map/MapView.tsx
+++ b/client/src/components/Map/MapView.tsx
@@ -46,6 +46,7 @@ import { PluginMapLayers } from './MapPluginLayers'
import { useTransportRoutes } from '../../hooks/useTransportRoutes'
import { visibleRouteReservations } from '../../utils/reservationRoutes'
import { safeHexColor } from '../../utils/safeColor'
+import { placeMarkerLook } from './markerLook'
import { escapeHtml } from '@trek/shared'
import type { Day, Reservation, RouteVia } from '../../types'
import type { MapHoverInfo } from './mapHover'
@@ -64,6 +65,7 @@ import { isGcj02Basemap, resolveBasemap } from '../../utils/tileUrl'
import VectorBasemap from './VectorBasemap'
import { useSettingsStore } from '../../store/settingsStore'
import { MapLayerSwitcher, MAP_LAYER_SWITCHER_INSET } from './MapLayerSwitcher'
+import { MapLockPill } from './MapLockPill'
import { computeMapViewport, TILE_SIZE_RASTER, type ViewportPadding } from '../../utils/mapViewport'
function categoryIconSvg(iconName: string | null | undefined, size: number): string {
@@ -136,7 +138,8 @@ function RouteViaMarker({ via, controls, eventHandlers, children }: {
* Shows image_url if available, otherwise category icon in colored circle.
*/
function createPlaceIcon(place, orderNumbers, isSelected) {
- const cacheKey = `${place.id}:${isSelected}:${place.image_url || ''}:${place.category_color || ''}:${place.category_icon || ''}:${place.stop_type || ''}:${orderNumbers?.join(',') || ''}:${(place as { rating_avg?: number | null }).rating_avg ?? ''}`
+ const look = placeMarkerLook(place, isSelected)
+ const cacheKey = `${place.id}:${isSelected}:${look.key}:${place.image_url || ''}:${place.category_color || ''}:${place.category_icon || ''}:${place.stop_type || ''}:${orderNumbers?.join(',') || ''}:${(place as { rating_avg?: number | null }).rating_avg ?? ''}`
const cached = iconCache.get(cacheKey)
if (cached) return cached
@@ -151,11 +154,10 @@ function createPlaceIcon(place, orderNumbers, isSelected) {
iconCache.set(cacheKey, icon)
return icon
}
- const size = isSelected ? 44 : 36
+ const { size, borderWidth } = look
// Allow-listed, not escaped: the value lands in style="…" of a divIcon, where
// escaping stops the attribute breakout but still permits a CSS url().
const borderColor = isSelected ? '#111827' : safeHexColor(place.category_color, 'white')
- const borderWidth = isSelected ? 3 : 2.5
const shadow = isSelected
? '0 0 0 3px rgba(17,24,39,0.25), 0 4px 14px rgba(0,0,0,0.3)'
: '0 2px 8px rgba(0,0,0,0.22)'
@@ -164,7 +166,7 @@ function createPlaceIcon(place, orderNumbers, isSelected) {
// Number badges (bottom-right), or the rating where there are none: a numbered stop
// is one already planned into a day, and the rating answers the question asked before
// that. The two never want the same corner at the same time.
- let badgeHtml = ratingBadgeHtml((place as { rating_avg?: number | null }).rating_avg)
+ let badgeHtml = look.showRating ? ratingBadgeHtml((place as { rating_avg?: number | null }).rating_avg) : ''
if (orderNumbers && orderNumbers.length > 0) {
const label = orderNumbers.join(' · ')
badgeHtml = `<span style="
@@ -183,7 +185,7 @@ function createPlaceIcon(place, orderNumbers, isSelected) {
// Prefer base64 data URLs (no zoom lag); also accept same-origin proxy + uploaded
// custom images (#1136) as a fallback while the thumb is still being generated
- if (place.image_url && (place.image_url.startsWith('data:') || place.image_url.startsWith('/api/maps/place-photo/') || place.image_url.startsWith('/uploads/'))) {
+ if (look.showPhoto && place.image_url && (place.image_url.startsWith('data:') || place.image_url.startsWith('/api/maps/place-photo/') || place.image_url.startsWith('/uploads/'))) {
const imgIcon = L.divIcon({
className: '',
html: `<div style="
@@ -194,7 +196,7 @@ function createPlaceIcon(place, orderNumbers, isSelected) {
width:${size}px;height:${size}px;border-radius:50%;
border:${borderWidth}px solid ${borderColor};
box-shadow:${shadow};
- overflow:hidden;background:${bgColor};
+ overflow:hidden;background:${bgColor};${look.circleCss}
">
${markerPhotoHtml(place.image_url)}
</div>
@@ -217,9 +219,9 @@ function createPlaceIcon(place, orderNumbers, isSelected) {
background:${bgColor};
display:flex;align-items:center;justify-content:center;
cursor:pointer;position:relative;
- will-change:transform;contain:layout style;
+ will-change:transform;contain:layout style;${look.circleCss}
">
- ${categoryIconSvg(place.category_icon, isSelected ? 18 : 15)}
+ ${categoryIconSvg(place.category_icon, look.iconSize)}
${badgeHtml}
</div>`,
iconSize: [size, size],
@@ -355,6 +357,8 @@ function ViewportController({ onViewportChange }: { onViewportChange?: (b: { sou
}
interface SelectionControllerProps {
+ /** False while the traveller locked the map (#2010): a pick changes nothing on it. */
+ follow: boolean
places: Place[]
selectedPlaceId: number | null
dayPlaces: Place[]
@@ -362,12 +366,12 @@ interface SelectionControllerProps {
paddingOpts: L.FitBoundsOptions
}
-function SelectionController({ places, selectedPlaceId, dayPlaces, selectedPlace, paddingOpts }: SelectionControllerProps) {
+function SelectionController({ follow, places, selectedPlaceId, dayPlaces, selectedPlace, paddingOpts }: SelectionControllerProps) {
const map = useMap()
const prev = useRef(null)
useEffect(() => {
- if (selectedPlaceId && selectedPlaceId !== prev.current) {
+ if (follow && selectedPlaceId && selectedPlaceId !== prev.current) {
// Pan to the selected place without changing zoom. Offset the centre by the
// side-panel + bottom-inspector padding so the pin lands in the middle of the
// *visible* map area rather than the geometric centre (where the bottom panel
@@ -386,7 +390,7 @@ function SelectionController({ places, selectedPlaceId, dayPlaces, selectedPlace
}
}
prev.current = selectedPlaceId
- }, [selectedPlaceId, places, dayPlaces, selectedPlace, map])
+ }, [selectedPlaceId, places, dayPlaces, selectedPlace, map, follow])
return null
}
@@ -429,6 +433,8 @@ interface BoundsControllerProps {
* needs that leg on screen, which is neither the day nor the trip.
*/
focusPoints?: [number, number][]
+ /** False while the map is locked (#2010): an arriving route no longer re-fits it. */
+ follow?: boolean
/**
* What the caller's own chrome covers while `focusPoints` is framed, in pixels per edge.
*
@@ -449,7 +455,7 @@ function leafletPadding(box: ViewportPadding): L.FitBoundsOptions {
}
}
-function BoundsController({ places, routeCoords, fitKey, paddingOpts, framedOnMount = false, focusPoints, fitPadding }: BoundsControllerProps) {
+function BoundsController({ places, routeCoords, fitKey, paddingOpts, framedOnMount = false, focusPoints, fitPadding, follow = true }: BoundsControllerProps) {
const map = useMap()
const prevFitKey = useRef(-1)
const awaitingRoute = useRef(false)
@@ -503,6 +509,8 @@ function BoundsController({ places, routeCoords, fitKey, paddingOpts, framedOnMo
useEffect(() => {
if (!awaitingRoute.current || routeCoords.length === 0) return
awaitingRoute.current = false
+ // A map locked since that fit keeps its view when the route turns up (#2010).
+ if (!follow) return
fitTo([...places.map(p => [p.lat, p.lng] as [number, number]), ...routeCoords])
}, [routeCoords]) // eslint-disable-line react-hooks/exhaustive-deps
@@ -733,6 +741,12 @@ export const MapView = memo(function MapView({
// One colour pair per entry of `route`, or absent for the blue the route has always
// been. Only the road trip passes these, and only while colouring by day is on.
routeColors = null,
+ // One flag per entry of `route`: a walked stretch is drawn dashed (#2532).
+ routeWalking = null,
+ // False while the map is locked (#2010): picking a place leaves the view alone.
+ followSelection = true,
+ // Given, the lock that sets followSelection sits above the layer switcher (#2010).
+ onToggleFollow,
routeSegments = [],
selectedPlaceId = null,
// The selected place itself, for when no pin on this map stands for it.
@@ -1186,8 +1200,8 @@ export const MapView = memo(function MapView({
)}
<MapController center={center} zoom={zoom} />
- <BoundsController places={dayPlaces.length > 0 ? dayPlaces : places} routeCoords={dayPlaces.length > 0 ? routeCoords : []} fitKey={fitKey} paddingOpts={paddingOpts} framedOnMount={initialView.framed} focusPoints={focusPoints} fitPadding={fitPadding} />
- <SelectionController places={places} selectedPlaceId={selectedPlaceId} dayPlaces={dayPlaces} selectedPlace={selectedPlace} paddingOpts={paddingOpts} />
+ <BoundsController places={dayPlaces.length > 0 ? dayPlaces : places} routeCoords={dayPlaces.length > 0 ? routeCoords : []} fitKey={fitKey} paddingOpts={paddingOpts} framedOnMount={initialView.framed} focusPoints={focusPoints} fitPadding={fitPadding} follow={followSelection} />
+ <SelectionController follow={followSelection} places={places} selectedPlaceId={selectedPlaceId} dayPlaces={dayPlaces} selectedPlace={selectedPlace} paddingOpts={paddingOpts} />
<MapClickHandler onClick={onMapClick} />
<MapContextMenuHandler onContextMenu={onMapContextMenu} />
<CameraHoverGuard movingRef={mapMovingRef} onMoveStart={clearHover} onZoom={setMapZoom} />
@@ -1202,7 +1216,15 @@ export const MapView = memo(function MapView({
{/* Apple-Maps style: darker-blue casing under a bright-blue core, rounded.
The casing carries the click when the route can be reshaped: it is the wider of
the two, so it is the one a pointer actually lands on. */}
- {route && route.length > 0 && route.flatMap((seg, i) => seg.length > 1 ? [
+ {route && route.length > 0 && route.flatMap((seg, i) => seg.length < 2 ? [] : routeWalking?.[i] ? [
+ // Walked, so dashed and without the casing: the drive is the solid line (#2532).
+ <Polyline
+ key={`${i}-walk`}
+ positions={seg}
+ pathOptions={{ color: routeColors?.[i]?.line ?? '#0a84ff', weight: 4, opacity: 1, dashArray: '1 9', lineCap: 'round', lineJoin: 'round' }}
+ interactive={false}
+ />,
+ ] : [
<Polyline
key={`${i}-casing`}
positions={seg}
@@ -1223,7 +1245,7 @@ export const MapView = memo(function MapView({
pathOptions={{ color: routeColors?.[i]?.line ?? '#0a84ff', weight: 5, opacity: 1, lineCap: 'round', lineJoin: 'round' }}
interactive={false}
/>,
- ] : [])}
+ ])}
{/* The last bit to a place the road does not reach.
Dashed and thin, over the route rather than under it, because it is the one
@@ -1349,7 +1371,8 @@ export const MapView = memo(function MapView({
top of the map, which read as the control moving house rather than as room being
made: the inspector is a centred card at most 800 wide, so the corner it would
have been clearing is one the card never reaches. */}
- <div style={{ position: 'absolute', left: leftWidth + MAP_LAYER_SWITCHER_INSET, bottom: switcherBottom, zIndex: 1000, pointerEvents: 'none' }}>
+ <div style={{ position: 'absolute', left: leftWidth + MAP_LAYER_SWITCHER_INSET, bottom: switcherBottom, zIndex: 1000, pointerEvents: 'none', display: 'flex', flexDirection: 'column', gap: 8 }}>
+ {onToggleFollow && <MapLockPill locked={!followSelection} onToggle={onToggleFollow} />}
<MapLayerSwitcher active={baseLayer} onToggle={toggleBaseLayer} />
</div>
</div>
diff --git a/client/src/components/Map/MapViewGL.tsx b/client/src/components/Map/MapViewGL.tsx
index 592625cc6..ebb398e58 100644
--- a/client/src/components/Map/MapViewGL.tsx
+++ b/client/src/components/Map/MapViewGL.tsx
@@ -10,8 +10,10 @@ import type mapboxgl from 'mapbox-gl'
import { useSettingsStore } from '../../store/settingsStore'
import { useTranslation } from '../../i18n/TranslationContext'
import { MapLayerSwitcher, MAP_LAYER_SWITCHER_INSET, type BaseLayer } from './MapLayerSwitcher'
+import { MapLockPill } from './MapLockPill'
import { useAuthStore } from '../../store/authStore'
import { getCached, isLoading, fetchPhoto, onThumbReady, getAllThumbs } from '../../services/photoService'
+import { placeMarkerLook, type PlaceMarkerFlags } from './markerLook'
import { isCustomPlaceImage, markerPhotoHtml, photoCacheKey, photoSourcesKey, placePhotoFull, placePhotoUrl } from './placePhoto'
import { CATEGORY_ICON_MAP } from '../shared/categoryIcons'
import { isStandardFamily, supportsCustom3d, wantsTerrain, addCustom3dBuildings, addTerrainAndSky } from './mapboxSetup'
@@ -147,6 +149,12 @@ interface Props {
* been. Only the road trip passes these, and only while colouring by day is on.
*/
routeColors?: ({ line: string; casing: string } | undefined)[] | null
+ /** One flag per entry of `route`: true where the stretch is walked, drawn dashed (#2532). */
+ routeWalking?: boolean[] | null
+ /** False while the map is locked (#2010): picking a place leaves the view alone. */
+ followSelection?: boolean
+ /** Given, the lock that sets followSelection sits above the layer switcher. */
+ onToggleFollow?: () => void
routeSegments?: RouteSegment[]
selectedPlaceId?: number | null
/** The selected place itself, for when no pin on this map stands for it. */
@@ -355,7 +363,7 @@ function applySatellite(map: any, on: boolean): void {
} catch { /* a style that refuses the layer keeps the plain basemap */ }
}
-function createMarkerElement(place: Place & { category_color?: string; category_icon?: string }, photoUrl: string | null, orderNumbers: number[] | null, selected: boolean): HTMLDivElement {
+function createMarkerElement(place: Place & PlaceMarkerFlags & { category_color?: string; category_icon?: string }, photoUrl: string | null, orderNumbers: number[] | null, selected: boolean): HTMLDivElement {
// A stop that interrupts the drive gets its own small disc, decided before the photo
// branch: the brand logo a fuel search comes back with is exactly what this replaces.
// No number badge either, for the same reason the rail gives it none.
@@ -368,10 +376,10 @@ function createMarkerElement(place: Place & { category_color?: string; category_
return wrap
}
- const size = selected ? 44 : 36
+ const look = placeMarkerLook(place, selected)
+ const { size, borderWidth } = look
// See MapView: allow-listed rather than escaped, because this is a CSS context.
const borderColor = selected ? '#111827' : safeHexColor(place.category_color, 'white')
- const borderWidth = selected ? 3 : 2.5
const shadow = selected
? '0 0 0 3px rgba(17,24,39,0.25), 0 4px 14px rgba(0,0,0,0.3)'
: '0 2px 8px rgba(0,0,0,0.22)'
@@ -386,7 +394,7 @@ function createMarkerElement(place: Place & { category_color?: string; category_
// Same corner, same rule as the Leaflet map: numbers when the place is planned into a
// day, the rating when it is not.
- let badgeHtml = ratingBadgeHtml((place as { rating_avg?: number | null }).rating_avg)
+ let badgeHtml = look.showRating ? ratingBadgeHtml((place as { rating_avg?: number | null }).rating_avg) : ''
if (orderNumbers && orderNumbers.length > 0) {
const label = orderNumbers.join(' · ')
badgeHtml = `<span style="
@@ -413,7 +421,7 @@ function createMarkerElement(place: Place & { category_color?: string; category_
// to its stacked slot, not to the map viewport.
wrap.style.cssText = `width:${outer}px;height:${outer}px;cursor:pointer;`
- const hasPhoto = photoUrl && (photoUrl.startsWith('data:') || photoUrl.startsWith('/api/maps/place-photo/') || photoUrl.startsWith('/uploads/'))
+ const hasPhoto = look.showPhoto && photoUrl && (photoUrl.startsWith('data:') || photoUrl.startsWith('/api/maps/place-photo/') || photoUrl.startsWith('/uploads/'))
if (hasPhoto) {
wrap.innerHTML = `
<div style="
@@ -422,7 +430,7 @@ function createMarkerElement(place: Place & { category_color?: string; category_
border:${borderWidth}px solid ${borderColor};
box-shadow:${shadow};
overflow:hidden;background:${bgColor};
- box-sizing:content-box;
+ box-sizing:content-box;${look.circleCss}
">
${markerPhotoHtml(photoUrl)}
</div>
@@ -437,9 +445,9 @@ function createMarkerElement(place: Place & { category_color?: string; category_
box-shadow:${shadow};
background:${bgColor};
display:flex;align-items:center;justify-content:center;
- box-sizing:content-box;
+ box-sizing:content-box;${look.circleCss}
">
- ${categoryIconSvg(place.category_icon, selected ? 18 : 15)}
+ ${categoryIconSvg(place.category_icon, look.iconSize)}
</div>
${badgeHtml}
`
@@ -678,6 +686,9 @@ export function MapViewGL({
accessLines = NO_ACCESS_LINES,
route = null,
routeColors = null,
+ routeWalking = null,
+ followSelection = true,
+ onToggleFollow,
routeSegments = NO_ROUTE_SEGMENTS,
selectedPlaceId = null,
selectedPlace = null,
@@ -1344,6 +1355,8 @@ export function MapViewGL({
source: 'trip-route',
// Per feature where the caller gave one, else the blue the route has always
// been. `coalesce` rather than a second layer: one source, one stroke.
+ // A walked stretch has no casing; it is drawn dashed by its own layer (#2532).
+ filter: ['!=', ['get', 'walks'], true],
paint: { 'line-color': ['coalesce', ['get', 'casing'], '#0a5cc2'], 'line-width': 8 },
layout: { 'line-cap': 'round', 'line-join': 'round' },
})
@@ -1361,9 +1374,18 @@ export function MapViewGL({
id: 'trip-route-line',
type: 'line',
source: 'trip-route',
+ filter: ['!=', ['get', 'walks'], true],
paint: { 'line-color': ['coalesce', ['get', 'color'], '#0a84ff'], 'line-width': 5 },
layout: { 'line-cap': 'round', 'line-join': 'round' },
})
+ map.addLayer({
+ id: 'trip-route-walk',
+ type: 'line',
+ source: 'trip-route',
+ filter: ['==', ['get', 'walks'], true],
+ paint: { 'line-color': ['coalesce', ['get', 'color'], '#0a84ff'], 'line-width': 4, 'line-dasharray': [0.1, 2.2] },
+ layout: { 'line-cap': 'round', 'line-join': 'round' },
+ })
}
// The last bit to a place the road does not reach (#1797). Added after the route
// so it draws over it: it is the one piece of the line that is not driving, and it
@@ -1851,7 +1873,7 @@ export function MapViewGL({
const orderNumbers = dayOrderMap[place.id] ?? null
const photoUrl = placePhotoUrl(place, photoUrls)
const selected = place.id === selectedPlaceId
- const el = createMarkerElement(place as Place & { category_color?: string; category_icon?: string }, photoUrl, orderNumbers, selected)
+ const el = createMarkerElement(place as Place & PlaceMarkerFlags & { category_color?: string; category_icon?: string }, photoUrl, orderNumbers, selected)
// Drag onto a day in the plan (#891). Markers are rebuilt from scratch
// on every reconcile, so the listeners go with the element and need no
// teardown of their own.
@@ -2129,17 +2151,17 @@ export function MapViewGL({
const src = map.getSource('trip-route') as mapboxgl.GeoJSONSource | undefined
if (!src) return
const features = (route || [])
- .map((seg, i) => ({ seg, colors: routeColors?.[i] }))
+ .map((seg, i) => ({ seg, colors: routeColors?.[i], walks: !!routeWalking?.[i] }))
.filter(({ seg }) => seg && seg.length > 1)
- .map(({ seg, colors }) => ({
+ .map(({ seg, colors, walks }) => ({
type: 'Feature' as const,
// Null rather than absent: `coalesce` in the paint expression falls through on
// null, and an absent property would make every line the default colour.
- properties: { color: colors?.line ?? null, casing: colors?.casing ?? null },
+ properties: { color: colors?.line ?? null, casing: colors?.casing ?? null, walks },
geometry: { type: 'LineString' as const, coordinates: seg.map(([lat, lng]) => [lng, lat]) },
}))
src.setData({ type: 'FeatureCollection', features })
- }, [route, routeColors, mapReady])
+ }, [route, routeColors, routeWalking, mapReady])
// Update access-spur geojson
useEffect(() => {
@@ -2239,6 +2261,8 @@ export function MapViewGL({
&& !!routeFitKey
&& routeFitKey !== pendingRouteFitRef.current.routeKey
if (!fitKeyChanged && !routeArrivedForPendingFit) return
+ // Locked since the last fit (#2010): the day's route arriving must not move the view.
+ if (!fitKeyChanged && !followSelection) { pendingRouteFitRef.current = null; return }
const map = mapRef.current
if (!map) return
@@ -2310,7 +2334,7 @@ export function MapViewGL({
// flyTo selected place
useEffect(() => {
const map = mapRef.current
- if (!map || !selectedPlaceId) return
+ if (!map || !selectedPlaceId || !followSelection) return
const target = selectedPlaceTarget(selectedPlaceId, places, dayPlaces, selectedPlace)
if (!target?.lat || !target?.lng) return
try {
@@ -2425,10 +2449,12 @@ export function MapViewGL({
covers. */}
<div style={{
position: 'absolute', left: leftWidth + MAP_LAYER_SWITCHER_INSET, zIndex: 1000, pointerEvents: 'none',
+ display: 'flex', flexDirection: 'column', gap: 8,
bottom: isMobile && hasDayDetail
? 'calc(var(--bottom-nav-h, 0px) + 20px + var(--day-panel-h, 0px) + 12px)'
: 'calc(var(--bottom-nav-h, 0px) + 12px)',
}}>
+ {onToggleFollow && <MapLockPill locked={!followSelection} onToggle={onToggleFollow} />}
<MapLayerSwitcher active={baseLayer as BaseLayer} onToggle={toggleBaseLayer} />
</div>
{/* Hover tooltip — cursor-following name/category/address card, identical to
diff --git a/client/src/components/Map/ReservationOverlay.tsx b/client/src/components/Map/ReservationOverlay.tsx
index 8a34cc99d..7df978ad6 100644
--- a/client/src/components/Map/ReservationOverlay.tsx
+++ b/client/src/components/Map/ReservationOverlay.tsx
@@ -2,7 +2,7 @@ import { Fragment, createElement, useMemo, useState } from 'react'
import { renderIconMarkup } from '../../utils/iconMarkup'
import { Marker, Polyline, Tooltip, useMap, useMapEvents } from 'react-leaflet'
import L from 'leaflet'
-import { Plane, Train, Ship, Car, Bus, Sailboat, Bike, CarTaxiFront, Route, TramFront } from 'lucide-react'
+import { Plane, Train, Ship, Car, Bus, Sailboat, CableCar, Bike, CarTaxiFront, Route, TramFront } from 'lucide-react'
import { escapeHtml } from '@trek/shared'
import { getTransitMapSegments, type TransitMapSegment } from './transitGeometry'
import { geodesicArcs } from './flightGeodesy'
@@ -13,8 +13,8 @@ import type { Reservation, ReservationEndpoint } from '../../types'
const ENDPOINT_PANE = 'reservation-endpoints'
-type TransportType = 'flight' | 'train' | 'cruise' | 'car' | 'bus' | 'taxi' | 'bicycle' | 'ferry' | 'transit' | 'transport_other'
-const TRANSPORT_TYPES: TransportType[] = ['flight', 'train', 'cruise', 'car', 'bus', 'taxi', 'bicycle', 'ferry', 'transit', 'transport_other']
+type TransportType = 'flight' | 'train' | 'cruise' | 'car' | 'bus' | 'taxi' | 'bicycle' | 'ferry' | 'cable_car' | 'transit' | 'transport_other'
+const TRANSPORT_TYPES: TransportType[] = ['flight', 'train', 'cruise', 'car', 'bus', 'taxi', 'bicycle', 'ferry', 'cable_car', 'transit', 'transport_other']
const TRANSPORT_COLOR = '#3b82f6'
@@ -27,6 +27,8 @@ const TYPE_META: Record<TransportType, { color: string; icon: typeof Plane; geod
taxi: { color: TRANSPORT_COLOR, icon: CarTaxiFront, geodesic: false },
bicycle: { color: TRANSPORT_COLOR, icon: Bike, geodesic: false },
ferry: { color: TRANSPORT_COLOR, icon: Sailboat, geodesic: true },
+ // Valley to mountain station as the rope runs: a straight line, never a road (#2535).
+ cable_car: { color: TRANSPORT_COLOR, icon: CableCar, geodesic: false },
transit: { color: TRANSPORT_COLOR, icon: TramFront, geodesic: false },
transport_other: { color: TRANSPORT_COLOR, icon: Route, geodesic: false },
}
diff --git a/client/src/components/Map/TripRouteOverview.tsx b/client/src/components/Map/TripRouteOverview.tsx
index 2f9278a8d..feba9d3c5 100644
--- a/client/src/components/Map/TripRouteOverview.tsx
+++ b/client/src/components/Map/TripRouteOverview.tsx
@@ -1,9 +1,8 @@
import { AlertTriangle, Route } from 'lucide-react'
import { useTranslation } from '../../i18n'
-import { Tooltip } from '../shared/Tooltip'
-import { profileIcon } from '../Planner/DayPlanSidebarRouteConnector'
+import { MapTogglePill } from './MapTogglePill'
+import { routeModeIcon } from '../Planner/routeModes'
import { formatDistance } from '../../utils/units'
-import { MAP_CONTROL_SHADOW } from './mapControlShadow'
import type { TripRouteOverview as Overview } from './useTripRouteOverview'
import type { DistanceUnit } from '../../types'
@@ -13,40 +12,14 @@ import type { DistanceUnit } from '../../types'
*/
export function TripRouteOverviewPill({ active, onToggle }: { active: boolean; onToggle: () => void }) {
const { t } = useTranslation()
- const label = active ? t('map.overview.hide') : t('map.overview.show')
return (
- <div style={{
- display: 'inline-flex', alignItems: 'center', padding: 4, borderRadius: 999, pointerEvents: 'auto',
- background: 'var(--sidebar-bg)',
- backdropFilter: 'blur(20px) saturate(180%)',
- WebkitBackdropFilter: 'blur(20px) saturate(180%)',
- boxShadow: MAP_CONTROL_SHADOW,
- }}>
- {/* TREK's own tooltip, not the browser's — the native one ignores the
- colour scheme, waits a second and a half, and cannot be read on a touch
- device at all. `left`, because these controls hug the right edge of the
- map and a tooltip to the right would hang off it. */}
- <Tooltip label={label} placement="left">
- <button
- type="button"
- onClick={onToggle}
- aria-label={label}
- aria-pressed={active}
- data-testid="trip-overview-pill"
- className={active ? 'text-accent' : 'text-content-muted'}
- style={{
- display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
- width: 34, height: 34, borderRadius: 999, border: 'none', cursor: 'pointer',
- background: 'transparent', padding: 0,
- transition: 'background 0.14s, color 0.14s',
- }}
- onMouseEnter={e => { e.currentTarget.style.background = 'var(--bg-hover)' }}
- onMouseLeave={e => { e.currentTarget.style.background = 'transparent' }}
- >
- <Route size={17} strokeWidth={2} />
- </button>
- </Tooltip>
- </div>
+ <MapTogglePill
+ active={active}
+ onToggle={onToggle}
+ label={active ? t('map.overview.hide') : t('map.overview.show')}
+ testId="trip-overview-pill"
+ icon={<Route size={17} strokeWidth={2} />}
+ />
)
}
@@ -123,7 +96,7 @@ export function TripRouteOverviewPanel({ overview, unit, selectedDayId, onSelect
</span>
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 3, flexShrink: 0 }} className="text-content-muted">
{day.modes.map(mode => {
- const Icon = profileIcon(mode)
+ const Icon = routeModeIcon(mode)
return <Icon key={mode} size={12} strokeWidth={2} aria-hidden />
})}
</span>
diff --git a/client/src/components/Map/dayRoutePlan.ts b/client/src/components/Map/dayRoutePlan.ts
index 033ae72b2..0a17784d4 100644
--- a/client/src/components/Map/dayRoutePlan.ts
+++ b/client/src/components/Map/dayRoutePlan.ts
@@ -4,7 +4,7 @@ import { getDayBookendHotels, shouldDrawMorningLeg, shouldDrawEveningLeg, type C
import { withinDriveRange } from '@trek/shared/roadtrip'
import type { Accommodation, AssignmentsMap, Day, Reservation } from '../../types'
-export const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other']
+export const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other']
/** A waypoint on a day's drive, carrying the per-leg modes `resolveLegMode` reads off it. */
export interface DayRoutePoint {
@@ -86,6 +86,8 @@ export function buildDayRouteRuns(dayId: number, input: DayRouteInputs): DayRout
if (item.type === 'place') {
const a = item.data
if (!a.place?.lat || !a.place?.lng) return []
+ // Kept on the day, shown on the map, but not driven to (#2532).
+ if ((a as { route_excluded?: boolean }).route_excluded) return []
return [{
kind: 'place', lat: a.place.lat, lng: a.place.lng, pos: item.sortKey, time: a.place?.place_time ?? null,
// Per-segment travel mode (#1281): mode of the leg leaving this place.
diff --git a/client/src/components/Map/markerLook.ts b/client/src/components/Map/markerLook.ts
new file mode 100644
index 000000000..95315353f
--- /dev/null
+++ b/client/src/components/Map/markerLook.ts
@@ -0,0 +1,41 @@
+/**
+ * Two ways a place marker can be told apart from the rest, set on the place object the
+ * planner hands to the map. Underscored because they are the map's reading of the plan,
+ * never fields of a stored place.
+ */
+export interface PlaceMarkerFlags {
+ /** Not planned into any day, drawn small and without its photo (#2024). */
+ _compact?: boolean
+ /** Its stay's booking still waits for a confirmation (#2281). */
+ _pending?: boolean
+}
+
+export interface PlaceMarkerLook {
+ size: number
+ borderWidth: number
+ showPhoto: boolean
+ showRating: boolean
+ iconSize: number
+ /** Extra CSS for the round marker: a dashed ring and a faded face for a pending stay. */
+ circleCss: string
+ /** Part of the icon cache key, so a changed look is never served from the cache. */
+ key: string
+}
+
+/**
+ * How a place marker is drawn, the same way on the Leaflet and the GL map. A selected
+ * marker always shows in full: whatever made it quiet, it is the one being looked at.
+ */
+export function placeMarkerLook(place: PlaceMarkerFlags, selected: boolean): PlaceMarkerLook {
+ const compact = !!place._compact && !selected
+ const pending = !!place._pending
+ return {
+ size: selected ? 44 : compact ? 24 : 36,
+ borderWidth: selected ? 3 : compact ? 2 : 2.5,
+ showPhoto: !compact,
+ showRating: !compact,
+ iconSize: selected ? 18 : compact ? 12 : 15,
+ circleCss: pending ? 'border-style:dashed;opacity:0.62;' : '',
+ key: `${compact ? 'c' : ''}${pending ? 'p' : ''}`,
+ }
+}
diff --git a/client/src/components/Map/reservationsMapbox.ts b/client/src/components/Map/reservationsMapbox.ts
index 5972e737d..ad6becc04 100644
--- a/client/src/components/Map/reservationsMapbox.ts
+++ b/client/src/components/Map/reservationsMapbox.ts
@@ -9,7 +9,7 @@
import { createElement } from 'react'
import { renderIconMarkup } from '../../utils/iconMarkup'
import type mapboxgl from 'mapbox-gl'
-import { Plane, Train, Ship, Car, Bus, Sailboat, Bike, CarTaxiFront, Route, TramFront } from 'lucide-react'
+import { Plane, Train, Ship, Car, Bus, Sailboat, CableCar, Bike, CarTaxiFront, Route, TramFront } from 'lucide-react'
import { getTransitMapSegments } from './transitGeometry'
import { geodesicArcs } from './flightGeodesy'
import { cleanEndpointName } from './reservationName'
@@ -22,8 +22,8 @@ export const RESERVATION_LINE_LAYER_ID = 'trek-reservations-lines'
/** Sits under the coloured transit lines; named here so teardown can find it. */
export const TRANSIT_CASING_LAYER_ID = `${RESERVATION_LINE_LAYER_ID}-transit-casing`
-type TransportType = 'flight' | 'train' | 'cruise' | 'car' | 'bus' | 'taxi' | 'bicycle' | 'ferry' | 'transit' | 'transport_other'
-const TRANSPORT_TYPES: TransportType[] = ['flight', 'train', 'cruise', 'car', 'bus', 'taxi', 'bicycle', 'ferry', 'transit', 'transport_other']
+type TransportType = 'flight' | 'train' | 'cruise' | 'car' | 'bus' | 'taxi' | 'bicycle' | 'ferry' | 'cable_car' | 'transit' | 'transport_other'
+const TRANSPORT_TYPES: TransportType[] = ['flight', 'train', 'cruise', 'car', 'bus', 'taxi', 'bicycle', 'ferry', 'cable_car', 'transit', 'transport_other']
const TRANSPORT_COLOR = '#3b82f6'
const TYPE_META: Record<TransportType, { icon: typeof Plane; geodesic: boolean }> = {
@@ -35,6 +35,7 @@ const TYPE_META: Record<TransportType, { icon: typeof Plane; geodesic: boolean }
taxi: { icon: CarTaxiFront, geodesic: false },
bicycle: { icon: Bike, geodesic: false },
ferry: { icon: Sailboat, geodesic: true },
+ cable_car: { icon: CableCar, geodesic: false },
transit: { icon: TramFront, geodesic: false },
transport_other: { icon: Route, geodesic: false },
}
diff --git a/client/src/components/PDF/TripPDF.tsx b/client/src/components/PDF/TripPDF.tsx
index 94f1d58a1..c20db2893 100644
--- a/client/src/components/PDF/TripPDF.tsx
+++ b/client/src/components/PDF/TripPDF.tsx
@@ -1,7 +1,7 @@
// Trip PDF via browser print window
import { createElement } from 'react'
import { getCategoryIcon } from '../shared/categoryIcons'
-import { FileText, Info, Clock, MapPin, Navigation, Train, Plane, Bus, Car, Ship, Sailboat, Bike, CarTaxiFront, Route, Coffee, Ticket, Star, Heart, Camera, Flag, Lightbulb, AlertTriangle, ShoppingBag, Bookmark, Hotel, LogIn, LogOut, KeyRound, BedDouble, Utensils, Users, ParkingSquare, LucideIcon } from 'lucide-react'
+import { FileText, Info, Clock, MapPin, Navigation, Train, Plane, Bus, Car, Ship, Sailboat, CableCar, Bike, CarTaxiFront, Route, Coffee, Ticket, Star, Heart, Camera, Flag, Lightbulb, AlertTriangle, ShoppingBag, Bookmark, Hotel, LogIn, LogOut, KeyRound, BedDouble, Utensils, Users, ParkingSquare, LucideIcon } from 'lucide-react'
import { accommodationsApi, mapsApi, pluginsApi } from '../../api/client'
import type { Trip, Day, Place, Category, AssignmentsMap, DayNote, DistanceUnit, BudgetItem } from '../../types'
import { isDayInAccommodationRange, getDayOrder } from '../../utils/dayOrder'
@@ -20,6 +20,7 @@ import { formatDistance } from '../../utils/units'
import { fetchExchangeRates } from '../../hooks/useExchangeRates'
import { getFlightLegs, getTrainLegs } from '../../utils/flightLegs'
import { isServiceStopType } from '../Roadtrip/roadtripModel'
+import { onlyMyPlan } from './pdfScope'
/**
* Every day starts a new page by default. On a trip of short days that prints
@@ -64,8 +65,8 @@ function noteIconSvg(iconId) {
return renderLucideIcon(Icon, { size: 14, strokeWidth: 1.8, color: '#94a3b8' })
}
-const RESERVATION_ICON_MAP = { flight: Plane, train: Train, bus: Bus, car: Car, taxi: CarTaxiFront, bicycle: Bike, cruise: Ship, ferry: Sailboat, transport_other: Route, restaurant: Utensils, event: Ticket, tour: Users, parking: ParkingSquare, other: FileText }
-const RESERVATION_COLOR_MAP = { flight: '#3b82f6', train: '#06b6d4', bus: '#059669', car: '#6b7280', taxi: '#ca8a04', bicycle: '#84cc16', cruise: '#0ea5e9', ferry: '#0d9488', transport_other: '#6b7280', restaurant: '#ef4444', event: '#f59e0b', tour: '#10b981', parking: '#2563eb', other: '#6b7280' }
+const RESERVATION_ICON_MAP = { flight: Plane, train: Train, bus: Bus, car: Car, taxi: CarTaxiFront, bicycle: Bike, cruise: Ship, ferry: Sailboat, cable_car: CableCar, transport_other: Route, restaurant: Utensils, event: Ticket, tour: Users, parking: ParkingSquare, other: FileText }
+const RESERVATION_COLOR_MAP = { flight: '#3b82f6', train: '#06b6d4', bus: '#059669', car: '#6b7280', taxi: '#ca8a04', bicycle: '#84cc16', cruise: '#0ea5e9', ferry: '#0d9488', cable_car: '#dc2626', transport_other: '#6b7280', restaurant: '#ef4444', event: '#f59e0b', tour: '#10b981', parking: '#2563eb', other: '#6b7280' }
function reservationIconSvg(type) {
const Icon = RESERVATION_ICON_MAP[type] || Ticket
const color = RESERVATION_COLOR_MAP[type] || '#3b82f6'
@@ -203,6 +204,8 @@ interface downloadTripPDFProps {
budgetItems?: BudgetItem[]
/** Whether the Costs addon is on. Read from the addon store when left out. */
costsEnabled?: boolean
+ /** Prints only this member's plan (#2168): the stops and bookings that name them, and the ones that name nobody. */
+ onlyUserId?: number
}
/**
@@ -223,7 +226,10 @@ function planAssignments(assignments: AssignmentsMap, showServiceStops: boolean)
// `assignments` is normalised here once, to the plan's own list; every read below
// (and fetchPlacePhotos) relies on it being an object.
-export async function downloadTripPDF({ trip, days, places, assignments: stored = {}, categories, dayNotes, reservations = [], t: _t, locale: _locale, timeFormat: _timeFormat, distanceUnit: _distanceUnit, showServiceStops = true, budgetItems, costsEnabled }: downloadTripPDFProps) {
+export async function downloadTripPDF({ trip, days, places, assignments: allStored = {}, categories, dayNotes, reservations: allReservations = [], t: _t, locale: _locale, timeFormat: _timeFormat, distanceUnit: _distanceUnit, showServiceStops = true, budgetItems, costsEnabled, onlyUserId }: downloadTripPDFProps) {
+ const { assignments: stored, reservations } = onlyUserId != null
+ ? onlyMyPlan(allStored, allReservations, onlyUserId)
+ : { assignments: allStored, reservations: allReservations }
const assignments = planAssignments(stored, showServiceStops)
const breaksPerDay = pageBreakPerDay()
const loc = _locale || undefined
diff --git a/client/src/components/PDF/pdfScope.test.ts b/client/src/components/PDF/pdfScope.test.ts
new file mode 100644
index 000000000..9e067ba55
--- /dev/null
+++ b/client/src/components/PDF/pdfScope.test.ts
@@ -0,0 +1,29 @@
+// FE-PDF-SCOPE-001 to FE-PDF-SCOPE-002 (#2168)
+import { describe, it, expect } from 'vitest'
+import type { AssignmentsMap } from '../../types'
+import { hasPersonalPlan, onlyMyPlan } from './pdfScope'
+
+const assignments = {
+ 1: [
+ { id: 11, participants: [] },
+ { id: 12, participants: [{ user_id: 7, username: 'me' }] },
+ { id: 13, participants: [{ user_id: 8, username: 'anna' }] },
+ ],
+ 2: [{ id: 21 }],
+} as unknown as AssignmentsMap
+
+describe('pdfScope', () => {
+ it('FE-PDF-SCOPE-001: offers a personal plan only once somebody was given a part', () => {
+ expect(hasPersonalPlan(assignments, [])).toBe(true)
+ expect(hasPersonalPlan({ 1: [{ id: 1 }] } as unknown as AssignmentsMap, [{ travelers: [] }])).toBe(false)
+ expect(hasPersonalPlan({}, [{ travelers: [{ user_id: 1 }] }])).toBe(true)
+ })
+
+ it('FE-PDF-SCOPE-002: keeps what names me and what names nobody', () => {
+ const reservations = [{ id: 1, travelers: [{ user_id: 7 }] }, { id: 2, travelers: [{ user_id: 8 }] }, { id: 3 }]
+ const out = onlyMyPlan(assignments, reservations, 7)
+ expect(out.assignments[1].map(a => a.id)).toEqual([11, 12])
+ expect(out.assignments[2].map(a => a.id)).toEqual([21])
+ expect(out.reservations.map(r => r.id)).toEqual([1, 3])
+ })
+})
diff --git a/client/src/components/PDF/pdfScope.ts b/client/src/components/PDF/pdfScope.ts
new file mode 100644
index 000000000..fcc026eaf
--- /dev/null
+++ b/client/src/components/PDF/pdfScope.ts
@@ -0,0 +1,29 @@
+import type { AssignmentsMap } from '../../types'
+
+interface WithTravelers { travelers?: { user_id: number }[] | null }
+
+/**
+ * Whether anyone on the trip has been given their own part of it (#2168): a stop
+ * with participants or a booking with travellers. Without either, "my plan" is
+ * the whole plan, and offering it would only be a second way to the same file.
+ */
+export function hasPersonalPlan(assignments: AssignmentsMap, reservations: WithTravelers[]): boolean {
+ return Object.values(assignments).some(list => (list || []).some(a => (a.participants || []).length > 0))
+ || reservations.some(r => (r.travelers || []).length > 0)
+}
+
+/**
+ * The plan one member goes on (#2168). A stop or booking that names its people
+ * stays only when it names them; one that names nobody is everybody's and stays.
+ */
+export function onlyMyPlan<R extends WithTravelers>(
+ assignments: AssignmentsMap,
+ reservations: R[],
+ userId: number,
+): { assignments: AssignmentsMap; reservations: R[] } {
+ const mine = (people: { user_id: number }[] | null | undefined) => !people?.length || people.some(p => p.user_id === userId)
+ return {
+ assignments: Object.fromEntries(Object.entries(assignments).map(([dayId, list]) => [dayId, (list || []).filter(a => mine(a.participants))])),
+ reservations: reservations.filter(r => mine(r.travelers)),
+ }
+}
diff --git a/client/src/components/Packing/PackingListPanelItemRow.tsx b/client/src/components/Packing/PackingListPanelItemRow.tsx
index b7e4ccb9f..2487ec8f2 100644
--- a/client/src/components/Packing/PackingListPanelItemRow.tsx
+++ b/client/src/components/Packing/PackingListPanelItemRow.tsx
@@ -9,9 +9,10 @@ import {
MoreHorizontal, ChevronDown, ChevronRight,
} from 'lucide-react'
import type { PackingItem, PackingBag } from '../../types'
-import { katColor } from './packingListPanel.helpers'
+import { katColor, packedOf } from './packingListPanel.helpers'
import { PACKING_PLACEHOLDER_NAME } from './packingListPanel.constants'
import { QuantityInput } from './PackingListPanelQuantityInput'
+import { PackedCounter } from './PackingPackedCounter'
import PackingShareControl from './PackingShareControl'
import { PopoverItem } from './PackingPopover'
import { POPOVER, POPOVER_CAPTION, POPOVER_DIVIDER } from './packingPopoverStyles'
@@ -65,7 +66,7 @@ export function ArtikelZeile({ item, tripId, categories, onCategoryChange: _onCa
const [bagInlineCreate, setBagInlineCreate] = useState(false)
const [bagInlineName, setBagInlineName] = useState('')
const itemMenuBtnRef = useRef<HTMLButtonElement>(null)
- const { togglePackingItem, updatePackingItem, deletePackingItem } = useTripStore()
+ const { togglePackingItem, updatePackingItem, deletePackingItem, setPackedCount } = useTripStore()
const toast = useToast()
const { t } = useTranslation()
@@ -104,6 +105,9 @@ export function ArtikelZeile({ item, tripId, categories, onCategoryChange: _onCa
const canDrag = canEdit && !isPlaceholder && !!drag
const selectedBag = bags.find(b => b.id === item.bag_id)
const quantity = item.quantity || 1
+ // A multi-piece item counts its pieces into the bag (#2296).
+ const packed = packedOf(item)
+ const partlyPacked = !item.checked && packed > 0
const owner = tripMembers.find(m => m.id === item.owner_id)
const ownerAvatar = owner?.avatar_url ?? owner?.avatar ?? null
@@ -167,7 +171,7 @@ export function ArtikelZeile({ item, tripId, categories, onCategoryChange: _onCa
<button type="button" onClick={handleToggle} className="packing-check" aria-pressed={!!item.checked} style={{
flexShrink: 0, cursor: 'pointer', padding: 0, width: 20, height: 20, borderRadius: 6,
display: 'grid', placeItems: 'center',
- border: `1.5px solid ${item.checked ? 'var(--accent)' : 'var(--text-faint)'}`,
+ border: `1.5px solid ${item.checked || partlyPacked ? 'var(--accent)' : 'var(--text-faint)'}`,
background: item.checked ? 'var(--accent)' : 'transparent',
color: 'var(--accent-text)',
transition: 'background 180ms cubic-bezier(0.23,1,0.32,1), border-color 180ms cubic-bezier(0.23,1,0.32,1)',
@@ -233,6 +237,9 @@ export function ArtikelZeile({ item, tripId, categories, onCategoryChange: _onCa
)}
<div className="packing-row-inline-actions" style={{ display: 'flex', alignItems: 'center', gap: 6, flexShrink: 0 }}>
+ {canEdit && !isPlaceholder && quantity > 1 && (
+ <PackedCounter packed={packed} quantity={quantity} onChange={count => setPackedCount(tripId, item.id, count)} style={reveal(active || partlyPacked)} />
+ )}
{/* Quantity */}
{canEdit && <QuantityInput value={quantity} onSave={qty => updatePackingItem(tripId, item.id, { quantity: qty })} style={badge(active || quantity > 1)} />}
diff --git a/client/src/components/Packing/PackingPackedCounter.test.tsx b/client/src/components/Packing/PackingPackedCounter.test.tsx
new file mode 100644
index 000000000..3d893a130
--- /dev/null
+++ b/client/src/components/Packing/PackingPackedCounter.test.tsx
@@ -0,0 +1,31 @@
+// FE-COMP-PACKEDCOUNTER-001 to FE-COMP-PACKEDCOUNTER-003 (#2296)
+import { vi } from 'vitest';
+import { render, screen, fireEvent } from '../../../tests/helpers/render';
+import { PackedCounter } from './PackingPackedCounter';
+import { packedOf } from './packingListPanel.helpers';
+
+describe('PackedCounter', () => {
+ it('FE-COMP-PACKEDCOUNTER-001: shows the count and steps it both ways', () => {
+ const onChange = vi.fn();
+ render(<PackedCounter packed={3} quantity={10} onChange={onChange} />);
+ expect(screen.getByText('3/10')).toBeInTheDocument();
+ expect(screen.getByRole('group', { name: '3 of 10 packed' })).toBeInTheDocument();
+
+ fireEvent.click(screen.getByRole('button', { name: 'Pack one more' }));
+ fireEvent.click(screen.getByRole('button', { name: 'Pack one less' }));
+ expect(onChange.mock.calls).toEqual([[4], [2]]);
+ });
+
+ it('FE-COMP-PACKEDCOUNTER-002: stops at nothing and at all of it', () => {
+ const { rerender } = render(<PackedCounter packed={0} quantity={2} onChange={() => {}} />);
+ expect(screen.getByRole('button', { name: 'Pack one less' })).toBeDisabled();
+ rerender(<PackedCounter packed={2} quantity={2} onChange={() => {}} />);
+ expect(screen.getByRole('button', { name: 'Pack one more' })).toBeDisabled();
+ });
+
+ it('FE-COMP-PACKEDCOUNTER-003: a ticked item reads as fully packed', () => {
+ expect(packedOf({ checked: 1, quantity: 4, packed_quantity: null })).toBe(4);
+ expect(packedOf({ checked: 0, quantity: 4, packed_quantity: 3 })).toBe(3);
+ expect(packedOf({ checked: 0 })).toBe(0);
+ });
+});
diff --git a/client/src/components/Packing/PackingPackedCounter.tsx b/client/src/components/Packing/PackingPackedCounter.tsx
new file mode 100644
index 000000000..173d65447
--- /dev/null
+++ b/client/src/components/Packing/PackingPackedCounter.tsx
@@ -0,0 +1,55 @@
+import type { CSSProperties } from 'react'
+import { Minus, Plus } from 'lucide-react'
+import { useTranslation } from '../../i18n'
+import { Tooltip } from '../shared/Tooltip'
+
+interface PackedCounterProps {
+ packed: number
+ quantity: number
+ onChange: (count: number) => void
+ style?: CSSProperties
+}
+
+const stepStyle: CSSProperties = {
+ width: 18, height: 18, display: 'grid', placeItems: 'center', padding: 0, border: 'none',
+ borderRadius: 99, background: 'transparent', color: 'var(--text-muted)', cursor: 'pointer',
+}
+
+/**
+ * How many pieces of a multi-piece item are already in the bag (#2296): "7/10"
+ * between a minus and a plus. Reaching the quantity ticks the item off.
+ */
+export function PackedCounter({ packed, quantity, onChange, style }: PackedCounterProps) {
+ const { t } = useTranslation()
+ const partial = packed > 0 && packed < quantity
+ return (
+ <Tooltip label={t('packing.packedCount', { packed, total: quantity })}>
+ <div
+ role="group"
+ aria-label={t('packing.packedCount', { packed, total: quantity })}
+ style={{
+ display: 'inline-flex', alignItems: 'center', gap: 2, flexShrink: 0, height: 24, padding: '0 3px',
+ borderRadius: 99, border: '1px solid transparent',
+ background: partial ? 'color-mix(in srgb, var(--accent) 12%, transparent)' : 'var(--bg-tertiary)',
+ ...style,
+ }}
+ >
+ <button type="button" aria-label={t('packing.packedLess')} disabled={packed <= 0} onClick={() => onChange(packed - 1)}
+ style={{ ...stepStyle, opacity: packed <= 0 ? 0.35 : 1, cursor: packed <= 0 ? 'default' : 'pointer' }}>
+ <Minus size={11} strokeWidth={2.5} />
+ </button>
+ <span style={{
+ minWidth: 30, textAlign: 'center', fontVariantNumeric: 'tabular-nums', fontWeight: 600,
+ fontSize: 'calc(11px * var(--fs-scale-caption, 1))',
+ color: partial ? 'var(--accent)' : 'var(--text-secondary)',
+ }}>
+ {packed}/{quantity}
+ </span>
+ <button type="button" aria-label={t('packing.packedMore')} disabled={packed >= quantity} onClick={() => onChange(packed + 1)}
+ style={{ ...stepStyle, opacity: packed >= quantity ? 0.35 : 1, cursor: packed >= quantity ? 'default' : 'pointer' }}>
+ <Plus size={11} strokeWidth={2.5} />
+ </button>
+ </div>
+ </Tooltip>
+ )
+}
diff --git a/client/src/components/Packing/packingListPanel.helpers.test.ts b/client/src/components/Packing/packingListPanel.helpers.test.ts
index 30f09d5bc..9d3eba0ba 100644
--- a/client/src/components/Packing/packingListPanel.helpers.test.ts
+++ b/client/src/components/Packing/packingListPanel.helpers.test.ts
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
-import { katColor, itemWeight, bagFillPct, bagTotalWeight, countsTowardsMyLoad, isMarkdownList, parseCsvLine, parseImportLines, sortItemsByName, unassignedTotalWeight } from './packingListPanel.helpers'
+import { katColor, itemWeight, bagFillPct, bagTotalWeight, countsTowardsMyLoad, isMarkdownList, newItemSharing, parseCsvLine, parseImportLines, sortItemsByName, unassignedTotalWeight } from './packingListPanel.helpers'
import { KAT_COLORS } from './packingListPanel.constants'
describe('packingListPanel.helpers', () => {
@@ -242,3 +242,25 @@ describe('packingListPanel.helpers', () => {
})
})
})
+
+describe('newItemSharing (#2241)', () => {
+ const mine = (id: number, category: string, recipients: number[]) =>
+ ({ id, name: `item ${id}`, category, is_private: 1, owner_id: 7, recipients: recipients.map(user_id => ({ user_id, username: `u${user_id}` })) })
+
+ it('shares a new item the way every own item of the category is shared', () => {
+ const items = [mine(1, 'Beach', [9, 8]), mine(2, 'Beach', [8, 9]), mine(3, 'Other', [])]
+ expect(newItemSharing(items, 'Beach', 'personal', 7)).toEqual({ visibility: 'shared', recipient_ids: [8, 9] })
+ })
+
+ it('keeps it to me when the category disagrees, keeps something private or is new', () => {
+ expect(newItemSharing([mine(1, 'Beach', [8]), mine(2, 'Beach', [9])], 'Beach', 'personal', 7)).toEqual({ visibility: 'personal' })
+ expect(newItemSharing([mine(1, 'Beach', [8]), mine(2, 'Beach', [])], 'Beach', 'personal', 7)).toEqual({ visibility: 'personal' })
+ expect(newItemSharing([], 'Beach', 'personal', 7)).toEqual({ visibility: 'personal' })
+ // Items shared to me by somebody else say nothing about how I share mine.
+ expect(newItemSharing([{ ...mine(1, 'Beach', [7]), owner_id: 8 }], 'Beach', 'personal', 7)).toEqual({ visibility: 'personal' })
+ })
+
+ it('the shared list stays common', () => {
+ expect(newItemSharing([mine(1, 'Beach', [8])], 'Beach', 'common', 7)).toEqual({ visibility: 'common' })
+ })
+})
diff --git a/client/src/components/Packing/packingListPanel.helpers.ts b/client/src/components/Packing/packingListPanel.helpers.ts
index 09884335f..fbafea8bc 100644
--- a/client/src/components/Packing/packingListPanel.helpers.ts
+++ b/client/src/components/Packing/packingListPanel.helpers.ts
@@ -196,3 +196,30 @@ export function sortItemsByName<T extends { name: string }>(items: T[], locale?:
return collator.compare(a.name.trim(), b.name.trim())
})
}
+
+/** The packed count an item shows (#2296): all of it once ticked, its partial count before that. */
+export function packedOf(item: { checked?: number | boolean; packed_quantity?: number | null; quantity?: number }): number {
+ return item.checked ? (item.quantity || 1) : (item.packed_quantity ?? 0)
+}
+
+type SharingItem = { category?: string | null; name: string; is_private?: number; owner_id?: number | null; recipients?: { user_id: number }[] }
+
+/**
+ * The tier a new item takes in the given category (#2241). In "my list" a category
+ * whose own items are all shared with the very same people shares the next one with
+ * them too, so a list kept for two does not need every new line shared by hand. Any
+ * difference between the items, or one kept to myself, and the new item stays mine
+ * alone: sharing is only ever carried over when the category is unanimous about it.
+ */
+export function newItemSharing(
+ items: SharingItem[],
+ category: string,
+ view: 'common' | 'personal',
+ userId: number | null | undefined,
+): { visibility: 'common' | 'personal' | 'shared'; recipient_ids?: number[] } {
+ if (view !== 'personal') return { visibility: 'common' }
+ const own = items.filter(i => i.category === category && i.name !== PACKING_PLACEHOLDER_NAME && !!i.is_private && i.owner_id === userId)
+ const sets = own.map(i => (i.recipients || []).map(r => r.user_id).sort((a, b) => a - b).join(','))
+ if (!own.length || !sets[0] || sets.some(set => set !== sets[0])) return { visibility: 'personal' }
+ return { visibility: 'shared', recipient_ids: sets[0].split(',').map(Number) }
+}
diff --git a/client/src/components/Packing/usePackingListPanel.ts b/client/src/components/Packing/usePackingListPanel.ts
index a3efe4509..df58a3365 100644
--- a/client/src/components/Packing/usePackingListPanel.ts
+++ b/client/src/components/Packing/usePackingListPanel.ts
@@ -11,7 +11,7 @@ import { useNetworkMode } from '../../hooks/useNetworkMode'
import { useBagTotalsPing } from './useBagTotalsPing'
import type { PackingItem, PackingBag } from '../../types'
import { BAG_COLORS, PACKING_PLACEHOLDER_NAME } from './packingListPanel.constants'
-import { parseImportLines, sortItemsByName } from './packingListPanel.helpers'
+import { newItemSharing, parseImportLines, sortItemsByName } from './packingListPanel.helpers'
const PACKING_SORT_KEY = 'trek:packing-sort'
@@ -153,8 +153,9 @@ export function usePackingList({ tripId, items, openImportSignal = 0, addCategor
if (placeholder) {
await updatePackingItem(tripId, placeholder.id, { name })
} else {
- // New items inherit the active view's tier: Personal in "my list", Common otherwise.
- await addPackingItem(tripId, { name, category, visibility: view === 'personal' ? 'personal' : 'common' } as Parameters<typeof addPackingItem>[1])
+ // New items inherit the active view's tier, and in "my list" the sharing the
+ // category's own items agree on (#2241).
+ await addPackingItem(tripId, { name, category, ...newItemSharing(items, category, view, currentUserId) } as Parameters<typeof addPackingItem>[1])
}
} catch { toast.error(t('packing.toast.addError')) }
}
diff --git a/client/src/components/Planner/AddressInput.tsx b/client/src/components/Planner/AddressInput.tsx
index 13ce18ef2..332fca8d1 100644
--- a/client/src/components/Planner/AddressInput.tsx
+++ b/client/src/components/Planner/AddressInput.tsx
@@ -3,6 +3,7 @@ import { MapPin } from 'lucide-react'
import { mapsApi } from '../../api/client'
import { useTranslation } from '../../i18n'
import { useLocationBias } from '../../hooks/useLocationBias'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
interface Props {
value: string
@@ -17,6 +18,7 @@ interface Props {
// is never lost, and picking a suggestion just replaces the text (#1496).
export default function AddressInput({ value, onChange, placeholder, className }: Props) {
const { t, locale } = useTranslation()
+ const placeLang = usePlaceLanguage()
// Ohne Reisekontext ist der Hinweis leer, und die Suche laeuft wie bisher.
const { point: locationBias } = useLocationBias()
const [open, setOpen] = useState(false)
@@ -50,7 +52,7 @@ export default function AddressInput({ value, onChange, placeholder, className }
const myReq = ++reqIdRef.current
setLoading(true)
try {
- const data = await mapsApi.search(trimmed, locale, locationBias)
+ const data = await mapsApi.search(trimmed, placeLang, locationBias)
if (myReq !== reqIdRef.current) return
setResults(data.places || [])
setHighlight(-1)
diff --git a/client/src/components/Planner/DayDetailPanel.test.tsx b/client/src/components/Planner/DayDetailPanel.test.tsx
index 17aa14c0b..03494c12c 100644
--- a/client/src/components/Planner/DayDetailPanel.test.tsx
+++ b/client/src/components/Planner/DayDetailPanel.test.tsx
@@ -2221,4 +2221,35 @@ describe('DayDetailPanel opening a booking', () => {
expect(screen.queryByRole('button', { name: /Grand Hotel Booking/ })).toBeNull();
expect(screen.getByRole('button', { name: '#XY99' })).toHaveAttribute('aria-pressed', 'false');
});
+
+ it('FE-PLANNER-DAYDETAIL-099: the arrival day shows only the check-in time and the middle night shows neither', async () => {
+ const middleDay = buildDay({ id: 2, trip_id: 1, date: '2025-06-16', title: 'Middle Day' });
+ server.use(
+ http.get('/api/trips/1/accommodations', () =>
+ HttpResponse.json({
+ accommodations: [{
+ id: 1, place_id: 5, place_name: 'Grand Hotel', place_address: 'Paris',
+ start_day_id: 1, end_day_id: 3, check_in: '14:00', check_out: '11:00', confirmation: null,
+ }],
+ })
+ ),
+ );
+ const { unmount } = render(<DayDetailPanel {...defaultProps} />);
+ await screen.findByText('14:00');
+ expect(screen.queryByText('11:00')).toBeNull();
+ unmount();
+ render(<DayDetailPanel {...defaultProps} day={middleDay} days={[day, middleDay]} />);
+ await screen.findByText('Grand Hotel');
+ expect(screen.queryByText('14:00')).toBeNull();
+ expect(screen.queryByText('11:00')).toBeNull();
+ });
+
+ it('FE-PLANNER-DAYDETAIL-100: date-first headings lead with the date and name the day second', async () => {
+ seedStore(useSettingsStore, {
+ settings: { time_format: '24h', temperature_unit: 'celsius', day_date_first: true },
+ });
+ render(<DayDetailPanel {...defaultProps} />);
+ const title = await screen.findByText(/June 15/);
+ expect(title.className).toContain('font-bold');
+ });
});
diff --git a/client/src/components/Planner/DayDetailPanel.tsx b/client/src/components/Planner/DayDetailPanel.tsx
index 54e2ec408..5874c8d18 100644
--- a/client/src/components/Planner/DayDetailPanel.tsx
+++ b/client/src/components/Planner/DayDetailPanel.tsx
@@ -11,6 +11,8 @@ import CustomTimePicker from '../shared/CustomTimePicker'
import { BlurredCode, BookingCodeInput } from '../shared/BookingCode'
import { Tooltip } from '../shared/Tooltip'
import { useSettingsStore } from '../../store/settingsStore'
+import { dayHeadingParts } from '../../utils/dayLabel'
+import { stayDayTimes } from './stayDayTimes'
import { useToast } from '../shared/Toast'
import { getLocaleForLanguage, useTranslation } from '../../i18n'
import type { Day, Place, Category, Reservation, AssignmentsMap, Accommodation } from '../../types'
@@ -82,6 +84,7 @@ export default function DayDetailPanel({ day, days, places, categories = [], tri
const canEditDays = can('day_edit', tripObj)
const isFahrenheit = useSettingsStore(s => s.settings.temperature_unit) === 'fahrenheit'
const is12h = useSettingsStore(s => s.settings.time_format) === '12h'
+ const dateFirst = useSettingsStore(s => s.settings.day_date_first === true)
const collapsed = collapsedProp
const toggleCollapse = () => onToggleCollapse?.()
@@ -147,7 +150,7 @@ export default function DayDetailPanel({ day, days, places, categories = [], tri
getLocaleForLanguage(language),
{ weekday: 'long', day: 'numeric', month: 'long', timeZone: 'UTC' }
) : null
- const dayTitle = day.title || t('planner.dayN', { n: (days.indexOf(day) + 1) || '?' })
+ const heading = dayHeadingParts(day.title || t('planner.dayN', { n: (days.indexOf(day) + 1) || '?' }), formattedDate, dateFirst)
const showError = (err: unknown) => toast.error(apiErrorMessage(err) || t('common.unknownError'))
// Saving the picker: a new stay or the one being edited. Both say what went
@@ -199,12 +202,12 @@ export default function DayDetailPanel({ day, days, places, categories = [], tri
/>
) : collapsed ? (
<div className="truncate font-bold text-content" style={fs(13.5, 'body')}>
- {dayTitle}
- {formattedDate && <span className="ml-2 font-medium text-content-muted">{formattedDate}</span>}
+ {heading.primary}
+ {heading.secondary && <span className="ml-2 font-medium text-content-muted">{heading.secondary}</span>}
</div>
) : (
<div className="flex min-w-0 items-center gap-1">
- <span className="truncate font-bold tracking-[-0.01em] text-content" style={fs(17, 'subtitle')}>{dayTitle}</span>
+ <span className="truncate font-bold tracking-[-0.01em] text-content" style={fs(17, 'subtitle')}>{heading.primary}</span>
{canEditDays && onUpdateDayTitle && (
<Tooltip label={t('common.edit')}>
<button type="button" onClick={startRename} aria-label={t('common.edit')}
@@ -215,7 +218,7 @@ export default function DayDetailPanel({ day, days, places, categories = [], tri
)}
</div>
)}
- {!collapsed && formattedDate && <div className="mt-0.5 truncate font-geist text-content-muted" style={fs(12.5)}>{formattedDate}</div>}
+ {!collapsed && heading.secondary && <div className="mt-0.5 truncate font-geist text-content-muted" style={fs(12.5)}>{heading.secondary}</div>}
</div>
<HeadButton label={collapsed ? t('common.expand') : t('common.collapse')} expanded={!collapsed}
onClick={() => toggleCollapse()}>
@@ -457,8 +460,9 @@ function AccommodationCard({ acc, day, linked, canEdit, onEdit, onRemove, onOpen
const leaving = isCheckOutDay && !isCheckInDay
const tint = isCheckInDay ? tintOf('var(--success)') : isCheckOutDay ? tintOf('var(--danger)') : NEUTRAL_TINT
const cells: { label: string; value: ReactNode }[] = []
- if (acc.check_in) cells.push({ label: t('day.checkIn'), value: `${fmtTime(acc.check_in)}${acc.check_in_end ? ` – ${fmtTime(acc.check_in_end)}` : ''}` })
- if (acc.check_out) cells.push({ label: t('day.checkOut'), value: fmtTime(acc.check_out) })
+ const times = stayDayTimes(acc, day.id)
+ if (times.checkIn && acc.check_in) cells.push({ label: t('day.checkIn'), value: `${fmtTime(acc.check_in)}${acc.check_in_end ? ` – ${fmtTime(acc.check_in_end)}` : ''}` })
+ if (times.checkOut && acc.check_out) cells.push({ label: t('day.checkOut'), value: fmtTime(acc.check_out) })
if (acc.confirmation) cells.push({ label: t('day.confirmation'), value: <BlurredCode className="font-geist">{acc.confirmation}</BlurredCode> })
const confirmed = linked?.status === 'confirmed'
diff --git a/client/src/components/Planner/DayPlanSidebar.constants.ts b/client/src/components/Planner/DayPlanSidebar.constants.ts
index 63f36a8df..981fc94c4 100644
--- a/client/src/components/Planner/DayPlanSidebar.constants.ts
+++ b/client/src/components/Planner/DayPlanSidebar.constants.ts
@@ -1,11 +1,11 @@
import {
FileText, Info, Clock, MapPin, Navigation, Train, Plane, Bus, Car, Ship,
Coffee, Ticket, Star, Heart, Camera, Flag, Lightbulb, AlertTriangle,
- ShoppingBag, Bookmark, Hotel, Utensils, Users, Sailboat, Bike, CarTaxiFront, Route, TramFront,
+ ShoppingBag, Bookmark, Hotel, Utensils, Users, Sailboat, CableCar, Bike, CarTaxiFront, Route, TramFront,
Wine, ParkingSquare, Fuel, Footprints, Mountain, Waves, Sun, Umbrella, Music, Landmark, Gift,
} from 'lucide-react'
-export const RES_ICONS = { flight: Plane, hotel: Hotel, restaurant: Utensils, train: Train, car: Car, cruise: Ship, bus: Bus, ferry: Sailboat, bicycle: Bike, taxi: CarTaxiFront, transit: TramFront, transport_other: Route, event: Ticket, tour: Users, parking: ParkingSquare, other: FileText }
+export const RES_ICONS = { flight: Plane, hotel: Hotel, restaurant: Utensils, train: Train, car: Car, cruise: Ship, bus: Bus, ferry: Sailboat, cable_car: CableCar, bicycle: Bike, taxi: CarTaxiFront, transit: TramFront, transport_other: Route, event: Ticket, tour: Users, parking: ParkingSquare, other: FileText }
export const NOTE_ICONS = [
{ id: 'FileText', Icon: FileText },
@@ -46,8 +46,8 @@ export function getNoteIcon(iconId) { return NOTE_ICON_MAP[iconId] || FileText }
export const TYPE_ICONS = {
flight: '✈️', hotel: '🏨', restaurant: '🍽️', train: '🚆',
- car: '🚗', cruise: '🚢', bus: '🚌', ferry: '⛴️', bicycle: '🚲', taxi: '🚕',
+ car: '🚗', cruise: '🚢', bus: '🚌', ferry: '⛴️', cable_car: '🚡', bicycle: '🚲', taxi: '🚕',
transport_other: '🧭', event: '🎫', parking: '🅿️', other: '📋',
}
-export const TRANSPORT_DETAIL_COLORS = { flight: '#3b82f6', train: '#06b6d4', bus: '#059669', ferry: '#0d9488', bicycle: '#84cc16', taxi: '#ca8a04', car: '#6b7280', cruise: '#0ea5e9', transit: '#7c3aed', transport_other: '#6b7280' }
+export const TRANSPORT_DETAIL_COLORS = { flight: '#3b82f6', train: '#06b6d4', bus: '#059669', ferry: '#0d9488', cable_car: '#dc2626', bicycle: '#84cc16', taxi: '#ca8a04', car: '#6b7280', cruise: '#0ea5e9', transit: '#7c3aed', transport_other: '#6b7280' }
diff --git a/client/src/components/Planner/DayPlanSidebar.test.tsx b/client/src/components/Planner/DayPlanSidebar.test.tsx
index c127d57dd..5340255d1 100644
--- a/client/src/components/Planner/DayPlanSidebar.test.tsx
+++ b/client/src/components/Planner/DayPlanSidebar.test.tsx
@@ -850,9 +850,9 @@ describe('DayPlanSidebar', () => {
] },
trip: buildTrip({ id: 1, currency: 'NOK' }),
})} />)
- // $25 + 250 NOK / 10 = $50, marked as approximate; footer and day header agree.
+ // $25 + 250 NOK / 10 = $50, marked as approximate. The day header carries no money.
await waitFor(() => expect(screen.getByText('≈ $50.00')).toBeInTheDocument())
- expect(screen.getByText('≈ $50')).toBeInTheDocument()
+ expect(screen.queryByText('≈ $50')).toBeNull()
})
it('FE-PLANNER-DAYPLAN-037c: falls back to a per-currency breakdown when rates are unavailable (#1561)', async () => {
@@ -876,7 +876,7 @@ describe('DayPlanSidebar', () => {
expect(screen.queryByText(/5\s?230/)).toBeNull()
})
- it('FE-PLANNER-DAYPLAN-037d: with Costs on, the day and the total follow the expenses, and drop one that is deleted (#2551)', async () => {
+ it('FE-PLANNER-DAYPLAN-037d: with Costs on, the total follows the expenses and drops one that is deleted (#2551)', async () => {
seedStore(useAddonStore, { addons: [{ id: 'budget', name: 'Costs', type: 'trip', icon: 'wallet', enabled: true }], loaded: true })
// The price on the place is not an expense: it stays out of both figures.
const place = buildPlace({ id: 1, name: 'Hanging Bridges', price: 999 })
@@ -890,8 +890,8 @@ describe('DayPlanSidebar', () => {
assignments: { '10': [buildAssignment({ id: 1, day_id: 10, order_index: 0, place })] },
trip: buildTrip({ id: 1, currency: 'EUR' }),
})} />)
- // The ticket is on the day of its place; the insurance belongs to no day but to the trip.
- expect(screen.getByText(/^60\s€$/)).toBeInTheDocument()
+ // Both count toward the trip; the day header itself shows no amount.
+ expect(screen.queryByText(/^60\s€$/)).toBeNull()
expect(screen.getByText(/^100,00\s€$/)).toBeInTheDocument()
expect(screen.queryByText(/999/)).toBeNull()
@@ -3925,7 +3925,7 @@ describe('DayPlanSidebar', () => {
expect(toggle).toHaveAccessibleName('Keep position during route optimization')
})
- it('FE-PLANNER-DAYPLAN-167: the place context menu opens the website, maps and collection actions', async () => {
+ it('FE-PLANNER-DAYPLAN-167: the place context menu opens the website but offers no navigation apps', async () => {
const user = userEvent.setup()
const openSpy = vi.spyOn(window, 'open').mockReturnValue(null)
const place = buildPlace({ id: 1, name: 'Louvre', website: 'https://louvre.fr', google_place_id: 'abc' })
@@ -3936,10 +3936,9 @@ describe('DayPlanSidebar', () => {
await user.click(screen.getByRole('button', { name: 'Open Website' }))
expect(openSpy).toHaveBeenCalledWith('https://louvre.fr', '_blank', 'noopener,noreferrer')
+ // Navigation lives on the place's own Navigation button, not in this menu.
fireEvent.contextMenu(dragRow(screen.getByText('Louvre')))
- await user.click(screen.getByRole('button', { name: 'Google Maps' }))
- expect(openSpy).toHaveBeenCalledTimes(2)
- expect(openSpy.mock.calls[1][0]).toContain('google.com/maps')
+ expect(screen.queryByRole('button', { name: 'Google Maps' })).not.toBeInTheDocument()
openSpy.mockRestore()
})
@@ -5055,4 +5054,14 @@ describe('the day route-tools row', () => {
/* The click itself is already pinned by FE-PLANNER-DAYPLAN-038 above, which
finds the button the same way. */
+
+ it('FE-PLANNER-DAYPLAN-235: with "date first" the day heading leads with its date', () => {
+ seedStore(useSettingsStore, { settings: { time_format: '24h', temperature_unit: 'celsius', day_date_first: true } } as any)
+ const day = buildDay({ id: 10, date: '2025-06-01', title: null })
+ render(<DayPlanSidebar {...makeDefaultProps({ days: [day], assignments: {} })} />)
+ const secondary = screen.getByText('Day 1')
+ expect(secondary.className).toContain('text-content-faint')
+ expect(secondary.previousElementSibling?.className).toContain('font-bold')
+ })
})
+
diff --git a/client/src/components/Planner/DayPlanSidebar.tsx b/client/src/components/Planner/DayPlanSidebar.tsx
index 64360b0da..70456de6b 100644
--- a/client/src/components/Planner/DayPlanSidebar.tsx
+++ b/client/src/components/Planner/DayPlanSidebar.tsx
@@ -7,7 +7,7 @@ declare global { interface Window { __dragData: DragDataPayload | null } }
import React, { useState, useEffect, useLayoutEffect, useRef, useMemo, useCallback } from 'react'
import { avatarSrc } from '../../utils/avatarSrc'
import { safeHttpUrl } from '../../utils/safeUrl'
-import { ChevronDown, ChevronRight, ChevronUp, Compass, Navigation, RotateCcw, ExternalLink, Pencil, GripVertical, Ticket, Plus, FileText, Trash2, Car, Lock, Hotel, Footprints, Route as RouteIcon, Bookmark, StickyNote, TramFront, Zap, MapPin, Wallet, Globe } from 'lucide-react'
+import { ChevronDown, ChevronRight, ChevronUp, Compass, RotateCcw, ExternalLink, Pencil, GripVertical, Ticket, Plus, FileText, Trash2, Car, Lock, Hotel, Eraser, Route as RouteIcon, RouteOff, Bookmark, StickyNote, TramFront, Zap, MapPin, Globe } from 'lucide-react'
import { type PickedPlace } from './TransitSearchPanel'
import { buildTransitLeg, buildTransitNameIndex } from './transitLeg'
import { assignmentsApi, reservationsApi, daysApi } from '../../api/client'
@@ -26,10 +26,10 @@ import { useTripStore } from '../../store/tripStore'
import { useCanDo } from '../../store/permissionsStore'
import { useSettingsStore } from '../../store/settingsStore'
import { useAddonStore } from '../../store/addonStore'
-import { usePluginStore } from '../../store/pluginStore'
import { useSaveToCollectionStore } from '../../store/saveToCollectionStore'
import { placeToSaveTarget } from '../Collections/saveTarget'
import { useTranslation } from '../../i18n'
+import { routeModeIcon, useRouteModeOptions } from './routeModes'
import { Tooltip } from '../shared/Tooltip'
import { NEUTRAL_TINT, fs } from '../shared/DialogShell'
import { BarButton, MoreButton, SoftPill, TimePill, tintOf } from './planParts'
@@ -49,6 +49,8 @@ import {
} from '../../utils/dayMerge'
import { withinDriveRange } from '@trek/shared/roadtrip'
import { formatDate, formatTime, formatMoneySum, splitReservationDateTime } from '../../utils/formatters'
+import { dayHeadingParts } from '../../utils/dayLabel'
+import { pendingStayIds } from '../../utils/pendingStays'
import { planCosts } from './planCosts'
import { useDayNotes } from '../../hooks/useDayNotes'
import { useExchangeRates } from '../../hooks/useExchangeRates'
@@ -69,7 +71,6 @@ import { DayPlanSidebarFooter } from './DayPlanSidebarFooter'
import type { DayAddControls } from '../../utils/dayAdd'
import type { DayDeleteQuestion } from '../../utils/dayImpactLines'
import type { Trip, Day, Place, Category, Assignment, Accommodation, Reservation, AssignmentsMap, RouteResult, RouteSegment, DayNote } from '../../types'
-import { getNavigationTargets, openNavigationTarget } from './placeNavigation'
interface DayPlanSidebarProps {
tripId: number
@@ -94,6 +95,8 @@ interface DayPlanSidebarProps {
onDeleteDay?: (dayId: number) => void
/** The open delete question, which the reorder dialog asks in place of its list. */
deleteDayQuestion?: DayDeleteQuestion | null
+ /** Asks to take every place off a day (#2470); the planner owns the question. */
+ onClearDay?: (dayId: number) => void
/** Renaming lives in the day-detail panel (#1065); the sidebar only forwards the prop. */
onUpdateDayTitle: (dayId: number, title: string) => void
/** The day route is computed by the planner page itself; kept for the existing call sites. */
@@ -651,6 +654,8 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
// flight, not a drive — and surface it as a bogus connector distance (#1394).
let curHasPlace = false
for (const it of merged) {
+ // A stop out of the route (#2532) is passed by, like a note.
+ if (it.type === 'place' && it.data.route_excluded) continue
if (it.type === 'place' && it.data.place?.lat && it.data.place?.lng) {
// Mirror of the guard below: the open run may hold nothing but a far-away
// arrival endpoint, which is no more drivable in this direction (#2133).
@@ -709,7 +714,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
// is one you flew out of or landed at rather than drove between (#2133).
const wayPts: { lat: number; lng: number; isPlace: boolean; time: string | null; carrierEdge?: CarrierEdge; leg_transport_mode?: string | null; incoming_leg_transport_mode?: string | null; id?: number }[] = []
for (const it of merged) {
- if (it.type === 'place' && it.data.place?.lat && it.data.place?.lng) {
+ if (it.type === 'place' && it.data.place?.lat && it.data.place?.lng && !it.data.route_excluded) {
wayPts.push({ lat: it.data.place.lat, lng: it.data.place.lng, isPlace: true, time: it.data.place?.place_time ?? null, leg_transport_mode: it.data.leg_transport_mode ?? null, incoming_leg_transport_mode: it.data.incoming_leg_transport_mode ?? null, id: it.data.id })
} else if (it.type === 'transport') {
const { from, to } = getTransportRouteEndpoints(it.data, dayId)
@@ -1164,14 +1169,12 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
window.__dragData = null
}
- // The day pills and Total Cost read the expenses in Costs when it is on (#2551).
+ // Total Cost reads the expenses in Costs when it is on (#2551).
const budgetItems = useTripStore(s => s.budgetItems)
const costsEnabled = useAddonStore(s => s.isEnabled('budget'))
- const { totalCostLabel, dayCostLabels } = useMemo(() => {
+ const totalCostLabel = useMemo(() => {
const costs = planCosts({ days, assignments, reservations, budgetItems, costsEnabled, tripCurrency: currency })
- const labels = new Map<number, string | null>()
- for (const [dayId, entries] of costs.byDay) labels.set(dayId, formatMoneySum(entries, costBase, locale, fxRates, { decimals: 0 }))
- return { totalCostLabel: formatMoneySum(costs.total, costBase, locale, fxRates), dayCostLabels: labels }
+ return formatMoneySum(costs.total, costBase, locale, fxRates)
}, [days, assignments, reservations, budgetItems, costsEnabled, currency, costBase, locale, fxRates])
return {
@@ -1316,7 +1319,6 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
handleOptimize,
handleDropOnDay,
totalCostLabel,
- dayCostLabels,
expandedRouteDayIds,
setExpandedRouteDayIds,
}
@@ -1334,6 +1336,7 @@ const NARROW_PLAN_PX = 320
const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarProps) {
const S = useDayPlanSidebar(props)
+ const onClearDay = props.onClearDay
// The plan sidebar is resizable. Below this the route button's own word is the
// first thing that stops fitting beside the two export buttons — the icon says
// the same thing, and the accessible name still spells it out.
@@ -1359,27 +1362,14 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
// Needed by the route-tools visibility gate in the render below (#1330); the hook
// keeps its own copy, so read it reactively here in the component scope too.
const optimizeFromAccommodation = useSettingsStore(s => s.settings.optimize_from_accommodation)
+ const dateFirst = useSettingsStore(s => s.settings.day_date_first === true)
const collectionsEnabled = useAddonStore(s => s.isEnabled('collections'))
- // Route-profile picker entries: the two built-ins plus every profile an active
- // routeProvider plugin declared (keyed 'plugin:<id>/<profile>', labeled by the
- // plugin's manifest). The feed only lists granted providers.
- const activePlugins = usePluginStore(s => s.plugins)
// Plugin time contributions in the day plan (dayScheduleProvider hook).
const daySchedule = usePluginDaySchedule(S.tripId)
// Per-day colours from the dayTintProvider hook — e.g. which leg of the trip a
// day belongs to. Empty unless a granted plugin provides them.
const dayTints = usePluginDayTints(S.tripId)
- const tr = S.t
- const routeProfileOptions = useMemo(() => {
- const opts: Array<{ key: string; label: string }> = [
- { key: 'driving', label: tr('mobileTrip.profileDriving') },
- { key: 'walking', label: tr('mobileTrip.profileWalking') },
- ]
- for (const p of activePlugins) {
- for (const prof of p.routeProfiles ?? []) opts.push({ key: `plugin:${p.id}/${prof.id}`, label: prof.label })
- }
- return opts
- }, [activePlugins, tr])
+ const routeProfileOptions = useRouteModeOptions()
const {
tripId,
trip,
@@ -1522,17 +1512,16 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
handleOptimize,
handleDropOnDay,
totalCostLabel,
- dayCostLabels,
expandedRouteDayIds,
setExpandedRouteDayIds,
} = S
+ // Stays still waiting for their booking to be confirmed, for the day pills (#2281).
+ const pendingStays = useMemo(() => pendingStayIds(reservations), [reservations])
// Rows that can be dragged lead with a grip; the rest keep its room so every tile lines up.
const gripsShown = canEditDays && !dragDisabled
// ── Per-segment / per-day travel mode (#1281) ──────────────────────────────
- // Icon per mode, matching the route picker (driving→Car, walking→Footprints,
- // any plugin profile→Zap).
- const modeIcon = (key: string) => (key === 'walking' ? Footprints : key.startsWith('plugin:') ? Zap : Car)
+ const modeIcon = routeModeIcon
// Set the mode of the leg LEAVING this stop. Optimistic (the connector + map
// recompute from the store), then persisted; null clears the override so the leg
@@ -1679,8 +1668,8 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
}
const isExpanded = expandedDays.has(day.id)
const da = getDayAssignments(day.id)
- const cost = dayCostLabels.get(day.id) ?? null
const formattedDate = formatDate(day.date, locale)
+ const heading = dayHeadingParts(day.title || t('dayplan.dayN', { n: index + 1 }), formattedDate, dateFirst)
const loc = da.find(a => a.place?.lat && a.place?.lng)
// Route tools normally need 2+ stops, but a single located place is still
// routable when accommodation optimization can bookend it with a hotel
@@ -1798,6 +1787,14 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
onPlanTransit && { label: t('transit.title'), icon: TramFront, onClick: () => onPlanTransit(day.id) },
{ label: t('dayplan.addNote'), icon: FileText, onClick: () => openAddNote(day.id, undefined) },
].filter(Boolean)
+ // Right-click on the head: what can be added, and emptying the day (#2470).
+ const dayMenuItems = [
+ ...addItems,
+ ...(onClearDay && da.length > 0 ? [
+ { divider: true },
+ { label: t('dayplan.clearDay'), icon: Eraser, danger: true, onClick: () => onClearDay(day.id) },
+ ] : []),
+ ]
return (
// One card per day, in the language of the booking cards: a head band
@@ -1830,6 +1827,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
onDragOver={e => { e.preventDefault(); if (dragOverDayId !== day.id) setDragOverDayId(day.id) }}
onDragLeave={e => { if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setDragOverDayId(null) }}
onDrop={e => handleDropOnDay(e, day.id)}
+ onContextMenu={canEditDays ? e => ctxMenu.open(e, dayMenuItems) : undefined}
style={{
display: 'flex', alignItems: 'flex-start', gap: 10,
padding: '10px 8px 10px 10px',
@@ -1878,15 +1876,15 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
<div className="min-w-0 flex-1 pt-px">
<div className="flex min-w-0 items-baseline gap-2">
<span className="min-w-0 truncate font-bold text-content" style={fs(13.5, 'body')}>
- {day.title || t('dayplan.dayN', { n: index + 1 })}
+ {heading.primary}
</span>
- {formattedDate && (
+ {heading.secondary && (
<span className="flex-none whitespace-nowrap text-content-faint" style={fs(11)}>
- {formattedDate}
+ {heading.secondary}
</span>
)}
</div>
- {(dayAccs.length > 0 || activeRentals.length > 0 || cost || dayTint?.label) && (
+ {(dayAccs.length > 0 || activeRentals.length > 0 || dayTint?.label) && (
<div className="mt-1.5 flex min-w-0 flex-wrap items-center gap-1">
{dayAccs.map(acc => {
const isCheckIn = acc.start_day_id === day.id
@@ -1896,11 +1894,15 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
// check-out red, a stay in between quiet.
const state = isCheckOut && !isCheckIn ? t('day.checkOut') : isCheckIn ? t('day.checkIn') : null
const iconTone = isCheckOut && !isCheckIn ? 'text-danger' : isCheckIn ? 'text-success' : 'text-content-faint'
+ // Not confirmed yet: a dashed ring says so at a glance, the tooltip in words (#2281).
+ const pending = pendingStays.has(acc.id)
+ const named = state ? `${state}: ${accName}` : accName
+ const tip = pending ? `${named} (${t('reservations.pending')})` : named
return (
- <Tooltip key={acc.id} label={state ? `${state}: ${accName}` : accName}>
- <button type="button" data-dp="day-pill"
+ <Tooltip key={acc.id} label={tip}>
+ <button type="button" data-dp="day-pill" data-pending={pending || undefined}
onClick={e => { e.stopPropagation(); if ((acc as any).place_id) onPlaceClick((acc as any).place_id) }}
- className="inline-flex min-w-0 max-w-full items-center gap-1 rounded-full bg-surface-card px-2 py-[2px] font-geist font-normal text-content-secondary shadow-sm hover:text-content"
+ className={`inline-flex min-w-0 max-w-full items-center gap-1 rounded-full px-2 py-[2px] font-geist font-normal text-content-secondary hover:text-content ${pending ? 'border border-dashed border-warning bg-warning-soft' : 'bg-surface-card shadow-sm'}`}
style={{ ...fs(10.5), cursor: (acc as any).place_id ? 'pointer' : 'default' }}>
<Hotel size={11} strokeWidth={2} className={`flex-none ${iconTone}`} />
<span className="truncate">{accName}</span>
@@ -1917,7 +1919,6 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
<span className="truncate">{r.title}</span>
</button>
))}
- {cost && <SoftPill tone="success" icon={<Wallet size={10} strokeWidth={2.2} />}>{cost}</SoftPill>}
{/* A plugin's name for this day (which leg of the trip it belongs to). */}
{dayTint?.label && <SoftPill>{dayTint.label}</SoftPill>}
</div>
@@ -2110,13 +2111,15 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
const isLocked = lockedIds.has(assignment.id)
// The actions a right-click offers; the row's "…" offers the same, so a
// mouse that never right-clicks and the keyboard reach them too.
- // Flat entries, one per navigation app: a submenu would need a
- // component that does not exist here.
const placeMenu = () => [
canEditPlaces && onEditPlace && { label: t('common.edit'), icon: Pencil, onClick: () => onEditPlace(place, assignment.id) },
canEditDays && onRemoveAssignment && { label: t('planner.removeFromDay'), icon: Trash2, onClick: () => onRemoveAssignment(day.id, assignment.id) },
+ canEditDays && place.lat != null && place.lng != null && {
+ label: assignment.route_excluded ? t('dayplan.includeInRoute') : t('dayplan.excludeFromRoute'),
+ icon: assignment.route_excluded ? RouteIcon : RouteOff,
+ onClick: () => { tripActions.setAssignmentRouteExcluded(tripId, day.id, assignment.id, !assignment.route_excluded).catch((err: unknown) => toast.error(err instanceof Error ? err.message : t('common.unknownError'))) },
+ },
safeHttpUrl(place.website) && { label: t('inspector.website'), icon: ExternalLink, onClick: () => window.open(safeHttpUrl(place.website)!, '_blank', 'noopener,noreferrer') },
- ...getNavigationTargets(place).map(target => ({ label: target.label, icon: Navigation, onClick: () => openNavigationTarget(target) })),
collectionsEnabled && { label: t('inspector.saveToCollection'), icon: Bookmark, onClick: () => useSaveToCollectionStore.getState().open(placeToSaveTarget(place)) },
{ divider: true },
canEditPlaces && onDeletePlace && { label: t('common.delete'), icon: Trash2, danger: true, onClick: () => onDeletePlace(place.id) },
@@ -2245,6 +2248,15 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
<span className="min-w-0 truncate font-semibold text-content" style={{ ...fs(13, 'body'), lineHeight: 1.25 }}>
{place.name}
</span>
+ {assignment.route_excluded && (
+ // Kept on the day but passed by (#2532): said once, beside the name.
+ <Tooltip label={t('dayplan.offRouteHint')}>
+ <span className="inline-flex flex-none items-center gap-1 rounded-full bg-surface-secondary px-1.5 py-[1px] font-geist font-semibold text-content-muted" style={fs(9.5)}>
+ <RouteOff size={10} strokeWidth={2.2} />
+ {t('dayplan.offRoute')}
+ </span>
+ </Tooltip>
+ )}
</div>
{(place.place_time || place.description || place.address || cat?.name) && (
<div className="mt-0.5 flex min-w-0 items-center gap-1.5">
@@ -2848,7 +2860,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
{/* The day's travel mode as one segmented control. */}
<div className={`inline-flex h-8 flex-none items-center gap-0.5 rounded-[10px] p-[3px] ${ROUTE_TOOL}`}>
{routeProfileOptions.map(p => {
- const ModeIcon = p.key === 'driving' ? Car : p.key === 'walking' ? Footprints : Zap
+ const ModeIcon = routeModeIcon(p.key)
const active = (day.default_transport_mode ?? routeProfile) === p.key
return (
<Tooltip key={p.key} label={p.label} placement="top">
diff --git a/client/src/components/Planner/DayPlanSidebarRouteConnector.tsx b/client/src/components/Planner/DayPlanSidebarRouteConnector.tsx
index 246a30aa5..898fefb9b 100644
--- a/client/src/components/Planner/DayPlanSidebarRouteConnector.tsx
+++ b/client/src/components/Planner/DayPlanSidebarRouteConnector.tsx
@@ -1,22 +1,14 @@
-import { Car, Footprints, Hotel, Zap } from 'lucide-react'
+import { Hotel } from 'lucide-react'
import type { RouteSegment } from '../../types'
import { fs } from '../shared/DialogShell'
-
-// Walking gets the foot icon; a plugin route profile ('plugin:…') gets the bolt —
-// its legs carry the profile-true durationText anyway, the icon just signals that
-// the time came from a plugin router (e.g. EV routing with charge time folded in).
-export function profileIcon(profile: string) {
- if (profile === 'walking') return Footprints
- if (profile.startsWith('plugin:')) return Zap
- return Car
-}
+import { routeModeIcon } from './routeModes'
/** The leg's figures as one quiet pill: mode, time, distance and a router note, side by side. */
function LegPill({ seg, profile }: { seg: RouteSegment; profile: string }) {
// The leg's own mode (#1281) wins over the day-wide fallback for icon + text.
const effProfile = seg.mode ?? profile
const driving = effProfile !== 'walking'
- const Icon = profileIcon(effProfile)
+ const Icon = routeModeIcon(effProfile)
return (
<span className="inline-flex flex-none items-center gap-1.5 whitespace-nowrap rounded-full bg-surface-secondary px-2 py-[2px] font-geist font-semibold tabular-nums text-content-muted" style={fs(10)}>
<Icon size={11} strokeWidth={2} className="flex-none" />
diff --git a/client/src/components/Planner/FileImportModal.tsx b/client/src/components/Planner/FileImportModal.tsx
index e051fdb6d..519f041af 100644
--- a/client/src/components/Planner/FileImportModal.tsx
+++ b/client/src/components/Planner/FileImportModal.tsx
@@ -5,6 +5,8 @@ import { useTranslation } from '../../i18n'
import { useToast } from '../shared/Toast'
import { placesApi } from '../../api/client'
import { useTripStore } from '../../store/tripStore'
+import { useAuthStore } from '../../store/authStore'
+import ToggleSwitch from '../Settings/ToggleSwitch'
import {
DialogButton, DialogFooter, DialogHeader, DialogSection, DialogShell, DialogTile, FooterSpacer, NEUTRAL_TINT, fs,
} from '../shared/DialogShell'
@@ -57,6 +59,10 @@ export default function FileImportModal({ isOpen, onClose, tripId, pushUndo, ini
const [summary, setSummary] = useState<PlacesImportSummary | null>(null)
const [gpxOpts, setGpxOpts] = useState({ waypoints: true, routes: true, tracks: true })
const [kmlOpts, setKmlOpts] = useState({ points: true, paths: true })
+ // The Google pass a list import offers, for the points of a file too (#2536).
+ const canEnrichImport = useAuthStore(s => s.hasMapsKey)
+ const [enrich, setEnrich] = useState(false)
+ const enrichHintId = useId()
const validateFile = (f: File): string | null => {
const ext = f.name.toLowerCase().split('.').pop()
@@ -168,13 +174,13 @@ export default function FileImportModal({ isOpen, onClose, tripId, pushUndo, ini
try {
if (ext === 'gpx') {
importedGpx = true
- const result = await placesApi.importGpx(tripId, f, gpxOpts)
+ const result = await placesApi.importGpx(tripId, f, { ...gpxOpts, enrich: enrich && canEnrichImport })
totalCreated += result.count ?? 0
totalSkipped += result.skipped ?? 0
if (result.places?.length > 0) createdIds.push(...result.places.map((p: { id: number }) => p.id))
} else {
importedKml = true
- const result = await placesApi.importMapFile(tripId, f, kmlOpts)
+ const result = await placesApi.importMapFile(tripId, f, { ...kmlOpts, enrich: enrich && canEnrichImport })
totalCreated += result.count ?? 0
if (result.places?.length > 0) createdIds.push(...result.places.map((p: { id: number }) => p.id))
const s = result.summary as PlacesImportSummary | undefined
@@ -327,6 +333,16 @@ export default function FileImportModal({ isOpen, onClose, tripId, pushUndo, ini
</DialogSection>
)}
+ {canEnrichImport && ((isGpx && gpxOpts.waypoints) || (isKml && kmlOpts.points)) && (
+ <div className="flex items-start gap-3 rounded-[14px] border border-edge-faint bg-surface-secondary p-3">
+ <div className="min-w-0 flex-1">
+ <div className="font-semibold text-content" style={fs(12.5, 'body')}>{t('places.enrichOnImport')}</div>
+ <div id={enrichHintId} className="mt-0.5 text-content-faint" style={fs(12, 'body')}>{t('places.enrichOnImportFileHint')}</div>
+ </div>
+ <ToggleSwitch on={enrich} onToggle={() => setEnrich(v => !v)} label={t('places.enrichOnImport')} describedBy={enrichHintId} />
+ </div>
+ )}
+
{summary && (
<div className="flex flex-col gap-2 rounded-[14px] border border-edge-faint bg-surface-secondary px-3 py-2.5">
<div className="text-content-muted" style={fs(12, 'body')}>
diff --git a/client/src/components/Planner/LocationSelect.tsx b/client/src/components/Planner/LocationSelect.tsx
index 4fc08c450..9c45ff763 100644
--- a/client/src/components/Planner/LocationSelect.tsx
+++ b/client/src/components/Planner/LocationSelect.tsx
@@ -3,6 +3,7 @@ import { MapPin, X } from 'lucide-react'
import { mapsApi } from '../../api/client'
import { useTranslation } from '../../i18n'
import { useLocationBias } from '../../hooks/useLocationBias'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
export interface LocationPoint {
name: string
@@ -26,6 +27,7 @@ interface Props {
export default function LocationSelect({ value, onChange, placeholder, style, places }: Props) {
const { t, locale } = useTranslation()
+ const placeLang = usePlaceLanguage()
// Ohne Reisekontext ist der Hinweis leer, und die Suche laeuft wie bisher.
const { point: locationBias } = useLocationBias()
const [query, setQuery] = useState(value?.name || '')
@@ -58,7 +60,7 @@ export default function LocationSelect({ value, onChange, placeholder, style, pl
debounceRef.current = setTimeout(async () => {
setLoading(true)
try {
- const data = await mapsApi.search(trimmed, locale, locationBias)
+ const data = await mapsApi.search(trimmed, placeLang, locationBias)
setResults(data.places || [])
setHighlight(-1)
} catch {
diff --git a/client/src/components/Planner/PlaceFormModal.helpers.test.ts b/client/src/components/Planner/PlaceFormModal.helpers.test.ts
index 188cea693..0f6c6a1f4 100644
--- a/client/src/components/Planner/PlaceFormModal.helpers.test.ts
+++ b/client/src/components/Planner/PlaceFormModal.helpers.test.ts
@@ -3,6 +3,7 @@ import {
DEFAULT_FORM, endsBeforeStart, findDuplicatePlace, isAmapUrl, isGoogleMapsUrl, isMapUrl, parseCoordinatePair,
timeCollisions,
} from './PlaceFormModal.helpers'
+import { formPin } from './PlaceFormModal.helpers'
describe('isGoogleMapsUrl', () => {
it('accepts the short share hosts', () => {
@@ -146,3 +147,14 @@ describe('timeCollisions', () => {
expect(timeCollisions(99, day, '12:00', '13:00')).toEqual([])
})
})
+
+describe('formPin', () => {
+ it('FE-PLACEFORM-PIN-001: reads a pin only from two real coordinates', () => {
+ expect(formPin({ lat: '52.5163', lng: '13.3777' })).toEqual({ lat: 52.5163, lng: 13.3777 })
+ expect(formPin({ lat: '0', lng: '0' })).toEqual({ lat: 0, lng: 0 })
+ expect(formPin({ lat: '', lng: '13.4' })).toBeNull()
+ expect(formPin({ lat: '52.5', lng: ' ' })).toBeNull()
+ expect(formPin({ lat: 'abc', lng: '13.4' })).toBeNull()
+ expect(formPin({ lat: '91', lng: '13.4' })).toBeNull()
+ })
+})
diff --git a/client/src/components/Planner/PlaceFormModal.helpers.ts b/client/src/components/Planner/PlaceFormModal.helpers.ts
index 24fa29a59..12d439f6c 100644
--- a/client/src/components/Planner/PlaceFormModal.helpers.ts
+++ b/client/src/components/Planner/PlaceFormModal.helpers.ts
@@ -233,3 +233,15 @@ export function timeCollisions(
return s1 < (e2 || '23:59') && s2 < (e1 || '23:59') && s1 !== e2 && s2 !== e1
})
}
+
+/**
+ * The pin the form holds, when both fields are real coordinates: what "places
+ * near here" asks about (#976). Empty or half-typed fields are no pin.
+ */
+export function formPin(form: Pick<PlaceFormData, 'lat' | 'lng'>): { lat: number; lng: number } | null {
+ if (!form.lat.trim() || !form.lng.trim()) return null
+ const lat = Number(form.lat)
+ const lng = Number(form.lng)
+ if (!Number.isFinite(lat) || !Number.isFinite(lng) || Math.abs(lat) > 90 || Math.abs(lng) > 180) return null
+ return { lat, lng }
+}
diff --git a/client/src/components/Planner/PlaceFormModal.test.tsx b/client/src/components/Planner/PlaceFormModal.test.tsx
index 54866dc67..c110c5c8f 100644
--- a/client/src/components/Planner/PlaceFormModal.test.tsx
+++ b/client/src/components/Planner/PlaceFormModal.test.tsx
@@ -310,6 +310,38 @@ describe('PlaceFormModal', () => {
expect(await screen.findByText('Eiffel Tower')).toBeInTheDocument();
});
+ it('FE-PLANNER-PLACEFORM-018c: a pin lists the places around it, nearest first with their distance, and one pick fills the form', async () => {
+ const user = userEvent.setup();
+ seedStore(useAuthStore, { user: buildUser(), isAuthenticated: true, hasMapsKey: true });
+ const bodies: Record<string, unknown>[] = [];
+ server.use(
+ http.post('/api/maps/nearby', async ({ request }) => {
+ bodies.push((await request.json()) as Record<string, unknown>);
+ return HttpResponse.json({
+ places: [{ name: 'Café am Tor', address: 'Pariser Platz 1', lat: 52.5163, lng: 13.378, distance_m: 40 }],
+ source: 'trek-places',
+ });
+ }),
+ );
+
+ render(<PlaceFormModal {...defaultProps} prefillCoords={{ lat: 52.5163, lng: 13.3777 }} />);
+ await user.click(screen.getByRole('button', { name: 'Places near this pin' }));
+
+ expect(bodies).toEqual([{ lat: 52.5163, lng: 13.3777 }]);
+ expect(await screen.findByText('Café am Tor')).toBeInTheDocument();
+ expect(screen.getByText('40 m')).toBeInTheDocument();
+ // No typed query, so nothing to send to Google instead.
+ expect(screen.queryByText('Not the right place? Search Google instead')).not.toBeInTheDocument();
+
+ await user.click(screen.getByText('Café am Tor'));
+ expect(screen.getByDisplayValue('Pariser Platz 1')).toBeInTheDocument();
+ });
+
+ it('FE-PLANNER-PLACEFORM-018d: without a pin there is nothing to look around', () => {
+ render(<PlaceFormModal {...defaultProps} />);
+ expect(screen.queryByRole('button', { name: 'Places near this pin' })).not.toBeInTheDocument();
+ });
+
it('FE-PLANNER-PLACEFORM-018b: a list the index answered offers Google instead, and the link sends the same query there alone', async () => {
const user = userEvent.setup();
seedStore(useAuthStore, { user: buildUser(), isAuthenticated: true, hasMapsKey: true });
diff --git a/client/src/components/Planner/PlaceFormModal.tsx b/client/src/components/Planner/PlaceFormModal.tsx
index 83a2fa18f..5914d557d 100644
--- a/client/src/components/Planner/PlaceFormModal.tsx
+++ b/client/src/components/Planner/PlaceFormModal.tsx
@@ -12,13 +12,16 @@ import CollectionPicker from '../Collections/CollectionPicker'
import PlaceDetailsColumn, { type PlaceDetailsSelection } from './PlaceDetailsColumn'
import { useToast } from '../shared/Toast'
import { Tooltip } from '../shared/Tooltip'
-import { Search, Paperclip, X, AlertTriangle, Loader2, Plus, RotateCcw, MapPin } from 'lucide-react'
+import { Search, Paperclip, X, AlertTriangle, Loader2, Plus, RotateCcw, MapPin, Navigation, LocateFixed } from 'lucide-react'
import { useTranslation } from '../../i18n'
import CustomTimePicker from '../shared/CustomTimePicker'
import {
- DEFAULT_FORM, endsBeforeStart, findDuplicatePlace, isMapUrl, mergeResult, parseCoordinatePair, timeCollisions,
+ DEFAULT_FORM, endsBeforeStart, findDuplicatePlace, formPin, isMapUrl, mergeResult, parseCoordinatePair, timeCollisions,
type PlaceFormData, type ResultField,
} from './PlaceFormModal.helpers'
+import { guessCategoryId } from './placeCategoryGuess'
+import { getNavigationTargets, openNavigationTarget } from './placeNavigation'
+import { NavigationMenu } from '../shared/NavigationMenu'
import { getApiErrorMessage } from '../../utils/apiError'
import { corePickRank, offersGoogleRetry, selectGoogleHoldsSlot } from '../../utils/placeSource'
import { safeHexColor } from '../../utils/safeColor'
@@ -28,6 +31,7 @@ import { BookingCostsSection } from './BookingCostsSection'
import type { BookingExpenseRequest } from './BookingCostsSection.types'
import type { Place, Category, Assignment, BudgetItem } from '../../types'
import { NumericInput } from '../shared/NumericInput'
+import { formatDistance } from '../../utils/units'
import { PlacesSession } from '../../utils/placesSession'
import ServiceStopSection from '../Roadtrip/ServiceStopSection'
import { DEFAULT_SERVICE_KIND, serviceStopChoice, type ServiceStopMode } from '../Roadtrip/manualStop'
@@ -39,6 +43,7 @@ import {
import { EditorField, GRID_2, INPUT, LABEL, PANEL, PillSelect, TEXTAREA } from '../shared/dialogParts'
import { SoftPill, tintOf } from './planParts'
import { WHITE_BUTTON } from './placeDialogParts'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
// The submit payload mirrors the form, but lat/lng are parsed to numbers and
// category_id is normalised, plus any files chosen before the place existed.
@@ -60,7 +65,7 @@ interface PlaceFormModalProps {
onClose: () => void
onSave: (data: PlaceSubmitData, files?: File[]) => Promise<{ id: number } | void> | void
place: Place | null
- prefillCoords?: { lat: number; lng: number; name?: string; address?: string; website?: string; phone?: string; osm_id?: string; stop_type?: RoadtripStopType | null; duration_minutes?: number } | null
+ prefillCoords?: { lat: number; lng: number; name?: string; address?: string; website?: string; phone?: string; osm_id?: string; stop_type?: RoadtripStopType | null; duration_minutes?: number; category?: string } | null
tripId: number
categories: Category[]
onCategoryCreated: (category: { name: string; color?: string; icon?: string }) => Promise<Category> | undefined
@@ -124,6 +129,9 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
const [mapsResults, setMapsResults] = useState([])
/** What answered the last full search. Only a fallback: a merged list carries the source per place. */
const [searchSource, setSearchSource] = useState<string>('')
+ // The list on screen answers "what is near the pin" rather than a typed query (#976).
+ const [nearbyList, setNearbyList] = useState(false)
+ const distanceUnit = useSettingsStore(s => s.settings.distance_unit) || 'metric'
/**
* What produced the list currently on screen, kept for the shadow log: the
* query as typed and the provider the envelope named. A ref rather than
@@ -146,6 +154,14 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
// to that place and goes when another is picked; anything outside it is the
// user's and survives. See mergeResult.
const autoFilledRef = useRef<Set<ResultField>>(new Set())
+ // Whether the category was preselected from a search result rather than chosen, so
+ // the next pick may replace it and a hand choice is never overwritten (#2282).
+ const categoryGuessedRef = useRef(false)
+ const guessedCategory = (result: Record<string, unknown>): string => {
+ const id = guessCategoryId(result, categories || [])
+ categoryGuessedRef.current = id != null
+ return id != null ? String(id) : ''
+ }
const [pendingFiles, setPendingFiles] = useState([])
/**
* The leg of the drive the traveller picked, or empty while the projection's own
@@ -170,7 +186,9 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
// billing session (see utils/placesSession).
const placesSessionRef = useRef(new PlacesSession())
const toast = useToast()
- const { t, language, locale } = useTranslation()
+ const { t, locale } = useTranslation()
+ // Place names in the language the user picked for them, the app's otherwise (#1799).
+ const language = usePlaceLanguage()
const { placesEnrichEnabled } = useAuthStore()
const googleAnswers = useAuthStore(selectGoogleHoldsSlot)
const can = useCanDo()
@@ -185,6 +203,7 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
const expenseIntentRef = useRef<{ editItem?: BudgetItem; create?: boolean } | null>(null)
useEffect(() => {
+ categoryGuessedRef.current = false
if (place) {
// Times are stored per day-assignment, not on the pool place. When an
// assignment is in context (itinerary edit, or a single-assignment pool
@@ -222,6 +241,7 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
website: prefillCoords.website || '',
phone: prefillCoords.phone || '',
osm_id: prefillCoords.osm_id,
+ category_id: guessedCategory(prefillCoords),
stop_type: prefillCoords.stop_type ?? null,
duration_minutes: prefillCoords.duration_minutes,
})
@@ -387,6 +407,7 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
const handleChange = (field: string, value: string) => {
// Typed by hand, so the next pick must not clear it.
autoFilledRef.current.delete(field as ResultField)
+ if (field === 'category_id') categoryGuessedRef.current = false
setForm(prev => ({ ...prev, [field]: value }))
}
@@ -423,8 +444,33 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
const result = await mapsApi.search(trimmed, language, locationBiasPoint, provider)
if (epoch !== searchEpochRef.current) return
searchMetaRef.current = { query: trimmed, source: result.source || 'unknown' }
+ setNearbyList(false)
+ setMapsResults(result.places || [])
+ setSearchSource(result.source || '')
+ } catch (err: unknown) {
+ if (epoch !== searchEpochRef.current) return
+ toast.error(getApiErrorMessage(err, t('places.mapsSearchError')))
+ } finally {
+ if (epoch === searchEpochRef.current) setIsSearchingMaps(false)
+ }
+ }
+
+ // What is around the pin the form holds (#976): the list a search would show,
+ // nearest first. Not logged as a search pick, because no query was typed.
+ const pin = formPin(form)
+ const handleNearby = async () => {
+ if (!pin) return
+ const epoch = searchEpochRef.current
+ setIsSearchingMaps(true)
+ setAcSuggestions([])
+ try {
+ const result = await mapsApi.nearby(pin.lat, pin.lng, language)
+ if (epoch !== searchEpochRef.current) return
+ searchMetaRef.current = null
+ setNearbyList(true)
setMapsResults(result.places || [])
setSearchSource(result.source || '')
+ if (!result.places?.length) toast.info(t('places.nearbyNone'))
} catch (err: unknown) {
if (epoch !== searchEpochRef.current) return
toast.error(getApiErrorMessage(err, t('places.mapsSearchError')))
@@ -440,7 +486,11 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
* worse than no row at all.
*/
const handleSelectMapsResult = (result, pick?: { mode: 'search' | 'autocomplete'; rank: number; count: number }) => {
- setForm(prev => mergeResult(prev, result, autoFilledRef.current))
+ setForm(prev => {
+ const merged = mergeResult(prev, result, autoFilledRef.current)
+ if (prev.category_id && !categoryGuessedRef.current) return merged
+ return { ...merged, category_id: guessedCategory(result) }
+ })
// The same name the row's badge carried. A suggestion's pick overrides it
// with its own row's (handleSelectSuggestion); a saved place names none.
setPickedSource(sourceLabel(result, pick?.mode === 'search' ? searchSource : ''))
@@ -782,6 +832,10 @@ function usePlaceFormModal(props: PlaceFormModalProps) {
sourceLabel,
handleChange,
handleMapsSearch,
+ handleNearby,
+ pin,
+ nearbyList,
+ distanceUnit,
handleSelectMapsResult,
handleSelectSuggestion,
handleSearchKeyDown,
@@ -837,6 +891,7 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
mapsSearch, setMapsSearch, mapsResults, isSearchingMaps, acSuggestions, setAcSuggestions, acSource,
searchSource, acHighlight, setAcHighlight, t, language, googleAnswers, placesEnrichEnabled,
canUploadFiles, fetchSuggestions, sourceLabel, handleChange, handleMapsSearch, handleSelectMapsResult,
+ handleNearby, pin, nearbyList, distanceUnit,
handleSelectSuggestion, handleSearchKeyDown, hasTimeError, handleSubmit, isSaving, duplicateWarning,
detailsSelection, serviceStop, serviceStopDuplicate,
} = S
@@ -910,6 +965,10 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
}}
pickedSource={S.pickedSource}
busy={isSearchingMaps}
+ navPlace={form.lat && form.lng ? {
+ name: form.name, address: form.address, lat: Number(form.lat), lng: Number(form.lng),
+ google_place_id: form.google_place_id || null, google_ftid: form.google_ftid || null,
+ } : null}
t={t}
/>
)}
@@ -956,6 +1015,7 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
/>
)}
<form onSubmit={handleSubmit} className={FORM_COLUMN}>
+
{/* Place search: typed-ahead suggestions, a full search, and a pasted map link. */}
<div className={PANEL}>
<EditorField label={t('common.search')} htmlFor={`${fieldId}-search`}>
@@ -991,6 +1051,19 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
{isSearchingMaps ? '...' : <Search size={15} strokeWidth={2.2} aria-hidden="true" />}
</button>
</Tooltip>
+ {pin && (
+ <Tooltip label={t('places.nearby')}>
+ <button
+ type="button"
+ onClick={handleNearby}
+ disabled={isSearchingMaps}
+ aria-label={t('places.nearby')}
+ className={`${SIDE_BUTTON} border border-edge bg-surface-card text-content-secondary hover:bg-surface-hover`}
+ >
+ <LocateFixed size={15} strokeWidth={2.2} aria-hidden="true" />
+ </button>
+ </Tooltip>
+ )}
</div>
{/* Autocomplete dropdown. Capped and scrolling, because plugin rows can
@@ -1035,6 +1108,9 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
<span className="block truncate font-medium text-content" style={fs(13, 'body')}>{result.name}</span>
{result.address && <span className="block truncate text-content-muted" style={fs(11.5)}>{result.address}</span>}
</span>
+ {nearbyList && typeof result.distance_m === 'number' && (
+ <SoftPill>{formatDistance(result.distance_m / 1000, distanceUnit)}</SoftPill>
+ )}
<SourceBadge label={sourceLabel(result, searchSource)} />
</button>
))}
@@ -1045,7 +1121,7 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
quiet line under the list sends the same query there, on an instance
where Google holds the key slot and for a list Google did not
already produce. */}
- {mapsResults.length > 0 && offersGoogleRetry(searchSource, googleAnswers) && (
+ {mapsResults.length > 0 && !nearbyList && offersGoogleRetry(searchSource, googleAnswers) && (
<button
type="button"
onClick={() => handleMapsSearch('google')}
@@ -1124,6 +1200,7 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
</div>
)}
+
{/* The day in context: its times and its own note. Both live on the
day-assignment, not on the pool place (#2163), so they are only shown
when a single assignment is in context (itinerary edit, or a
@@ -1238,7 +1315,7 @@ interface NewCategoryRow {
* place of both. Then where the picked place came from, and a spinner while a
* pick is still being looked up.
*/
-function HeaderPills({ kind, categories, categoryId, onCategory, newCategory, pickedSource, busy, t }: {
+function HeaderPills({ kind, categories, categoryId, onCategory, newCategory, pickedSource, busy, navPlace, t }: {
kind?: StopKind
categories: Category[] | null
categoryId: string
@@ -1246,6 +1323,8 @@ function HeaderPills({ kind, categories, categoryId, onCategory, newCategory, pi
newCategory: NewCategoryRow
pickedSource: string | null
busy: boolean
+ /** The place as the form holds it, once it has a position: opens it in a map app (#2178). */
+ navPlace: NavigablePlace | null
t: Translate
}) {
// When the new-category field closes, the field or the button that closed it
@@ -1299,6 +1378,7 @@ function HeaderPills({ kind, categories, categoryId, onCategory, newCategory, pi
{pickedSource}
</span>
)}
+ {navPlace && <OpenInMapsPill place={navPlace} t={t} />}
{busy && (
<span className={PILL} role="status" aria-label={t('places.loadingDetails')}>
<Loader2 size={13} className="animate-spin text-content-faint" aria-hidden="true" />
@@ -1309,6 +1389,33 @@ function HeaderPills({ kind, categories, categoryId, onCategory, newCategory, pi
)
}
+type NavigablePlace = Pick<Place, 'name' | 'address' | 'lat' | 'lng' | 'google_place_id' | 'google_ftid'>
+
+/**
+ * A look at the picked place in a real map before it is saved (#2178): its reviews, its
+ * photos, whether it is the right branch. The same apps the inspector offers, one tap
+ * straight away when only one applies.
+ */
+function OpenInMapsPill({ place, t }: { place: NavigablePlace; t: Translate }) {
+ const [open, setOpen] = useState(false)
+ const anchorRef = useRef<HTMLSpanElement>(null)
+ const targets = getNavigationTargets(place)
+ if (targets.length === 0) return null
+ return (
+ <span ref={anchorRef} className="inline-flex">
+ <Tooltip label={t('places.openInMaps')}>
+ <button type="button" aria-label={t('places.openInMaps')} aria-haspopup={targets.length > 1 ? 'menu' : undefined}
+ aria-expanded={targets.length > 1 ? open : undefined}
+ onClick={() => { if (targets.length === 1) openNavigationTarget(targets[0]); else setOpen(o => !o) }}
+ className={ROUND_PILL_BUTTON}>
+ <Navigation size={13} strokeWidth={2.2} />
+ </button>
+ </Tooltip>
+ {open && <NavigationMenu targets={targets} anchor={anchorRef.current} onClose={() => setOpen(false)} />}
+ </span>
+ )
+}
+
/** The new category's name, typed where the category pill was, with its OK and Cancel beside it. */
function NewCategoryField({ inputId, name, setName, create, setOpen, t }: NewCategoryRow & { t: Translate }) {
return (
diff --git a/client/src/components/Planner/PlaceInspector.tsx b/client/src/components/Planner/PlaceInspector.tsx
index b677bd7e5..b067cb5f3 100644
--- a/client/src/components/Planner/PlaceInspector.tsx
+++ b/client/src/components/Planner/PlaceInspector.tsx
@@ -8,7 +8,7 @@ import remarkBreaks from 'remark-breaks'
import { markdownLinkComponents } from '../shared/markdownLink'
import { X, Clock, MapPin, ExternalLink, Phone, Banknote, Pencil, Plus, Minus, ChevronDown, ChevronUp, ChevronRight, FileText, Upload, File, FileImage, Star, Navigation, Mountain, Bookmark, BookmarkCheck, Copy } from 'lucide-react'
import PlaceAvatar from '../shared/PlaceAvatar'
-import PlaceAvatarUpload from '../shared/PlaceAvatarUpload'
+import PlaceAvatarUpload, { pickableImages } from '../shared/PlaceAvatarUpload'
import { BlurredCode } from '../shared/BookingCode'
import PlaceRating from '../shared/StarRating'
import TrackColorPicker from '../shared/TrackColorPicker'
@@ -33,7 +33,7 @@ import { splitReservationDateTime, formatTime, formatMoney } from '../../utils/f
import { useTripStore } from '../../store/tripStore'
import { useCanDo } from '../../store/permissionsStore'
import { formatDistance, formatElevation } from '../../utils/units'
-import { getNavigationTargets, openNavigationTarget } from './placeNavigation'
+import { navigationTargetLabel, getNavigationTargets, openNavigationTarget } from './placeNavigation'
import { TRANSPORT_TYPES, getAssignmentReservations } from '../../utils/dayMerge'
import { NavigationMenu } from '../shared/NavigationMenu'
import { resolveOpenNow, resolvePlaceTimeZone, placeWeekdayIndex, type OpeningPeriod } from './placeOpenState'
@@ -44,6 +44,7 @@ import { DialogButton, DialogSection, DeleteButton, FooterSpacer, NEUTRAL_TINT,
import { BOX, Field, TypeTile, toneOf, toneTint, useOpenFile } from './bookings/bookingParts'
import { parseMeta } from './bookings/bookingsModel'
import { SoftPill, TimePill, tintOf } from './planParts'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
const detailsCache = new Map()
@@ -189,6 +190,8 @@ interface PlaceInspectorProps {
onUpdatePlace?: (placeId: number, data: Partial<Place>) => void
/** Upload a custom thumbnail (#1136); enables the click-to-change avatar in trip mode. */
onUploadImage?: (placeId: number, file: File) => Promise<void>
+ /** Takes a picture already attached to the place as its image (#1242). */
+ onImageFromFile?: (placeId: number, fileId: number) => Promise<void>
/** Cast/clear the current user's star vote (#1435); enables the rating row. */
onRate?: (placeId: number, rating: number | null) => Promise<void> | void
leftWidth?: number
@@ -213,7 +216,7 @@ export default function PlaceInspector({
place, categories, mode = 'trip', days = [], selectedDayId = null, selectedAssignmentId = null,
assignments = {}, reservations = [], onEditTransport, onEditReservation, onOpenBooking,
onClose, onEdit: editPlace, onDelete: deletePlace, onAssignToDay, onRemoveAssignment,
- files = [], onFileUpload, tripMembers = [], onSetParticipants, onUpdatePlace: updatePlace, onUploadImage, onRate,
+ files = [], onFileUpload, tripMembers = [], onSetParticipants, onUpdatePlace: updatePlace, onUploadImage, onImageFromFile, onRate,
leftWidth = 0, rightWidth = 0,
collectionStatus, onCopyToTrip, onSetStatus, onRemoveFromList, roadtripEndDay, roadtripStay, roadtripActive,
}: PlaceInspectorProps) {
@@ -245,6 +248,7 @@ export default function PlaceInspector({
return () => { cancelled = true }
}, [placeIdForDetails])
const { t, locale, language } = useTranslation()
+ const placeLang = usePlaceLanguage()
// Currency-less prices mean "the trip's currency"; null in collection mode (EUR fallback below).
const tripCurrency = useTripStore(s => s.trip?.currency)
// The day list handed in is the one the planner shows, and in the day view that
@@ -267,7 +271,7 @@ export default function PlaceInspector({
const [nameValue, setNameValue] = useState('')
const nameInputRef = useRef<HTMLInputElement>(null)
const fileInputRef = useRef<HTMLInputElement>(null)
- const googleDetails = usePlaceDetails(place?.google_place_id, place?.osm_id, language)
+ const googleDetails = usePlaceDetails(place?.google_place_id, place?.osm_id, placeLang)
// Library-wide "is this place already saved anywhere I can see?" indicator for
// the trip-planner footer bookmark. Re-checks when the place changes or after
@@ -391,7 +395,7 @@ export default function PlaceInspector({
place ? { ...place, google_ftid: place.google_ftid || googleDetails?.google_ftid || null } : null,
googleDetails?.google_maps_url,
)
- const navigationLabel = navigationTargets.length === 1 ? navigationTargets[0].label : t('inspector.navigation')
+ const navigationLabel = navigationTargets.length === 1 ? navigationTargetLabel(navigationTargets[0], t) : t('inspector.navigation')
const selectedDay = days?.find(d => d.id === selectedDayId)
const weekdayIndex = getWeekdayIndex(selectedDay?.date, placeTimeZone)
@@ -424,6 +428,8 @@ export default function PlaceInspector({
commitNameEdit={commitNameEdit} handleNameKeyDown={handleNameKeyDown} startNameEdit={startNameEdit}
onUpdatePlace={onUpdatePlace}
onUploadImage={mode === 'trip' && onUpdatePlace ? onUploadImage : undefined}
+ attachedImages={pickableImages(placeFiles)}
+ onImageFromFile={mode === 'trip' && onUpdatePlace ? onImageFromFile : undefined}
onClose={onClose} />
{/* The body scrolls inside the capped card; each block keeps its natural height (#1195). */}
@@ -626,6 +632,8 @@ interface InspectorHeadProps {
startNameEdit: () => void
onUpdatePlace?: (placeId: number, data: Partial<Place>) => void
onUploadImage?: (placeId: number, file: File) => Promise<void>
+ attachedImages: TripFile[]
+ onImageFromFile?: (placeId: number, fileId: number) => Promise<void>
onClose: () => void
}
@@ -634,7 +642,7 @@ interface InspectorHeadProps {
* name (a double-click renames it), the address, and the facts as pills.
*/
function InspectorHead({ place, category, openNow, phone, rating, ratingCount, price, time, editingName, nameInputRef,
- nameValue, setNameValue, commitNameEdit, handleNameKeyDown, startNameEdit, onUpdatePlace, onUploadImage, onClose }: InspectorHeadProps) {
+ nameValue, setNameValue, commitNameEdit, handleNameKeyDown, startNameEdit, onUpdatePlace, onUploadImage, attachedImages, onImageFromFile, onClose }: InspectorHeadProps) {
const { t, locale } = useTranslation()
const ring = openNow === true ? 'bg-success' : openNow === false ? 'bg-danger' : 'bg-surface-card shadow-sm'
const hasCoords = !!(place.lat && place.lng)
@@ -647,7 +655,9 @@ function InspectorHead({ place, category, openNow, phone, rating, ratingCount, p
{onUploadImage
? <PlaceAvatarUpload place={place} category={category} size={52}
onUpload={(file: File) => onUploadImage(place.id, file)}
- onRemove={() => onUpdatePlace(place.id, { image_url: null })} />
+ onRemove={() => onUpdatePlace(place.id, { image_url: null })}
+ attachedImages={attachedImages}
+ onPickAttached={onImageFromFile ? (fileId: number) => onImageFromFile(place.id, fileId) : undefined} />
: <PlaceAvatar place={place} category={category} size={52} />}
</div>
<PhotoCredit imageUrl={place.image_url} />
diff --git a/client/src/components/Planner/PlacesSidebarHeader.tsx b/client/src/components/Planner/PlacesSidebarHeader.tsx
index a7ce9609a..a69906c93 100644
--- a/client/src/components/Planner/PlacesSidebarHeader.tsx
+++ b/client/src/components/Planner/PlacesSidebarHeader.tsx
@@ -1,5 +1,5 @@
import { useEffect, useRef, useState, type MouseEvent as ReactMouseEvent, type ReactNode } from 'react'
-import { Search, Plus, X, Upload, FileDown, ListPlus, Check, Star, CalendarPlus, CalendarDays, ChevronDown, Tag } from 'lucide-react'
+import { Search, Plus, X, Upload, FileDown, ListPlus, Check, Star, CalendarPlus, CalendarDays, ChevronDown, Tag, Globe2 } from 'lucide-react'
import { Tooltip } from '../shared/Tooltip'
import { ContextMenu, useContextMenu } from '../shared/ContextMenu'
import { NEUTRAL_TINT, fs } from '../shared/DialogShell'
@@ -90,6 +90,7 @@ export function PlacesHeader(S: SidebarState) {
<ShowDropdown {...S} />
<CategoryFilter {...S} />
<RatingFilter {...S} />
+ <LocalityFilterDropdown {...S} />
</div>
<ActiveFilterChips {...S} />
</div>
@@ -325,6 +326,47 @@ function RatingFilter(S: SidebarState) {
)
}
+/**
+ * Country, or one region in it, from each place's resolved position (#2537). Shown once
+ * the trip spans more than one country or region; a single one has nothing to narrow.
+ */
+function LocalityFilterDropdown(S: SidebarState) {
+ const { t, localities, localityFilter, setLocalityFilter } = S
+ const [open, setOpen] = useState(false)
+ const regionCount = localities.reduce((n, g) => n + g.regions.length, 0)
+ if (localities.length < 2 && regionCount < 2) return null
+ const pick = (country: string, region: string | null) => { setLocalityFilter({ country, region }); setOpen(false) }
+ const row = (key: string, label: string, count: number, on: boolean, onClick: () => void, indent: boolean) => (
+ <button type="button" key={key} onClick={onClick} aria-pressed={on}
+ className={`flex w-full items-center gap-2 rounded-[9px] py-1.5 pr-2 text-left transition-colors ${indent ? 'pl-5' : 'pl-2'} ${on ? 'bg-surface-tertiary' : 'hover:bg-surface-hover'}`}
+ style={fs(indent ? 12 : 12.5, 'body')}>
+ <span className={`min-w-0 flex-1 truncate ${indent ? 'text-content-secondary' : 'font-semibold text-content'}`}>{label}</span>
+ <span className="rounded-full bg-surface-secondary px-1.5 font-geist tabular-nums text-content-faint" style={fs(10.5)}>{count}</span>
+ <span className="grid w-3.5 flex-none place-items-center">{on && <Check size={13} strokeWidth={2.4} className="text-content-muted" />}</span>
+ </button>
+ )
+ const label = localityFilter ? (localityFilter.region ?? localityFilter.country) : t('places.allLocations')
+ return (
+ <FilterDropdown name={t('places.filterByLocation')} label={label} active={!!localityFilter} badge={1}
+ icon={<Globe2 size={14} strokeWidth={2} />} open={open} setOpen={setOpen}>
+ {localities.map(g => (
+ <div key={g.country} className="flex flex-col gap-px">
+ {row(`c:${g.country}`, g.country, g.count, localityFilter?.country === g.country && localityFilter.region == null, () => pick(g.country, null), false)}
+ {g.regions.map(r => row(`c:${g.country}:${r.region}`, r.region, r.count, localityFilter?.country === g.country && localityFilter.region === r.region, () => pick(g.country, r.region), true))}
+ </div>
+ ))}
+ {localityFilter && (
+ <button type="button" onClick={() => { setLocalityFilter(null); setOpen(false) }}
+ className="mt-1 flex w-full items-center gap-1.5 rounded-[9px] border-t border-edge-faint px-1.5 pb-1 pt-2 text-left font-semibold text-content-muted hover:text-content"
+ style={fs(12, 'body')}>
+ <X size={12} strokeWidth={2.4} />
+ {t('places.clearFilter')}
+ </button>
+ )}
+ </FilterDropdown>
+ )
+}
+
function AddRow(S: SidebarState) {
const { onAddPlace, onAddPlaceToSelectedDay, selectedDayId, t, setFileImportOpen, setListImportOpen, hasMultipleListImportProviders } = S
const dayOpen = selectedDayId != null
diff --git a/client/src/components/Planner/ReservationsPanel.tsx b/client/src/components/Planner/ReservationsPanel.tsx
index e6c742d4f..42d8d95ba 100644
--- a/client/src/components/Planner/ReservationsPanel.tsx
+++ b/client/src/components/Planner/ReservationsPanel.tsx
@@ -22,6 +22,8 @@ import BookingsTimeline from './bookings/BookingsTimeline'
import BookingDetailHost from './bookings/BookingDetailHost'
import { useReservationDetailPlugins } from './bookings/useReservationDetailPlugins'
import { useBookingActions } from './bookings/useBookingActions'
+import { bookingsCsv, bookingsFileName } from './bookings/bookingsExport'
+import { downloadBlob } from '../../utils/fileDownload'
interface ReservationsPanelProps {
tripId: number
@@ -94,6 +96,20 @@ export default function ReservationsPanel({
[reservations, v.types, v.status, v.travelers, v.query, labelOf],
)
const sorted = useMemo(() => sortReservations(filtered, days, v.sort.by, v.sort.dir, labelOf, v.transitApart), [filtered, days, v.sort.by, v.sort.dir, labelOf, v.transitApart])
+ // What is on screen, in its order, as a spreadsheet (#1360).
+ const exportCsv = () => {
+ const csv = bookingsCsv(sorted, {
+ type: labelOf,
+ status: s => (s === 'confirmed' ? t('reservations.confirmed') : s === 'pending' ? t('reservations.pending') : s),
+ headers: {
+ type: t('reservations.export.type'), title: t('reservations.export.title'), status: t('reservations.status'),
+ start: t('reservations.export.start'), end: t('reservations.export.end'), from: t('reservations.export.from'),
+ to: t('reservations.export.to'), location: t('reservations.export.location'),
+ confirmation: t('reservations.export.confirmation'), notes: t('reservations.export.notes'),
+ },
+ })
+ downloadBlob(new Blob([csv], { type: 'text/csv;charset=utf-8' }), bookingsFileName(trip?.title, kind))
+ }
const groups = useMemo(() => groupReservations(sorted, v.group, days, trip?.start_date, trip?.end_date, {
confirmed: t('reservations.confirmed'), pending: t('reservations.pending'), transit: t('transit.sectionTitle'),
before: t('reservations.group.before'), after: t('reservations.group.after'), undated: t('reservations.group.undated'),
@@ -298,6 +314,7 @@ export default function ReservationsPanel({
onTransitApart={v.view === 'cards' && v.group === 'status' && reservations.some(r => r.type === 'transit') ? v.toggleTransitApart : undefined}
viewIsDefault={v.viewIsDefault}
onResetView={v.resetView}
+ onExport={exportCsv}
/>
</div>
diff --git a/client/src/components/Planner/TransitSearchPanel.test.tsx b/client/src/components/Planner/TransitSearchPanel.test.tsx
index 1cf79228d..fd8dc074a 100644
--- a/client/src/components/Planner/TransitSearchPanel.test.tsx
+++ b/client/src/components/Planner/TransitSearchPanel.test.tsx
@@ -7,7 +7,7 @@ import { useAuthStore } from '../../store/authStore'
import { useSettingsStore } from '../../store/settingsStore'
import { buildUser, buildDay, buildPlace } from '../../../tests/helpers/factories'
import type { Accommodation, Day } from '../../types'
-import TransitSearchPanel from './TransitSearchPanel'
+import TransitSearchPanel, { buildQuickPicks, dayBookingStops } from './TransitSearchPanel'
const { transitApiMock, toastErrors } = vi.hoisted(() => ({
transitApiMock: { geocode: vi.fn(), plan: vi.fn() },
@@ -663,3 +663,39 @@ describe('TransitSearchPanel', () => {
expect(screen.getByText('Aachen, Bushof')).toBeInTheDocument()
})
})
+
+describe('quick picks from the bookings of the day (#1506)', () => {
+ const day = buildDay({ id: 2, date: '2026-07-08' }) as Day
+ const flight = {
+ id: 5, type: 'flight', day_id: 2, end_day_id: 2, status: 'confirmed', title: 'LH 190',
+ endpoints: [
+ { role: 'from', name: 'FRA', lat: 50.03, lng: 8.56, local_date: '2026-07-08', local_time: '09:00', sequence: 0 },
+ { role: 'to', name: 'BER Airport', lat: 52.36, lng: 13.5, local_date: '2026-07-08', local_time: '10:10', sequence: 1 },
+ ],
+ }
+ const nextDayTrain = {
+ id: 6, type: 'train', day_id: 3, end_day_id: 3, status: 'confirmed', title: 'ICE',
+ endpoints: [{ role: 'from', name: 'Berlin Hbf', lat: 52.52, lng: 13.37, local_date: '2026-07-09', local_time: null, sequence: 0 }],
+ }
+ const undatedFerry = {
+ id: 7, type: 'ferry', day_id: 1, end_day_id: 2, status: 'confirmed', title: 'Ferry',
+ endpoints: [
+ { role: 'from', name: 'Kiel', lat: 54.3, lng: 10.1, local_date: null, local_time: null, sequence: 0 },
+ { role: 'to', name: 'Oslo', lat: 59.9, lng: 10.7, local_date: null, local_time: null, sequence: 1 },
+ ],
+ }
+ const taxi = { id: 8, type: 'taxi', day_id: 2, status: 'confirmed', title: 'Taxi', endpoints: [{ role: 'from', name: 'Home', lat: 1, lng: 1, local_date: '2026-07-08', sequence: 0 }] }
+
+ it('FE-PLANNER-TRANSIT-031: the airports and stations of the day are offered, other days and non-carriers are not', () => {
+ const stops = dayBookingStops(day, [flight, nextDayTrain, undatedFerry, taxi] as any)
+ expect(stops.map(s => s.name)).toEqual(['FRA', 'BER Airport', 'Oslo'])
+ })
+
+ it('FE-PLANNER-TRANSIT-032: they come right after the stays and are never cut by the cap', () => {
+ const places = Array.from({ length: 12 }, (_, i) => buildPlace({ id: 100 + i, name: `P${i}`, lat: 52 + i / 100, lng: 13 }))
+ const picks = buildQuickPicks(day, [day], places as any, [], dayBookingStops(day, [flight] as any))
+ expect(picks.slice(0, 2).map(p => p.name)).toEqual(['FRA', 'BER Airport'])
+ expect(picks).toHaveLength(2 + 8)
+ })
+})
+
diff --git a/client/src/components/Planner/TransitSearchPanel.tsx b/client/src/components/Planner/TransitSearchPanel.tsx
index 173142091..b8ddbf7b2 100644
--- a/client/src/components/Planner/TransitSearchPanel.tsx
+++ b/client/src/components/Planner/TransitSearchPanel.tsx
@@ -1,4 +1,5 @@
import React, { useEffect, useMemo, useRef, useState } from 'react'
+import { createPortal } from 'react-dom'
import tzlookup from 'tz-lookup'
import { ArrowLeftRight, ArrowRight, Bus, CableCar, ChevronDown, ChevronUp, Clock, Footprints, MapPin, Sailboat, Search, TramFront, TrainFront, TrainFrontTunnel } from 'lucide-react'
import CustomTimePicker from '../shared/CustomTimePicker'
@@ -8,7 +9,9 @@ import { useSettingsStore } from '../../store/settingsStore'
import { useToast } from '../shared/Toast'
import { useTranslation } from '../../i18n'
import { getDayBookendHotels } from '../../utils/dayOrder'
-import type { Day, Place, Accommodation } from '../../types'
+import type { Day, Place, Accommodation, Reservation } from '../../types'
+import { useTripStore } from '../../store/tripStore'
+import { isCarrierTransport } from '../../utils/dayMerge'
import type { TransitProvider } from '@trek/shared'
/**
@@ -110,13 +113,36 @@ function stayPick(a: Accommodation): PickedPlace | null {
return a.place_lat != null && a.place_lng != null && a.place_name ? { name: a.place_name, lat: a.place_lat, lng: a.place_lng } : null
}
+/**
+ * The airports, stations and ports the day's flights, trains, buses and ferries leave
+ * from or arrive at (#1506): the way to the hotel after landing starts at one of them.
+ * An endpoint belongs to the day by its own local date, or, without one, by the leg's
+ * day: departures on the booking's first day, arrivals on its last.
+ */
+export function dayBookingStops(day: Pick<Day, 'id' | 'date'>, reservations: Reservation[]): PickedPlace[] {
+ const stops: PickedPlace[] = []
+ for (const r of reservations) {
+ if (!isCarrierTransport(r)) continue
+ const endDay = r.end_day_id ?? r.day_id
+ for (const ep of r.endpoints ?? []) {
+ if (ep.lat == null || ep.lng == null || !ep.name) continue
+ const onDay = ep.local_date
+ ? !!day.date && ep.local_date.slice(0, 10) === day.date.slice(0, 10)
+ : (ep.role === 'from' && r.day_id === day.id) || (ep.role === 'to' && endDay === day.id)
+ if (onDay) stops.push({ name: ep.name, lat: ep.lat, lng: ep.lng })
+ }
+ }
+ return stops
+}
+
/**
* What the from/to fields offer before anything is typed. The stay the day
* starts in and the one it ends in come first and are never cut, since most
- * connections of a day begin or end there (#2538); then the day's own located
+ * connections of a day begin or end there (#2538); the day's airports and
+ * stations follow and are not cut either (#1506); then the day's own located
* places and the trip's other stays, up to MAX_QUICK_PICKS.
*/
-function buildQuickPicks(day: Day, days: Day[], places: Place[], accommodations: Accommodation[]): PickedPlace[] {
+export function buildQuickPicks(day: Day, days: Day[], places: Place[], accommodations: Accommodation[], bookingStops: PickedPlace[] = []): PickedPlace[] {
const { morning, evening } = getDayBookendHotels(day, days, accommodations)
const dayStays = [morning, evening].filter((a): a is Accommodation => a != null)
@@ -130,15 +156,55 @@ function buildQuickPicks(day: Day, days: Day[], places: Place[], accommodations:
}
const stays = dayStays.map(stayPick).filter(unique)
+ const stations = bookingStops.filter(unique)
const rest = [
...places.map(p => (p.lat != null && p.lng != null ? { name: p.name, lat: p.lat, lng: p.lng } : null)),
...accommodations.filter(a => !dayStays.includes(a)).map(stayPick),
].filter(unique)
- return [...stays, ...rest.slice(0, MAX_QUICK_PICKS)]
+ return [...stays, ...stations, ...rest.slice(0, MAX_QUICK_PICKS)]
}
// ── from/to stop picker ──────────────────────────────────────────────────────
+const LIST_GAP = 4
+const LIST_MAX = 240
+const VIEW_EDGE = 12
+
+/**
+ * Where the suggestion list sits on screen: under the field, or above it when the
+ * window has no room below. Measured again on scroll and resize while it is open.
+ */
+function useFloatingList(anchorRef: React.RefObject<HTMLElement | null>, open: boolean) {
+ const [pos, setPos] = useState<{ left: number; width: number; top: number; bottom: number; above: boolean; maxHeight: number } | null>(null)
+ useEffect(() => {
+ if (!open) { setPos(null); return }
+ const place = () => {
+ const el = anchorRef.current
+ if (!el) return
+ const r = el.getBoundingClientRect()
+ const below = window.innerHeight - r.bottom - VIEW_EDGE
+ const aboveRoom = r.top - VIEW_EDGE
+ const above = below < 160 && aboveRoom > below
+ setPos({
+ left: r.left,
+ width: r.width,
+ top: r.bottom + LIST_GAP,
+ bottom: window.innerHeight - r.top + LIST_GAP,
+ above,
+ maxHeight: Math.max(120, Math.min(LIST_MAX, (above ? aboveRoom : below) - LIST_GAP)),
+ })
+ }
+ place()
+ window.addEventListener('resize', place)
+ window.addEventListener('scroll', place, true)
+ return () => {
+ window.removeEventListener('resize', place)
+ window.removeEventListener('scroll', place, true)
+ }
+ }, [open, anchorRef])
+ return pos
+}
+
function StopPicker({ label, value, onPick, quickPicks, near, placeholder }: {
label: string
value: PickedPlace | null
@@ -153,9 +219,15 @@ function StopPicker({ label, value, onPick, quickPicks, near, placeholder }: {
const [open, setOpen] = useState(false)
const debounceRef = useRef<ReturnType<typeof setTimeout> | null>(null)
const rootRef = useRef<HTMLDivElement>(null)
+ const fieldRef = useRef<HTMLDivElement>(null)
+ const listRef = useRef<HTMLDivElement>(null)
+ const listPos = useFloatingList(fieldRef, open)
useEffect(() => {
- const close = (e: MouseEvent) => { if (!rootRef.current?.contains(e.target as Node)) setOpen(false) }
+ const close = (e: MouseEvent) => {
+ const target = e.target as Node
+ if (!rootRef.current?.contains(target) && !listRef.current?.contains(target)) setOpen(false)
+ }
document.addEventListener('mousedown', close)
return () => document.removeEventListener('mousedown', close)
}, [])
@@ -179,7 +251,7 @@ function StopPicker({ label, value, onPick, quickPicks, near, placeholder }: {
return (
<div ref={rootRef} style={{ position: 'relative', flex: 1, minWidth: 0 }}>
<label className="block text-[11px] font-semibold text-content-faint mb-[5px] uppercase tracking-[0.03em]">{label}</label>
- <div className="bg-surface-input border border-edge" style={{ display: 'flex', alignItems: 'center', gap: 7, borderRadius: 10, padding: '0 10px', height: 38 }}>
+ <div ref={fieldRef} className="bg-surface-input border border-edge" style={{ display: 'flex', alignItems: 'center', gap: 7, borderRadius: 10, padding: '0 10px', height: 38 }}>
<MapPin size={14} className="text-content-faint" style={{ flexShrink: 0 }} />
<input
value={display}
@@ -190,8 +262,10 @@ function StopPicker({ label, value, onPick, quickPicks, near, placeholder }: {
style={{ border: 0, background: 'none', outline: 'none', fontSize: 'calc(13px * var(--fs-scale-body, 1))', width: '100%', fontFamily: 'inherit' }}
/>
</div>
- {open && (results.length > 0 || (!value && text.trim().length < 2 && quickPicks.length > 0)) && (
- <div className="bg-surface-card border border-edge" style={{ position: 'absolute', top: '100%', left: 0, right: 0, marginTop: 4, borderRadius: 10, boxShadow: '0 8px 32px rgba(0,0,0,0.14)', zIndex: 30, overflow: 'hidden', maxHeight: 240, overflowY: 'auto' }}>
+ {open && listPos && (results.length > 0 || (!value && text.trim().length < 2 && quickPicks.length > 0)) && createPortal(
+ // On the page rather than inside the dialog, so a dialog that scrolls or clips
+ // its content cannot cut the list off before anything is typed.
+ <div ref={listRef} className="bg-surface-card border border-edge z-[var(--z-toast)]" style={{ position: 'fixed', left: listPos.left, width: listPos.width, ...(listPos.above ? { bottom: listPos.bottom } : { top: listPos.top }), borderRadius: 10, boxShadow: 'var(--shadow-dropdown)', overflow: 'hidden', maxHeight: listPos.maxHeight, overflowY: 'auto' }}>
{results.length > 0
? results.map((r, i) => (
<button type="button" key={i} onClick={() => { onPick({ name: r.name, lat: r.lat, lng: r.lng }); setText(''); setResults([]); setOpen(false) }}
@@ -202,7 +276,7 @@ function StopPicker({ label, value, onPick, quickPicks, near, placeholder }: {
<MapPin size={13} className="text-content-faint" style={{ flexShrink: 0 }} />
<span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
{r.name}
- {r.area && <span className="text-content-faint"> · {r.area}</span>}
+ {r.area && <span className="ml-1.5 text-content-faint">{r.area}</span>}
</span>
</button>
))
@@ -216,7 +290,8 @@ function StopPicker({ label, value, onPick, quickPicks, near, placeholder }: {
<span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{p.name}</span>
</button>
))}
- </div>
+ </div>,
+ document.body,
)}
</div>
)
@@ -402,7 +477,11 @@ export default function TransitSearchPanel({ day, days, places, accommodations =
const [addingIdx, setAddingIdx] = useState<number | null>(null)
const [provider, setProvider] = useState<TransitProvider | null>(null)
- const quickPicks = useMemo(() => buildQuickPicks(day, days, places, accommodations), [day, days, places, accommodations])
+ const reservations = useTripStore(s => s.reservations)
+ const quickPicks = useMemo(
+ () => buildQuickPicks(day, days, places, accommodations, dayBookingStops(day, reservations)),
+ [day, days, places, accommodations, reservations],
+ )
const near = quickPicks.length > 0 ? `${quickPicks[0].lat},${quickPicks[0].lng}` : null
diff --git a/client/src/components/Planner/TransportModal.tsx b/client/src/components/Planner/TransportModal.tsx
index 95a4cf9e8..b0be23237 100644
--- a/client/src/components/Planner/TransportModal.tsx
+++ b/client/src/components/Planner/TransportModal.tsx
@@ -1,6 +1,6 @@
import { useState, useEffect, useRef, useMemo, type ReactNode } from 'react'
import { useParams } from 'react-router'
-import { Plane, Train, Car, Ship, Bus, Sailboat, Bike, CarTaxiFront, Route, X, Trash2, ChevronUp, ChevronDown, CalendarDays, type LucideIcon } from 'lucide-react'
+import { Plane, Train, Car, Ship, Bus, Sailboat, CableCar, Bike, CarTaxiFront, Route, X, Trash2, ChevronUp, ChevronDown, CalendarDays, type LucideIcon } from 'lucide-react'
import ConfirmDialog from '../shared/ConfirmDialog'
import CustomSelect from '../shared/CustomSelect'
import { BookingCodeInput } from '../shared/BookingCode'
@@ -31,7 +31,7 @@ import { fs, Eyebrow, type StatusTone } from './bookings/bookingParts'
import { typeInfo } from './bookings/bookingsModel'
import { typeToCostCategory } from '@trek/shared'
-const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other'] as const
+const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other'] as const
type TransportType = typeof TRANSPORT_TYPES[number]
interface EndpointPick {
@@ -142,6 +142,7 @@ const TYPE_OPTIONS: { value: TransportType; labelKey: string; Icon: LucideIcon }
{ value: 'bicycle', labelKey: 'reservations.type.bicycle', Icon: Bike },
{ value: 'cruise', labelKey: 'reservations.type.cruise', Icon: Ship },
{ value: 'ferry', labelKey: 'reservations.type.ferry', Icon: Sailboat },
+ { value: 'cable_car', labelKey: 'reservations.type.cable_car', Icon: CableCar },
{ value: 'transport_other', labelKey: 'reservations.type.transport_other', Icon: Route },
]
diff --git a/client/src/components/Planner/TripExportModal.test.tsx b/client/src/components/Planner/TripExportModal.test.tsx
index f6fce6c48..584025dff 100644
--- a/client/src/components/Planner/TripExportModal.test.tsx
+++ b/client/src/components/Planner/TripExportModal.test.tsx
@@ -1,9 +1,12 @@
-// FE-PLANNER-EXPORTMODAL-001 to FE-PLANNER-EXPORTMODAL-017
+// FE-PLANNER-EXPORTMODAL-001 to FE-PLANNER-EXPORTMODAL-018
import { render, screen, waitFor } from '../../../tests/helpers/render'
import userEvent from '@testing-library/user-event'
import { downloadTripPDF } from '../PDF/TripPDF'
-import { buildDay, buildDayNote, buildTrip } from '../../../tests/helpers/factories'
+import { buildDay, buildDayNote, buildTrip, buildUser } from '../../../tests/helpers/factories'
import { TripExportModal } from './TripExportModal'
+import { resetAllStores, seedStore } from '../../../tests/helpers/store'
+import { useAuthStore } from '../../store/authStore'
+import type { AssignmentsMap } from '../../types'
vi.mock('../PDF/TripPDF', () => ({ downloadTripPDF: vi.fn().mockResolvedValue(undefined) }))
@@ -274,4 +277,18 @@ describe('TripExportModal', () => {
await user.click(screen.getByText('dayplan.gpxAll'))
await waitFor(() => expect(toast.error).toHaveBeenCalledWith('dayplan.gpxFailed'))
})
+
+ it('FE-PLANNER-EXPORTMODAL-018: "My plan" appears once people are assigned, and prints only mine (#2168)', async () => {
+ const user = userEvent.setup()
+ resetAllStores()
+ seedStore(useAuthStore, { user: buildUser({ id: 7 }) })
+ const { rerender } = render(<TripExportModal {...makeProps()} />)
+ expect(screen.queryByText('dayplan.pdfMine')).toBeNull()
+
+ const assignments = { 10: [{ id: 1, participants: [{ user_id: 7, username: 'me' }] }] } as unknown as AssignmentsMap
+ rerender(<TripExportModal {...makeProps({ assignments })} />)
+ await user.click(screen.getByText('dayplan.pdfMine'))
+ await waitFor(() => expect(downloadTripPDF).toHaveBeenCalledTimes(1))
+ expect(vi.mocked(downloadTripPDF).mock.calls[0][0]).toMatchObject({ onlyUserId: 7 })
+ })
})
diff --git a/client/src/components/Planner/TripExportModal.tsx b/client/src/components/Planner/TripExportModal.tsx
index 7908691b2..3d9501538 100644
--- a/client/src/components/Planner/TripExportModal.tsx
+++ b/client/src/components/Planner/TripExportModal.tsx
@@ -1,5 +1,5 @@
import { useId, useState } from 'react'
-import { CalendarDays, CalendarPlus, ChevronRight, Download, FileText, Loader2, MapPin, Route as RouteIcon } from 'lucide-react'
+import { CalendarDays, CalendarPlus, ChevronRight, Download, FileText, Loader2, MapPin, Route as RouteIcon, UserRound } from 'lucide-react'
import type { LucideIcon } from 'lucide-react'
import { DialogHeader, DialogSection, DialogShell, DialogTile, NEUTRAL_TINT, fs } from '../shared/DialogShell'
import { IcsSubscribeModal } from './IcsSubscribeModal'
@@ -8,6 +8,8 @@ import { useToast } from '../shared/Toast'
import type { Trip, Day, Place, Category, AssignmentsMap, Reservation, DayNote } from '../../types'
import { useSettingsStore } from '../../store/settingsStore'
import { useRoadtripSettings } from '../../hooks/useRoadtripSettings'
+import { useAuthStore } from '../../store/authStore'
+import { hasPersonalPlan } from '../PDF/pdfScope'
/**
* What a GPX download can carry. Worded by what someone wants on their device
@@ -81,9 +83,13 @@ export function TripExportModal({
setTimeout(() => { URL.revokeObjectURL(url); a.remove() }, 100)
}
- const exportPdf = async () => {
+ const myId = useAuthStore(s => s.user?.id)
+ // "My plan" (#2168) only once somebody has been given a part of the trip.
+ const offerMine = myId != null && hasPersonalPlan(assignments, reservations)
+
+ const exportPdf = async (mine = false) => {
if (busy) return
- setBusy('pdf')
+ setBusy(mine ? 'pdf:mine' : 'pdf')
const flatNotes = Object.entries(dayNotes).flatMap(([dayId, notes]) =>
notes.map(n => ({ ...n, day_id: Number(dayId) })),
)
@@ -93,7 +99,7 @@ export function TripExportModal({
// exported. A missing chunk lands in the catch and shows the same error
// the export already had.
const { downloadTripPDF } = await import('../PDF/TripPDF')
- await downloadTripPDF({ trip, days, places, assignments, categories, dayNotes: flatNotes, reservations, t, locale, timeFormat, distanceUnit, showServiceStops })
+ await downloadTripPDF({ trip, days, places, assignments, categories, dayNotes: flatNotes, reservations, t, locale, timeFormat, distanceUnit, showServiceStops, onlyUserId: mine ? myId : undefined })
onClose()
} catch (e) {
console.error('PDF error:', e)
@@ -154,14 +160,26 @@ export function TripExportModal({
its own: one key press closes only the dialog in front. */}
<DialogShell open={isOpen} onClose={onClose} labelledBy={titleId} width="narrow" blocked={subscribeOpen} header={header}>
<DialogSection label={t('dayplan.exportDocument')}>
- <ExportRow
- icon={FileText}
- title={t('dayplan.pdf')}
- sub={t('dayplan.pdfTooltip')}
- busy={busy === 'pdf'}
- disabled={busy != null}
- onClick={exportPdf}
- />
+ <div className="flex flex-col gap-1.5">
+ <ExportRow
+ icon={FileText}
+ title={t('dayplan.pdf')}
+ sub={t('dayplan.pdfTooltip')}
+ busy={busy === 'pdf'}
+ disabled={busy != null}
+ onClick={() => exportPdf()}
+ />
+ {offerMine && (
+ <ExportRow
+ icon={UserRound}
+ title={t('dayplan.pdfMine')}
+ sub={t('dayplan.pdfMineSub')}
+ busy={busy === 'pdf:mine'}
+ disabled={busy != null}
+ onClick={() => exportPdf(true)}
+ />
+ )}
+ </div>
</DialogSection>
<DialogSection label={t('dayplan.exportCalendar')}>
diff --git a/client/src/components/Planner/bookings/BookingsHeader.tsx b/client/src/components/Planner/bookings/BookingsHeader.tsx
index b2baa7469..08aeb2082 100644
--- a/client/src/components/Planner/bookings/BookingsHeader.tsx
+++ b/client/src/components/Planner/bookings/BookingsHeader.tsx
@@ -1,6 +1,6 @@
import { useCallback, useRef, useState, type ReactNode } from 'react'
import {
- ArrowDownUp, CalendarDays, Check, Download, Filter, GanttChart, Layers, LayoutGrid, Plane, Plus, RotateCcw, Rows3,
+ ArrowDownUp, CalendarDays, Check, Download, FileSpreadsheet, Filter, GanttChart, Layers, LayoutGrid, Plane, Plus, RotateCcw, Rows3,
Search, SlidersHorizontal, Tag, X,
} from 'lucide-react'
import { useTranslation } from '../../../i18n'
@@ -53,6 +53,8 @@ export interface BookingsHeaderProps {
onTransitApart?: () => void
viewIsDefault: boolean
onResetView: () => void
+ /** Downloads what is shown as a CSV (#1360). */
+ onExport?: () => void
}
/** A 36 px control on the bar, in the card colour so it reads on the bar's tint. */
@@ -118,6 +120,11 @@ export default function BookingsHeader(p: BookingsHeaderProps) {
))}
</div>
<ViewOptions {...p} />
+ {p.onExport && (
+ <Tooltip label={t('reservations.exportCsv')}>
+ <button type="button" onClick={p.onExport} aria-label={t('reservations.exportCsv')} className={BAR_BTN}><FileSpreadsheet size={15} strokeWidth={2} /></button>
+ </Tooltip>
+ )}
</>
)}
diff --git a/client/src/components/Planner/bookings/bookingsExport.test.ts b/client/src/components/Planner/bookings/bookingsExport.test.ts
new file mode 100644
index 000000000..6ee968bd4
--- /dev/null
+++ b/client/src/components/Planner/bookings/bookingsExport.test.ts
@@ -0,0 +1,42 @@
+// FE-BOOKINGS-EXPORT-001 to FE-BOOKINGS-EXPORT-003 (#1360)
+import { describe, it, expect } from 'vitest'
+import type { Reservation } from '../../../types'
+import { bookingsCsv, bookingsFileName, csvCell } from './bookingsExport'
+
+const labels = {
+ type: (t: string) => `T:${t}`,
+ status: (s: string) => `S:${s}`,
+ headers: { type: 'Type', title: 'Title', status: 'Status', start: 'Start', end: 'End', from: 'From', to: 'To', location: 'Location', confirmation: 'Confirmation', notes: 'Notes' },
+}
+
+describe('bookingsExport', () => {
+ it('FE-BOOKINGS-EXPORT-001: quotes what needs it and defuses formulas', () => {
+ expect(csvCell('plain')).toBe('plain')
+ expect(csvCell('a;b')).toBe('"a;b"')
+ expect(csvCell('say "hi"')).toBe('"say ""hi"""')
+ expect(csvCell('=SUM(A1)')).toBe("'=SUM(A1)")
+ expect(csvCell('-5')).toBe("'-5")
+ expect(csvCell(null)).toBe('')
+ })
+
+ it('FE-BOOKINGS-EXPORT-002: writes a header and one row per booking, route from its stops', () => {
+ const rows = [
+ { id: 1, type: 'flight', title: 'LH 190', status: 'confirmed', reservation_time: '2026-07-07T09:15', reservation_end_time: '2026-07-07T10:25', location: null, confirmation_number: 'ABC123', notes: 'Window',
+ endpoints: [{ sequence: 1, code: 'BER', name: 'Berlin' }, { sequence: 0, code: 'FRA', name: 'Frankfurt' }] },
+ { id: 2, type: 'hotel', title: 'Redo XXL', status: 'pending', reservation_time: null, reservation_end_time: null, location: 'Berlin', confirmation_number: null, notes: null },
+ ] as unknown as Reservation[]
+ const csv = bookingsCsv(rows, labels)
+ expect(csv.startsWith('\uFEFF')).toBe(true)
+ const lines = csv.slice(1).trim().split('\r\n')
+ expect(lines[0]).toBe('Type;Title;Status;Start;End;From;To;Location;Confirmation;Notes')
+ expect(lines[1]).toBe('T:flight;LH 190;S:confirmed;2026-07-07T09:15;2026-07-07T10:25;FRA Frankfurt;BER Berlin;;ABC123;Window')
+ expect(lines[2]).toBe('T:hotel;Redo XXL;S:pending;;;;;Berlin;;')
+ })
+
+ it('FE-BOOKINGS-EXPORT-003: names the file after the trip', () => {
+ expect(bookingsFileName('Berlin 2026', 'transports')).toBe('berlin-2026-transports.csv')
+ expect(bookingsFileName('Zürich & Côte', 'bookings')).toBe('zurich-cote-bookings.csv')
+ expect(bookingsFileName(undefined, 'bookings')).toBe('trip-bookings.csv')
+ expect(bookingsFileName('!!!', 'bookings')).toBe('trip-bookings.csv')
+ })
+})
diff --git a/client/src/components/Planner/bookings/bookingsExport.ts b/client/src/components/Planner/bookings/bookingsExport.ts
new file mode 100644
index 000000000..c2e65e93c
--- /dev/null
+++ b/client/src/components/Planner/bookings/bookingsExport.ts
@@ -0,0 +1,54 @@
+import type { Reservation } from '../../../types'
+
+interface ExportLabels {
+ type: (type: string) => string
+ status: (status: string) => string
+ headers: {
+ type: string; title: string; status: string; start: string; end: string
+ from: string; to: string; location: string; confirmation: string; notes: string
+ }
+}
+
+/**
+ * A spreadsheet cell: quoted when it holds a separator, a quote or a line break,
+ * and prefixed with an apostrophe when it would otherwise open as a formula, so a
+ * booking titled "=HYPERLINK(...)" stays text in Excel or Sheets.
+ */
+export function csvCell(value: string | null | undefined): string {
+ let text = value ?? ''
+ if (/^[=+\-@\t\r]/.test(text)) text = `'${text}`
+ return /[",;\n\r]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text
+}
+
+/** Where a booking starts and ends, from its ordered stops when it has them (#1360). */
+function fromTo(r: Reservation): [string, string] {
+ const stops = (r.endpoints || []).slice().sort((a, b) => (a.sequence ?? 0) - (b.sequence ?? 0))
+ if (stops.length < 2) return ['', '']
+ const name = (s: (typeof stops)[number]) => [s.code, s.name].filter(Boolean).join(' ')
+ return [name(stops[0]), name(stops[stops.length - 1])]
+}
+
+/**
+ * The bookings as a CSV for a spreadsheet (#1360), one row each in the order they
+ * are shown, with a header row. Times stay as TREK stores them (ISO, local to the
+ * booking), which every spreadsheet sorts correctly.
+ */
+export function bookingsCsv(reservations: Reservation[], labels: ExportLabels): string {
+ const h = labels.headers
+ const rows = [[h.type, h.title, h.status, h.start, h.end, h.from, h.to, h.location, h.confirmation, h.notes].map(csvCell).join(';')]
+ for (const r of reservations) {
+ const [from, to] = fromTo(r)
+ rows.push([
+ labels.type(r.type), r.title, labels.status(r.status), r.reservation_time, r.reservation_end_time,
+ from, to, r.location, r.confirmation_number, r.notes,
+ ].map(v => csvCell(v)).join(';'))
+ }
+ // A byte order mark, so Excel reads the umlauts as UTF-8.
+ return `\uFEFF${rows.join('\r\n')}\r\n`
+}
+
+/** "berlin-2026-bookings.csv": the trip's name, made safe for a file name. */
+export function bookingsFileName(tripTitle: string | undefined, section: string): string {
+ const slug = (tripTitle || 'trip').toLowerCase().normalize('NFKD').replace(/[\u0300-\u036f]/g, '').replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')
+ return `${slug || 'trip'}-${section}.csv`
+}
diff --git a/client/src/components/Planner/bookings/bookingsModel.ts b/client/src/components/Planner/bookings/bookingsModel.ts
index 670bbf95a..bd86b4c9d 100644
--- a/client/src/components/Planner/bookings/bookingsModel.ts
+++ b/client/src/components/Planner/bookings/bookingsModel.ts
@@ -1,5 +1,5 @@
import {
- Plane, Hotel, Utensils, Train, Car, Ship, Bus, Sailboat, Bike, CarTaxiFront, Route, Ticket, FileText,
+ Plane, Hotel, Utensils, Train, Car, Ship, Bus, Sailboat, CableCar, Bike, CarTaxiFront, Route, Ticket, FileText,
TramFront, Users, ParkingSquare, type LucideIcon,
} from 'lucide-react'
import type { AssignmentsMap, Day, Reservation } from '../../../types'
@@ -27,7 +27,7 @@ export interface ReservationTypeInfo {
// models so the two shells can never drift apart on what a flight looks like.
const TYPES: Record<string, { Icon: LucideIcon; chipKey?: string }> = {
flight: { Icon: Plane }, train: { Icon: Train }, bus: { Icon: Bus }, car: { Icon: Car },
- taxi: { Icon: CarTaxiFront }, bicycle: { Icon: Bike }, cruise: { Icon: Ship }, ferry: { Icon: Sailboat },
+ taxi: { Icon: CarTaxiFront }, bicycle: { Icon: Bike }, cruise: { Icon: Ship }, ferry: { Icon: Sailboat }, cable_car: { Icon: CableCar },
transit: { Icon: TramFront, chipKey: 'reservations.typeShort.transit' }, transport_other: { Icon: Route },
hotel: { Icon: Hotel }, restaurant: { Icon: Utensils }, event: { Icon: Ticket }, tour: { Icon: Users },
parking: { Icon: ParkingSquare }, other: { Icon: FileText },
@@ -45,7 +45,7 @@ export function typeInfo(type: string): ReservationTypeInfo {
/** The order the type pills appear in, whichever types a trip uses. */
export const TYPE_ORDER = [
- 'flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other',
+ 'flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other',
'hotel', 'restaurant', 'event', 'tour', 'parking', 'other',
]
diff --git a/client/src/components/Planner/parsedItemToDraft.ts b/client/src/components/Planner/parsedItemToDraft.ts
index a6c836f98..1b0df56d7 100644
--- a/client/src/components/Planner/parsedItemToDraft.ts
+++ b/client/src/components/Planner/parsedItemToDraft.ts
@@ -43,7 +43,7 @@ export function parsedItemToDraft(item: BookingImportPreviewItem): BookingReview
}
/** Transport types route to the TransportModal; everything else to the ReservationModal. */
-const TRANSPORT_TYPES = new Set(['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other'])
+const TRANSPORT_TYPES = new Set(['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other'])
/** The types the booking form can express — its own chip list. */
const BOOKING_TYPES = new Set(['hotel', 'restaurant', 'event', 'tour', 'activity', 'parking', 'other'])
diff --git a/client/src/components/Planner/placeCategoryGuess.test.ts b/client/src/components/Planner/placeCategoryGuess.test.ts
new file mode 100644
index 000000000..15ca1b6d4
--- /dev/null
+++ b/client/src/components/Planner/placeCategoryGuess.test.ts
@@ -0,0 +1,53 @@
+// FE-PLANNER-CATGUESS-001 to FE-PLANNER-CATGUESS-006
+import { describe, it, expect } from 'vitest'
+import { guessCategoryId, kindOfResult } from './placeCategoryGuess'
+
+const seeded = [
+ { id: 1, name: 'Hotel', icon: '🏨' },
+ { id: 2, name: 'Restaurant', icon: '🍽️' },
+ { id: 3, name: 'Attraction', icon: '🏛️' },
+ { id: 4, name: 'Shopping', icon: '🛍️' },
+ { id: 5, name: 'Transport', icon: '🚌' },
+ { id: 6, name: 'Activity', icon: '🎯' },
+ { id: 7, name: 'Bar/Cafe', icon: '☕' },
+ { id: 8, name: 'Beach', icon: '🏖️' },
+ { id: 9, name: 'Nature', icon: '🌿' },
+ { id: 10, name: 'Other', icon: '📍' },
+]
+
+describe('guessCategoryId', () => {
+ it('FE-PLANNER-CATGUESS-001: an OSM hotel lands in the Hotel category', () => {
+ expect(guessCategoryId({ category: 'hotel' }, seeded)).toBe(1)
+ expect(guessCategoryId({ category: 'guest_house' }, seeded)).toBe(1)
+ })
+
+ it('FE-PLANNER-CATGUESS-002: Google types are read in order, so a restaurant bar is still a bar', () => {
+ expect(guessCategoryId({ types: ['restaurant', 'food', 'point_of_interest'] }, seeded)).toBe(2)
+ expect(guessCategoryId({ types: ['bar', 'restaurant'] }, seeded)).toBe(7)
+ expect(guessCategoryId({ types: ['museum', 'tourist_attraction'] }, seeded)).toBe(3)
+ })
+
+ it('FE-PLANNER-CATGUESS-003: a shop and a station find their categories', () => {
+ expect(guessCategoryId({ category: 'shop_bakery' }, seeded)).toBe(7)
+ expect(guessCategoryId({ category: 'shop_clothes' }, seeded)).toBe(4)
+ expect(guessCategoryId({ types: ['train_station', 'transit_station'] }, seeded)).toBe(5)
+ })
+
+ it('FE-PLANNER-CATGUESS-004: renamed categories are still found, by a local name or their icon', () => {
+ expect(guessCategoryId({ category: 'hotel' }, [{ id: 42, name: 'Unterkunft', icon: 'X' }])).toBe(42)
+ expect(guessCategoryId({ category: 'hotel' }, [{ id: 43, name: 'Schlafen', icon: 'BedDouble' }])).toBe(43)
+ })
+
+ it('FE-PLANNER-CATGUESS-005: nothing to go on, or nothing that fits, leaves the field empty', () => {
+ expect(guessCategoryId({}, seeded)).toBeNull()
+ expect(guessCategoryId({ types: ['point_of_interest'] }, seeded)).toBeNull()
+ expect(guessCategoryId({ category: 'hotel' }, [{ id: 1, name: 'Food', icon: '🍴' }])).toBeNull()
+ })
+
+ it('FE-PLANNER-CATGUESS-006: the kind is read from any source vocabulary', () => {
+ expect(kindOfResult({ category: 'italian_restaurant' })).toBe('food')
+ expect(kindOfResult({ category: 'beach' })).toBe('beach')
+ expect(kindOfResult({ types: ['park'] })).toBe('nature')
+ expect(kindOfResult({ category: 'swimming_pool' })).toBe('activity')
+ })
+})
diff --git a/client/src/components/Planner/placeCategoryGuess.ts b/client/src/components/Planner/placeCategoryGuess.ts
new file mode 100644
index 000000000..5fe19cdf5
--- /dev/null
+++ b/client/src/components/Planner/placeCategoryGuess.ts
@@ -0,0 +1,72 @@
+import type { Category } from '../../types'
+
+type Kind = 'lodging' | 'food' | 'drinks' | 'sight' | 'shopping' | 'transport' | 'beach' | 'nature' | 'activity'
+
+/**
+ * What a search result says it is, read from whichever vocabulary its source speaks:
+ * Google `types`, the OpenStreetMap tag value, or the TREK Places (Overture) category.
+ * Checked in order, first hit wins, so the specific kinds sit before the broad ones
+ * ("bar" before "restaurant" would misfile a "restaurant_bar" otherwise).
+ */
+const KIND_TERMS: [Kind, string[]][] = [
+ ['lodging', ['hotel', 'hostel', 'motel', 'guest_house', 'lodging', 'resort', 'camp_site', 'campground', 'campsite', 'chalet', 'bed_and_breakfast', 'alpine_hut', 'apartment', 'caravan_site']],
+ ['beach', ['beach']],
+ ['drinks', ['cafe', 'coffee', 'bar', 'pub', 'biergarten', 'night_club', 'nightclub', 'bakery', 'ice_cream', 'wine_bar', 'brewery', 'tea_house']],
+ ['food', ['restaurant', 'fast_food', 'food', 'meal_', 'bistro', 'diner', 'pizzeria', 'steakhouse']],
+ ['transport', ['station', 'airport', 'aerodrome', 'ferry_terminal', 'bus_stop', 'terminal', 'car_rental', 'parking']],
+ ['shopping', ['shop', 'store', 'mall', 'supermarket', 'market', 'department_store', 'boutique']],
+ ['sight', ['museum', 'attraction', 'viewpoint', 'monument', 'memorial', 'castle', 'artwork', 'gallery', 'church', 'cathedral', 'place_of_worship', 'historic', 'ruins', 'landmark', 'zoo', 'aquarium', 'palace', 'tower']],
+ ['nature', ['park', 'nature_reserve', 'national_park', 'peak', 'waterfall', 'forest', 'garden', 'natural_feature', 'lake', 'hiking']],
+ ['activity', ['amusement_park', 'theme_park', 'stadium', 'sports', 'spa', 'gym', 'cinema', 'theatre', 'theater', 'bowling', 'swimming', 'golf', 'climbing', 'ski']],
+]
+
+/** How a trip's category of that kind is recognised: words in its name, then its icon. */
+const KIND_CATEGORY: Record<Kind, { names: string[]; icons: string[] }> = {
+ lodging: { names: ['hotel', 'accommodation', 'lodging', 'unterkunft', 'hébergement', 'alojamiento', 'alloggio', 'stay', 'hostel', 'camping'], icons: ['🏨', '🛏️', '🏠', 'BedDouble', 'Home', 'Tent'] },
+ food: { names: ['restaurant', 'food', 'essen', 'ristorante', 'restaurante', 'eat'], icons: ['🍽️', '🍴', 'UtensilsCrossed', 'Utensils'] },
+ drinks: { names: ['cafe', 'café', 'bar', 'coffee', 'kaffee', 'pub', 'drinks'], icons: ['☕', '🍺', '🍸', 'Coffee', 'Beer', 'Wine'] },
+ sight: { names: ['attraction', 'sight', 'sehenswürdigkeit', 'museum', 'attraktion', 'culture', 'kultur'], icons: ['🏛️', '📸', 'Landmark', 'Library', 'Camera', 'Church'] },
+ shopping: { names: ['shopping', 'shop', 'einkauf', 'store', 'markt'], icons: ['🛍️', 'ShoppingBag', 'Store'] },
+ transport: { names: ['transport', 'verkehr', 'transit', 'station'], icons: ['🚌', '🚆', '✈️', 'Bus', 'Train', 'Plane'] },
+ beach: { names: ['beach', 'strand', 'plage', 'playa', 'spiaggia'], icons: ['🏖️', 'Waves'] },
+ nature: { names: ['nature', 'natur', 'park', 'outdoor', 'hiking', 'wandern'], icons: ['🌿', '🌲', '⛰️', 'TreePine', 'Leaf', 'Mountain'] },
+ activity: { names: ['activity', 'aktivität', 'activité', 'actividad', 'attività', 'sport'], icons: ['🎯', 'Activity', 'Dumbbell', 'Ticket'] },
+}
+
+/** The words a result carries about itself, lower-cased, whatever the source. */
+function resultTerms(result: Record<string, unknown>): string[] {
+ const terms: string[] = []
+ if (Array.isArray(result.types)) for (const t of result.types) if (typeof t === 'string') terms.push(t.toLowerCase())
+ if (typeof result.category === 'string') terms.push(result.category.toLowerCase())
+ return terms
+}
+
+export function kindOfResult(result: Record<string, unknown>): Kind | null {
+ const terms = resultTerms(result)
+ if (terms.length === 0) return null
+ for (const [kind, words] of KIND_TERMS) {
+ if (terms.some(term => words.some(word => term.includes(word)))) return kind
+ }
+ return null
+}
+
+/**
+ * The trip category a picked search result most likely belongs in (#2282), or null.
+ *
+ * Categories are the admin's own, freely named and freely iconed, so there is no key to
+ * look up; they are recognised by their name, then by their icon. When nothing matches
+ * the answer is null and the field stays empty, because a wrong category that looks
+ * deliberate is worse than none.
+ */
+export function guessCategoryId(result: Record<string, unknown>, categories: Pick<Category, 'id' | 'name' | 'icon'>[]): number | null {
+ const kind = kindOfResult(result)
+ if (!kind) return null
+ const { names, icons } = KIND_CATEGORY[kind]
+ const byName = categories.find(c => {
+ const name = (c.name || '').toLowerCase()
+ return names.some(word => name.includes(word))
+ })
+ if (byName) return byName.id
+ const byIcon = categories.find(c => c.icon != null && icons.includes(c.icon))
+ return byIcon ? byIcon.id : null
+}
diff --git a/client/src/components/Planner/placeLocalityFilter.test.ts b/client/src/components/Planner/placeLocalityFilter.test.ts
new file mode 100644
index 000000000..f6bcd4af3
--- /dev/null
+++ b/client/src/components/Planner/placeLocalityFilter.test.ts
@@ -0,0 +1,29 @@
+// FE-PLANNER-LOCFILTER-001 to FE-PLANNER-LOCFILTER-002
+import { describe, it, expect } from 'vitest'
+import { localityGroups, matchesLocality } from './placeLocalityFilter'
+
+describe('localityGroups', () => {
+ it('FE-PLANNER-LOCFILTER-001: groups by country and region, most places first, unknown countries left out', () => {
+ const groups = localityGroups([
+ { country: 'Germany', region: 'Berlin' },
+ { country: 'Germany', region: 'Berlin' },
+ { country: 'Germany', region: 'Brandenburg' },
+ { country: 'France', region: 'Île-de-France' },
+ { country: null, region: null },
+ ])
+ expect(groups).toEqual([
+ { country: 'Germany', count: 3, regions: [{ region: 'Berlin', count: 2 }, { region: 'Brandenburg', count: 1 }] },
+ { country: 'France', count: 1, regions: [{ region: 'Île-de-France', count: 1 }] },
+ ])
+ })
+})
+
+describe('matchesLocality', () => {
+ it('FE-PLANNER-LOCFILTER-002: a country filter takes all its regions, a region filter only that one', () => {
+ const berlin = { country: 'Germany', region: 'Berlin' }
+ expect(matchesLocality(berlin, { country: 'Germany', region: null })).toBe(true)
+ expect(matchesLocality(berlin, { country: 'Germany', region: 'Brandenburg' })).toBe(false)
+ expect(matchesLocality(berlin, { country: 'France', region: null })).toBe(false)
+ expect(matchesLocality(undefined, { country: 'Germany', region: null })).toBe(false)
+ })
+})
diff --git a/client/src/components/Planner/placeLocalityFilter.ts b/client/src/components/Planner/placeLocalityFilter.ts
new file mode 100644
index 000000000..3974df766
--- /dev/null
+++ b/client/src/components/Planner/placeLocalityFilter.ts
@@ -0,0 +1,42 @@
+import type { PlaceLocality } from '../../utils/placeLocality'
+
+/** A country on its own, or one region in it. */
+export interface LocalityFilter {
+ country: string
+ region: string | null
+}
+
+export interface LocalityGroup {
+ country: string
+ count: number
+ regions: { region: string; count: number }[]
+}
+
+/**
+ * The trip's places by country and region, for the filter's list (#2537). Countries by
+ * how many places they hold, then by name; the same for the regions inside each. Places
+ * whose address names no country are left out, they have nothing to be filtered by.
+ */
+export function localityGroups(localities: PlaceLocality[]): LocalityGroup[] {
+ const byCountry = new Map<string, { count: number; regions: Map<string, number> }>()
+ for (const { country, region } of localities) {
+ if (!country) continue
+ const entry = byCountry.get(country) ?? { count: 0, regions: new Map<string, number>() }
+ entry.count++
+ if (region) entry.regions.set(region, (entry.regions.get(region) ?? 0) + 1)
+ byCountry.set(country, entry)
+ }
+ const byCountThenName = <T extends { count: number }>(a: T, b: T, na: string, nb: string) => b.count - a.count || na.localeCompare(nb)
+ return [...byCountry.entries()]
+ .map(([country, { count, regions }]) => ({
+ country,
+ count,
+ regions: [...regions.entries()].map(([region, n]) => ({ region, count: n })).sort((a, b) => byCountThenName(a, b, a.region, b.region)),
+ }))
+ .sort((a, b) => byCountThenName(a, b, a.country, b.country))
+}
+
+export function matchesLocality(locality: PlaceLocality | undefined, filter: LocalityFilter): boolean {
+ if (!locality || locality.country !== filter.country) return false
+ return filter.region == null || locality.region === filter.region
+}
diff --git a/client/src/components/Planner/placeNavigation.test.ts b/client/src/components/Planner/placeNavigation.test.ts
index c99dc81de..45bb6e5f3 100644
--- a/client/src/components/Planner/placeNavigation.test.ts
+++ b/client/src/components/Planner/placeNavigation.test.ts
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, it, vi } from 'vitest'
-import { getNavigationTargets, openNavigationTarget, showsAppleMaps } from './placeNavigation'
+import { getNavigationTargets, navigationTargetLabel, openNavigationTarget, showsAppleMaps, showsGeoUri } from './placeNavigation'
import type { Place } from '../../types'
// FE-PLANNER-NAV-001 to FE-PLANNER-NAV-008
@@ -58,7 +58,7 @@ describe('getNavigationTargets', () => {
it('FE-PLANNER-NAV-004b: an Android phone does not, because nobody there wants it', () => {
const restore = withUserAgent('Mozilla/5.0 (Linux; Android 15; Pixel 9)')
try {
- expect(getNavigationTargets(place()).map(t => t.id)).toEqual(['google', 'waze', 'osm', 'comaps'])
+ expect(getNavigationTargets(place()).map(t => t.id)).toEqual(['google', 'waze', 'osm', 'comaps', 'geo'])
} finally { restore() }
})
@@ -94,6 +94,25 @@ describe('getNavigationTargets', () => {
expect(targets.map(t => t.id)).not.toContain('comaps')
})
+ it('FE-PLANNER-NAV-104: Android gets a geo: link for any installed map app, labeled in the UI language (#1406)', () => {
+ const restore = withUserAgent('Mozilla/5.0 (Linux; Android 15; Pixel 9)')
+ try {
+ expect(showsGeoUri()).toBe(true)
+ const geo = getNavigationTargets(place()).find(t => t.id === 'geo')!
+ expect(geo.url).toBe('geo:48.2038,16.3616?q=48.2038,16.3616(Stephansdom)')
+ expect(navigationTargetLabel(geo, key => `t:${key}`)).toBe('t:inspector.otherMapApp')
+ } finally { restore() }
+ })
+
+ it('FE-PLANNER-NAV-105: no geo: entry where nothing would answer it', () => {
+ const restore = withUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X)')
+ try {
+ expect(getNavigationTargets(place()).map(t => t.id)).not.toContain('geo')
+ const google = getNavigationTargets(place())[0]
+ expect(navigationTargetLabel(google, key => `t:${key}`)).toBe('Google Maps')
+ } finally { restore() }
+ })
+
it('FE-PLANNER-NAV-008: no place at all yields nothing', () => {
expect(getNavigationTargets(null)).toEqual([])
expect(getNavigationTargets(place({ lat: null, lng: null, name: '' }))).toEqual([])
diff --git a/client/src/components/Planner/placeNavigation.ts b/client/src/components/Planner/placeNavigation.ts
index 9dd0548c0..056ef3f44 100644
--- a/client/src/components/Planner/placeNavigation.ts
+++ b/client/src/components/Planner/placeNavigation.ts
@@ -7,15 +7,34 @@ import { getOpenStreetMapUrlForPlace } from './placeOpenStreetMap'
type PlaceLike = Pick<Place | AssignmentPlace, 'name' | 'address' | 'lat' | 'lng' | 'google_place_id' | 'google_ftid'>
-export type NavigationAppId = 'google' | 'waze' | 'apple' | 'osm' | 'comaps' | 'amap'
+export type NavigationAppId = 'google' | 'waze' | 'apple' | 'osm' | 'comaps' | 'amap' | 'geo'
export interface NavigationTarget {
id: NavigationAppId
/** Product name. Not translated in any language, so it carries no i18n key. */
label: string
+ /** Set for the one entry that is no product (#1406): its label is this key's translation. */
+ labelKey?: string
url: string
}
+type Translate = (key: string) => string
+
+/** What a target is called on screen: its product name, or the translated name of the generic entry. */
+export function navigationTargetLabel(target: NavigationTarget, t: Translate): string {
+ return target.labelKey ? t(target.labelKey) : target.label
+}
+
+/**
+ * Whether the generic `geo:` link is worth offering (#1406). Android hands it to
+ * whichever map app the traveller installed (OsmAnd, Organic Maps, Magic Earth…);
+ * desktop browsers and iOS have no handler, so there the entry would lead nowhere.
+ */
+export function showsGeoUri(): boolean {
+ if (typeof navigator === 'undefined') return false
+ return /Android/i.test(navigator.userAgent)
+}
+
/**
* Whether Apple Maps is worth offering.
*
@@ -105,6 +124,16 @@ export function getNavigationTargets(
if (amapUrl) targets.push({ id: 'amap', label: '高德地图', url: amapUrl })
}
+ if (place.lat != null && place.lng != null && showsGeoUri()) {
+ const label = name ? `(${encodeURIComponent(name)})` : ''
+ targets.push({
+ id: 'geo',
+ label: 'geo:',
+ labelKey: 'inspector.otherMapApp',
+ url: `geo:${place.lat},${place.lng}?q=${place.lat},${place.lng}${label}`,
+ })
+ }
+
return targets
}
@@ -120,7 +149,8 @@ export function getNavigationTargets(
* shell was never replaced by the time the platform switched away.
*/
export function openNavigationTarget(target: NavigationTarget): void {
- if (isInstalledApp()) window.location.href = target.url
+ // A geo: link is handed to the system, which asks for the app; a new tab would stay blank.
+ if (target.id === 'geo' || isInstalledApp()) window.location.href = target.url
else window.open(target.url, '_blank', 'noopener,noreferrer')
}
diff --git a/client/src/components/Planner/routeModes.ts b/client/src/components/Planner/routeModes.ts
new file mode 100644
index 000000000..35b654e6b
--- /dev/null
+++ b/client/src/components/Planner/routeModes.ts
@@ -0,0 +1,38 @@
+import { useMemo } from 'react'
+import { Bike, Car, Footprints, Zap, type LucideIcon } from 'lucide-react'
+import { useTranslation } from '../../i18n'
+import { usePluginStore } from '../../store/pluginStore'
+
+export interface RouteModeOption {
+ key: string
+ label: string
+}
+
+/** The icon a route profile key is drawn with, wherever a leg or a day names its mode. */
+export function routeModeIcon(mode: string | null | undefined): LucideIcon {
+ if (mode === 'walking') return Footprints
+ if (mode === 'cycling') return Bike
+ if (mode?.startsWith('plugin:')) return Zap
+ return Car
+}
+
+/**
+ * Every mode a day or a single leg can be given: the three built-in profiles plus
+ * each profile a granted routeProvider plugin declared, keyed 'plugin:<id>/<profile>'
+ * and labeled by the plugin's manifest.
+ */
+export function useRouteModeOptions(): RouteModeOption[] {
+ const { t } = useTranslation()
+ const activePlugins = usePluginStore(s => s.plugins)
+ return useMemo(() => {
+ const opts: RouteModeOption[] = [
+ { key: 'driving', label: t('mobileTrip.profileDriving') },
+ { key: 'walking', label: t('mobileTrip.profileWalking') },
+ { key: 'cycling', label: t('mobileTrip.profileCycling') },
+ ]
+ for (const p of activePlugins) {
+ for (const prof of p.routeProfiles ?? []) opts.push({ key: `plugin:${p.id}/${prof.id}`, label: prof.label })
+ }
+ return opts
+ }, [activePlugins, t])
+}
diff --git a/client/src/components/Planner/stayDayTimes.test.ts b/client/src/components/Planner/stayDayTimes.test.ts
new file mode 100644
index 000000000..e202ff2a4
--- /dev/null
+++ b/client/src/components/Planner/stayDayTimes.test.ts
@@ -0,0 +1,24 @@
+// FE-PLANNER-STAYTIMES-001 to FE-PLANNER-STAYTIMES-004
+import { describe, it, expect } from 'vitest'
+import { stayDayTimes } from './stayDayTimes'
+
+const stay = { start_day_id: 1, end_day_id: 3, check_in: '15:00', check_out: '10:00' }
+
+describe('stayDayTimes', () => {
+ it('FE-PLANNER-STAYTIMES-001: the arrival day keeps only the check-in', () => {
+ expect(stayDayTimes(stay, 1)).toEqual({ checkIn: true, checkOut: false })
+ })
+
+ it('FE-PLANNER-STAYTIMES-002: the departure day keeps only the check-out', () => {
+ expect(stayDayTimes(stay, 3)).toEqual({ checkIn: false, checkOut: true })
+ })
+
+ it('FE-PLANNER-STAYTIMES-003: a night in the middle shows neither time', () => {
+ expect(stayDayTimes(stay, 2)).toEqual({ checkIn: false, checkOut: false })
+ })
+
+ it('FE-PLANNER-STAYTIMES-004: a stay within one day shows both, and an unset time never shows', () => {
+ expect(stayDayTimes({ ...stay, end_day_id: 1 }, 1)).toEqual({ checkIn: true, checkOut: true })
+ expect(stayDayTimes({ ...stay, check_in: null }, 1)).toEqual({ checkIn: false, checkOut: false })
+ })
+})
diff --git a/client/src/components/Planner/stayDayTimes.ts b/client/src/components/Planner/stayDayTimes.ts
new file mode 100644
index 000000000..9c1fd3cd8
--- /dev/null
+++ b/client/src/components/Planner/stayDayTimes.ts
@@ -0,0 +1,25 @@
+interface StayRange {
+ start_day_id: number | null
+ end_day_id: number | null
+ check_in?: string | null
+ check_out?: string | null
+}
+
+export interface StayDayTimes {
+ /** The check-in time belongs on this day: it is the arrival day and a time is set. */
+ checkIn: boolean
+ /** The check-out time belongs on this day: it is the departure day and a time is set. */
+ checkOut: boolean
+}
+
+/**
+ * Which of a stay's two times matter on a given day (#2393). The arrival day shows the
+ * check-in, the departure day the check-out, a one-night stop on a single day both; a
+ * night in the middle of the stay shows neither, since nothing happens at the desk then.
+ */
+export function stayDayTimes(stay: StayRange, dayId: number): StayDayTimes {
+ return {
+ checkIn: stay.start_day_id === dayId && !!stay.check_in,
+ checkOut: stay.end_day_id === dayId && !!stay.check_out,
+ }
+}
diff --git a/client/src/components/Planner/usePlacesSidebar.ts b/client/src/components/Planner/usePlacesSidebar.ts
index 8f4e8416a..9cf90d3e7 100644
--- a/client/src/components/Planner/usePlacesSidebar.ts
+++ b/client/src/components/Planner/usePlacesSidebar.ts
@@ -1,4 +1,6 @@
import type React from 'react'
+import { placeLocality } from '../../utils/placeLocality'
+import { localityGroups, matchesLocality, type LocalityFilter } from './placeLocalityFilter'
import { useState, useMemo, useEffect, useLayoutEffect, useRef, useCallback } from 'react'
import { Pencil, Trash2, ExternalLink, Navigation, CalendarDays, Bookmark } from 'lucide-react'
import { useTranslation } from '../../i18n'
@@ -73,7 +75,7 @@ export function usePlacesSidebar(props: PlacesSidebarProps) {
tripId, places, assignments, selectedDayId, days, accommodations = NO_ACCOMMODATIONS,
pushUndo, initialScrollTop, onScrollTopChange, onEditPlace, onAssignToDay, onDeletePlace,
} = props
- const { t } = useTranslation()
+ const { t, language } = useTranslation()
const toast = useToast()
const ctxMenu = useContextMenu()
const trip = useTripStore((s) => s.trip)
@@ -184,6 +186,11 @@ export function usePlacesSidebar(props: PlacesSidebarProps) {
// which put the best first but still left everything else on the list — no
// help at all when the point is to see only what the group actually rated.
const [ratingFilter, setRatingFilter] = useState<number | 'all'>('all')
+ // Country, or country and region, from each place's resolved position (#2537). List-only,
+ // like the rating floor.
+ const [localityFilter, setLocalityFilter] = useState<LocalityFilter | null>(null)
+ const localityOf = useMemo(() => new Map(places.map(p => [p.id, placeLocality(p, language)])), [places, language])
+ const localities = useMemo(() => localityGroups(places.map(p => localityOf.get(p.id)!)), [places, localityOf])
const [selectedIds, setSelectedIds] = useState<Set<number>>(new Set())
const [pendingDeleteIds, setPendingDeleteIds] = useState<number[] | null>(null)
const [categoryPickerOpen, setCategoryPickerOpen] = useState(false)
@@ -286,10 +293,11 @@ export function usePlacesSidebar(props: PlacesSidebarProps) {
if (search && !p.name.toLowerCase().includes(search.toLowerCase()) &&
!(p.address || '').toLowerCase().includes(search.toLowerCase())) return false
if (ratingFilter !== 'all' && (p.rating_avg == null || p.rating_avg < ratingFilter)) return false
+ if (localityFilter && !matchesLocality(localityOf.get(p.id), localityFilter)) return false
return true
})
return list
- }, [places, filter, categoryFilters, search, plannedIds, plannedFilterIds, ratingFilter])
+ }, [places, filter, categoryFilters, search, plannedIds, plannedFilterIds, ratingFilter, localityFilter, localityOf])
/**
* How many places each "show" choice would leave, under the category and search
@@ -399,6 +407,7 @@ export function usePlacesSidebar(props: PlacesSidebarProps) {
search, setSearch, filter, setFilter, pickFilter, filterCounts,
categoryFilters, setCategoryFilters,
ratingFilter, setRatingFilter,
+ localityFilter, setLocalityFilter, localities,
selectMode, setSelectMode, selectedIds, setSelectedIds, pendingDeleteIds, setPendingDeleteIds,
categoryPickerOpen, setCategoryPickerOpen,
saveToListOpen, setSaveToListOpen, collectionsEnabled, tripId,
diff --git a/client/src/components/Settings/DisplaySettingsTab.test.tsx b/client/src/components/Settings/DisplaySettingsTab.test.tsx
index 3d00e38a7..dce07d37e 100644
--- a/client/src/components/Settings/DisplaySettingsTab.test.tsx
+++ b/client/src/components/Settings/DisplaySettingsTab.test.tsx
@@ -1,4 +1,4 @@
-// FE-COMP-DISPLAY-001 to FE-COMP-DISPLAY-054
+// FE-COMP-DISPLAY-001 to FE-COMP-DISPLAY-055
import { render, screen, within, fireEvent } from '../../../tests/helpers/render';
import userEvent from '@testing-library/user-event';
import { http, HttpResponse } from 'msw';
@@ -193,6 +193,21 @@ function optionBlock(label: RegExp): HTMLElement {
}
describe('DisplaySettingsTab – Display currency', () => {
+ it('FE-COMP-DISPLAY-055: place names follow the app until another language is picked for them (#1799)', async () => {
+ const user = userEvent.setup();
+ const updateSetting = vi.fn().mockResolvedValue(undefined);
+ seedStore(useSettingsStore, { settings: buildSettings({ language: 'de' }), updateSetting });
+ render(<DisplaySettingsTab />);
+
+ await user.click(screen.getByRole('button', { name: 'Same as the app' }));
+ // The language grid shows the same name, so the option is the last one on screen.
+ const options = await screen.findAllByText('English');
+ await user.click(options[options.length - 1]);
+
+ expect(updateSetting).toHaveBeenCalledWith('place_language', 'en');
+ expect(updateSetting).not.toHaveBeenCalledWith('language', expect.anything());
+ });
+
it('FE-COMP-DISPLAY-033: picking "Trip currency" clears the personal display currency', async () => {
const user = userEvent.setup();
const updateSetting = vi.fn().mockResolvedValue(undefined);
diff --git a/client/src/components/Settings/DisplaySettingsTab.tsx b/client/src/components/Settings/DisplaySettingsTab.tsx
index eadd580da..7b27f07e4 100644
--- a/client/src/components/Settings/DisplaySettingsTab.tsx
+++ b/client/src/components/Settings/DisplaySettingsTab.tsx
@@ -38,6 +38,11 @@ export default function DisplaySettingsTab(): React.ReactElement {
setDistanceUnit(settings.distance_unit || DEFAULT_SETTINGS.distance_unit)
}, [settings.distance_unit])
+ const saveOnOff = async (key: OnOffKey, value: boolean) => {
+ try { await updateSetting(key, value) }
+ catch (e: unknown) { toast.error(e instanceof Error ? e.message : t('common.error')) }
+ }
+
const startPage = settings.start_page === 'active_trip' ? 'active_trip' : DEFAULT_START_PAGE
const startTripTab = settings.start_trip_tab || DEFAULT_START_TRIP_TAB
@@ -195,6 +200,24 @@ export default function DisplaySettingsTab(): React.ReactElement {
</div>
</div>
+ {/* Place names (#1799): searches can answer in another language than the app. */}
+ <div>
+ <label className="block text-sm font-medium mb-2 text-content-secondary">{t('settings.placeLanguage')}</label>
+ <CustomSelect
+ value={settings.place_language || ''}
+ onChange={async v => {
+ try { await updateSetting('place_language', String(v)) }
+ catch (e: unknown) { toast.error(e instanceof Error ? e.message : t('common.error')) }
+ }}
+ options={[
+ { value: '', label: t('settings.placeLanguageApp') },
+ ...SUPPORTED_LANGUAGES.map(opt => ({ value: opt.value, label: opt.label })),
+ ]}
+ searchable
+ />
+ <p className="text-xs text-content-faint mt-2">{t('settings.placeLanguageHint')}</p>
+ </div>
+
{/* Temperature */}
<div>
<label className="block text-sm font-medium mb-2 text-content-secondary">{t('settings.temperature')}</label>
@@ -304,160 +327,62 @@ export default function DisplaySettingsTab(): React.ReactElement {
</Section>
<Section title={t('settings.general.travelMap')} icon={Map}>
+ {/* Date first in day headings (#1953) */}
+ <OnOffSetting label={t('settings.dayDateFirst')} hint={t('settings.dayDateFirstHint')} on={settings.day_date_first === true} onChange={value => saveOnOff('day_date_first', value)} />
+
{/* Booking route labels */}
- <div>
- <label className="block text-sm font-medium mb-2 text-content-secondary">{t('settings.bookingLabels')}</label>
- <div className="flex gap-3">
- {[
- { value: true, label: t('settings.on') || 'On' },
- { value: false, label: t('settings.off') || 'Off' },
- ].map(opt => (
- <button type="button"
- key={String(opt.value)}
- onClick={async () => {
- try { await updateSetting('map_booking_labels', opt.value) }
- catch (e: unknown) { toast.error(e instanceof Error ? e.message : t('common.error')) }
- }}
- style={{
- display: 'flex', alignItems: 'center', gap: 8,
- padding: '10px 20px', borderRadius: 10, cursor: 'pointer',
- fontFamily: 'inherit', fontSize: 'calc(14px * var(--fs-scale-body, 1))', fontWeight: 500,
- border: (settings.map_booking_labels === true) === opt.value ? '2px solid var(--text-primary)' : '2px solid var(--border-primary)',
- background: (settings.map_booking_labels === true) === opt.value ? 'var(--bg-hover)' : 'var(--bg-card)',
- color: 'var(--text-primary)',
- transition: 'all 0.15s',
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- <p className="text-xs mt-1 text-content-faint">{t('settings.bookingLabelsHint')}</p>
- </div>
+ <OnOffSetting label={t('settings.bookingLabels')} hint={t('settings.bookingLabelsHint')} on={settings.map_booking_labels === true} onChange={value => saveOnOff('map_booking_labels', value)} />
{/* Always show booking routes */}
- <div>
- <label className="block text-sm font-medium mb-2 text-content-secondary">{t('settings.alwaysShowRoutes')}</label>
- <div className="flex gap-3">
- {[
- { value: true, label: t('settings.on') || 'On' },
- { value: false, label: t('settings.off') || 'Off' },
- ].map(opt => (
- <button type="button"
- key={String(opt.value)}
- onClick={async () => {
- try { await updateSetting('map_always_show_routes', opt.value) }
- catch (e: unknown) { toast.error(e instanceof Error ? e.message : t('common.error')) }
- }}
- style={{
- display: 'flex', alignItems: 'center', gap: 8,
- padding: '10px 20px', borderRadius: 10, cursor: 'pointer',
- fontFamily: 'inherit', fontSize: 'calc(14px * var(--fs-scale-body, 1))', fontWeight: 500,
- border: (settings.map_always_show_routes === true) === opt.value ? '2px solid var(--text-primary)' : '2px solid var(--border-primary)',
- background: (settings.map_always_show_routes === true) === opt.value ? 'var(--bg-hover)' : 'var(--bg-card)',
- color: 'var(--text-primary)',
- transition: 'all 0.15s',
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- <p className="text-xs mt-1 text-content-faint">{t('settings.alwaysShowRoutesHint')}</p>
- </div>
+ <OnOffSetting label={t('settings.alwaysShowRoutes')} hint={t('settings.alwaysShowRoutesHint')} on={settings.map_always_show_routes === true} onChange={value => saveOnOff('map_always_show_routes', value)} />
+
+ {/* Unplanned places as small markers (#2024) */}
+ <OnOffSetting label={t('settings.compactUnplanned')} hint={t('settings.compactUnplannedHint')} on={settings.map_compact_unplanned === true} onChange={value => saveOnOff('map_compact_unplanned', value)} />
{/* Explore places on the map (POI category pill) */}
- <div>
- <label className="block text-sm font-medium mb-2 text-content-secondary">{t('settings.mapPoiPill')}</label>
- <div className="flex gap-3">
- {[
- { value: true, label: t('settings.on') || 'On' },
- { value: false, label: t('settings.off') || 'Off' },
- ].map(opt => (
- <button type="button"
- key={String(opt.value)}
- onClick={async () => {
- try { await updateSetting('map_poi_pill_enabled', opt.value) }
- catch (e: unknown) { toast.error(e instanceof Error ? e.message : t('common.error')) }
- }}
- style={{
- display: 'flex', alignItems: 'center', gap: 8,
- padding: '10px 20px', borderRadius: 10, cursor: 'pointer',
- fontFamily: 'inherit', fontSize: 'calc(14px * var(--fs-scale-body, 1))', fontWeight: 500,
- border: (settings.map_poi_pill_enabled !== false) === opt.value ? '2px solid var(--text-primary)' : '2px solid var(--border-primary)',
- background: (settings.map_poi_pill_enabled !== false) === opt.value ? 'var(--bg-hover)' : 'var(--bg-card)',
- color: 'var(--text-primary)',
- transition: 'all 0.15s',
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- <p className="text-xs mt-1 text-content-faint">{t('settings.mapPoiPillHint')}</p>
- </div>
+ <OnOffSetting label={t('settings.mapPoiPill')} hint={t('settings.mapPoiPillHint')} on={settings.map_poi_pill_enabled !== false} onChange={value => saveOnOff('map_poi_pill_enabled', value)} />
{/* Blur Booking Codes */}
- <div>
- <label className="block text-sm font-medium mb-2 text-content-secondary">{t('settings.blurBookingCodes')}</label>
- <div className="flex gap-3">
- {[
- { value: true, label: t('settings.on') || 'On' },
- { value: false, label: t('settings.off') || 'Off' },
- ].map(opt => (
- <button type="button"
- key={String(opt.value)}
- onClick={async () => {
- try { await updateSetting('blur_booking_codes', opt.value) }
- catch (e: unknown) { toast.error(e instanceof Error ? e.message : t('common.error')) }
- }}
- style={{
- display: 'flex', alignItems: 'center', gap: 8,
- padding: '10px 20px', borderRadius: 10, cursor: 'pointer',
- fontFamily: 'inherit', fontSize: 'calc(14px * var(--fs-scale-body, 1))', fontWeight: 500,
- border: (!!settings.blur_booking_codes) === opt.value ? '2px solid var(--text-primary)' : '2px solid var(--border-primary)',
- background: (!!settings.blur_booking_codes) === opt.value ? 'var(--bg-hover)' : 'var(--bg-card)',
- color: 'var(--text-primary)',
- transition: 'all 0.15s',
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
+ <OnOffSetting label={t('settings.blurBookingCodes')} on={!!settings.blur_booking_codes} onChange={value => saveOnOff('blur_booking_codes', value)} />
{/* Optimize route from accommodation */}
- <div>
- <label className="block text-sm font-medium mb-2 text-content-secondary">{t('settings.optimizeFromAccommodation')}</label>
- <div className="flex gap-3">
- {[
- { value: true, label: t('settings.on') || 'On' },
- { value: false, label: t('settings.off') || 'Off' },
- ].map(opt => (
- <button type="button"
- key={String(opt.value)}
- onClick={async () => {
- try { await updateSetting('optimize_from_accommodation', opt.value) }
- catch (e: unknown) { toast.error(e instanceof Error ? e.message : t('common.error')) }
- }}
- style={{
- display: 'flex', alignItems: 'center', gap: 8,
- padding: '10px 20px', borderRadius: 10, cursor: 'pointer',
- fontFamily: 'inherit', fontSize: 'calc(14px * var(--fs-scale-body, 1))', fontWeight: 500,
- border: (settings.optimize_from_accommodation !== false) === opt.value ? '2px solid var(--text-primary)' : '2px solid var(--border-primary)',
- background: (settings.optimize_from_accommodation !== false) === opt.value ? 'var(--bg-hover)' : 'var(--bg-card)',
- color: 'var(--text-primary)',
- transition: 'all 0.15s',
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- <p className="text-xs mt-1 text-content-faint">{t('settings.optimizeFromAccommodationHint')}</p>
- </div>
+ <OnOffSetting label={t('settings.optimizeFromAccommodation')} hint={t('settings.optimizeFromAccommodationHint')} on={settings.optimize_from_accommodation !== false} onChange={value => saveOnOff('optimize_from_accommodation', value)} />
</Section>
</>
)
}
+
+type OnOffKey = 'day_date_first' | 'map_compact_unplanned' | 'map_booking_labels' | 'map_always_show_routes' | 'map_poi_pill_enabled' | 'blur_booking_codes' | 'optimize_from_accommodation'
+
+/** One preference as a pair of On / Off buttons, the way this tab asks every yes-or-no question. */
+function OnOffSetting({ label, hint, on, onChange }: { label: string; hint?: string; on: boolean; onChange: (value: boolean) => void }) {
+ const { t } = useTranslation()
+ return (
+ <div>
+ <label className="block text-sm font-medium mb-2 text-content-secondary">{label}</label>
+ <div className="flex gap-3">
+ {[
+ { value: true, label: t('settings.on') || 'On' },
+ { value: false, label: t('settings.off') || 'Off' },
+ ].map(opt => (
+ <button type="button"
+ key={String(opt.value)}
+ onClick={() => onChange(opt.value)}
+ style={{
+ display: 'flex', alignItems: 'center', gap: 8,
+ padding: '10px 20px', borderRadius: 10, cursor: 'pointer',
+ fontFamily: 'inherit', fontSize: 'calc(14px * var(--fs-scale-body, 1))', fontWeight: 500,
+ border: on === opt.value ? '2px solid var(--text-primary)' : '2px solid var(--border-primary)',
+ background: on === opt.value ? 'var(--bg-hover)' : 'var(--bg-card)',
+ color: 'var(--text-primary)',
+ transition: 'all 0.15s',
+ }}
+ >
+ {opt.label}
+ </button>
+ ))}
+ </div>
+ {hint && <p className="text-xs mt-1 text-content-faint">{hint}</p>}
+ </div>
+ )
+}
diff --git a/client/src/components/Studio/StudioCanvas.tsx b/client/src/components/Studio/StudioCanvas.tsx
index 150e6f1b2..60bcec74e 100644
--- a/client/src/components/Studio/StudioCanvas.tsx
+++ b/client/src/components/Studio/StudioCanvas.tsx
@@ -97,6 +97,9 @@ export function StudioCanvas({
const select = useStudioStore(s => s.select)
const removeElements = useStudioStore(s => s.removeElements)
const duplicate = useStudioStore(s => s.duplicate)
+ const copy = useStudioStore(s => s.copy)
+ const paste = useStudioStore(s => s.paste)
+ const hasClipboard = useStudioStore(s => !!s.clipboard)
const raise = useStudioStore(s => s.raise)
const commit = useStudioStore(s => s.commit)
const addElement = useStudioStore(s => s.addElement)
@@ -155,10 +158,21 @@ export function StudioCanvas({
const ids = deletable(spread, selection)
if (ids.length) removeElements(spreadIndex, ids)
}
+ // Copy and paste across pages (#2316). Text selected on the page is the
+ // browser's to copy, not the book's.
+ if (!(e.metaKey || e.ctrlKey) || e.altKey) return
+ const key = e.key.toLowerCase()
+ if (key === 'c' && selection.length && !window.getSelection()?.toString()) {
+ e.preventDefault()
+ copy(spreadIndex, selection)
+ } else if (key === 'v' && hasClipboard) {
+ e.preventDefault()
+ paste(spreadIndex)
+ }
}
window.addEventListener('keydown', onKey)
return () => window.removeEventListener('keydown', onKey)
- }, [selection, spread, spreadIndex, removeElements])
+ }, [selection, spread, spreadIndex, removeElements, copy, paste, hasClipboard])
if (!spread) return null
diff --git a/client/src/components/Studio/StudioInspector.tsx b/client/src/components/Studio/StudioInspector.tsx
index 56a67c0c2..7e9a163ec 100644
--- a/client/src/components/Studio/StudioInspector.tsx
+++ b/client/src/components/Studio/StudioInspector.tsx
@@ -1,7 +1,7 @@
import type { BookElement, BookPageNumbers, BookPageSetup, BookShapeId, JourneyStats } from '@trek/shared'
import {
AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowDown, ArrowUp,
- ChevronsDown, ChevronsUp, Copy, Italic, Lock, Trash2, Unlock,
+ ChevronsDown, ChevronsUp, ClipboardCopy, Copy, Italic, Lock, Trash2, Unlock,
} from 'lucide-react'
import { useMemo, useRef, useState } from 'react'
import { useStudioStore } from '../../store/studioStore'
@@ -15,6 +15,7 @@ import { formatBookCoords } from './entryText'
import { iconComponent, iconLabel, searchIcons } from './iconLibrary'
import { Choice, Line, NumField, Section, Switch } from './StudioControls'
import type { JourneySource } from './StudioSidebar'
+import { Tooltip } from '../shared/Tooltip'
/** How many icons the swap grid offers at once. A search narrows it below this. */
const ICON_CHOICES = 60
@@ -78,6 +79,7 @@ export function StudioInspector({
const commit = useStudioStore(s => s.commit)
const raise = useStudioStore(s => s.raise)
const duplicate = useStudioStore(s => s.duplicate)
+ const copy = useStudioStore(s => s.copy)
const removeElements = useStudioStore(s => s.removeElements)
const spread = doc?.spreads[spreadIndex]
@@ -232,6 +234,15 @@ export function StudioInspector({
{sel.length > 1 && <em>{sel.length}</em>}
</span>
<span className="st-head-acts">
+ <Tooltip label={t('journey.studio.copyToPage')}>
+ <button type="button"
+ className="st-act"
+ onClick={() => copy(spreadIndex, selection)}
+ aria-label={t('journey.studio.copyToPage')}
+ >
+ <ClipboardCopy size={14} />
+ </button>
+ </Tooltip>
<button type="button"
className="st-act"
onClick={() => duplicate(spreadIndex, selection)}
diff --git a/client/src/components/Studio/StudioSavedLayouts.tsx b/client/src/components/Studio/StudioSavedLayouts.tsx
new file mode 100644
index 000000000..f91c9caee
--- /dev/null
+++ b/client/src/components/Studio/StudioSavedLayouts.tsx
@@ -0,0 +1,84 @@
+import type { BookPageSetup } from '@trek/shared'
+import { MAX_BOOK_LAYOUTS } from '@trek/shared'
+import { BookmarkPlus, Trash2 } from 'lucide-react'
+import { useStudioStore } from '../../store/studioStore'
+import { Tooltip } from '../shared/Tooltip'
+import { SpreadView } from './SpreadView'
+import { layoutPreview, layoutRole, nextLayoutName } from './savedLayouts'
+
+/**
+ * The book's own layouts, above the built-in ones (#2316).
+ *
+ * One button keeps the page on screen as a layout; each card lays the page on
+ * screen out that way, keeping its pictures and words. The cards draw the
+ * layout with the same renderer as the page, so what is kept is what is shown.
+ */
+export function StudioSavedLayouts({
+ page, width, pxPerMm, t,
+}: { page: BookPageSetup; width: number; pxPerMm: number; t: (k: string) => string }) {
+ const doc = useStudioStore(s => s.doc)
+ const active = useStudioStore(s => s.activeSpread)
+ const saveLayout = useStudioStore(s => s.saveLayout)
+ const removeLayout = useStudioStore(s => s.removeLayout)
+ const applyLayout = useStudioStore(s => s.applyLayout)
+ const spread = doc?.spreads[active]
+ if (!doc || !spread) return null
+
+ const all = doc.layouts ?? []
+ const role = layoutRole(spread)
+ const fitting = all.filter(l => l.role === role)
+ const full = all.length >= MAX_BOOK_LAYOUTS
+ const canSave = spread.elements.length > 0 && !full
+ const single = role !== 'inner'
+ const wMm = page.pageWidth * (single ? 1 : 2)
+ const scale = width / (wMm * pxPerMm)
+
+ return (
+ <div className="st-saved-layouts">
+ <div className="st-section-label">{t('journey.studio.myLayouts')}</div>
+ {fitting.length === 0 && <p className="st-hint">{t('journey.studio.myLayoutsEmpty')}</p>}
+ <div className="st-thumbs">
+ {fitting.map(layout => (
+ <div className="st-thumb-row" key={layout.id}>
+ <button type="button" className="st-thumb" onClick={() => applyLayout(active, layout.id)}>
+ <div className="st-thumb-sheet" style={{ width, height: page.pageHeight * pxPerMm * scale }}>
+ <div
+ style={{
+ position: 'absolute', left: 0, top: 0,
+ width: `${wMm}mm`, height: `${page.pageHeight}mm`,
+ transform: `scale(${scale})`, transformOrigin: 'top left',
+ }}
+ >
+ <SpreadView spread={layoutPreview(layout, page)} page={page} />
+ </div>
+ </div>
+ <span className="st-thumb-label">{layout.name}</span>
+ </button>
+ <div className="st-thumb-actions">
+ <Tooltip label={t('journey.studio.deleteLayout')}>
+ <button type="button"
+ className="is-danger"
+ onClick={() => removeLayout(layout.id)}
+ aria-label={t('journey.studio.deleteLayout')}
+ >
+ <Trash2 size={12} />
+ </button>
+ </Tooltip>
+ </div>
+ </div>
+ ))}
+ </div>
+ <Tooltip label={t(full ? 'journey.studio.saveLayoutFull' : 'journey.studio.saveLayoutHint')}>
+ <button type="button"
+ className="st-add-page"
+ disabled={!canSave}
+ onClick={() => saveLayout(active, nextLayoutName(all, t('journey.studio.layoutName')))}
+ >
+ <BookmarkPlus size={14} />
+ {t('journey.studio.saveLayout')}
+ </button>
+ </Tooltip>
+ <div className="st-section-label st-builtin-label">{t('journey.studio.builtInLayouts')}</div>
+ </div>
+ )
+}
diff --git a/client/src/components/Studio/StudioShell.tsx b/client/src/components/Studio/StudioShell.tsx
index eb9d28d1f..65bc2c1cc 100644
--- a/client/src/components/Studio/StudioShell.tsx
+++ b/client/src/components/Studio/StudioShell.tsx
@@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
import { useNavigate } from 'react-router'
import {
- ArrowLeft, BookOpen, Check, ChevronDown, Download, Maximize2, Minus, Plus,
+ ArrowLeft, BookOpen, Check, ChevronDown, ClipboardPaste, Download, Maximize2, Minus, Plus,
Redo2, Sparkles, Undo2,
} from 'lucide-react'
import { useJourneyStudio } from '../../pages/journeyStudio/useJourneyStudio'
@@ -17,6 +17,8 @@ import { downloadSpread } from './spreadFile'
import { StudioExport } from './StudioExport'
import { PeerBadges } from './PeerBadges'
import { TrimField } from './TrimField'
+import { Tooltip } from '../shared/Tooltip'
+import { useStudioStore } from '../../store/studioStore'
import '../../styles/dashboard.css'
import '../../styles/studio.css'
import './bookFontFaces'
@@ -193,6 +195,7 @@ function StudioBar({
>
<Redo2 size={15} />
</button>
+ <PasteButton s={s} />
<div className="st-sep" />
@@ -221,6 +224,29 @@ function StudioBar({
* book is behind the chevron, where it cannot be hit by accident, and both are
* ordinary undo steps.
*/
+/**
+ * Paste what was copied onto the page on screen (#2316). Beside undo and redo
+ * because it is the same kind of thing, and there so the keyboard shortcut is
+ * not the only way to find it.
+ */
+function PasteButton({ s }: { s: Studio }) {
+ const clipboard = useStudioStore(st => st.clipboard)
+ const paste = useStudioStore(st => st.paste)
+ const label = s.t('journey.studio.paste')
+ return (
+ <Tooltip label={clipboard ? label : s.t('journey.studio.pasteEmpty')}>
+ <button type="button"
+ className="st-tool is-icon"
+ disabled={!clipboard || !s.canEdit}
+ onClick={() => paste(s.activeSpread)}
+ aria-label={label}
+ >
+ <ClipboardPaste size={15} />
+ </button>
+ </Tooltip>
+ )
+}
+
function AutoLayoutButton({ s }: { s: Studio }) {
const [open, setOpen] = useState(false)
const box = useRef<HTMLDivElement>(null)
diff --git a/client/src/components/Studio/StudioSidebar.tsx b/client/src/components/Studio/StudioSidebar.tsx
index e844b6f74..703809f20 100644
--- a/client/src/components/Studio/StudioSidebar.tsx
+++ b/client/src/components/Studio/StudioSidebar.tsx
@@ -19,6 +19,7 @@ import { MOOD_CONFIG, WEATHER_CONFIG } from '../../pages/journeyDetail/JourneyDe
import { PanelHead as Head } from './StudioPanelHead'
import { StudioElementsPanel } from './StudioElementsPanel'
import { StudioTravelPanel } from './StudioTravelPanel'
+import { StudioSavedLayouts } from './StudioSavedLayouts'
import { MAX_SPREAD_FILE_BYTES, importSpread } from './spreadFile'
import { StudioContentFilter } from './StudioContentFilter'
import { emptyKeyFor, matchingEntries, matchingPhotos, photosFor, type PhotoFilter } from './photoFilter'
@@ -776,6 +777,7 @@ function TemplatesPanel({
<>
<Head label={t('journey.studio.templates')} count={templates.length} />
<div className="st-panel-scroll">
+ <StudioSavedLayouts page={page} width={CARD_W} pxPerMm={pxPerMm} t={t} />
{(
<div className="st-thumbs" ref={list.ref}>
{templates.map(tpl => {
diff --git a/client/src/components/Studio/savedLayouts.ts b/client/src/components/Studio/savedLayouts.ts
new file mode 100644
index 000000000..be80eb516
--- /dev/null
+++ b/client/src/components/Studio/savedLayouts.ts
@@ -0,0 +1,131 @@
+import type { BookElement, BookLayout, BookPageSetup, BookSpread } from '@trek/shared'
+import { MAX_SPREAD_ELEMENTS } from '@trek/shared'
+import { elementId } from './bookIds'
+
+/**
+ * A book's own layouts (#2316): a page somebody arranged, kept to lay other
+ * pages out the same way.
+ *
+ * The built-in layouts in templates.ts are frames only. A saved one is the whole
+ * design, panels and shapes and type included, with the pictures taken out; the
+ * page it is applied to brings its own.
+ */
+
+/** Which saved layouts fit a spread: a double spread's design does not fit a single page. */
+export const layoutRole = (spread: BookSpread): BookLayout['role'] => (spread.role === 'inner' ? 'inner' : 'single')
+
+/** The arrangement of a spread, as a layout to keep. */
+export function layoutFromSpread(spread: BookSpread, page: BookPageSetup, name: string): BookLayout {
+ return {
+ id: elementId('ly'),
+ name,
+ role: layoutRole(spread),
+ pageWidth: page.pageWidth,
+ pageHeight: page.pageHeight,
+ background: spread.background,
+ // The design, not the pictures: every frame comes out empty.
+ elements: spread.elements.map(el => (el.kind === 'photo' ? { ...el, photoId: null } : el)),
+ }
+}
+
+/** The next free "Layout n" name, so a save needs no dialog. */
+export function nextLayoutName(existing: readonly BookLayout[], base: string): string {
+ const taken = new Set(existing.map(l => l.name))
+ let n = existing.length + 1
+ while (taken.has(`${base} ${n}`)) n += 1
+ return `${base} ${n}`
+}
+
+const textSize = (el: BookElement) => (el.kind === 'text' ? el.size : 0)
+
+/**
+ * Lay a spread out on a saved layout, keeping what the spread holds.
+ *
+ * The same contract as applying a built-in layout: the spread's pictures go into
+ * the layout's frames in order, its words into the layout's text boxes (the
+ * largest into the largest, so the title stays the title), and whatever does not
+ * fit is parked rather than lost. The layout's own type keeps its look and takes
+ * the spread's words; a text box that was filled from a journal entry and finds
+ * nothing to take is left out, because its words belonged to the page it was
+ * saved from. The small marks and the pros and cons list are content too: each
+ * takes the values of the spread's own mark of the same kind, in order (the
+ * spread's day, its coordinates), and keeps the layout's look. Everything else
+ * is the design and is copied as drawn, scaled from the page it was drawn on to
+ * this one.
+ */
+export function applySavedLayout(spread: BookSpread, layout: BookLayout, page: BookPageSetup): BookSpread {
+ const sx = page.pageWidth / layout.pageWidth
+ const sy = page.pageHeight / layout.pageHeight
+ const pool = [...spread.elements, ...(spread.parked ?? [])]
+ const photos = pool.filter(e => e.kind === 'photo' && e.photoId != null)
+ const texts = pool.filter(e => e.kind === 'text' && e.text.trim()).sort((a, b) => textSize(b) - textSize(a))
+
+ // Which of the layout's text boxes takes which of the spread's words.
+ const slots = layout.elements.filter(e => e.kind === 'text').sort((a, b) => textSize(b) - textSize(a))
+ const wordsFor = new Map<BookElement, BookElement>()
+ slots.forEach((slot, i) => { if (texts[i]) wordsFor.set(slot, texts[i]) })
+
+ // The spread's own marks and lists, queued per kind, for the layout's to take their values from.
+ const marks = new Map<string, BookElement[]>()
+ for (const el of spread.elements) {
+ const key = el.kind === 'badge' ? `badge:${el.variant}` : el.kind === 'list' ? 'list' : null
+ if (key) marks.set(key, [...(marks.get(key) ?? []), el])
+ }
+ const takeMark = (key: string) => marks.get(key)?.shift()
+
+ let pi = 0
+ const out: BookElement[] = []
+ for (const el of layout.elements) {
+ const frame = { x: el.frame.x * sx, y: el.frame.y * sy, w: el.frame.w * sx, h: el.frame.h * sy }
+ const base = { ...el, id: elementId(el.kind[0]), frame } as BookElement
+ if (base.kind === 'photo') {
+ const src = photos[pi++]
+ out.push(src && src.kind === 'photo'
+ ? { ...base, photoId: src.photoId, focalX: src.focalX, focalY: src.focalY }
+ : base)
+ continue
+ }
+ if (base.kind === 'text' && el.kind === 'text') {
+ const src = wordsFor.get(el)
+ if (src && src.kind === 'text') {
+ out.push({ ...base, text: src.text, binding: src.binding, overridden: src.overridden })
+ } else if (!el.binding) {
+ out.push(base)
+ }
+ continue
+ }
+ if (base.kind === 'badge') {
+ const own = takeMark(`badge:${base.variant}`)
+ out.push(own && own.kind === 'badge' ? { ...base, text: own.text, sub: own.sub, code: own.code } : base)
+ continue
+ }
+ if (base.kind === 'list') {
+ const own = takeMark('list')
+ out.push(own && own.kind === 'list' ? { ...base, items: own.items } : base)
+ continue
+ }
+ out.push(base)
+ }
+
+ const used = new Set(wordsFor.values())
+ const parked = [
+ ...photos.slice(pi),
+ ...texts.filter(t => !used.has(t)),
+ ].slice(0, MAX_SPREAD_ELEMENTS)
+
+ return { ...spread, background: layout.background, elements: out, parked }
+}
+
+/** A saved layout drawn as a spread on this book's page, for its card. Nothing is filled in. */
+export function layoutPreview(layout: BookLayout, page: BookPageSetup): BookSpread {
+ const sx = page.pageWidth / layout.pageWidth
+ const sy = page.pageHeight / layout.pageHeight
+ return {
+ id: layout.id,
+ role: layout.role === 'inner' ? 'inner' : 'first',
+ background: layout.background,
+ elements: layout.elements.map(el => ({ ...el, frame: { x: el.frame.x * sx, y: el.frame.y * sy, w: el.frame.w * sx, h: el.frame.h * sy } }) as BookElement),
+ parked: [],
+ entryId: null,
+ }
+}
diff --git a/client/src/components/Studio/studioClipboard.ts b/client/src/components/Studio/studioClipboard.ts
new file mode 100644
index 000000000..ba96d06e9
--- /dev/null
+++ b/client/src/components/Studio/studioClipboard.ts
@@ -0,0 +1,40 @@
+import type { BookElement, BookPageSetup, BookSpread } from '@trek/shared'
+import { elementId } from './bookIds'
+
+/**
+ * What was copied, and from where (#2316).
+ *
+ * The elements as they stood, in the millimetres of the spread they came from.
+ * The source spread's id is kept so a paste back onto the same page can step
+ * the copy aside rather than drop it exactly over the original.
+ */
+export interface StudioClipboard {
+ fromSpreadId: string
+ elements: BookElement[]
+}
+
+/** How far a paste onto its own page is stepped aside, the same step Duplicate takes. */
+const OFFSET = 4
+
+const spreadWidth = (spread: BookSpread, page: BookPageSetup) =>
+ page.pageWidth * (spread.role === 'inner' ? 2 : 1)
+
+/**
+ * The clipboard's elements, ready to go onto `target`.
+ *
+ * Fresh ids every time, because the book is edited by several people at once
+ * and two elements sharing an id would merge into one on the next save. An
+ * element copied from a double spread onto a single page is pulled back inside
+ * it: its place on the right-hand page would otherwise be off the paper.
+ */
+export function pastedElements(clip: StudioClipboard, target: BookSpread, page: BookPageSetup): BookElement[] {
+ const width = spreadWidth(target, page)
+ const step = clip.fromSpreadId === target.id ? OFFSET : 0
+ return clip.elements.map(el => {
+ const w = Math.min(el.frame.w, width)
+ const h = Math.min(el.frame.h, page.pageHeight)
+ const x = Math.min(Math.max(el.frame.x + step, 0), width - w)
+ const y = Math.min(Math.max(el.frame.y + step, 0), page.pageHeight - h)
+ return { ...el, id: elementId(el.kind[0]), locked: false, frame: { x, y, w, h } } as BookElement
+ })
+}
diff --git a/client/src/components/Todo/TodoRow.tsx b/client/src/components/Todo/TodoRow.tsx
index b5bf91c54..986f87b81 100644
--- a/client/src/components/Todo/TodoRow.tsx
+++ b/client/src/components/Todo/TodoRow.tsx
@@ -2,6 +2,7 @@ import type { CSSProperties } from 'react'
import { Check, ChevronRight, Flag, Calendar, GripVertical, UserRound } from 'lucide-react'
import { avatarSrc } from '../../utils/avatarSrc'
import type { TodoItem } from '../../types'
+import MarkdownText from '../shared/MarkdownText'
import { katColor, PRIO_CONFIG, type Member } from './todoListModel'
/** A quiet pill for the row's facts: filled, no frame, the packing list's badge. */
@@ -113,8 +114,8 @@ export default function TodoRow({ item, members, categories, today, isSelected,
</div>
{/* Description preview */}
{item.description && (
- <div style={{ fontSize: 'calc(12px * var(--fs-scale-body, 1))', color: 'var(--text-faint)', marginTop: 2, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', lineHeight: 1.4 }}>
- {item.description}
+ <div style={{ fontSize: 'calc(12px * var(--fs-scale-body, 1))', color: 'var(--text-faint)', marginTop: 2, minWidth: 0 }}>
+ <MarkdownText clamp>{item.description}</MarkdownText>
</div>
)}
{/* Priority, date and list as quiet badges */}
diff --git a/client/src/components/Todo/TodoTaskFields.tsx b/client/src/components/Todo/TodoTaskFields.tsx
index 0adceeddd..50fb5493c 100644
--- a/client/src/components/Todo/TodoTaskFields.tsx
+++ b/client/src/components/Todo/TodoTaskFields.tsx
@@ -6,6 +6,7 @@ import CustomSelect from '../shared/CustomSelect'
import { CustomDatePicker } from '../shared/CustomDateTimePicker'
import NameDialog from '../shared/NameDialog'
import { Tooltip } from '../shared/Tooltip'
+import MarkdownEditable from '../shared/MarkdownEditable'
import { GRID_2, LABEL, TEXTAREA } from '../shared/dialogParts'
import { PRIO_CONFIG, katColor, taskInputStyle, taskLabelClass, type Member, type TaskFieldValues } from './todoListModel'
@@ -92,9 +93,14 @@ export default function TodoTaskFields({ values, onChange, categories, members,
<textarea value={desc} onChange={e => onChange({ desc: e.target.value })} disabled={!canEdit} rows={3}
placeholder={t('todo.descriptionPlaceholder')} className={TEXTAREA} />
) : (
- <textarea value={desc} onChange={e => onChange({ desc: e.target.value })} disabled={!canEdit} rows={4}
- placeholder={t('todo.descriptionPlaceholder')}
- style={{ ...taskInputStyle, resize: 'vertical', minHeight: 84 }} />
+ <MarkdownEditable value={desc} canEdit={canEdit} editLabel={t('todo.editDescription')}
+ className="text-content-secondary"
+ style={{ ...taskInputStyle, minHeight: 84, lineHeight: 1.5, overflowWrap: 'break-word' }}
+ renderEditor={editor => (
+ <textarea value={desc} onChange={e => onChange({ desc: e.target.value })} rows={4} {...editor}
+ placeholder={t('todo.descriptionPlaceholder')}
+ style={{ ...taskInputStyle, resize: 'vertical', minHeight: 84 }} />
+ )} />
)}
</div>
diff --git a/client/src/components/Trips/TripMembersModal.test.tsx b/client/src/components/Trips/TripMembersModal.test.tsx
index 2ea415b85..800441439 100644
--- a/client/src/components/Trips/TripMembersModal.test.tsx
+++ b/client/src/components/Trips/TripMembersModal.test.tsx
@@ -602,6 +602,23 @@ describe('TripMembersModal', () => {
}));
});
+ it('FE-COMP-MEMBERS-033b: the two narrowing options post with the link (#1712)', async () => {
+ const user = userEvent.setup();
+ asShareOwner();
+ let postedPerms: Record<string, unknown> | null = null;
+ server.use(
+ http.get('/api/trips/1/share-link', () => HttpResponse.json({ token: 'tok77', share_hide_images: true })),
+ http.post('/api/trips/1/share-link', async ({ request }) => {
+ postedPerms = (await request.json()) as Record<string, unknown>;
+ return HttpResponse.json({ token: 'tok77' });
+ }),
+ );
+ render(<TripMembersModal {...defaultProps} />);
+
+ await user.click(await screen.findByText('Travel & stays only'));
+ await waitFor(() => expect(postedPerms).toMatchObject({ share_travel_only: true, share_hide_images: true }));
+ });
+
it('FE-COMP-MEMBERS-034: a failing permission update is reported', async () => {
const user = userEvent.setup();
asShareOwner();
diff --git a/client/src/components/Trips/TripMembersModal.tsx b/client/src/components/Trips/TripMembersModal.tsx
index 9d3f0cd0f..87112e4db 100644
--- a/client/src/components/Trips/TripMembersModal.tsx
+++ b/client/src/components/Trips/TripMembersModal.tsx
@@ -5,7 +5,7 @@ import CustomSelect from '../shared/CustomSelect'
import { useIsPhone } from '../../mobile/useIsPhone'
import { TripMemberAvatar as Avatar } from './TripMemberAvatar'
import TripShareDialog from './TripShareDialog'
-import { useShareLink, useTripInviteLink, useTripMembers } from './useTripShare'
+import { SHARE_OPTIONS, SHARE_SECTIONS, useShareLink, useTripInviteLink, useTripMembers } from './useTripShare'
function ShareLinkSection({ tripId, t }: { tripId: number; t: (key: string, params?: Record<string, string | number>) => string }) {
const { loading, url: shareUrl, perms, copied, create: handleCreate, setPerm, remove: handleDelete, copy: handleCopy } = useShareLink(tripId)
@@ -23,13 +23,7 @@ function ShareLinkSection({ tripId, t }: { tripId: number; t: (key: string, para
{/* Permission checkboxes */}
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6, marginBottom: 12 }}>
- {[
- { key: 'share_map', label: t('share.permMap'), always: true },
- { key: 'share_bookings', label: t('share.permBookings') },
- { key: 'share_packing', label: t('share.permPacking') },
- { key: 'share_budget', label: t('share.permBudget') },
- { key: 'share_collab', label: t('share.permCollab') },
- ].map(opt => (
+ {[...SHARE_SECTIONS, ...SHARE_OPTIONS].map(opt => ({ ...opt, label: t(opt.label), always: 'always' in opt && !!opt.always })).map(opt => (
<button type="button" key={opt.key} onClick={() => !opt.always && handleUpdatePerms(opt.key, !perms[opt.key])}
style={{
display: 'flex', alignItems: 'center', gap: 5, padding: '4px 10px', borderRadius: 20,
diff --git a/client/src/components/Trips/TripShareDialog.tsx b/client/src/components/Trips/TripShareDialog.tsx
index a0afed238..61dd432da 100644
--- a/client/src/components/Trips/TripShareDialog.tsx
+++ b/client/src/components/Trips/TripShareDialog.tsx
@@ -5,9 +5,9 @@ import CustomSelect from '../shared/CustomSelect'
import ConfirmDialog from '../shared/ConfirmDialog'
import { Tooltip } from '../shared/Tooltip'
import { DialogButton, DialogHeader, DialogSection, DialogShell, DialogTile, NEUTRAL_TINT, PILL, fs } from '../shared/DialogShell'
-import { AddRowButton, INPUT, PANEL } from '../shared/dialogParts'
+import { AddRowButton, INPUT, LABEL, PANEL } from '../shared/dialogParts'
import { TripMemberAvatar } from './TripMemberAvatar'
-import { useShareLink, useTripInviteLink, useTripMembers, type SharePerm, type TripMembersState } from './useTripShare'
+import { SHARE_OPTIONS, SHARE_SECTIONS, useShareLink, useTripInviteLink, useTripMembers, type TripMembersState } from './useTripShare'
interface TripShareDialogProps {
isOpen: boolean
@@ -306,13 +306,17 @@ function LinkCard({ icon, title, hint, children }: { icon: ReactNode; title: str
)
}
-const SHARE_PERMS: { key: SharePerm; label: string; always?: boolean }[] = [
- { key: 'share_map', label: 'share.permMap', always: true },
- { key: 'share_bookings', label: 'share.permBookings' },
- { key: 'share_packing', label: 'share.permPacking' },
- { key: 'share_budget', label: 'share.permBudget' },
- { key: 'share_collab', label: 'share.permCollab' },
-]
+/** One toggle of the link, a filled pill with a tick while it is on. */
+function PermChip({ on, disabled, label, hint, onToggle }: { on: boolean; disabled?: boolean; label: string; hint?: string; onToggle: () => void }) {
+ const chip = (
+ <button type="button" aria-pressed={on} disabled={disabled} onClick={onToggle}
+ className={`inline-flex items-center gap-1 rounded-full px-2.5 py-1 font-semibold disabled:cursor-default ${on ? 'bg-accent text-accent-text disabled:opacity-70' : 'bg-surface-card text-content-muted ring-1 ring-edge-faint hover:text-content'}`}
+ style={fs(11.5, 'body')}>
+ {on && <Check size={11} strokeWidth={2.6} />}{label}
+ </button>
+ )
+ return hint ? <Tooltip label={hint}>{chip}</Tooltip> : chip
+}
/** The read-only public link, and which parts of the trip it shows. */
function PublicLink({ tripId }: { tripId: number }) {
@@ -322,17 +326,19 @@ function PublicLink({ tripId }: { tripId: number }) {
return (
<LinkCard icon={<Link2 size={15} strokeWidth={2.2} />} title={t('share.linkTitle')} hint={t('share.linkHint')}>
<div className="flex flex-wrap gap-1.5">
- {SHARE_PERMS.map(opt => {
- const on = link.perms[opt.key]
- return (
- <button key={opt.key} type="button" aria-pressed={on} disabled={opt.always}
- onClick={() => void link.setPerm(opt.key, !on)}
- className={`inline-flex items-center gap-1 rounded-full px-2.5 py-1 font-semibold disabled:cursor-default ${on ? 'bg-accent text-accent-text disabled:opacity-70' : 'bg-surface-card text-content-muted ring-1 ring-edge-faint hover:text-content'}`}
- style={fs(11.5, 'body')}>
- {on && <Check size={11} strokeWidth={2.6} />}{t(opt.label)}
- </button>
- )
- })}
+ {SHARE_SECTIONS.map(opt => (
+ <PermChip key={opt.key} on={link.perms[opt.key]} disabled={opt.always} label={t(opt.label)}
+ onToggle={() => void link.setPerm(opt.key, !link.perms[opt.key])} />
+ ))}
+ </div>
+ <div>
+ <span className={LABEL}>{t('share.options')}</span>
+ <div className="flex flex-wrap gap-1.5">
+ {SHARE_OPTIONS.map(opt => (
+ <PermChip key={opt.key} on={link.perms[opt.key]} label={t(opt.label)} hint={t(`${opt.label}Hint`)}
+ onToggle={() => void link.setPerm(opt.key, !link.perms[opt.key])} />
+ ))}
+ </div>
</div>
{link.url ? (
<>
diff --git a/client/src/components/Trips/useTripShare.ts b/client/src/components/Trips/useTripShare.ts
index 6d1211933..20fa2eeff 100644
--- a/client/src/components/Trips/useTripShare.ts
+++ b/client/src/components/Trips/useTripShare.ts
@@ -13,10 +13,28 @@ import { copyText } from '../../utils/clipboard'
// phone opens from its More sheet. The questions ("Remove this member?") are the
// caller's: the desktop asks in a dialog of its own, the phone with the browser's.
-export type SharePerm = 'share_map' | 'share_bookings' | 'share_packing' | 'share_budget' | 'share_collab'
+export type SharePerm = 'share_map' | 'share_bookings' | 'share_packing' | 'share_budget' | 'share_collab' | 'share_travel_only' | 'share_hide_images'
type SharePerms = Record<SharePerm, boolean>
-const DEFAULT_PERMS: SharePerms = { share_map: true, share_bookings: true, share_packing: false, share_budget: false, share_collab: false }
+const DEFAULT_PERMS: SharePerms = {
+ share_map: true, share_bookings: true, share_packing: false, share_budget: false, share_collab: false,
+ share_travel_only: false, share_hide_images: false,
+}
+
+/** What the link shows, one tab each. */
+export const SHARE_SECTIONS: { key: SharePerm; label: string; always?: boolean }[] = [
+ { key: 'share_map', label: 'share.permMap', always: true },
+ { key: 'share_bookings', label: 'share.permBookings' },
+ { key: 'share_packing', label: 'share.permPacking' },
+ { key: 'share_budget', label: 'share.permBudget' },
+ { key: 'share_collab', label: 'share.permCollab' },
+]
+
+/** How the plan it shows is narrowed (#1712). */
+export const SHARE_OPTIONS: { key: SharePerm; label: string }[] = [
+ { key: 'share_travel_only', label: 'share.optTravelOnly' },
+ { key: 'share_hide_images', label: 'share.optHideImages' },
+]
/** Copy text and show "Copied" for two seconds, the timer restarting on every copy. */
function useCopied() {
@@ -44,7 +62,11 @@ export function useShareLink(tripId: number) {
useEffect(() => {
shareApi.getLink(tripId).then(d => {
setToken(d.token)
- if (d.token) setPerms({ share_map: d.share_map ?? true, share_bookings: d.share_bookings ?? true, share_packing: d.share_packing ?? false, share_budget: d.share_budget ?? false, share_collab: d.share_collab ?? false })
+ if (d.token) setPerms({
+ share_map: d.share_map ?? true, share_bookings: d.share_bookings ?? true, share_packing: d.share_packing ?? false,
+ share_budget: d.share_budget ?? false, share_collab: d.share_collab ?? false,
+ share_travel_only: d.share_travel_only ?? false, share_hide_images: d.share_hide_images ?? false,
+ })
setLoading(false)
}).catch(() => setLoading(false))
}, [tripId])
diff --git a/client/src/components/Vacay/VacayCalendar.tsx b/client/src/components/Vacay/VacayCalendar.tsx
index 08a844236..b974b9913 100644
--- a/client/src/components/Vacay/VacayCalendar.tsx
+++ b/client/src/components/Vacay/VacayCalendar.tsx
@@ -8,6 +8,7 @@ import { tripsApi } from '../../api/client'
import VacayMonthCard from './VacayMonthCard'
import type { VacayEntry } from '../../types'
import { Building2, MousePointer2 } from 'lucide-react'
+import { companyHolidaySets, leaveFractionFor } from './companyHolidays'
type VacayMode = 'vacation' | 'company'
type HoverTip = { date: string; top: number; left: number }
@@ -51,11 +52,8 @@ export default function VacayCalendar() {
return () => { cancelled = true }
}, [selectedYear, yearSettings])
- const companyHolidaySet = useMemo(() => {
- const s = new Set<string>()
- companyHolidays.forEach(h => s.add(h.date))
- return s
- }, [companyHolidays])
+ // Whole company holidays close a day to leave, half ones leave half of it (#2439).
+ const { full: companyHolidaySet, half: companyHalfSet } = useMemo(() => companyHolidaySets(companyHolidays), [companyHolidays])
const entryMap = useMemo(() => {
const map: Record<string, VacayEntry[]> = {}
@@ -91,7 +89,7 @@ export default function VacayCalendar() {
const handleCellClick = useCallback(async (dateStr: string) => {
if (mode === 'company') {
if (!companyHolidaysEnabled) return
- await toggleCompanyHoliday(dateStr)
+ await toggleCompanyHoliday(dateStr, halfDay ? 0.5 : 1)
return
}
if (blockWeekends && isWeekend(dateStr, weekendDays)) {
@@ -105,8 +103,9 @@ export default function VacayCalendar() {
return
}
if (companyHolidaysEnabled && companyHolidaySet.has(dateStr)) return
- await toggleEntry(dateStr, selectedUserId || undefined, halfDay ? 0.5 : 1, compDay ? 'comp' : 'vacation')
- }, [mode, halfDay, compDay, toggleEntry, toggleCompanyHoliday, companyHolidaySet, blockWeekends, weekendDays, companyHolidaysEnabled, selectedUserId, currentUserId, entryMap])
+ const fraction = companyHolidaysEnabled ? leaveFractionFor(dateStr, companyHalfSet, halfDay ? 0.5 : 1) : (halfDay ? 0.5 : 1)
+ await toggleEntry(dateStr, selectedUserId || undefined, fraction, compDay ? 'comp' : 'vacation')
+ }, [mode, halfDay, compDay, toggleEntry, toggleCompanyHoliday, companyHolidaySet, companyHalfSet, blockWeekends, weekendDays, companyHolidaysEnabled, selectedUserId, currentUserId, entryMap])
// Cells with a half day or a shared overlay report a hover, so the tooltip
// appears exactly when there's something to explain. Fixed-positioned at the
@@ -146,6 +145,7 @@ export default function VacayCalendar() {
month={month}
holidays={holidays}
companyHolidaySet={companyHolidaySet}
+ companyHalfSet={companyHalfSet}
companyHolidaysEnabled={companyHolidaysEnabled}
entryMap={entryMap}
sharedMap={sharedMap}
diff --git a/client/src/components/Vacay/VacayMonthCard.tsx b/client/src/components/Vacay/VacayMonthCard.tsx
index 7dc1d0d44..0cff21f7b 100644
--- a/client/src/components/Vacay/VacayMonthCard.tsx
+++ b/client/src/components/Vacay/VacayMonthCard.tsx
@@ -10,6 +10,8 @@ interface VacayMonthCardProps {
month: number
holidays: HolidaysMap
companyHolidaySet: Set<string>
+ /** Half company holidays (#2439): shown half-filled, and still open for half a day of leave. */
+ companyHalfSet?: Set<string>
companyHolidaysEnabled?: boolean
entryMap: Record<string, VacayEntry[]>
// Shared read-only calendars per date (#444/#667) — rendered as rings, not fills.
@@ -24,7 +26,7 @@ interface VacayMonthCardProps {
}
export default function VacayMonthCard({
- year, month, holidays, companyHolidaySet, companyHolidaysEnabled = true, entryMap, sharedMap,
+ year, month, holidays, companyHolidaySet, companyHalfSet, companyHolidaysEnabled = true, entryMap, sharedMap,
onCellClick, onCellHover, companyMode, blockWeekends, weekendDays = [0, 6], tripDates, weekStart = 1
}: VacayMonthCardProps) {
const { t, locale } = useTranslation()
@@ -106,13 +108,14 @@ export default function VacayMonthCard({
const publicHoliday = holidayMarkers.find(h => (h.type ?? 'public_holiday') === 'public_holiday')
const schoolHolidayMarkers = holidayMarkers.filter(h => h.type === 'school_holiday')
const isCompany = companyHolidaysEnabled && companyHolidaySet.has(dateStr)
+ const isHalfCompany = companyHolidaysEnabled && !!companyHalfSet?.has(dateStr)
const dayEntries = entryMap[dateStr] || []
const hasEntries = dayEntries.length > 0
// A blocked weekend day that still carries an entry (#1897) stays clickable —
// the click clears the stranded day rather than logging a new one.
const isBlocked = (weekend && blockWeekends && !hasEntries) || (isCompany && !companyMode)
const isToday = dateStr === todayStr
- const plain = !hasEntries && holidayMarkers.length === 0 && !isCompany
+ const plain = !hasEntries && holidayMarkers.length === 0 && !isCompany && !isHalfCompany
// The fill always shows WHO is off (person colour, split for several) — half
// days keep that fill and get a small corner ½ badge instead, so a half day
@@ -130,6 +133,8 @@ export default function VacayMonthCard({
// 2 people render via the diagonal overlay below, so each half can be a solid
// vacation fill or a hatched comp fill independently (#1074).
else if (dayEntries.length === 0 && isCompany) background = 'rgba(245,158,11,0.22)'
+ // Half the day is the company's: the fill covers half the cell (#2439).
+ else if (dayEntries.length === 0 && isHalfCompany) background = 'linear-gradient(135deg, rgba(245,158,11,0.3) 50%, transparent 50%)'
else if (dayEntries.length === 0 && publicHoliday) background = `color-mix(in srgb, ${publicHoliday.color} 22%, transparent)`
// A plain school-break day gets a soft wash of its calendar colour so a run of
// days reads as one gentle stretch; the rounded band below names the calendar.
diff --git a/client/src/components/Vacay/companyHolidays.test.ts b/client/src/components/Vacay/companyHolidays.test.ts
new file mode 100644
index 000000000..dc3e3cf24
--- /dev/null
+++ b/client/src/components/Vacay/companyHolidays.test.ts
@@ -0,0 +1,24 @@
+// FE-VACAY-COMPANY-001 to FE-VACAY-COMPANY-003 (#2439)
+import { describe, it, expect } from 'vitest'
+import { companyHolidaySets, leaveFractionFor, toggledCompanyHolidays } from './companyHolidays'
+
+describe('company holidays', () => {
+ it('FE-VACAY-COMPANY-001: splits whole and half days, old rows being whole', () => {
+ const { full, half } = companyHolidaySets([{ date: 'a' }, { date: 'b', fraction: 0.5 }, { date: 'c', fraction: 1 }])
+ expect([...full]).toEqual(['a', 'c'])
+ expect([...half]).toEqual(['b'])
+ })
+
+ it('FE-VACAY-COMPANY-002: adds, converts and clears by the server rule', () => {
+ const one = toggledCompanyHolidays([], 'x', 0.5)
+ expect(one).toEqual([{ date: 'x', fraction: 0.5 }])
+ const whole = toggledCompanyHolidays(one, 'x', 1)
+ expect(whole).toEqual([{ date: 'x', fraction: 1 }])
+ expect(toggledCompanyHolidays(whole, 'x', 1)).toEqual([])
+ })
+
+ it('FE-VACAY-COMPANY-003: leave on a half company holiday is half a day', () => {
+ expect(leaveFractionFor('x', new Set(['x']), 1)).toBe(0.5)
+ expect(leaveFractionFor('y', new Set(['x']), 1)).toBe(1)
+ })
+})
diff --git a/client/src/components/Vacay/companyHolidays.ts b/client/src/components/Vacay/companyHolidays.ts
new file mode 100644
index 000000000..b495e9054
--- /dev/null
+++ b/client/src/components/Vacay/companyHolidays.ts
@@ -0,0 +1,35 @@
+/** A company holiday as the plan holds it; `fraction` 0.5 is a half day (#2439). */
+export interface CompanyHoliday {
+ date: string
+ note?: string
+ fraction?: number | null
+}
+
+const isHalf = (h: CompanyHoliday) => (h.fraction ?? 1) < 1
+
+/**
+ * The plan's company holidays split by size (#2439): a whole one closes the day to
+ * leave, a half one leaves half of it. Rows from before the column are whole.
+ */
+export function companyHolidaySets(list: CompanyHoliday[]): { full: Set<string>; half: Set<string> } {
+ const full = new Set<string>()
+ const half = new Set<string>()
+ for (const h of list) (isHalf(h) ? half : full).add(h.date)
+ return { full, half }
+}
+
+/**
+ * The list after a click, ahead of the server, by its rule: the same size again
+ * clears the day, the other size converts it.
+ */
+export function toggledCompanyHolidays(list: CompanyHoliday[], date: string, fraction: number): CompanyHoliday[] {
+ const existing = list.find(h => h.date === date)
+ if (!existing) return [...list, { date, fraction }]
+ if ((existing.fraction ?? 1) === fraction) return list.filter(h => h.date !== date)
+ return list.map(h => (h.date === date ? { ...h, fraction } : h))
+}
+
+/** The fraction a leave click may book on a day: half of a half company holiday, else what was asked. */
+export function leaveFractionFor(date: string, half: Set<string>, asked: 0.5 | 1): 0.5 | 1 {
+ return half.has(date) ? 0.5 : asked
+}
diff --git a/client/src/components/shared/MarkdownEditable.test.tsx b/client/src/components/shared/MarkdownEditable.test.tsx
new file mode 100644
index 000000000..3aa1c2065
--- /dev/null
+++ b/client/src/components/shared/MarkdownEditable.test.tsx
@@ -0,0 +1,49 @@
+// FE-SHARED-MDEDIT-001 to FE-SHARED-MDEDIT-004 (#2558)
+import { useState } from 'react'
+import { render, screen, fireEvent } from '../../../tests/helpers/render'
+import MarkdownEditable from './MarkdownEditable'
+
+function Harness({ initial, canEdit = true }: { initial: string; canEdit?: boolean }) {
+ const [value, setValue] = useState(initial)
+ return (
+ <MarkdownEditable value={value} canEdit={canEdit} editLabel="Edit"
+ renderEditor={editor => <textarea aria-label="editor" value={value} onChange={e => setValue(e.target.value)} {...editor} />} />
+ )
+}
+
+describe('MarkdownEditable', () => {
+ it('FE-SHARED-MDEDIT-001: renders a saved value as Markdown with a working link', () => {
+ render(<Harness initial={'**Ferry** at [the port](https://example.com)'} />)
+ expect(screen.getByText('Ferry').tagName).toBe('STRONG')
+ const link = screen.getByRole('link', { name: 'the port' })
+ expect(link).toHaveAttribute('href', 'https://example.com')
+ // Following the link does not open the editor.
+ fireEvent.click(link)
+ expect(screen.queryByLabelText('editor')).not.toBeInTheDocument()
+ })
+
+ it('FE-SHARED-MDEDIT-002: a click on the text opens the editor, leaving it shows the text again', () => {
+ render(<Harness initial="Bring cash" />)
+ fireEvent.click(screen.getByText('Bring cash'))
+ const editor = screen.getByLabelText('editor')
+ expect(editor).toHaveValue('Bring cash')
+ fireEvent.blur(editor)
+ expect(screen.queryByLabelText('editor')).not.toBeInTheDocument()
+ fireEvent.keyDown(screen.getByRole('button'), { key: 'Enter' })
+ expect(screen.getByLabelText('editor')).toBeInTheDocument()
+ })
+
+ it('FE-SHARED-MDEDIT-003: an empty field is the editor, and stays one while it is typed into', () => {
+ render(<Harness initial="" />)
+ const editor = screen.getByLabelText('editor')
+ fireEvent.focus(editor)
+ fireEvent.change(editor, { target: { value: 'N' } })
+ expect(screen.getByLabelText('editor')).toHaveValue('N')
+ })
+
+ it('FE-SHARED-MDEDIT-004: without edit rights it is only text', () => {
+ render(<Harness initial="Read only" canEdit={false} />)
+ expect(screen.getByText('Read only')).toBeInTheDocument()
+ expect(screen.queryByRole('button')).not.toBeInTheDocument()
+ })
+})
diff --git a/client/src/components/shared/MarkdownEditable.tsx b/client/src/components/shared/MarkdownEditable.tsx
new file mode 100644
index 000000000..46c278a56
--- /dev/null
+++ b/client/src/components/shared/MarkdownEditable.tsx
@@ -0,0 +1,46 @@
+import { useState, type CSSProperties, type ReactNode } from 'react'
+import MarkdownText from './MarkdownText'
+import { Tooltip } from './Tooltip'
+
+interface EditorProps {
+ autoFocus: boolean
+ /** Holds the editor open while it has focus, so typing into an empty field does not flip it to text. */
+ onFocus: () => void
+ onBlur: () => void
+}
+
+/**
+ * A Markdown field that reads as rendered text and turns into its textarea on a
+ * click (#2558): a link in a to-do description is a link, not a line of syntax.
+ * An empty field, or one being written, is the editor straight away. A click that
+ * lands on a link follows the link and leaves the text alone.
+ */
+export default function MarkdownEditable({ value, canEdit, editLabel, renderEditor, className = '', style }: {
+ value: string
+ canEdit: boolean
+ /** The hint on the rendered text, which is what opens the editor. */
+ editLabel: string
+ renderEditor: (props: EditorProps) => ReactNode
+ className?: string
+ style?: CSSProperties
+}) {
+ const [editing, setEditing] = useState(false)
+ if (canEdit && (editing || !value.trim())) {
+ return <>{renderEditor({ autoFocus: editing, onFocus: () => setEditing(true), onBlur: () => setEditing(false) })}</>
+ }
+ if (!canEdit) return <MarkdownText className={className}>{value}</MarkdownText>
+ return (
+ <Tooltip label={editLabel} placement="top">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={e => { if (!(e.target as HTMLElement).closest('a')) setEditing(true) }}
+ onKeyDown={e => { if (e.key === 'Enter' && e.target === e.currentTarget) { e.preventDefault(); setEditing(true) } }}
+ className={`cursor-text ${className}`}
+ style={style}
+ >
+ <MarkdownText>{value}</MarkdownText>
+ </div>
+ </Tooltip>
+ )
+}
diff --git a/client/src/components/shared/NavigationMenu.tsx b/client/src/components/shared/NavigationMenu.tsx
index 1665603a4..f8dc1a9d9 100644
--- a/client/src/components/shared/NavigationMenu.tsx
+++ b/client/src/components/shared/NavigationMenu.tsx
@@ -2,7 +2,8 @@ import { useEffect, useLayoutEffect, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
import { Navigation } from 'lucide-react'
import type { NavigationTarget } from '../Planner/placeNavigation'
-import { openNavigationTarget } from '../Planner/placeNavigation'
+import { navigationTargetLabel, openNavigationTarget } from '../Planner/placeNavigation'
+import { useTranslation } from '../../i18n'
interface NavigationMenuProps {
targets: NavigationTarget[]
@@ -27,6 +28,7 @@ const EDGE = 8
* than the space to its right is pulled back inside.
*/
export function NavigationMenu({ targets, anchor, onClose, title }: NavigationMenuProps) {
+ const { t } = useTranslation()
const ref = useRef<HTMLDivElement>(null)
const [pos, setPos] = useState<{ top: number; left: number } | null>(null)
@@ -126,7 +128,7 @@ export function NavigationMenu({ targets, anchor, onClose, title }: NavigationMe
onMouseLeave={e => { e.currentTarget.style.background = 'none' }}
>
<Navigation size={13} style={{ flexShrink: 0, color: 'var(--text-faint)' }} />
- <span>{target.label}</span>
+ <span>{navigationTargetLabel(target, t)}</span>
</button>
))}
</div>,
diff --git a/client/src/components/shared/PlaceAvatarUpload.tsx b/client/src/components/shared/PlaceAvatarUpload.tsx
index 9297809dd..2c629228a 100644
--- a/client/src/components/shared/PlaceAvatarUpload.tsx
+++ b/client/src/components/shared/PlaceAvatarUpload.tsx
@@ -1,11 +1,13 @@
-import { useRef, useState } from 'react'
-import { Camera, Loader2, X } from 'lucide-react'
+import { useEffect, useLayoutEffect, useRef, useState } from 'react'
+import { createPortal } from 'react-dom'
+import { Camera, Loader2, Upload, X } from 'lucide-react'
import PlaceAvatar from './PlaceAvatar'
import { Tooltip } from './Tooltip'
import { normalizeImageFile } from '../../utils/convertHeic'
import { useToast } from './Toast'
import { useTranslation, translateApiError } from '../../i18n'
-import type { Place } from '../../types'
+import { fetchImageAsBlob } from '../../api/authUrl'
+import type { Place, TripFile } from '../../types'
interface Category {
color?: string
@@ -19,6 +21,16 @@ interface PlaceAvatarUploadProps {
onUpload: (file: File) => Promise<void>
/** Clears the custom image; the auto-fetched default thumbnail then returns (#1136). */
onRemove: () => Promise<void> | void
+ /** Pictures already attached to the place, offered as its image beside an upload (#1242). */
+ attachedImages?: TripFile[]
+ onPickAttached?: (fileId: number) => Promise<void>
+}
+
+const PICKABLE = /^image\/(jpeg|png|gif|webp)$/
+
+/** The images among a place's files that can stand as its picture. */
+export function pickableImages(files: TripFile[]): TripFile[] {
+ return files.filter(f => PICKABLE.test(f.mime_type || ''))
}
/**
@@ -26,12 +38,29 @@ interface PlaceAvatarUploadProps {
* a camera overlay with a tooltip, clicking opens the file picker, and when a custom
* upload is present a small corner button removes it (falling back to the default).
*/
-export default function PlaceAvatarUpload({ place, category, size = 52, onUpload, onRemove }: PlaceAvatarUploadProps) {
+export default function PlaceAvatarUpload({ place, category, size = 52, onUpload, onRemove, attachedImages = [], onPickAttached }: PlaceAvatarUploadProps) {
const { t } = useTranslation()
const toast = useToast()
const fileRef = useRef<HTMLInputElement>(null)
+ const anchorRef = useRef<HTMLDivElement>(null)
const [busy, setBusy] = useState(false)
+ const [chooserOpen, setChooserOpen] = useState(false)
const hasCustom = Boolean(place.image_url)
+ const offersAttached = !!onPickAttached && attachedImages.length > 0
+ // With pictures on the place the click asks where from; without, it goes straight to the device.
+ const openPicker = () => { if (busy) return; if (offersAttached) setChooserOpen(o => !o); else fileRef.current?.click() }
+
+ const pickAttached = async (fileId: number) => {
+ setChooserOpen(false)
+ setBusy(true)
+ try {
+ await onPickAttached!(fileId)
+ } catch (err: unknown) {
+ toast.error(translateApiError(t, err, 'places.imageUploadError'))
+ } finally {
+ setBusy(false)
+ }
+ }
const handleFile = async (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0]
@@ -65,10 +94,13 @@ export default function PlaceAvatarUpload({ place, category, size = 52, onUpload
<div
className="group"
style={{ position: 'relative', width: size, height: size, borderRadius: '50%', cursor: busy ? 'default' : 'pointer' }}
- onClick={() => { if (!busy) fileRef.current?.click() }}
+ ref={anchorRef}
+ onClick={openPicker}
role="button"
tabIndex={0}
- onKeyDown={e => { if ((e.key === 'Enter' || e.key === ' ') && !busy) { e.preventDefault(); fileRef.current?.click() } }}
+ aria-haspopup={offersAttached ? 'dialog' : undefined}
+ aria-expanded={offersAttached ? chooserOpen : undefined}
+ onKeyDown={e => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); openPicker() } }}
aria-label={hasCustom ? t('places.changeImage') : t('places.uploadImage')}
>
<PlaceAvatar place={place} category={category} size={size} />
@@ -106,6 +138,81 @@ export default function PlaceAvatarUpload({ place, category, size = 52, onUpload
)}
<input ref={fileRef} type="file" accept="image/jpeg,image/png,image/gif,image/webp,.heic,.heif" style={{ display: 'none' }} onChange={handleFile} />
+ {chooserOpen && (
+ <ImageChooser
+ anchor={anchorRef.current}
+ images={attachedImages}
+ onUpload={() => { setChooserOpen(false); fileRef.current?.click() }}
+ onPick={id => { void pickAttached(id) }}
+ onClose={() => setChooserOpen(false)}
+ />
+ )}
</div>
)
}
+
+/** Upload from the device, or one of the pictures already on the place (#1242). */
+function ImageChooser({ anchor, images, onUpload, onPick, onClose }: {
+ anchor: HTMLElement | null
+ images: TripFile[]
+ onUpload: () => void
+ onPick: (fileId: number) => void
+ onClose: () => void
+}) {
+ const { t } = useTranslation()
+ const ref = useRef<HTMLDivElement>(null)
+ const [pos, setPos] = useState<{ top: number; left: number } | null>(null)
+
+ useLayoutEffect(() => {
+ if (!anchor) return
+ const r = anchor.getBoundingClientRect()
+ const width = 264
+ setPos({ top: r.bottom + 8, left: Math.min(Math.max(12, r.left), window.innerWidth - width - 12) })
+ }, [anchor])
+
+ useEffect(() => {
+ const onDown = (e: MouseEvent) => {
+ const target = e.target as Node
+ if (!ref.current?.contains(target) && !anchor?.contains(target)) onClose()
+ }
+ const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose() }
+ document.addEventListener('mousedown', onDown)
+ document.addEventListener('keydown', onKey)
+ return () => { document.removeEventListener('mousedown', onDown); document.removeEventListener('keydown', onKey) }
+ }, [anchor, onClose])
+
+ if (!pos) return null
+ return createPortal(
+ <div ref={ref} role="dialog" aria-label={t('places.chooseImage')}
+ className="trek-popover-enter fixed z-[var(--z-toast)] flex w-[264px] flex-col gap-2 rounded-[14px] border border-edge-secondary bg-surface-card p-2 shadow-popover"
+ style={{ top: pos.top, left: pos.left }}>
+ <button type="button" onClick={onUpload}
+ className="flex items-center gap-2 rounded-[10px] px-2.5 py-2 text-left text-body font-semibold text-content hover:bg-surface-hover">
+ <Upload size={14} strokeWidth={2.2} className="text-content-muted" />
+ {t('places.uploadFromDevice')}
+ </button>
+ <div className="px-2.5 text-caption font-semibold uppercase tracking-[0.04em] text-content-faint">{t('places.fromAttachedFiles')}</div>
+ <div className="grid grid-cols-4 gap-1.5 px-1 pb-1">
+ {images.map(f => <AttachedThumb key={f.id} file={f} onPick={() => onPick(f.id)} />)}
+ </div>
+ </div>,
+ document.body,
+ )
+}
+
+function AttachedThumb({ file, onPick }: { file: TripFile; onPick: () => void }) {
+ const [src, setSrc] = useState<string | null>(null)
+ useEffect(() => {
+ let current = true
+ fetchImageAsBlob(file.url).then(u => { if (current) setSrc(u) }).catch(() => {})
+ return () => { current = false }
+ }, [file.url])
+ return (
+ <Tooltip label={file.original_name} placement="top">
+ <button type="button" onClick={onPick} aria-label={file.original_name}
+ className="aspect-square overflow-hidden rounded-[9px] bg-surface-secondary ring-1 ring-edge-faint transition-shadow hover:ring-2 hover:ring-accent">
+ {src && <img src={src} alt="" className="h-full w-full object-cover" />}
+ </button>
+ </Tooltip>
+ )
+}
diff --git a/client/src/hooks/usePlaceLanguage.test.ts b/client/src/hooks/usePlaceLanguage.test.ts
new file mode 100644
index 000000000..7b0143c5f
--- /dev/null
+++ b/client/src/hooks/usePlaceLanguage.test.ts
@@ -0,0 +1,16 @@
+import { describe, it, expect } from 'vitest'
+import { placeLanguage } from './usePlaceLanguage'
+
+describe('placeLanguage', () => {
+ it('FE-HOOK-PLACELANG-001: a chosen language wins over the app language', () => {
+ expect(placeLanguage('de', 'en')).toBe('en')
+ expect(placeLanguage('de', ' ja ')).toBe('ja')
+ })
+
+ it('FE-HOOK-PLACELANG-002: no choice follows the app language', () => {
+ expect(placeLanguage('de', '')).toBe('de')
+ expect(placeLanguage('de', ' ')).toBe('de')
+ expect(placeLanguage('de', undefined)).toBe('de')
+ expect(placeLanguage('de', null)).toBe('de')
+ })
+})
diff --git a/client/src/hooks/usePlaceLanguage.ts b/client/src/hooks/usePlaceLanguage.ts
new file mode 100644
index 000000000..e5d3dd706
--- /dev/null
+++ b/client/src/hooks/usePlaceLanguage.ts
@@ -0,0 +1,18 @@
+import { useTranslation } from '../i18n'
+import { useSettingsStore } from '../store/settingsStore'
+
+/**
+ * The language place names and addresses are asked for (#1799): the user's own
+ * choice when there is one, the app's language otherwise. A German interface
+ * with English names, or local names under any interface, is a real way to
+ * travel; tying the two together forced one or the other.
+ */
+export function placeLanguage(appLanguage: string, chosen: string | undefined | null): string {
+ return chosen?.trim() ? chosen.trim() : appLanguage
+}
+
+export function usePlaceLanguage(): string {
+ const { language } = useTranslation()
+ const chosen = useSettingsStore(s => s.settings.place_language)
+ return placeLanguage(language, chosen)
+}
diff --git a/client/src/hooks/useRouteCalculation.ts b/client/src/hooks/useRouteCalculation.ts
index ae9bdd09d..e002dea33 100644
--- a/client/src/hooks/useRouteCalculation.ts
+++ b/client/src/hooks/useRouteCalculation.ts
@@ -20,6 +20,9 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu
const [route, setRoute] = useState<[number, number][][] | null>(null)
const [routeInfo, setRouteInfo] = useState<RouteResult | null>(null)
const [routeSegments, setRouteSegments] = useState<RouteSegment[]>([])
+ // One flag per polyline of `route`: true where the stretch is walked, which the map
+ // draws dashed so it reads apart from the drive (#2532).
+ const [routeWalking, setRouteWalking] = useState<boolean[]>([])
// Charging stops / rest areas a plugin route places on the drawn line.
const [routeVias, setRouteVias] = useState<RouteVia[]>([])
const mirrorServiceStops = useRoadtripSettings(s => s.roadtrip_service_stops_in_days !== false)
@@ -40,7 +43,7 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu
const updateRouteForDay = useCallback(async (dayId: number | null) => {
if (routeAbortRef.current) routeAbortRef.current.abort()
// Route is manual: only compute when explicitly enabled (the "show route" toggle).
- if (!dayId || !enabled) { setRoute(null); setRouteSegments([]); setRouteVias([]); return }
+ if (!dayId || !enabled) { setRoute(null); setRouteWalking([]); setRouteSegments([]); setRouteVias([]); return }
// Read directly from store (not a render-phase ref) so callers after optimistic
// updates or non-optimistic deletes always see the latest assignments.
const state = useTripStore.getState()
@@ -57,11 +60,12 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu
const straightLines = (): [number, number][][] =>
runsWithHotel.map(r => r.map(p => [p.lat, p.lng] as [number, number]))
- if (runsWithHotel.length === 0) { setRoute(null); setRouteSegments([]); setRouteVias([]); return }
+ if (runsWithHotel.length === 0) { setRoute(null); setRouteWalking([]); setRouteSegments([]); setRouteVias([]); return }
// Draw straight lines immediately for snappiness, then upgrade to the real
// OSRM (or plugin-provided) road geometry.
setRoute(straightLines())
+ setRouteWalking([])
const tripId = useTripStore.getState().trip?.id ?? null
const controller = new AbortController()
@@ -73,13 +77,26 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu
const dayDefaultMode = day?.default_transport_mode || profile
try {
const polylines: [number, number][][] = []
+ const walking: boolean[] = []
const allLegs: RouteSegment[] = []
const allVias: RouteVia[] = []
for (const run of runsWithHotel) {
- const polyline: [number, number][] = []
+ let polyline: [number, number][] = []
+ let polylineWalks = false
+ const finishPolyline = () => {
+ if (polyline.length >= 2) { polylines.push(polyline); walking.push(polylineWalks) }
+ }
// Append a leg's coordinates, dropping the point shared with the previous
- // leg so concatenated legs don't leave a duplicate at each junction.
- const pushCoords = (coords: [number, number][]) => {
+ // leg so concatenated legs don't leave a duplicate at each junction. A switch
+ // between walking and riding starts a new polyline at the shared point, so the
+ // walked part can be drawn in its own style without a gap (#2532).
+ const pushCoords = (coords: [number, number][], walks: boolean) => {
+ if (polyline.length > 0 && walks !== polylineWalks) {
+ const joint = polyline[polyline.length - 1]
+ finishPolyline()
+ polyline = [joint]
+ }
+ polylineWalks = walks
for (const c of coords) {
const last = polyline[polyline.length - 1]
if (last && last[0] === c[0] && last[1] === c[1]) continue
@@ -99,7 +116,7 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu
const straight = (): [number, number][] => chunk.map(p => [p.lat, p.lng] as [number, number])
try {
const r = await calculateRouteWithLegs(chunk.map(p => ({ lat: p.lat, lng: p.lng })), { signal: controller.signal, profile: mode, tripId, dayId })
- pushCoords(r.coordinates.length >= 2 ? r.coordinates : straight())
+ pushCoords(r.coordinates.length >= 2 ? r.coordinates : straight(), mode === 'walking')
// Leg k runs from chunk[k] to chunk[k + 1]; a hotel bookend says so on the
// segment, which is how the phone timeline finds it (#2501).
r.legs.forEach((leg, k) => {
@@ -110,13 +127,13 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu
} catch (err) {
if (err instanceof Error && err.name === 'AbortError') throw err
// Routing failed for these legs — fall back to straight lines, no times.
- pushCoords(straight())
+ pushCoords(straight(), mode === 'walking')
}
i = end
}
- if (polyline.length >= 2) polylines.push(polyline)
+ finishPolyline()
}
- if (!controller.signal.aborted) { setRoute(polylines); setRouteSegments(allLegs); setRouteVias(allVias) }
+ if (!controller.signal.aborted) { setRoute(polylines); setRouteWalking(walking); setRouteSegments(allLegs); setRouteVias(allVias) }
} catch (err: unknown) {
// Aborted (day changed) — newer call owns the state. Anything else: keep straight lines.
if (!(err instanceof Error) || err.name !== 'AbortError') { setRouteSegments([]); setRouteVias([]) }
@@ -142,10 +159,10 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu
// Recalculate when assignments or transport positions for the SELECTED day change
const selectedDayAssignments = selectedDayId ? tripStore.assignments?.[String(selectedDayId)] : null
useEffect(() => {
- if (!selectedDayId) { setRoute(null); setRouteSegments([]); setRouteVias([]); return }
+ if (!selectedDayId) { setRoute(null); setRouteWalking([]); setRouteSegments([]); setRouteVias([]); return }
updateRouteForDay(selectedDayId)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedDayId, selectedDayAssignments, transportSignature, enabled, profile, accommodations, optimizeFromAccommodation, distanceUnit, selectedDayDefaultMode, mirrorServiceStops])
- return { route, routeSegments, routeVias, routeInfo, setRoute, setRouteInfo, updateRouteForDay }
+ return { route, routeWalking, routeSegments, routeVias, routeInfo, setRoute, setRouteInfo, updateRouteForDay }
}
diff --git a/client/src/index.css b/client/src/index.css
index 0ad77c726..c5ffb6861 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -1547,7 +1547,7 @@ img[alt="TREK"] {
.collab-note-md code, .collab-note-md-full code { font-size: 0.9em; padding: 1px 5px; border-radius: 4px; background: var(--bg-secondary); }
.collab-note-md-full pre { padding: 10px 12px; border-radius: 8px; background: var(--bg-secondary); overflow-x: auto; margin: 0.5em 0; }
.collab-note-md-full pre code { padding: 0; background: none; }
-.collab-note-md a, .collab-note-md-full a { color: #3b82f6; text-decoration: underline; word-break: break-all; }
+.collab-note-md a, .collab-note-md-full a { color: #3b82f6; text-decoration: underline; word-break: normal; overflow-wrap: break-word; }
.collab-note-md blockquote, .collab-note-md-full blockquote { border-left: 3px solid var(--border-primary); padding-left: 12px; margin: 0.5em 0; color: var(--text-muted); }
.collab-note-md-full table { border-collapse: collapse; width: 100%; margin: 0.5em 0; }
.collab-note-md-full th, .collab-note-md-full td { border: 1px solid var(--border-primary); padding: 4px 8px; font-size: 0.9em; }
diff --git a/client/src/mobile/screens/atlas/MAtlas.tsx b/client/src/mobile/screens/atlas/MAtlas.tsx
index 4e6f76f3b..5b887b3a8 100644
--- a/client/src/mobile/screens/atlas/MAtlas.tsx
+++ b/client/src/mobile/screens/atlas/MAtlas.tsx
@@ -14,6 +14,7 @@ import DawarichIcon from '../../../components/shared/DawarichIcon'
import DawarichAtlasDialog from '../../../components/Dawarich/DawarichAtlasDialog'
import { useAddonStore } from '../../../store/addonStore'
import { countryStatus } from '../../../pages/atlas/atlasModel'
+import AtlasCountryPlaces from '../../../components/Atlas/AtlasCountryPlaces'
const removeBtnCls = 'mt-4 w-full rounded-full bg-[rgba(214,39,59,.12)] py-[11px] text-center text-[0.8125rem] font-bold text-[color:var(--m-st-danger)]' // theme-lint-disable — fixed status-danger tint
@@ -191,8 +192,12 @@ export default function MAtlas() {
/>
<div className="min-w-0 flex-1">
<div className="truncate text-[1.0625rem] font-extrabold text-m-ink">{resolveName(selectedCountry)}</div>
- <div className="mt-[2px] font-geist text-[0.6875rem] text-m-muted">
- {countryDetail.places.length} {t('atlas.places')} · {countryDetail.trips.length} {t('atlas.trips')}
+ <div className="mt-[4px] flex flex-wrap gap-1">
+ {[[countryDetail.places.length, t('atlas.places')], [countryDetail.trips.length, t('atlas.trips')]].map(([n, label]) => (
+ <span key={label} className="rounded-full bg-[color:var(--m-ic)] px-2 py-[1px] font-geist text-[0.625rem] font-bold tabular-nums text-m-muted">
+ {n} {label}
+ </span>
+ ))}
</div>
</div>
<MIconBtn variant="neutral" size={34} onClick={() => setDetailOpen(false)} ariaLabel={t('common.close')}>
@@ -208,6 +213,12 @@ export default function MAtlas() {
))}
</div>
)}
+ {/* Every place counted for the country, by trip (#2174). */}
+ {countryDetail.places.length > 0 && (
+ <div className="mt-4 max-h-[46vh] overflow-y-auto">
+ <AtlasCountryPlaces variant="mobile" detail={countryDetail} onOpenTrip={id => navigate(`/trips/${id}`)} />
+ </div>
+ )}
{countryDetail.manually_marked && (
<button
type="button"
diff --git a/client/src/mobile/screens/atlas/MAtlasCountryPopup.tsx b/client/src/mobile/screens/atlas/MAtlasCountryPopup.tsx
index 31ff8a2b4..2081f45c2 100644
--- a/client/src/mobile/screens/atlas/MAtlasCountryPopup.tsx
+++ b/client/src/mobile/screens/atlas/MAtlasCountryPopup.tsx
@@ -157,6 +157,8 @@ export default function MAtlasCountryPopup({ atlas }: MAtlasCountryPopupProps) {
name: confirmAction.name,
country_code: confirmAction.code,
target_date: targetDate,
+ // A region wish hatches that region on the map, not the whole country (#1901).
+ region_code: confirmAction.regionCode ?? null,
})
setBucketList((prev) => [r.data.item, ...prev])
} catch (err) {
diff --git a/client/src/mobile/screens/collections/MCollAddSheet.tsx b/client/src/mobile/screens/collections/MCollAddSheet.tsx
index 0705efd6b..e2ce4a006 100644
--- a/client/src/mobile/screens/collections/MCollAddSheet.tsx
+++ b/client/src/mobile/screens/collections/MCollAddSheet.tsx
@@ -12,6 +12,7 @@ import MSheet from '../../components/MSheet'
import MCollCategoryPicker from './MCollCategoryPicker'
import { STATUS_SPEC } from './collectionsMobileModel'
import { CancelPill, Eyebrow, INPUT_CLS, PrimaryPill, SheetFooter, SheetHeader, TEXTAREA_CLS } from './MCollSheetKit'
+import { usePlaceLanguage } from '../../../hooks/usePlaceLanguage'
type MapsPlace = Record<string, unknown>
const str = (v: unknown): string | undefined => (typeof v === 'string' && v ? v : undefined)
@@ -36,6 +37,7 @@ interface MCollAddSheetProps {
*/
export default function MCollAddSheet({ open, collectionId, collectionName, lists, categories, onClose, onAdded, t }: MCollAddSheetProps) {
const { language } = useTranslation()
+ const placeLang = usePlaceLanguage()
const toast = useToast()
const [query, setQuery] = useState('')
const [results, setResults] = useState<MapsPlace[]>([])
@@ -69,7 +71,7 @@ export default function MCollAddSheet({ open, collectionId, collectionName, list
if (!query.trim() || searching) return
setSearching(true)
try {
- const res = await mapsApi.search(query, language)
+ const res = await mapsApi.search(query, placeLang)
setResults((res.places as MapsPlace[]) || [])
} catch (err) {
toast.error(getApiErrorMessage(err, t('places.mapsSearchError')))
diff --git a/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx b/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx
index 88f94898f..2a54d0f19 100644
--- a/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx
+++ b/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx
@@ -1,6 +1,6 @@
import { useEffect, useMemo, useRef, useState } from 'react'
import { localIsoDate } from '../../../utils/localDate'
-import { Camera, Plus, Image, Images, X, MapPin, Locate, Trash2, CheckCircle2, MinusCircle, ChevronUp, ChevronDown, EyeOff, Play } from 'lucide-react'
+import { Briefcase, Camera, Plus, Image, Images, X, MapPin, Locate, Trash2, CheckCircle2, MinusCircle, ChevronUp, ChevronDown, EyeOff, Play } from 'lucide-react'
import MSheet from '../../components/MSheet'
import MIconBtn from '../../components/MIconBtn'
import MToggle from '../../components/MToggle'
@@ -20,6 +20,9 @@ import { photoUrl, posterlessVideo, geoOnceErrorKey, isValidGeoPoint } from '../
import JournalBody from '../../../components/Journey/JournalBody'
import { ProviderPicker, type ProviderPhotoGroup } from '../../../components/Journey/JourneyDetailPageProviderPicker'
import { journeyWeatherCategory, MOBILE_MOODS, MOBILE_WEATHERS } from './mobileJourneyMeta'
+import { useJourneyTripSuggestion } from '../../../components/Journey/useJourneyTripSuggestion'
+import { useEntryPhotoOrder } from '../../../components/Journey/useEntryPhotoOrder'
+import { usePlaceLanguage } from '../../../hooks/usePlaceLanguage'
const PRO_COLOR = '#2FA37A'
const CON_COLOR = '#D6273B'
@@ -87,6 +90,7 @@ export default function MJourneyEntrySheet({
onClose, onSave, onUploadPhotos, onAddProviderPhotos, onDelete, onDone,
}: MJourneyEntrySheetProps) {
const { t, language } = useTranslation()
+ const placeLang = usePlaceLanguage()
const toast = useToast()
// Which verdict row to hand the caret after the next render — see addVerdictRow.
const verdictFocusRef = useRef<string | null>(null)
@@ -105,11 +109,16 @@ export default function MJourneyEntrySheet({
const [mood, setMood] = useState(entry.mood || '')
const [weather, setWeather] = useState(entry.weather || '')
const [statsExcluded, setStatsExcluded] = useState(entry.stats_excluded ?? false)
+ // The trip this day belongs to, when the journey does not follow it yet (#2265).
+ const tripSuggestion = useJourneyTripSuggestion(entry.journey_id, trips.map(tr => tr.trip_id), entryDate, !readOnly)
+ const [isDraft, setIsDraft] = useState(entry.is_draft ?? false)
const [pros, setPros] = useState<string[]>(entry.pros_cons?.pros ?? [])
const [cons, setCons] = useState<string[]>(entry.pros_cons?.cons ?? [])
const [tags, setTags] = useState<string[]>(entry.tags ?? [])
const [tagInput, setTagInput] = useState('')
const [photos, setPhotos] = useState<(JourneyPhoto | GalleryPhoto)[]>(entry.photos || [])
+ // Sends a photo to the front in one request, the same way the desktop editor does (#824).
+ const photoOrder = useEntryPhotoOrder(entry.id, photos, setPhotos)
const [pendingFiles, setPendingFiles] = useState<File[]>([])
const [pendingLinkIds, setPendingLinkIds] = useState<number[]>([])
const [pendingProviderGroups, setPendingProviderGroups] = useState<PendingProviderGroup[]>([])
@@ -195,7 +204,7 @@ export default function MJourneyEntrySheet({
setLocationLng(pos.lng)
const [placeResult, weatherResult] = await Promise.allSettled([
- mapsApi.reverse(pos.lat, pos.lng, language),
+ mapsApi.reverse(pos.lat, pos.lng, placeLang),
weatherApi.getCurrent(pos.lat, pos.lng, language),
])
if (!active) return
@@ -213,7 +222,7 @@ export default function MJourneyEntrySheet({
})
return () => { active = false }
- }, [quickCapture, readOnly, entry.location_lat, entry.location_lng, entry.entry_date, t, language])
+ }, [quickCapture, readOnly, entry.location_lat, entry.location_lng, entry.entry_date, t, language, placeLang])
const isDirty =
title !== (entry.title || '') ||
@@ -224,6 +233,7 @@ export default function MJourneyEntrySheet({
mood !== (entry.mood || '') ||
weather !== (entry.weather || '') ||
statsExcluded !== (entry.stats_excluded ?? false) ||
+ isDraft !== (entry.is_draft ?? false) ||
pros.filter(p => p.trim()).join('\n') !== (entry.pros_cons?.pros ?? []).join('\n') ||
cons.filter(c => c.trim()).join('\n') !== (entry.pros_cons?.cons ?? []).join('\n') ||
tags.join('\n') !== (entry.tags ?? []).join('\n') ||
@@ -271,6 +281,7 @@ export default function MJourneyEntrySheet({
location_lat: locationLat,
location_lng: locationLng,
stats_excluded: offersStatsToggle ? statsExcluded : undefined,
+ is_draft: isDraft,
mood: mood || null,
weather: weather || null,
tags: tags.filter(tag => tag.trim()),
@@ -339,7 +350,7 @@ export default function MJourneyEntrySheet({
}
locationTimerRef.current = setTimeout(async () => {
try {
- const res = await mapsApi.search(query)
+ const res = await mapsApi.search(query, placeLang)
setLocationResults((res.places || []).slice(0, 6).map((p: { name: string; address?: string; lat: number | string; lng: number | string }) => ({
name: p.name, address: p.address, lat: Number(p.lat), lng: Number(p.lng),
})))
@@ -366,7 +377,7 @@ export default function MJourneyEntrySheet({
setLocationResults([])
setShowLocationResults(false)
try {
- const data = await mapsApi.reverse(pos.lat, pos.lng, language)
+ const data = await mapsApi.reverse(pos.lat, pos.lng, placeLang)
const name = data.name || data.address
// Only replace the coordinate fallback — don't clobber a search
// result the user may have picked while the reverse call was in flight.
@@ -634,25 +645,7 @@ export default function MJourneyEntrySheet({
{!readOnly && idx > 0 && photos.length > 1 && (
<button
type="button"
- onClick={() => {
- // The PATCHes stay outside the updater — StrictMode invokes it
- // twice in dev and would send the whole batch a second time.
- const prevOrder = photos
- const next = [...photos]
- const [moved] = next.splice(idx, 1)
- next.unshift(moved)
- setPhotos(next)
- // Same as the desktop editor: the order is shared with the other
- // members, the share view and the PDF, so a run the server refused
- // outright goes back instead of passing for saved.
- void (async () => {
- const results = await Promise.allSettled(next.map((ph, i) => journeyApi.updatePhoto(ph.id, { sort_order: i })))
- const rejected = results.filter(r => r.status === 'rejected') as PromiseRejectedResult[]
- if (rejected.length === 0) return
- toast.error(getApiErrorMessage(rejected[0].reason, t('common.error')))
- if (rejected.length === results.length) setPhotos(prevOrder)
- })()
- }}
+ onClick={() => photoOrder.makeFirst(idx)}
className="absolute bottom-[3px] left-[3px] rounded-full bg-black/60 px-[6px] py-[1px] font-geist text-[0.5rem] font-bold text-white"
>
{t('journey.editor.photoFirst')}
@@ -828,6 +821,20 @@ export default function MJourneyEntrySheet({
</div>
</div>
+ {tripSuggestion.trip && (
+ <div className={`mt-3 flex items-center gap-3 px-3 py-[10px] ${fieldShell}`}>
+ <Briefcase size={15} strokeWidth={2} className="flex-none text-m-muted" />
+ <div className="min-w-0 flex-1">
+ <div className="text-[0.75rem] font-semibold text-m-ink [overflow-wrap:anywhere]">{tripSuggestion.trip.title}</div>
+ <div className="mt-[2px] font-geist text-[0.65625rem] leading-[1.4] text-m-muted">{t('journey.editor.tripSuggestionHint')}</div>
+ </div>
+ <button type="button" onClick={() => void tripSuggestion.link()} disabled={tripSuggestion.linking}
+ className="flex-none rounded-full bg-m-act px-3 py-[6px] text-[0.6875rem] font-bold text-m-actfg disabled:opacity-50">
+ {t('journey.trips.linkTrip')}
+ </button>
+ </div>
+ )}
+
{/* Location */}
<div className="relative mt-3">
<div className={`${eyebrow} mb-[5px]`}>{t('journey.editor.location')}</div>
@@ -897,6 +904,15 @@ export default function MJourneyEntrySheet({
</div>
)}
+ {/* Kept among the contributors until it is ready (#696). */}
+ <div className={`mt-3 flex items-center gap-3 px-3 py-[10px] ${fieldShell}`}>
+ <div className="min-w-0 flex-1">
+ <div className="text-[0.75rem] font-semibold text-m-ink">{t('journey.editor.draft')}</div>
+ <div className="mt-[2px] font-geist text-[0.65625rem] leading-[1.4] text-m-muted">{t('journey.editor.draftHint')}</div>
+ </div>
+ <MToggle checked={isDraft} onChange={setIsDraft} disabled={readOnly} ariaLabel={t('journey.editor.draft')} />
+ </div>
+
{/* Mood */}
{showMood && !captureOnly && <>
<div className={`${eyebrow} mb-[6px] mt-3`}>{t('journey.editor.mood')}</div>
diff --git a/client/src/mobile/screens/settings/MSettingsGeneral.tsx b/client/src/mobile/screens/settings/MSettingsGeneral.tsx
index f9cf51510..eceec29ae 100644
--- a/client/src/mobile/screens/settings/MSettingsGeneral.tsx
+++ b/client/src/mobile/screens/settings/MSettingsGeneral.tsx
@@ -48,6 +48,13 @@ export default function MSettingsGeneral() {
on: boolean
value: (on: boolean) => boolean
}[] = [
+ {
+ key: 'day_date_first',
+ label: t('settings.dayDateFirst'),
+ sub: t('settings.dayDateFirstHint'),
+ on: settings.day_date_first === true,
+ value: (on) => on,
+ },
{
key: 'map_booking_labels',
label: t('settings.bookingLabels'),
@@ -62,6 +69,13 @@ export default function MSettingsGeneral() {
on: settings.map_always_show_routes === true,
value: (on) => on,
},
+ {
+ key: 'map_compact_unplanned',
+ label: t('settings.compactUnplanned'),
+ sub: t('settings.compactUnplannedHint'),
+ on: settings.map_compact_unplanned === true,
+ value: (on) => on,
+ },
{
key: 'map_poi_pill_enabled',
label: t('settings.mapPoiPill'),
diff --git a/client/src/mobile/screens/trip/map/MMapArea.tsx b/client/src/mobile/screens/trip/map/MMapArea.tsx
index 4695c3981..6fbdf688e 100644
--- a/client/src/mobile/screens/trip/map/MMapArea.tsx
+++ b/client/src/mobile/screens/trip/map/MMapArea.tsx
@@ -353,6 +353,7 @@ export default function MMapArea({ planner, shell }: MMapAreaProps) {
dayPlaces={onStage ? undefined : planner.dayPlaces}
route={stageMap ? stageMap.lines : planner.overviewActive ? planner.tripOverview.lines : planner.route}
routeColors={stageMap ? stageMap.lineColors : planner.overviewActive ? planner.tripOverview.lineColors : undefined}
+ routeWalking={stageMap || planner.overviewActive ? undefined : planner.routeWalking}
accessLines={stageMap ? stageMap.accessLines : undefined}
// A hit somebody tapped in the search sheet, a stop shown from its sheet, or the
// stations the fuel search is offering take the camera while their day is on
diff --git a/client/src/mobile/screens/trip/plan/MPlanTimeline.tsx b/client/src/mobile/screens/trip/plan/MPlanTimeline.tsx
index 2005ed16b..46cb596f0 100644
--- a/client/src/mobile/screens/trip/plan/MPlanTimeline.tsx
+++ b/client/src/mobile/screens/trip/plan/MPlanTimeline.tsx
@@ -1,13 +1,10 @@
import { useRef, useState, type MouseEvent } from 'react'
-import {
- ArrowRight, BedDouble, CalendarDays, CalendarRange, ChevronRight, Compass, LogIn, LogOut,
- MapPin, Pencil, PencilLine, Route, Ticket, TrainFront, Undo2,
- Car, Footprints, Zap, RotateCcw, TramFront,
-} from 'lucide-react'
+import { ArrowRight, BedDouble, CalendarDays, CalendarRange, ChevronRight, Compass, LogIn, LogOut, MapPin, Pencil, PencilLine, Route, Ticket, TrainFront, Undo2, RotateCcw, TramFront } from 'lucide-react'
import type { LucideIcon } from 'lucide-react'
import { useContextMenu, ContextMenu } from '../../../../components/shared/ContextMenu'
import MarkdownText from '../../../../components/shared/MarkdownText'
import { fmtTransitDuration } from '../../../../components/Planner/transitDisplay'
+import { routeModeIcon } from '../../../../components/Planner/routeModes'
import { formatTime } from '../../../../utils/formatters'
import { useMPlanTimeline, type MPlanTimelineController } from './useMPlanTimeline'
import { cityPillsForDay, weatherIconFor } from './planTimelineModel'
@@ -46,12 +43,11 @@ export default function MPlanTimeline({ planner, shell }: MPlanTimelineProps) {
const canEditPlaces = can('place_edit', trip)
// Per-segment travel mode (#1281): tap a connector → pick the leg's mode.
const legMenu = useContextMenu()
- const modeIcon = (key: string) => (key === 'walking' ? Footprints : key.startsWith('plugin:') ? Zap : Car)
const openLegMenu = (e: MouseEvent, assignmentId: number, seg: RouteSegment) => {
// Public transit sits under the road profiles, as on the desktop (#2398).
const transitLeg = tl.transitLegFor(seg)
legMenu.open(e, [
- ...tl.routeModeOptions.map(o => ({ label: o.label, icon: modeIcon(o.key), onClick: () => tl.setLegMode(assignmentId, o.key) })),
+ ...tl.routeModeOptions.map(o => ({ label: o.label, icon: routeModeIcon(o.key), onClick: () => tl.setLegMode(assignmentId, o.key) })),
...(transitLeg ? [{ label: t('transit.title'), icon: TramFront, onClick: () => tl.planTransitLeg(transitLeg) }] : []),
{ divider: true },
{ label: t('dayplan.transportMode.useDefault'), icon: RotateCcw, onClick: () => tl.setLegMode(assignmentId, null) },
diff --git a/client/src/mobile/screens/trip/plan/MPlanTimelineRows.tsx b/client/src/mobile/screens/trip/plan/MPlanTimelineRows.tsx
index 803a53cb6..0c4c88061 100644
--- a/client/src/mobile/screens/trip/plan/MPlanTimelineRows.tsx
+++ b/client/src/mobile/screens/trip/plan/MPlanTimelineRows.tsx
@@ -1,4 +1,5 @@
-import { BedDouble, Car, ChevronDown, ChevronUp, Clock, Footprints, Pencil, Route, StickyNote, Ticket, X, Zap } from 'lucide-react'
+import { BedDouble, ChevronDown, ChevronUp, Clock, Footprints, Pencil, Route, StickyNote, Ticket, X, Zap } from 'lucide-react'
+import { routeModeIcon } from '../../../../components/Planner/routeModes'
import type { ReactNode, MouseEvent, CSSProperties } from 'react'
import PlaceAvatar from '../../../../components/shared/PlaceAvatar'
import { getCategoryIcon } from '../../../../components/shared/categoryIcons'
@@ -451,7 +452,7 @@ export function TransitRow({ res, transit, dayId, open, chrome, reorder, drag, o
/** The connector line of a routed leg — the leg's own mode (#1281) picks icon and duration. */
function TravelLine({ seg }: { seg: RouteSegment }) {
const mode = seg.mode
- const Icon = mode === 'walking' ? Footprints : mode?.startsWith('plugin:') ? Zap : Car
+ const Icon = routeModeIcon(mode)
const durationText = seg.durationText ?? (mode === 'walking' ? seg.walkingText : seg.drivingText)
return (
<>
diff --git a/client/src/mobile/screens/trip/plan/planTimelineModel.ts b/client/src/mobile/screens/trip/plan/planTimelineModel.ts
index c39df2393..fcbb39dbf 100644
--- a/client/src/mobile/screens/trip/plan/planTimelineModel.ts
+++ b/client/src/mobile/screens/trip/plan/planTimelineModel.ts
@@ -157,6 +157,8 @@ export function buildPlanRows(opts: {
if (row.kind === 'place') {
const place = row.assignment.place
if (place?.lat == null || place?.lng == null) continue
+ // Out of the route (#2532): the drive passes it by, so no leg starts or ends here.
+ if (row.assignment.route_excluded) continue
const at: [number, number] = [place.lat, place.lng]
connect(prev, at)
// The leg's mode is stored on its ORIGIN place assignment (#1281), so carry
diff --git a/client/src/mobile/screens/trip/plan/useMPlanTimeline.ts b/client/src/mobile/screens/trip/plan/useMPlanTimeline.ts
index d1bda48fd..3d65cfc1e 100644
--- a/client/src/mobile/screens/trip/plan/useMPlanTimeline.ts
+++ b/client/src/mobile/screens/trip/plan/useMPlanTimeline.ts
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'
import { useTripStore } from '../../../../store/tripStore'
import { useRouteCalculation } from '../../../../hooks/useRouteCalculation'
import { assignmentsApi, reservationsApi, weatherApi } from '../../../../api/client'
-import { usePluginStore } from '../../../../store/pluginStore'
+import { useRouteModeOptions } from '../../../../components/Planner/routeModes'
import { getDayBookendHotels } from '../../../../utils/dayOrder'
import { getDisplayTimeForDay, getMergedItems, getTransportForDay, hasCarrierEndpointOnDay, isCarrierTransport } from '../../../../utils/dayMerge'
import { dayCoMapsUrl, dayExportStops, dayGoogleMapsUrl, optimizeDayOrder, type DayCarrier } from '../lib/dayRoute'
@@ -368,15 +368,7 @@ export function useMPlanTimeline(planner: TripPlanner) {
: null
// ── Per-segment travel mode (#1281) ──
- const activePlugins = usePluginStore(s => s.plugins)
- const routeModeOptions = useMemo(() => {
- const opts: Array<{ key: string; label: string }> = [
- { key: 'driving', label: t('mobileTrip.profileDriving') },
- { key: 'walking', label: t('mobileTrip.profileWalking') },
- ]
- for (const p of activePlugins) for (const prof of p.routeProfiles ?? []) opts.push({ key: `plugin:${p.id}/${prof.id}`, label: prof.label })
- return opts
- }, [activePlugins, t])
+ const routeModeOptions = useRouteModeOptions()
// Set the mode of the leg leaving a stop — optimistic, then persisted; null clears
// the override back to the day default. Sticky against the whole-day picker.
diff --git a/client/src/mobile/screens/trip/roadtrip/MRoadtripTab.tsx b/client/src/mobile/screens/trip/roadtrip/MRoadtripTab.tsx
index 8e6d10bd5..d21192bc8 100644
--- a/client/src/mobile/screens/trip/roadtrip/MRoadtripTab.tsx
+++ b/client/src/mobile/screens/trip/roadtrip/MRoadtripTab.tsx
@@ -10,7 +10,7 @@ import { RtAutoRow, RtBookendRow, RtBookingChips, RtDryRow, RtLegRow, RtRideRow,
import MBadge from '../../../components/MBadge'
import MDancingTrek from '../../../components/MDancingTrek'
import { formatDurationShort } from '../../../../components/Roadtrip/roadtripModel'
-import { getNavigationTargets } from '../../../../components/Planner/placeNavigation'
+import { navigationTargetLabel, getNavigationTargets } from '../../../../components/Planner/placeNavigation'
import { useSettingsStore } from '../../../../store/settingsStore'
import { formatDistance } from '../../../../utils/units'
import { formatClockTime } from '../../../../utils/formatters'
@@ -419,7 +419,7 @@ function UpNext({ planner, shell, rt, stageDayId, onOpen }: {
className={`flex h-11 flex-1 items-center justify-center gap-[7px] rounded-full bg-m-act text-[0.8125rem] font-semibold text-m-actfg shadow-[0_10px_24px_-10px_rgba(0,0,0,.45)] ${targets.length ? '' : 'pointer-events-none opacity-40'}`}
>
<Navigation size={15} strokeWidth={2.2} aria-hidden="true" />
- {targets.length === 1 ? targets[0].label : t('inspector.navigation')}
+ {targets.length === 1 ? navigationTargetLabel(targets[0], t) : t('inspector.navigation')}
</a>
<button
type="button"
diff --git a/client/src/mobile/screens/trip/roadtrip/MRtStopSheet.tsx b/client/src/mobile/screens/trip/roadtrip/MRtStopSheet.tsx
index 8d1963828..17d555f7a 100644
--- a/client/src/mobile/screens/trip/roadtrip/MRtStopSheet.tsx
+++ b/client/src/mobile/screens/trip/roadtrip/MRtStopSheet.tsx
@@ -15,7 +15,7 @@ import { formatDurationShort } from '../../../../components/Roadtrip/roadtripMod
import { roadtripRows, stageOf, type StopRow } from '../../../../components/Roadtrip/roadtripRowModel'
import { readStay, shownStay } from '../../../../components/Roadtrip/stayReading'
import { STOP_KIND_BY_KEY } from '../../../../components/Roadtrip/stopKinds'
-import { getNavigationTargets, openNavigationTarget } from '../../../../components/Planner/placeNavigation'
+import { navigationTargetLabel, getNavigationTargets, openNavigationTarget } from '../../../../components/Planner/placeNavigation'
import { NavigationMenu } from '../../../../components/shared/NavigationMenu'
import { formatDistance } from '../../../../utils/units'
import { Eyebrow, displayTime } from '../sheets/MTripSheetUi'
@@ -411,7 +411,7 @@ export default function MRtStopSheet({ planner, shell }: MTripSheetsProps) {
tileRef={navBtnRef}
icon={<Navigation size={16} strokeWidth={2} />}
label={t('inspector.navigation')}
- value={navTargets.length === 1 ? navTargets[0].label : undefined}
+ value={navTargets.length === 1 ? navigationTargetLabel(navTargets[0], t) : undefined}
onClick={openDirections}
/>
)}
diff --git a/client/src/mobile/screens/trip/sheets/ImpFileStep.tsx b/client/src/mobile/screens/trip/sheets/ImpFileStep.tsx
index d5bc3514e..4bb19b7f6 100644
--- a/client/src/mobile/screens/trip/sheets/ImpFileStep.tsx
+++ b/client/src/mobile/screens/trip/sheets/ImpFileStep.tsx
@@ -1,6 +1,8 @@
import { useRef, useState } from 'react'
import { Check, FileDown } from 'lucide-react'
import { placesApi } from '../../../../api/client'
+import { useAuthStore } from '../../../../store/authStore'
+import MToggle from '../../../components/MToggle'
import { Eyebrow, FormSheetFooter } from './PlSheetChrome'
import type { TripPlanner } from '../MTripShell'
@@ -37,6 +39,9 @@ export default function ImpFileStep({ planner, onBack, onDone }: ImpFileStepProp
const [summary, setSummary] = useState<ImportSummary | null>(null)
const [gpxOpts, setGpxOpts] = useState({ waypoints: true, routes: true, tracks: true })
const [kmlOpts, setKmlOpts] = useState({ points: true, paths: true })
+ // The Google pass the list import offers, for a file's points too (#2536).
+ const canEnrich = useAuthStore(s => s.hasMapsKey)
+ const [enrich, setEnrich] = useState(false)
const validateFile = (f: File): string | null => {
const ext = f.name.toLowerCase().split('.').pop()
@@ -77,12 +82,12 @@ export default function ImpFileStep({ planner, onBack, onDone }: ImpFileStepProp
const ext = f.name.toLowerCase().split('.').pop()
try {
if (ext === 'gpx') {
- const result = await placesApi.importGpx(tripId, f, gpxOpts)
+ const result = await placesApi.importGpx(tripId, f, { ...gpxOpts, enrich: enrich && canEnrich })
gpxCreated += result.count ?? 0
totalSkipped += result.skipped ?? 0
if (result.places?.length > 0) gpxIds.push(...result.places.map((p: { id: number }) => p.id))
} else {
- const result = await placesApi.importMapFile(tripId, f, kmlOpts)
+ const result = await placesApi.importMapFile(tripId, f, { ...kmlOpts, enrich: enrich && canEnrich })
kmlCreated += result.count ?? 0
if (result.places?.length > 0) kmlIds.push(...result.places.map((p: { id: number }) => p.id))
const s = result.summary as ImportSummary | undefined
@@ -208,6 +213,16 @@ export default function ImpFileStep({ planner, onBack, onDone }: ImpFileStepProp
/>
)}
+ {canEnrich && ((isGpx && gpxOpts.waypoints) || (isKml && kmlOpts.points)) && (
+ <div className="mt-3 flex items-start gap-3">
+ <div className="min-w-0 flex-1">
+ <div className="text-[0.78125rem] font-semibold text-m-ink">{t('places.enrichOnImport')}</div>
+ <div className="mt-[2px] font-geist text-[0.65625rem] leading-[1.4] text-m-faint">{t('places.enrichOnImportFileHint')}</div>
+ </div>
+ <MToggle checked={enrich} onChange={setEnrich} ariaLabel={t('places.enrichOnImport')} className="mt-[2px]" />
+ </div>
+ )}
+
{summary && (
<div className="mt-3 rounded-[13px] border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 py-[10px]">
<div className="font-geist text-[0.71875rem] text-m-muted">
diff --git a/client/src/mobile/screens/trip/sheets/MDaySheet.tsx b/client/src/mobile/screens/trip/sheets/MDaySheet.tsx
index ed0eb2af9..9193f4f51 100644
--- a/client/src/mobile/screens/trip/sheets/MDaySheet.tsx
+++ b/client/src/mobile/screens/trip/sheets/MDaySheet.tsx
@@ -1,15 +1,14 @@
import { useEffect, useMemo, useRef, useState } from 'react'
-import {
- CalendarDays, Car, Compass, Footprints, Hotel, MapPin, Pencil, Plus, RotateCcw,
- Route as RouteIcon, TramFront, Zap,
-} from 'lucide-react'
+import { CalendarDays, Compass, Eraser, Hotel, MapPin, Pencil, Plus, RotateCcw, Route as RouteIcon, TramFront } from 'lucide-react'
import type { WeatherResult } from '@trek/shared'
import MSheet from '../../../components/MSheet'
import type { MTripSheetsProps } from '../MTripShell'
import { useTranslation } from '../../../../i18n'
import { weatherApi } from '../../../../api/client'
import { useSettingsStore } from '../../../../store/settingsStore'
-import { usePluginStore } from '../../../../store/pluginStore'
+import { routeModeIcon, useRouteModeOptions } from '../../../../components/Planner/routeModes'
+import { dayHeadingParts } from '../../../../utils/dayLabel'
+import { stayDayTimes } from '../../../../components/Planner/stayDayTimes'
import { useDayNotes } from '../../../../hooks/useDayNotes'
import { RES_ICONS, getNoteIcon } from '../../../../components/Planner/DayPlanSidebar.constants'
import { getDayBookendHotels, isDayInAccommodationRange } from '../../../../utils/dayOrder'
@@ -45,24 +44,13 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
const canEditReservations = planner.can('reservation_edit', planner.trip)
const tripHasDates = Boolean(planner.trip?.start_date && planner.trip?.end_date)
- // Route-profile pills: the built-ins plus every profile an active routeProvider
- // plugin declared (same key format as the desktop picker, 'plugin:<id>/<profile>').
- const activePlugins = usePluginStore(s => s.plugins)
- const routeProfileOptions = useMemo(() => {
- const opts: Array<{ key: string; label: string }> = [
- { key: 'driving', label: t('mobileTrip.profileDriving') },
- { key: 'walking', label: t('mobileTrip.profileWalking') },
- ]
- for (const p of activePlugins) {
- for (const prof of p.routeProfiles ?? []) opts.push({ key: `plugin:${p.id}/${prof.id}`, label: prof.label })
- }
- return opts
- }, [activePlugins, t])
+ const routeProfileOptions = useRouteModeOptions()
const isFahrenheit = useSettingsStore(s => s.settings.temperature_unit) === 'fahrenheit'
const timeFormat = useSettingsStore(s => s.settings.time_format) || '24h'
const blurCodes = useSettingsStore(s => s.settings.blur_booking_codes)
const optimizeFromAccommodation = useSettingsStore(s => s.settings.optimize_from_accommodation)
+ const dateFirst = useSettingsStore(s => s.settings.day_date_first === true)
const dayAssignments = useMemo<Assignment[]>(() => {
if (!day) return []
@@ -240,6 +228,7 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
: null
// A day_number of 0 is as unusable as a missing one — both fall back to the row position.
const dayLabel = day?.title || t('planner.dayN', { n: day ? day.day_number || dayIndex + 1 : '?' })
+ const heading = dayHeadingParts(dayLabel, formattedDate, dateFirst)
const WeatherIcon = weatherIconFor(weather?.main)
const stayBadge = (acc: (typeof dayAccommodations)[number]) => {
@@ -270,7 +259,7 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
/>
) : (
<>
- <span className="truncate">{dayLabel}</span>
+ <span className="truncate">{heading.primary}</span>
{canEditDays && (
<button
type="button"
@@ -283,7 +272,7 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
)}
</>
)}
- sub={formattedDate}
+ sub={heading.secondary}
onClose={shell.closeSheet}
closeLabel={t('common.close')}
/>
@@ -346,7 +335,7 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
{routable && (
<div className={`flex overflow-hidden rounded-full ${INNER_CLS}`}>
{routeProfileOptions.map(p => {
- const ProfileIcon = p.key === 'driving' ? Car : p.key === 'walking' ? Footprints : Zap
+ const ProfileIcon = routeModeIcon(p.key)
const active = planner.routeProfile === p.key
return (
<button
@@ -394,6 +383,16 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
{t('dayplan.optimize')}
</button>
)}
+ {canEditDays && dayAssignments.length > 0 && (
+ <button
+ type="button"
+ onClick={() => planner.handleClearDay(day.id)}
+ className={`flex items-center gap-[5px] rounded-full px-3 py-[7px] text-[0.75rem] font-semibold text-m-ink ${INNER_CLS}`}
+ >
+ <Eraser size={13} strokeWidth={2} />
+ {t('dayplan.clearDay')}
+ </button>
+ )}
{canEditDays && tripHasDates && (
<button
type="button"
@@ -494,6 +493,10 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
<div className="flex flex-col gap-2">
{dayAccommodations.map(acc => {
const badge = stayBadge(acc)
+ const times = stayDayTimes(acc, day.id)
+ // The desk time carries the arrival or departure colour itself (#2393),
+ // so the head keeps its room for the name and drops the badge.
+ const badgeAtTime = times.checkIn || times.checkOut
const linked = planner.reservations.find(r => String(r.accommodation_id ?? '') === String(acc.id))
return (
<div key={acc.id} className={`rounded-[16px] px-3 py-[11px] ${INNER_CLS}`}>
@@ -523,9 +526,11 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
)}
</div>
</button>
- <span className={`flex-none rounded-full border px-[7px] py-[2px] text-[0.5625rem] font-bold uppercase tracking-[.05em] ${badge.cls}`}>
- {badge.label}
- </span>
+ {!badgeAtTime && (
+ <span className={`flex-none rounded-full border px-[7px] py-[2px] text-[0.5625rem] font-bold uppercase tracking-[.05em] ${badge.cls}`}>
+ {badge.label}
+ </span>
+ )}
{canEditDays && acc.place_id != null && (
<button
type="button"
@@ -537,16 +542,17 @@ export default function MDaySheet({ planner, shell }: MTripSheetsProps) {
</button>
)}
</div>
- {(acc.check_in || acc.check_out || acc.confirmation) && (
+ {(badgeAtTime || acc.confirmation) && (
<div className="mt-[10px] flex gap-[6px]">
- {acc.check_in && (
+ {times.checkIn && acc.check_in && (
<StatBox
value={`${displayTime(acc.check_in, locale, timeFormat)}${acc.check_in_end ? ` – ${displayTime(acc.check_in_end, locale, timeFormat)}` : ''}`}
label={t('day.checkIn')}
+ labelTone="confirmed"
/>
)}
- {acc.check_out && (
- <StatBox value={displayTime(acc.check_out, locale, timeFormat)} label={t('day.checkOut')} />
+ {times.checkOut && acc.check_out && (
+ <StatBox value={displayTime(acc.check_out, locale, timeFormat)} label={t('day.checkOut')} labelTone="danger" />
)}
{acc.confirmation && (
<StatBox value={acc.confirmation} label={t('day.confirmation')} blurred={blurCodes} />
diff --git a/client/src/mobile/screens/trip/sheets/MExportSheet.tsx b/client/src/mobile/screens/trip/sheets/MExportSheet.tsx
index cea7d4409..a607ac52d 100644
--- a/client/src/mobile/screens/trip/sheets/MExportSheet.tsx
+++ b/client/src/mobile/screens/trip/sheets/MExportSheet.tsx
@@ -1,11 +1,13 @@
import { useState, type ReactNode } from 'react'
-import { CalendarPlus, ChevronRight, FileDown, Share2 } from 'lucide-react'
+import { CalendarPlus, ChevronRight, FileDown, Share2, UserRound } from 'lucide-react'
import MSheet from '../../../components/MSheet'
import { IcsSubscribeModal } from '../../../../components/Planner/IcsSubscribeModal'
import { useTripStore } from '../../../../store/tripStore'
import { useSettingsStore } from '../../../../store/settingsStore'
import { useRoadtripSettings } from '../../../../hooks/useRoadtripSettings'
import { useTranslation } from '../../../../i18n'
+import { useAuthStore } from '../../../../store/authStore'
+import { hasPersonalPlan } from '../../../../components/PDF/pdfScope'
import { INNER_CLS, TileHeader } from './MTripSheetUi'
import type { MTripSheetsProps } from '../MTripShell'
import type { LucideIcon } from 'lucide-react'
@@ -27,7 +29,9 @@ export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
const open = shell.sheet?.id === 'export'
const dayNotes = useTripStore(s => s.dayNotes)
const [subscribeOpen, setSubscribeOpen] = useState(false)
- const [pdfBusy, setPdfBusy] = useState(false)
+ const [pdfBusy, setPdfBusy] = useState<false | 'all' | 'mine'>(false)
+ const myId = useAuthStore(s => s.user?.id)
+ const offerMine = myId != null && hasPersonalPlan(planner.storedAssignments, planner.reservations)
const [icsBusy, setIcsBusy] = useState(false)
const [gpxBusy, setGpxBusy] = useState(false)
// The subscription link reads the trip without an account, so it needs the
@@ -35,12 +39,12 @@ export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
// not: that is a file this member may already read.
const canManageShare = planner.can('share_manage', planner.trip)
- const exportPdf = async () => {
+ const exportPdf = async (mine = false) => {
if (!planner.trip || pdfBusy) return
const flatNotes = Object.entries(dayNotes).flatMap(([dayId, notes]) =>
notes.map(n => ({ ...n, day_id: Number(dayId) })),
)
- setPdfBusy(true)
+ setPdfBusy(mine ? 'mine' : 'all')
try {
// See DayPlanSidebarToolbar: loaded on demand, not with the trip.
const { downloadTripPDF } = await import('../../../../components/PDF/TripPDF')
@@ -57,6 +61,7 @@ export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
timeFormat,
distanceUnit,
showServiceStops,
+ onlyUserId: mine ? myId : undefined,
})
} catch (e) {
planner.toast.error(`${t('dayplan.pdfError')}: ${e instanceof Error ? e.message : String(e)}`)
@@ -130,10 +135,18 @@ export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
<div className="flex flex-col gap-2">
<ExportRow
icon={FileDown}
- title={pdfBusy ? t('common.loading') : t('dayplan.pdf')}
+ title={pdfBusy === 'all' ? t('common.loading') : t('dayplan.pdf')}
sub={t('dayplan.pdfTooltip')}
onClick={() => void exportPdf()}
/>
+ {offerMine && (
+ <ExportRow
+ icon={UserRound}
+ title={pdfBusy === 'mine' ? t('common.loading') : t('dayplan.pdfMine')}
+ sub={t('dayplan.pdfMineSub')}
+ onClick={() => void exportPdf(true)}
+ />
+ )}
<ExportRow
icon={FileDown}
title={icsBusy ? t('common.loading') : t('mobileTrip.icsDownload')}
diff --git a/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx b/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx
index eb29d346e..109255037 100644
--- a/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx
+++ b/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx
@@ -2,7 +2,7 @@ import { useMemo, useRef, useState } from 'react'
import DawarichIcon from '../../../../components/shared/DawarichIcon'
import {
Bookmark, Camera, ChevronRight, ExternalLink, Loader2, Map as MapIcon, Navigation, Paperclip,
- Pencil, Phone, Plus, Route, Trash2, Upload, X,
+ Pencil, Phone, Plus, Route, RouteOff, Trash2, Upload, X,
} from 'lucide-react'
import MSheet from '../../../components/MSheet'
import type { MTripSheetsProps } from '../MTripShell'
@@ -22,7 +22,7 @@ import { avatarSrc } from '../../../../utils/avatarSrc'
import { safeHttpUrl } from '../../../../utils/safeUrl'
import { openFile } from '../../../../utils/fileDownload'
import { filesForPlace } from '../../../../utils/placeFiles'
-import { getNavigationTargets, openNavigationTarget } from '../../../../components/Planner/placeNavigation'
+import { navigationTargetLabel, getNavigationTargets, openNavigationTarget } from '../../../../components/Planner/placeNavigation'
import { NavigationMenu } from '../../../../components/shared/NavigationMenu'
import { getAssignmentReservations } from '../../../../utils/dayMerge'
import type { Assignment, Day, Reservation, TripMember } from '../../../../types'
@@ -402,6 +402,18 @@ export default function MPlaceSheet({ planner, shell }: MTripSheetsProps) {
className={`flex items-center gap-1 rounded-full py-1 pl-[10px] text-[0.75rem] font-semibold ${INNER_CLS} ${canEditDays ? 'pr-1' : 'pr-[10px]'}`}
>
{day.title || t('planner.dayN', { n: (day.day_number ?? planner.days.indexOf(day) + 1) || '?' })}
+ {canEditDays && place.lat != null && place.lng != null && (
+ // In or out of that day's route (#2532); the icon says which it is.
+ <button
+ type="button"
+ onClick={() => { planner.tripActions.setAssignmentRouteExcluded(planner.tripId, day.id, assignment.id, !assignment.route_excluded).catch((err: unknown) => planner.toast.error(err instanceof Error ? err.message : t('common.unknownError'))) }}
+ aria-label={assignment.route_excluded ? t('dayplan.includeInRoute') : t('dayplan.excludeFromRoute')}
+ aria-pressed={!!assignment.route_excluded}
+ className={`flex h-[18px] w-[18px] items-center justify-center rounded-full ${assignment.route_excluded ? 'bg-m-act text-m-actfg' : 'bg-[color:var(--m-ic)] text-m-muted'}`}
+ >
+ <RouteOff size={10} strokeWidth={2.4} />
+ </button>
+ )}
{canEditDays && (
<button
type="button"
@@ -609,7 +621,7 @@ export default function MPlaceSheet({ planner, shell }: MTripSheetsProps) {
<ActionCircle
ref={navBtnRef}
onClick={openDirections}
- label={navTargets.length === 1 ? navTargets[0].label : t('inspector.navigation')}
+ label={navTargets.length === 1 ? navigationTargetLabel(navTargets[0], t) : t('inspector.navigation')}
>
<Navigation size={15} strokeWidth={2} />
</ActionCircle>
diff --git a/client/src/mobile/screens/trip/sheets/MTransportFormSheet.tsx b/client/src/mobile/screens/trip/sheets/MTransportFormSheet.tsx
index 2bf294392..4b5c18c59 100644
--- a/client/src/mobile/screens/trip/sheets/MTransportFormSheet.tsx
+++ b/client/src/mobile/screens/trip/sheets/MTransportFormSheet.tsx
@@ -1,5 +1,5 @@
import { useEffect, useMemo, useRef, useState } from 'react'
-import { Bike, Bus, Car, CarTaxiFront, Check, ChevronDown, ChevronUp, Plane, Plus, Route, Sailboat, Ship, Train, TrainFront, TramFront, Trash2, X } from 'lucide-react'
+import { Bike, Bus, Car, CarTaxiFront, Check, ChevronDown, ChevronUp, Plane, Plus, Route, Sailboat, CableCar, Ship, Train, TrainFront, TramFront, Trash2, X } from 'lucide-react'
import MSheet from '../../../components/MSheet'
import { useAddonStore } from '../../../../store/addonStore'
import { useTranslation } from '../../../../i18n'
@@ -30,7 +30,7 @@ export interface MTransportFormSheetProps {
onOpenExpense: (req: BookingExpenseRequest) => void
}
-const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other'] as const
+const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other'] as const
type TransportType = typeof TRANSPORT_TYPES[number]
const TYPE_OPTIONS = [
@@ -42,6 +42,7 @@ const TYPE_OPTIONS = [
{ value: 'bicycle', labelKey: 'reservations.type.bicycle', Icon: Bike },
{ value: 'cruise', labelKey: 'reservations.type.cruise', Icon: Ship },
{ value: 'ferry', labelKey: 'reservations.type.ferry', Icon: Sailboat },
+ { value: 'cable_car', labelKey: 'reservations.type.cable_car', Icon: CableCar },
{ value: 'transport_other', labelKey: 'reservations.type.transport_other', Icon: Route },
]
diff --git a/client/src/mobile/screens/trip/sheets/MTripSheetUi.tsx b/client/src/mobile/screens/trip/sheets/MTripSheetUi.tsx
index 6a6313899..d74a9d9d5 100644
--- a/client/src/mobile/screens/trip/sheets/MTripSheetUi.tsx
+++ b/client/src/mobile/screens/trip/sheets/MTripSheetUi.tsx
@@ -62,10 +62,17 @@ interface StatBoxProps {
label: ReactNode
blurred?: boolean
onClick?: () => void
+ /** Colours the label, so a check-in or check-out time carries its own state. */
+ labelTone?: 'confirmed' | 'danger'
+}
+
+const LABEL_TONE: Record<NonNullable<StatBoxProps['labelTone']>, string> = {
+ confirmed: 'font-bold uppercase tracking-[.05em] text-[color:var(--m-st-confirmed)]',
+ danger: 'font-bold uppercase tracking-[.05em] text-[color:var(--m-st-danger)]',
}
/** Small stat box (check-in / times / code): value 700 tabular over a faint Geist label. */
-export function StatBox({ value, label, blurred = false, onClick }: StatBoxProps) {
+export function StatBox({ value, label, blurred = false, onClick, labelTone }: StatBoxProps) {
const box = 'min-w-0 flex-1 rounded-[10px] bg-[color:var(--m-ic)] px-[9px] py-[7px] text-center'
const inner = (
<>
@@ -74,7 +81,7 @@ export function StatBox({ value, label, blurred = false, onClick }: StatBoxProps
>
{value}
</div>
- <div className="truncate font-geist text-[0.5625rem] text-m-faint">{label}</div>
+ <div className={`truncate font-geist text-[0.5625rem] ${labelTone ? LABEL_TONE[labelTone] : 'text-m-faint'}`}>{label}</div>
</>
)
// A tappable stat is a real button — value and label give it its name. Without
diff --git a/client/src/mobile/screens/trip/sheets/MTripSheets.tsx b/client/src/mobile/screens/trip/sheets/MTripSheets.tsx
index 4f2d9c724..1ce2053e3 100644
--- a/client/src/mobile/screens/trip/sheets/MTripSheets.tsx
+++ b/client/src/mobile/screens/trip/sheets/MTripSheets.tsx
@@ -206,6 +206,18 @@ export default function MTripSheets({ planner, shell }: MTripSheetsProps) {
}}
/>
+ {/* Clear-day confirm behind the day sheet's "Clear day" (#2470). */}
+ <MConfirmSheet
+ open={planner.clearDayId != null}
+ onClose={planner.cancelClearDay}
+ title={planner.clearDayTitle}
+ message={t('dayplan.clearDayBody')}
+ confirmLabel={t('dayplan.clearDay')}
+ cancelLabel={t('common.cancel')}
+ danger
+ onConfirm={() => { void planner.confirmClearDay() }}
+ />
+
{/* Delete-day confirm behind the days sheet's delete buttons. Mounted
last, so it opens over that sheet; the list of what goes with the day
comes ready made from the planner, the same one the desktop shows. */}
diff --git a/client/src/mobile/screens/trip/sheets/PlPlaceSearch.tsx b/client/src/mobile/screens/trip/sheets/PlPlaceSearch.tsx
index 7267364e7..6b6785307 100644
--- a/client/src/mobile/screens/trip/sheets/PlPlaceSearch.tsx
+++ b/client/src/mobile/screens/trip/sheets/PlPlaceSearch.tsx
@@ -11,6 +11,7 @@ import { pointFromBox } from '../../../../hooks/useLocationBias'
import { usePlaceSuggestions } from '../../../../hooks/usePlaceSuggestions'
import { FIELD_CLS } from './PlSheetChrome'
import type { TripPlanner } from '../MTripShell'
+import { usePlaceLanguage } from '../../../../hooks/usePlaceLanguage'
/** Fields a search pick can contribute to the place form. */
export interface PlSearchPick {
@@ -92,7 +93,9 @@ function placeToPick(place: MapsPlace): PlSearchPick {
* detection — the mobile counterpart of PlaceFormModal's search block.
*/
export default function PlPlaceSearch({ planner, locationBias, onPick, onResolvingChange }: PlPlaceSearchProps) {
- const { t, language, toast } = planner
+ const { t, toast } = planner
+ // Place names in the language the user picked for them, the app's otherwise (#1799).
+ const language = usePlaceLanguage()
const [query, setQuery] = useState('')
const [results, setResults] = useState<MapsPlace[]>([])
const [suggestions, setSuggestions] = useState<Suggestion[]>([])
diff --git a/client/src/mobile/screens/trip/tabs/MCostsTab.tsx b/client/src/mobile/screens/trip/tabs/MCostsTab.tsx
index 64463d773..c1299ff22 100644
--- a/client/src/mobile/screens/trip/tabs/MCostsTab.tsx
+++ b/client/src/mobile/screens/trip/tabs/MCostsTab.tsx
@@ -15,7 +15,7 @@ import { budgetApi } from '../../../../api/client'
import MCostSheet from '../sheets/MCostSheet'
import { ReceiptPreviewModal } from '../../../../components/Budget/ReceiptPreviewModal'
import { useFreezeMissingRates } from '../../../../components/Budget/useFreezeMissingRates'
-import { finalBudgetFor, finalBudgetSources, paidByUser, readUserNote, settlementDate } from '../../../../components/Budget/CostsPanel.helpers'
+import { finalBudgetFor, finalBudgetSources, NOTE_MAX, paidByUser, readUserNote, settlementDate } from '../../../../components/Budget/CostsPanel.helpers'
import { catMeta, COST_CAT_META } from '../../../../components/Budget/costsCategories'
import CustomSelect from '../../../../components/shared/CustomSelect'
import { CustomDatePicker } from '../../../../components/shared/CustomDateTimePicker'
@@ -24,7 +24,7 @@ import { localToday } from '../../../../components/Planner/today'
import MConfirmSheet from '../../settings/MConfirmSheet'
import MSheet from '../../../components/MSheet'
import MChip from '../../../components/MChip'
-import { Eyebrow, FIELD_CLS, FormSheetFooter, FormSheetHeader } from '../sheets/PlSheetChrome'
+import { Eyebrow, FIELD_AREA_CLS, FIELD_CLS, FormSheetFooter, FormSheetHeader } from '../sheets/PlSheetChrome'
import { CountPill, TabScroller } from './tabChrome'
import { STATUS_COLOR, type MTabScreenProps } from './tabModel'
import {
@@ -635,9 +635,6 @@ function ExpenseRow({ item, ctx, base, locale, t, canEdit, onEdit, onDelete, onT
const borderColor = tint(meta.color, 0.55)
const members = item.members || []
const note = readUserNote(item)
- // A phone row has no width to spare for a note, so it stays folded away and
- // the card itself is the handle — no extra control, no extra height.
- const [noteOpen, setNoteOpen] = useState(false)
return (
<div className="mt-2 flex items-center gap-[6px]">
@@ -709,24 +706,7 @@ function ExpenseRow({ item, ctx, base, locale, t, canEdit, onEdit, onDelete, onT
</span>
</div>
- {note && (
- <button
- type="button"
- aria-expanded={noteOpen}
- onClick={() => setNoteOpen(v => !v)}
- className="mt-[7px] flex w-full items-center gap-[7px] rounded-xl bg-[color:var(--m-ic)] px-[9px] py-[6px] text-left"
- >
- <StickyNote size={11} strokeWidth={2} className="flex-none text-m-faint" />
- <span className={`min-w-0 flex-1 text-[0.6875rem] leading-[1.5] text-m-muted ${noteOpen ? 'whitespace-pre-wrap [overflow-wrap:anywhere]' : 'truncate'}`}>
- {note}
- </span>
- <ChevronDown
- size={12}
- strokeWidth={2}
- className={`flex-none text-m-faint transition-transform duration-200 ${noteOpen ? 'rotate-180' : ''}`}
- />
- </button>
- )}
+ {note && <RowNote note={note} />}
</div>
{canEdit && (
@@ -743,6 +723,32 @@ function ExpenseRow({ item, ctx, base, locale, t, canEdit, onEdit, onDelete, onT
)
}
+/**
+ * A row's note, folded to one line until tapped: a phone row has no width to
+ * spare for it. Expenses and payments (#2340) share it.
+ */
+function RowNote({ note }: { note: string }) {
+ const [open, setOpen] = useState(false)
+ return (
+ <button
+ type="button"
+ aria-expanded={open}
+ onClick={() => setOpen(v => !v)}
+ className="mt-[7px] flex w-full items-center gap-[7px] rounded-xl bg-[color:var(--m-ic)] px-[9px] py-[6px] text-left"
+ >
+ <StickyNote size={11} strokeWidth={2} className="flex-none text-m-faint" />
+ <span className={`min-w-0 flex-1 text-[0.6875rem] leading-[1.5] text-m-muted ${open ? 'whitespace-pre-wrap [overflow-wrap:anywhere]' : 'truncate'}`}>
+ {note}
+ </span>
+ <ChevronDown
+ size={12}
+ strokeWidth={2}
+ className={`flex-none text-m-faint transition-transform duration-200 ${open ? 'rotate-180' : ''}`}
+ />
+ </button>
+ )
+}
+
/**
* A recorded settle-up payment mixed into the day-grouped ledger (spec 03
* §3.7 desktop parity — see `CostsPanel.tsx`'s `SettlementRow`). Edit opens
@@ -786,6 +792,7 @@ function PaymentRow({ settlement, ctx, base, locale, t, personName, canEdit, onE
{formatMoney(amount, base, locale)}
</span>
</div>
+ {settlement.note && <RowNote note={settlement.note} />}
</div>
{canEdit && (
@@ -905,6 +912,7 @@ function AddPaymentSheet({ open, editing, onClose, tripId, base, tripCurrency, p
const [amount, setAmount] = useState('')
const [currency, setCurrency] = useState(base)
const [day, setDay] = useState(localToday())
+ const [note, setNote] = useState('')
const [saving, setSaving] = useState(false)
useEffect(() => {
@@ -915,6 +923,7 @@ function AddPaymentSheet({ open, editing, onClose, tripId, base, tripCurrency, p
setAmount(editing ? amountToInputString(editing.amount, cur) : '')
setCurrency(cur)
setDay(editing ? settlementDate(editing) : localToday())
+ setNote(editing?.note || '')
setSaving(false)
}, [open, editing, me, base, people])
@@ -924,7 +933,7 @@ function AddPaymentSheet({ open, editing, onClose, tripId, base, tripCurrency, p
const save = async () => {
if (!valid || saving) return
setSaving(true)
- const data = withFallbackFx({ from_user_id: fromId, to_user_id: toId, amount: amt, currency, settled_at: day }, tripCurrency)
+ const data = withFallbackFx({ from_user_id: fromId, to_user_id: toId, amount: amt, currency, settled_at: day, note: note.trim() || null }, tripCurrency)
try {
if (editing) await budgetApi.updateSettlement(tripId, editing.id, data)
else await budgetApi.createSettlement(tripId, data)
@@ -985,6 +994,16 @@ function AddPaymentSheet({ open, editing, onClose, tripId, base, tripCurrency, p
<CustomDatePicker value={day} onChange={setDay} style={{ width: '100%' }} />
</div>
</div>
+
+ <Eyebrow className="mb-[6px] mt-[14px] uppercase">{t('costs.note')}</Eyebrow>
+ <textarea
+ value={note}
+ onChange={e => setNote(e.target.value)}
+ rows={2}
+ maxLength={NOTE_MAX}
+ placeholder={t('costs.paymentNotePlaceholder')}
+ className={FIELD_AREA_CLS}
+ />
</div>
<FormSheetFooter onCancel={onClose} cancelLabel={t('common.cancel')} onSubmit={save} submitLabel={editing ? t('common.save') : t('costs.addPayment')} submitDisabled={!valid || saving} />
</MSheet>
diff --git a/client/src/mobile/screens/trip/tabs/MPackingListTab.tsx b/client/src/mobile/screens/trip/tabs/MPackingListTab.tsx
index 0e0275baa..72854539c 100644
--- a/client/src/mobile/screens/trip/tabs/MPackingListTab.tsx
+++ b/client/src/mobile/screens/trip/tabs/MPackingListTab.tsx
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useState, useCallback } from 'react'
import type { LucideIcon } from 'lucide-react'
import {
- Briefcase, Check, CheckCheck, ChevronDown, ChevronUp, HandHelping,
+ Briefcase, Check, CheckCheck, ChevronDown, ChevronUp, HandHelping, Minus,
Download, FileSpreadsheet, FileText, LayoutTemplate, MoreHorizontal, Package, Pencil, Plus, Printer, RotateCcw, Save as SaveIcon,
Trash2, UserPlus, UserRound,
} from 'lucide-react'
@@ -18,7 +18,7 @@ import type { TripPlanner } from '../MTripShell'
import MConfirmSheet from '../../settings/MConfirmSheet'
import { FIELD_CLS } from '../sheets/PlSheetChrome'
import { TabScroller } from './tabChrome'
-import { katColor } from '../../../../components/Packing/packingListPanel.helpers'
+import { katColor, newItemSharing, packedOf } from '../../../../components/Packing/packingListPanel.helpers'
import { BAG_COLORS, PACKING_PLACEHOLDER_NAME } from '../../../../components/Packing/packingListPanel.constants'
import {
formatWeight, groupPackingItems, isLastCustomItemInCategory, isPackingPlaceholder,
@@ -121,7 +121,8 @@ export default function MPackingListTab({ planner }: { planner: TripPlanner }) {
} else {
await tripActions.addPackingItem(
tripId,
- { name, category, visibility: view === 'personal' ? 'personal' : 'common' } as Parameters<typeof tripActions.addPackingItem>[1],
+ // In "my list", shared the way the category's own items all are (#2241).
+ { name, category, ...newItemSharing(items, category, view, currentUserId) } as Parameters<typeof tripActions.addPackingItem>[1],
)
}
} catch {
@@ -827,6 +828,10 @@ function PackingItemRow({ item, planner, currentUserId, editMode, canEdit, bagTr
const ownerAvatarUrl = ownerMember?.avatar_url ?? (item.owner_id === me?.id ? me?.avatar_url ?? null : null)
const toggle = () => tripActions.togglePackingItem(tripId, item.id, !item.checked)
+ // Multi-piece items count their pieces into the bag (#2296).
+ const quantity = item.quantity || 1
+ const packed = packedOf(item)
+ const partlyPacked = !item.checked && packed > 0
const assignBag = async (bagId: number | null) => {
setBagPickerOpen(false)
@@ -850,7 +855,7 @@ function PackingItemRow({ item, planner, currentUserId, editMode, canEdit, bagTr
aria-label={item.name}
aria-pressed={!!item.checked}
className={`flex h-[22px] w-[22px] flex-none items-center justify-center rounded-[7px] border-[1.5px] ${
- item.checked ? 'border-m-act bg-m-act text-m-actfg' : 'border-[color:var(--m-rowbr)] text-transparent'
+ item.checked ? 'border-m-act bg-m-act text-m-actfg' : partlyPacked ? 'border-m-act text-transparent' : 'border-[color:var(--m-rowbr)] text-transparent'
}`}
>
<Check size={12} strokeWidth={3} />
@@ -893,11 +898,27 @@ function PackingItemRow({ item, planner, currentUserId, editMode, canEdit, bagTr
</span>
)}
- {(item.quantity || 1) > 1 && (
+ {quantity > 1 && (canEdit && !isPlaceholder ? (
+ <span
+ role="group"
+ aria-label={t('packing.packedCount', { packed, total: quantity })}
+ className={`flex flex-none items-center rounded-full font-geist text-[0.625rem] font-bold tabular-nums ${partlyPacked ? 'bg-[color:color-mix(in_srgb,var(--m-act)_14%,transparent)] text-m-ink' : 'bg-[color:var(--m-ic)] text-m-muted'}`}
+ >
+ <button type="button" aria-label={t('packing.packedLess')} disabled={packed <= 0} onClick={() => tripActions.setPackedCount(tripId, item.id, packed - 1)}
+ className="flex h-[22px] w-[22px] items-center justify-center disabled:opacity-30">
+ <Minus size={11} strokeWidth={2.6} />
+ </button>
+ <span className="min-w-[26px] text-center">{packed}/{quantity}</span>
+ <button type="button" aria-label={t('packing.packedMore')} disabled={packed >= quantity} onClick={() => tripActions.setPackedCount(tripId, item.id, packed + 1)}
+ className="flex h-[22px] w-[22px] items-center justify-center disabled:opacity-30">
+ <Plus size={11} strokeWidth={2.6} />
+ </button>
+ </span>
+ ) : (
<span className="flex-none rounded-full bg-[color:var(--m-ic)] px-2 py-[2px] font-geist text-[0.625rem] font-bold tabular-nums text-m-muted">
- {item.quantity}×
+ {partlyPacked ? `${packed}/${quantity}` : `${quantity}×`}
</span>
- )}
+ ))}
{/* A weight nobody entered is not worth a column: "— g" on every row
cost as much width as a real value (#1525). */}
diff --git a/client/src/mobile/screens/trip/tabs/MTaskSheet.tsx b/client/src/mobile/screens/trip/tabs/MTaskSheet.tsx
index 17f63b6fc..3b26b32a1 100644
--- a/client/src/mobile/screens/trip/tabs/MTaskSheet.tsx
+++ b/client/src/mobile/screens/trip/tabs/MTaskSheet.tsx
@@ -3,6 +3,7 @@ import { Check, Flag, Plus, User } from 'lucide-react'
import type { TodoCreateItemRequest, TodoUpdateItemRequest } from '@trek/shared'
import MSheet from '../../../components/MSheet'
import { CustomDatePicker } from '../../../../components/shared/CustomDateTimePicker'
+import MarkdownEditable from '../../../../components/shared/MarkdownEditable'
import { Eyebrow, FIELD_AREA_CLS, FIELD_CLS, FormSheetFooter, FormSheetHeader } from '../sheets/PlSheetChrome'
import { avatarSrc } from '../../../../utils/avatarSrc'
import type { TodoItem, TripMember } from '../../../../types'
@@ -133,12 +134,21 @@ export default function MTaskSheet({ planner, open, itemId, categories, members,
/>
<Eyebrow className="mb-[5px] mt-3 uppercase">{t('todo.detail.description')}</Eyebrow>
- <textarea
+ <MarkdownEditable
value={description}
- onChange={e => setDescription(e.target.value)}
- rows={3}
- placeholder={t('todo.descriptionPlaceholder')}
- className={FIELD_AREA_CLS}
+ canEdit
+ editLabel={t('todo.editDescription')}
+ className="rounded-[12px] border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 py-[10px] font-geist text-[0.78125rem] leading-[1.5] text-m-ink [overflow-wrap:break-word]"
+ renderEditor={editor => (
+ <textarea
+ value={description}
+ onChange={e => setDescription(e.target.value)}
+ rows={3}
+ {...editor}
+ placeholder={t('todo.descriptionPlaceholder')}
+ className={FIELD_AREA_CLS}
+ />
+ )}
/>
<Eyebrow className="mb-[6px] mt-3 uppercase">{t('todo.detail.priority')}</Eyebrow>
diff --git a/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx b/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx
index 727734642..8f0d38fd2 100644
--- a/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx
+++ b/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx
@@ -14,6 +14,7 @@ import {
sortTodoRows, todoCategories, todoCategoryOpenCount, todoCounts, type TodoSmartFilter,
} from './listsModel'
import MTaskSheet from './MTaskSheet'
+import MarkdownText from '../../../../components/shared/MarkdownText'
const BUILTIN_FILTERS: TodoSmartFilter[] = ['all', 'my', 'overdue', 'done']
@@ -219,7 +220,7 @@ function TaskCard({ item, members, today, onToggle, onOpen }: {
{item.name}
</div>
{item.description && (
- <div className="mt-[1px] truncate font-geist text-[0.625rem] text-m-faint">{item.description}</div>
+ <MarkdownText clamp className="mt-[1px] font-geist text-[0.625rem] text-m-faint">{item.description}</MarkdownText>
)}
{(item.priority > 0 || item.due_date || assignee) && (
<div className="mt-[5px] flex flex-wrap items-center gap-[5px]">
diff --git a/client/src/mobile/screens/trip/tabs/costsModel.ts b/client/src/mobile/screens/trip/tabs/costsModel.ts
index bd5fb6ef7..0b1dd6eee 100644
--- a/client/src/mobile/screens/trip/tabs/costsModel.ts
+++ b/client/src/mobile/screens/trip/tabs/costsModel.ts
@@ -108,6 +108,8 @@ export interface CostsSettlement {
// The day the transfer actually happened; editable, unlike created_at (when it
// was recorded). Null/absent on rows predating this field.
settled_at?: string | null
+ /** A free-text note on the payment (#2340). */
+ note?: string | null
}
export interface CostsSettlementResponse {
diff --git a/client/src/mobile/screens/trip/tabs/transportsModel.ts b/client/src/mobile/screens/trip/tabs/transportsModel.ts
index afc2efa39..c6d4aa1dd 100644
--- a/client/src/mobile/screens/trip/tabs/transportsModel.ts
+++ b/client/src/mobile/screens/trip/tabs/transportsModel.ts
@@ -18,6 +18,7 @@ export const TRANSPORT_TYPE_COLOR: Record<string, string> = {
bicycle: '#84cc16',
cruise: '#0ea5e9',
ferry: '#0d9488',
+ cable_car: '#dc2626',
transit: '#7c3aed',
transport_other: '#6b7280',
}
diff --git a/client/src/mobile/screens/vacay/useMVacay.ts b/client/src/mobile/screens/vacay/useMVacay.ts
index a26fdc1d3..52258eff7 100644
--- a/client/src/mobile/screens/vacay/useMVacay.ts
+++ b/client/src/mobile/screens/vacay/useMVacay.ts
@@ -10,6 +10,7 @@ import { isWeekend } from '../../../components/Vacay/holidays'
import { currentPeriodYear, inGridWindow, windowMonths } from '../../../vacay/yearWindow'
import { FALLBACK_PERSON_COLOR, localDateStr, type DayVisualContext } from './vacayDayModel'
import { getApiErrorMessage, type Trip } from '../../../types'
+import { companyHolidaySets, leaveFractionFor } from '../../../components/Vacay/companyHolidays'
export type MVacayView = 'grid' | 'edit'
export type MVacayMode = 'vacation' | 'company'
@@ -94,7 +95,8 @@ export function useMVacay() {
[plan?.weekend_days],
)
- const companyHolidaySet = useMemo(() => new Set(companyHolidays.map(h => h.date)), [companyHolidays])
+ // Whole company holidays close a day to leave, half ones leave half of it (#2439).
+ const { full: companyHolidaySet, half: companyHalfSet } = useMemo(() => companyHolidaySets(companyHolidays), [companyHolidays])
const entryMap = useMemo(() => {
const map: DayVisualContext['entryMap'] = {}
@@ -125,8 +127,8 @@ export function useMVacay() {
}, [sharedCalendars])
const dayCtx = useMemo<DayVisualContext>(() => ({
- todayStr, entryMap, companyHolidaySet, companyHolidaysEnabled, holidays, weekendDays, sharedMap,
- }), [todayStr, entryMap, companyHolidaySet, companyHolidaysEnabled, holidays, weekendDays, sharedMap])
+ todayStr, entryMap, companyHolidaySet, companyHalfSet, companyHolidaysEnabled, holidays, weekendDays, sharedMap,
+ }), [todayStr, entryMap, companyHolidaySet, companyHalfSet, companyHolidaysEnabled, holidays, weekendDays, sharedMap])
// The twelve months the window spans, in display order — Jan–Dec for a calendar
// year, Jul–Jun for a fiscal one starting in July (#737).
@@ -193,7 +195,7 @@ export function useMVacay() {
}
if (mode === 'company') {
if (!companyHolidaysEnabled) return
- await toggleCompanyHoliday(dateStr)
+ await toggleCompanyHoliday(dateStr, halfDay ? 0.5 : 1)
return
}
if (blockWeekends && isWeekend(dateStr, weekendDays)) {
@@ -207,8 +209,9 @@ export function useMVacay() {
return
}
if (companyHolidaysEnabled && companyHolidaySet.has(dateStr)) return
- await toggleEntry(dateStr, selectedUserId || undefined, halfDay ? 0.5 : 1, compDay ? 'comp' : 'vacation')
- }, [view, months, openMonthSlot, mode, halfDay, compDay, companyHolidaysEnabled, blockWeekends, weekendDays, companyHolidaySet, toggleEntry, toggleCompanyHoliday, selectedUserId, currentUser?.id, entryMap])
+ const fraction = companyHolidaysEnabled ? leaveFractionFor(dateStr, companyHalfSet, halfDay ? 0.5 : 1) : (halfDay ? 0.5 : 1)
+ await toggleEntry(dateStr, selectedUserId || undefined, fraction, compDay ? 'comp' : 'vacation')
+ }, [view, months, openMonthSlot, mode, halfDay, compDay, companyHolidaysEnabled, blockWeekends, weekendDays, companyHolidaySet, companyHalfSet, toggleEntry, toggleCompanyHoliday, selectedUserId, currentUser?.id, entryMap])
// Entitlement stepper: never below what is already used this year
// (carried-over days cover the difference when used > entitlement).
diff --git a/client/src/mobile/screens/vacay/vacayDayModel.ts b/client/src/mobile/screens/vacay/vacayDayModel.ts
index 2db106b4d..5c5456861 100644
--- a/client/src/mobile/screens/vacay/vacayDayModel.ts
+++ b/client/src/mobile/screens/vacay/vacayDayModel.ts
@@ -27,6 +27,8 @@ export interface DayVisualContext {
todayStr: string
entryMap: Record<string, VacayEntry[]>
companyHolidaySet: Set<string>
+ /** Half company holidays (#2439): half-filled, still open for half a day of leave. */
+ companyHalfSet?: Set<string>
companyHolidaysEnabled: boolean
holidays: HolidaysMap
weekendDays: number[]
@@ -125,6 +127,9 @@ function baseDayVisual(dateStr: string, dayOfWeek: number, ctx: DayVisualContext
if (entries.some(e => (e.fraction ?? 1) === 0.5)) visual.half = true
return withSchool(visual)
}
+ if (ctx.companyHolidaysEnabled && ctx.companyHalfSet?.has(dateStr)) {
+ return withSchool({ background: 'linear-gradient(135deg, #F5D9A6 50%, transparent 50%)', numColor: '#8A5A00' })
+ }
if (publicHoliday) {
return withSchool({ background: publicHoliday.color, numColor: holidayInk(publicHoliday.color) })
}
diff --git a/client/src/pages/AtlasPage.tsx b/client/src/pages/AtlasPage.tsx
index 3d2676532..75be38ba7 100644
--- a/client/src/pages/AtlasPage.tsx
+++ b/client/src/pages/AtlasPage.tsx
@@ -12,7 +12,7 @@ import { DialogButton, DialogFooter, DialogHeader, DialogShell, DialogTile, Foot
import { EditorField, GRID_2 } from '../components/shared/dialogParts'
import DawarichAtlasSidePanel from '../components/Dawarich/DawarichAtlasSidePanel'
import CountryFlag from '../components/shared/CountryFlag'
-import { A2_TO_A3, countryCodeToFlag, findBucketDuplicate, isBucketDuplicateError, withCountryMarkedVisited, type AtlasCountry, type AtlasStats, type AtlasData, type CountryDetail } from './atlas/atlasModel'
+import { A2_TO_A3, countryCodeToFlag, findBucketDuplicate, isBucketDuplicateError, visitedRegionCount, withCountryMarkedVisited, type AtlasCountry, type AtlasStats, type AtlasData, type CountryDetail } from './atlas/atlasModel'
import { continentForCountry } from '@trek/shared'
import { useAtlas } from './atlas/useAtlas'
import AtlasCountrySearch from './atlas/AtlasCountrySearch'
@@ -20,6 +20,7 @@ import AtlasLayerToggle from './atlas/AtlasLayerToggle'
import { useToast } from '../components/shared/Toast'
import { getApiErrorMessage } from '../types'
import HelpAnchor from '../components/Help/HelpAnchor'
+import AtlasCountryPlaces from '../components/Atlas/AtlasCountryPlaces'
// Fixed ids rather than useId: the page body stays free of hooks, and there is only one atlas.
const COUNTRY_DIALOG_TITLE = 'atlas-country-dialog-title'
@@ -50,7 +51,7 @@ function AtlasPageDesktop(): React.ReactElement {
data, setData, stats, countries, selectedCountry, countryDetail,
showPlanned, togglePlanned,
loadCountryDetail, handleUnmarkCountry, select_country_from_search,
- visitedRegions, setVisitedRegions,
+ visitedRegions, setVisitedRegions, regionsVisited, placesOpen, setPlacesOpen,
atlas_country_search, set_atlas_country_search,
atlas_country_results, set_atlas_country_results,
atlas_country_open, set_atlas_country_open, atlas_country_options,
@@ -132,7 +133,27 @@ function AtlasPageDesktop(): React.ReactElement {
plannedCount={stats.totalCountriesPlanned || 0}
/>
- {/* Mobile: Bottom bar */}
+ {placesOpen && selectedCountry && countryDetail && (
+ <DialogShell
+ onClose={() => setPlacesOpen(false)}
+ labelledBy="atlas-places-title"
+ width="detail"
+ header={(
+ <DialogHeader
+ tile={<DialogTile><CountryFlag code={selectedCountry} size={26} /></DialogTile>}
+ tint={NEUTRAL_TINT}
+ labelId="atlas-places-title"
+ onClose={() => setPlacesOpen(false)}
+ title={resolveName(selectedCountry)}
+ sub={`${countryDetail.places.length} ${t('atlas.places')}`}
+ />
+ )}
+ >
+ <AtlasCountryPlaces detail={countryDetail} onOpenTrip={id => navigate(`/trips/${id}`)} />
+ </DialogShell>
+ )}
+
+ {/* Mobile: Bottom bar */}
<div className="md:hidden absolute left-0 right-0 z-10 flex justify-center" style={{ bottom: 'calc(84px + env(safe-area-inset-bottom, 0px) + 8px)', touchAction: 'manipulation' }}>
<div className="flex items-center gap-4 px-5 py-4 rounded-2xl"
style={{ background: dark ? 'rgba(0,0,0,0.45)' : 'rgba(255,255,255,0.5)', backdropFilter: 'blur(16px)' }}>
@@ -141,7 +162,7 @@ function AtlasPageDesktop(): React.ReactElement {
<p className="text-3xl font-black tabular-nums leading-none text-content">{stats.totalCountries}</p>
<p className="text-[9px] font-semibold uppercase tracking-wide mt-1 text-content-faint">{t('atlas.countries')}</p>
</div>
- {[[stats.totalTrips, t('atlas.trips')], [stats.totalPlaces, t('atlas.places')], [stats.totalCities || 0, t('atlas.cities')], [stats.totalDays, t('atlas.days')]].map(([v, l], i) => (
+ {[[regionsVisited, t('atlas.regions')], [stats.totalTrips, t('atlas.trips')], [stats.totalPlaces, t('atlas.places')], [stats.totalCities || 0, t('atlas.cities')], [stats.totalDays, t('atlas.days')]].map(([v, l], i) => (
<div key={i} className="text-center px-1">
<p className="text-xl font-black tabular-nums leading-none text-content">{v}</p>
<p className="text-[9px] font-semibold uppercase tracking-wide mt-1 text-content-faint">{l}</p>
@@ -192,6 +213,9 @@ function AtlasPageDesktop(): React.ReactElement {
<SidebarContent
data={data} stats={stats} countries={countries} selectedCountry={selectedCountry}
countryDetail={countryDetail} resolveName={resolveName}
+ regionsVisited={regionsVisited}
+ countryRegions={selectedCountry ? visitedRegionCount(visitedRegions, selectedCountry) : 0}
+ onOpenPlaces={() => setPlacesOpen(true)}
onCountryClick={loadCountryDetail} onTripClick={(id) => navigate(`/trips/${id}`)} onUnmarkCountry={handleUnmarkCountry}
bucketList={bucketList} bucketTab={bucketTab} setBucketTab={setBucketTab}
showBucketAdd={showBucketAdd} setShowBucketAdd={setShowBucketAdd}
@@ -306,7 +330,7 @@ function AtlasPageDesktop(): React.ReactElement {
return
}
try {
- const r = await apiClient.post('/addons/atlas/bucket-list', { name: confirmAction.name, country_code: confirmAction.code, target_date: targetDate })
+ const r = await apiClient.post('/addons/atlas/bucket-list', { name: confirmAction.name, country_code: confirmAction.code, target_date: targetDate, region_code: confirmAction.regionCode ?? null })
setBucketList(prev => [r.data.item, ...prev])
} catch (err) {
if (isBucketDuplicateError(err)) {
@@ -454,6 +478,11 @@ function CountryChoice({ icon: Icon, tone = 'text-content-secondary', title, hin
interface SidebarContentProps {
data: AtlasData | null
stats: AtlasStats
+ /** Regions visited over every country, and in the country picked (#1639). */
+ regionsVisited: number
+ countryRegions: number
+ /** Opens the list of the picked country's places (#2174). */
+ onOpenPlaces: () => void
countries: AtlasCountry[]
selectedCountry: string | null
countryDetail: CountryDetail | null
@@ -486,7 +515,7 @@ interface SidebarContentProps {
dark: boolean
}
-function SidebarContent({ data, stats, countries, selectedCountry, countryDetail, resolveName, onTripClick, onUnmarkCountry, bucketList, bucketTab, setBucketTab, showBucketAdd, setShowBucketAdd, bucketForm, setBucketForm, onAddBucket, onDeleteBucket, onClearBucketVisit, onSearchBucket, onSelectBucketPoi, bucketSearchResults, setBucketSearchResults, bucketPoiMonth, setBucketPoiMonth, bucketPoiYear, setBucketPoiYear, bucketSearching, bucketSearch, setBucketSearch, t, dark }: SidebarContentProps): React.ReactElement {
+function SidebarContent({ data, stats, regionsVisited, countryRegions, onOpenPlaces, countries, selectedCountry, countryDetail, resolveName, onTripClick, onUnmarkCountry, bucketList, bucketTab, setBucketTab, showBucketAdd, setShowBucketAdd, bucketForm, setBucketForm, onAddBucket, onDeleteBucket, onClearBucketVisit, onSearchBucket, onSelectBucketPoi, bucketSearchResults, setBucketSearchResults, bucketPoiMonth, setBucketPoiMonth, bucketPoiYear, setBucketPoiYear, bucketSearching, bucketSearch, setBucketSearch, t, dark }: SidebarContentProps): React.ReactElement {
const { language } = useTranslation()
const statsContentRef = useRef<HTMLDivElement>(null)
const bucketSearchRowRef = useRef<HTMLDivElement>(null)
@@ -732,7 +761,7 @@ function SidebarContent({ data, stats, countries, selectedCountry, countryDetail
)}
</div>
{/* Other stats */}
- {[[stats.totalTrips, t('atlas.trips')], [stats.totalPlaces, t('atlas.places')], [stats.totalCities || 0, t('atlas.cities')], [stats.totalDays, t('atlas.days')]].map(([v, l], i) => (
+ {[[regionsVisited, t('atlas.regions')], [stats.totalTrips, t('atlas.trips')], [stats.totalPlaces, t('atlas.places')], [stats.totalCities || 0, t('atlas.cities')], [stats.totalDays, t('atlas.days')]].map(([v, l], i) => (
<div key={i} className="flex flex-col items-center justify-center px-3 py-5 shrink-0">
<span className="text-2xl font-black tabular-nums leading-none" style={{ color: tp }}>{v}</span>
<span className="text-[9px] font-semibold mt-1.5 uppercase tracking-wide whitespace-nowrap" style={{ color: tf }}>{l}</span>
@@ -799,7 +828,26 @@ function SidebarContent({ data, stats, countries, selectedCountry, countryDetail
<span className="ml-2 text-[9px] font-semibold uppercase tracking-wide" style={{ color: tf }}>{t('atlas.planned')}</span>
)}
</p>
- <p className="text-[10px] mb-1" style={{ color: tf }}>{countryDetail.places.length} {t('atlas.places')} · {countryDetail.trips.length} {t('atlas.tripPlural')}</p>
+ {/* Counts as quiet badges, the regions among them once any is visited (#1639). */}
+ <div className="mb-1.5 flex flex-wrap gap-1">
+ {countryDetail.places.length > 0 && (
+ <Tooltip label={t('atlas.placesShow')}>
+ <button type="button" onClick={onOpenPlaces}
+ className="inline-flex items-center gap-1 whitespace-nowrap rounded-full px-1.5 py-px text-[10px] font-semibold tabular-nums transition-opacity hover:opacity-75"
+ style={{ background: bg(0.1), color: tp }}>
+ <MapPin size={9} />{countryDetail.places.length} {t('atlas.places')}
+ </button>
+ </Tooltip>
+ )}
+ {[
+ [countryDetail.trips.length, t('atlas.tripPlural')],
+ ...(countryRegions > 0 ? [[countryRegions, t('atlas.regions')] as const] : []),
+ ].map(([n, label]) => (
+ <span key={label} className="whitespace-nowrap rounded-full px-1.5 py-px text-[10px] font-semibold tabular-nums" style={{ background: bg(0.06), color: tf }}>
+ {n} {label}
+ </span>
+ ))}
+ </div>
<div className="flex flex-wrap gap-1">
{countryDetail.trips.slice(0, 3).map(trip => (
<button type="button" key={trip.id} onClick={() => onTripClick(trip.id)}
diff --git a/client/src/pages/JourneyDetailPage.tsx b/client/src/pages/JourneyDetailPage.tsx
index 80ca07a65..c1d723ce4 100644
--- a/client/src/pages/JourneyDetailPage.tsx
+++ b/client/src/pages/JourneyDetailPage.tsx
@@ -26,6 +26,7 @@ import { EntryEditor } from '../components/Journey/JourneyDetailPageEntryEditor'
import { AddTripDialog } from '../components/Journey/JourneyDetailPageAddTripDialog'
import { JourneySettingsDialog } from '../components/Journey/JourneyDetailPageSettingsDialog'
import HelpAnchor from '../components/Help/HelpAnchor'
+import JourneyDayJump from '../components/Journey/JourneyDayJump'
export default function JourneyDetailPage() {
// ViewportRoute in App.tsx picks the branch now, so the phone screen is a
@@ -458,7 +459,7 @@ function JourneyDetailPageDesktop() {
const locations = [...new Set(entries.map(e => e.location_name).filter(Boolean))]
return (
- <div key={date} className="flex flex-col gap-3 trek-stagger">
+ <div key={date} data-day={date} className="flex flex-col gap-3 trek-stagger">
<div className="backdrop-blur border-y md:border rounded-none md:rounded-2xl -mx-4 md:mx-0 px-4 py-3 flex items-center justify-between" style={{ background: 'var(--vg-surf)', borderColor: 'var(--vg-line)' }}>
<div className="flex items-center gap-3">
<div className="w-9 h-9 rounded-xl flex items-center justify-center text-[13px] font-bold text-white" style={{ background: DAY_COLORS[dayIdx % DAY_COLORS.length], boxShadow: `0 5px 14px -4px ${DAY_COLORS[dayIdx % DAY_COLORS.length]}` }}>
@@ -613,9 +614,9 @@ function JourneyDetailPageDesktop() {
buttons, the left to the reorder arrows. Zero-height sticky box
so it rides the scroll without taking layout space, and each
half appears only when there is somewhere to go. */}
- {!isMobile && (!feedEdge.atTop || !feedEdge.atBottom) && (
+ {!isMobile && view === 'timeline' && (!feedEdge.atTop || !feedEdge.atBottom || sortedDates.length > 1) && (
<div className="sticky bottom-0 z-20 h-0 pointer-events-none">
- <div className="absolute bottom-6 left-1/2 -translate-x-1/2 flex gap-1.5 pointer-events-auto">
+ <div className="absolute bottom-6 left-1/2 -translate-x-1/2 flex items-center gap-1.5 pointer-events-auto">
{!feedEdge.atTop && (
<button type="button"
onClick={() => scrollFeedTo('top')}
@@ -627,6 +628,15 @@ function JourneyDetailPageDesktop() {
<ChevronUp size={16} strokeWidth={2.4} />
</button>
)}
+ {/* Every day, and each day's entries, one click away (#1243). */}
+ <JourneyDayJump
+ feedRef={feedRef}
+ days={sortedDates.map((date, i) => ({
+ date,
+ color: DAY_COLORS[i % DAY_COLORS.length],
+ entries: (dayGroups.get(date) ?? []).map(e => ({ id: e.id, title: e.title || e.location_name || t('journey.detail.newEntry') })),
+ }))}
+ />
{!feedEdge.atBottom && (
<button type="button"
onClick={() => scrollFeedTo('bottom')}
diff --git a/client/src/pages/SharedTripPage.test.tsx b/client/src/pages/SharedTripPage.test.tsx
index 0c9591fd5..88bb98df6 100644
--- a/client/src/pages/SharedTripPage.test.tsx
+++ b/client/src/pages/SharedTripPage.test.tsx
@@ -1854,4 +1854,43 @@ describe('SharedTripPage', () => {
expect(calls).toBe(2);
});
});
+
+ describe('FE-PAGE-SHARED-040: unplanned places and the travel-only link (#1758, #1712)', () => {
+ const payload = (permissions: Record<string, boolean>) => ({
+ trip: { id: 1, title: 'Shared Paris Trip', start_date: '2026-07-01', end_date: '2026-07-03' },
+ days: [
+ { id: 1, day_number: 1, date: '2026-07-01' },
+ { id: 2, day_number: 2, date: '2026-07-02' },
+ ],
+ assignments: { 1: [{ id: 11, order_index: 0, place: { id: 100, name: 'Louvre', lat: 48.86, lng: 2.34 } }] },
+ dayNotes: {},
+ places: [
+ { id: 100, name: 'Louvre', lat: 48.86, lng: 2.34 },
+ { id: 200, name: 'Sainte-Chapelle', lat: 48.85, lng: 2.35 },
+ ],
+ reservations: [],
+ accommodations: [],
+ packing: [], budget: [], categories: [], collab: [],
+ permissions: { share_map: true, share_bookings: false, ...permissions },
+ });
+
+ it('lists the places no day has picked up under the days', async () => {
+ server.use(http.get('/api/shared/:token', () => HttpResponse.json(payload({}))));
+ renderSharedTrip('unplanned-token');
+ const card = (await screen.findByText('Not planned yet')).closest('article') as HTMLElement;
+ expect(within(card).getByText('Sainte-Chapelle')).toBeInTheDocument();
+ expect(within(card).queryByText('Louvre')).toBeNull();
+ fireEvent.click(within(card).getByRole('button', { name: /collapse/i }));
+ expect(within(card).queryByText('Sainte-Chapelle')).toBeNull();
+ });
+
+ it('a travel-only link leaves out empty days and the unplanned pool', async () => {
+ server.use(http.get('/api/shared/:token', () => HttpResponse.json(payload({ share_travel_only: true }))));
+ renderSharedTrip('travel-token');
+ await screen.findByRole('heading', { name: 'Shared Paris Trip' });
+ expect(document.getElementById('shared-day-1')).not.toBeNull();
+ expect(document.getElementById('shared-day-2')).toBeNull();
+ expect(screen.queryByText('Not planned yet')).toBeNull();
+ });
+ });
});
diff --git a/client/src/pages/SharedTripPage.tsx b/client/src/pages/SharedTripPage.tsx
index 93d1aaf60..665b8e08d 100644
--- a/client/src/pages/SharedTripPage.tsx
+++ b/client/src/pages/SharedTripPage.tsx
@@ -73,6 +73,7 @@ export default function SharedTripPage() {
onPickDayOnMap={pickDayOnMap}
collapsedDays={collapsedDays}
onToggleDay={toggleDay}
+ travelOnly={!!permissions?.share_travel_only}
/>
)}
{activeTab === 'bookings' && (
diff --git a/client/src/pages/TripPlannerPage.tsx b/client/src/pages/TripPlannerPage.tsx
index af9b8215e..21062c03c 100644
--- a/client/src/pages/TripPlannerPage.tsx
+++ b/client/src/pages/TripPlannerPage.tsx
@@ -322,11 +322,13 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
visibleConnections, roadtripConnections, toggleConnection, allConnectionsShown, toggleAllConnections, mapTransportDetail, setMapTransportDetail,
isMobile, isTouch,
expandedDayIds, setExpandedDayIds, mapPlaces,
- route, routeSegments, routeInfo, setRoute, setRouteInfo, updateRouteForDay,
+ mapLocked, toggleMapLocked,
+ route, routeWalking, routeSegments, routeInfo, setRoute, setRouteInfo, updateRouteForDay,
handleSelectDay, handlePlaceClick, handleMarkerClick, handleMapClick, handleMapContextMenu, handlePoiClick,
handleSavePlace, openPlaceEditor, handleDeletePlace, confirmDeletePlace, confirmDeletePlaces, confirmChangeCategory,
handleAssignToDay, handleMoveToDay, handleRemoveAssignment, handleReorder, handleReorderDays, handleAddDay, dayAdd, handleUpdateDayTitle,
deleteDayQuestion, handleDeleteDay,
+ clearDayId, clearDayTitle, handleClearDay, cancelClearDay, confirmClearDay,
handleSaveReservation, handleSaveTransport, handleDeleteReservation,
selectedPlace, dayOrderMap, dayPlaces,
mapTileUrl, fontStyle, splashDone,
@@ -457,6 +459,9 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
dayPlaces={dayPlaces}
route={roadtripActive ? roadtripMapLines : overviewActive ? tripOverview.lines : route}
routeColors={roadtripActive ? roadtripLineColors : overviewActive ? tripOverview.lineColors : undefined}
+ routeWalking={roadtripActive || overviewActive ? undefined : routeWalking}
+ followSelection={!mapLocked || isMobile}
+ onToggleFollow={isMobile ? undefined : toggleMapLocked}
routeVias={roadtripActive ? roadtripMapVias : routeVias}
dayBoundaryControls={roadtripActive ? dayBoundaryControls : undefined}
accessLines={roadtripActive ? roadtripRoutes.accessLines : undefined}
@@ -688,6 +693,7 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
dayAdd={dayAdd}
onDeleteDay={handleDeleteDay}
deleteDayQuestion={deleteDayQuestion}
+ onClearDay={can('day_edit', trip) ? handleClearDay : undefined}
onUpdateDayTitle={handleUpdateDayTitle}
onAssignToDay={handleAssignToDay}
onMoveToDay={handleMoveToDay}
@@ -922,6 +928,7 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
}}
onUpdatePlace={async (placeId, data) => { try { await tripActions.updatePlace(tripId, placeId, data) } catch (err: unknown) { toast.error(err instanceof Error ? err.message : t('common.unknownError')) } }}
onUploadImage={async (placeId, file) => { await tripActions.uploadPlaceImage(tripId, placeId, file) }}
+ onImageFromFile={async (placeId, fileId) => { await tripActions.setPlaceImageFromFile(tripId, placeId, fileId) }}
onRate={async (placeId, rating) => { try { await tripActions.ratePlace(tripId, placeId, rating) } catch (err: unknown) { toast.error(err instanceof Error ? err.message : t('common.unknownError')) } }}
leftWidth={isMobile ? 0 : leftPanelPx}
rightWidth={isMobile ? 0 : rightPanelPx}
@@ -966,6 +973,7 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
}}
onUpdatePlace={async (placeId, data) => { try { await tripActions.updatePlace(tripId, placeId, data) } catch (err: unknown) { toast.error(err instanceof Error ? err.message : t('common.unknownError')) } }}
onUploadImage={async (placeId, file) => { await tripActions.uploadPlaceImage(tripId, placeId, file) }}
+ onImageFromFile={async (placeId, fileId) => { await tripActions.setPlaceImageFromFile(tripId, placeId, fileId) }}
onRate={async (placeId, rating) => { try { await tripActions.ratePlace(tripId, placeId, rating) } catch (err: unknown) { toast.error(err instanceof Error ? err.message : t('common.unknownError')) } }}
leftWidth={0}
rightWidth={0}
@@ -986,7 +994,7 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
</div>
<div style={{ flex: 1, overflow: 'auto', paddingBottom: 'env(safe-area-inset-bottom, 0px)' }}>
{mobileSidebarOpen === 'left'
- ? <DayPlanSidebar tripId={tripId} trip={trip} days={days} places={places} categories={categories} assignments={storedAssignments} selectedDayId={selectedDayId} selectedPlaceId={selectedPlaceId} selectedAssignmentId={selectedAssignmentId} onSelectDay={(id) => { handleSelectDay(id); setMobileSidebarOpen(null) }} onPlaceClick={(placeId, assignmentId) => { handlePlaceClick(placeId, assignmentId) }} onReorder={handleReorder} onReorderDays={handleReorderDays} onAddDay={handleAddDay} dayAdd={dayAdd} onDeleteDay={handleDeleteDay} deleteDayQuestion={deleteDayQuestion} onUpdateDayTitle={handleUpdateDayTitle} onAssignToDay={handleAssignToDay} onMoveToDay={handleMoveToDay} onRouteCalculated={(r) => { if (r) { setRoute([r.coordinates]); setRouteInfo(r) } else { setRoute(null); setRouteInfo(null) } }} reservations={reservations} visibleConnectionIds={visibleConnections} onToggleConnection={toggleConnection} allConnectionsShown={allConnectionsShown} onToggleAllConnections={toggleAllConnections} onAddReservation={(dayId) => { setEditingReservation(null); tripActions.setSelectedDay(dayId); setShowReservationModal(true); setMobileSidebarOpen(null) }} onAddTransport={can('day_edit', trip) ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(false); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onOpenTransit={(r) => { setTransitJourney(r); setMobileSidebarOpen(null) }} onPlanTransit={can('day_edit', trip) && tripHasDates ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(true); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onPlanTransitLeg={can('day_edit', trip) && tripHasDates ? ({ dayId, from, to, time }) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill({ from, to, time }); setTransportModalAutomated(true); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onAddPlace={() => { setEditingPlace(null); setPlaceFormDayId(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onCreatePlaceForDay={can('place_edit', trip) ? (dayId) => { setEditingPlace(null); setPlaceFormDayId(dayId); setShowPlaceForm(true); setMobileSidebarOpen(null) } : undefined} onDayDetail={(day) => { setShowDayDetail(day); setSelectedPlaceId(null); selectAssignment(null) }} onRemoveAssignment={handleRemoveAssignment} onEditPlace={(place, assignmentId) => { setEditingPlace(place); setEditingAssignmentId(assignmentId || null); setPlaceFormDayId(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onDeletePlace={(placeId) => handleDeletePlace(placeId)} accommodations={tripAccommodations} routeShown={routeShown} routeProfile={routeProfile} onToggleRoute={() => setRouteShown(v => !v)} onSetRouteProfile={setRouteProfile} onNavigateToFiles={() => { setMobileSidebarOpen(null); handleTabChange('dateien') }} onExpandedDaysChange={setExpandedDayIds} pushUndo={pushUndo} canUndo={canUndo} lastActionLabel={lastActionLabel} onUndo={handleUndo} onEditTransport={can('day_edit', trip) ? (reservation) => { setEditingTransport(reservation); setTransportModalDayId(reservation.day_id ?? null); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onEditReservation={can('reservation_edit', trip) ? (r) => { setEditingReservation(r); setShowReservationModal(true); setMobileSidebarOpen(null) } : undefined} initialScrollTop={mobilePlanScrollTopRef.current} onScrollTopChange={(top) => { mobilePlanScrollTopRef.current = top }} showRouteToolsWhenExpanded isMobile />
+ ? <DayPlanSidebar tripId={tripId} trip={trip} days={days} places={places} categories={categories} assignments={storedAssignments} selectedDayId={selectedDayId} selectedPlaceId={selectedPlaceId} selectedAssignmentId={selectedAssignmentId} onSelectDay={(id) => { handleSelectDay(id); setMobileSidebarOpen(null) }} onPlaceClick={(placeId, assignmentId) => { handlePlaceClick(placeId, assignmentId) }} onReorder={handleReorder} onReorderDays={handleReorderDays} onAddDay={handleAddDay} dayAdd={dayAdd} onDeleteDay={handleDeleteDay} deleteDayQuestion={deleteDayQuestion} onClearDay={can('day_edit', trip) ? handleClearDay : undefined} onUpdateDayTitle={handleUpdateDayTitle} onAssignToDay={handleAssignToDay} onMoveToDay={handleMoveToDay} onRouteCalculated={(r) => { if (r) { setRoute([r.coordinates]); setRouteInfo(r) } else { setRoute(null); setRouteInfo(null) } }} reservations={reservations} visibleConnectionIds={visibleConnections} onToggleConnection={toggleConnection} allConnectionsShown={allConnectionsShown} onToggleAllConnections={toggleAllConnections} onAddReservation={(dayId) => { setEditingReservation(null); tripActions.setSelectedDay(dayId); setShowReservationModal(true); setMobileSidebarOpen(null) }} onAddTransport={can('day_edit', trip) ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(false); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onOpenTransit={(r) => { setTransitJourney(r); setMobileSidebarOpen(null) }} onPlanTransit={can('day_edit', trip) && tripHasDates ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(true); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onPlanTransitLeg={can('day_edit', trip) && tripHasDates ? ({ dayId, from, to, time }) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill({ from, to, time }); setTransportModalAutomated(true); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onAddPlace={() => { setEditingPlace(null); setPlaceFormDayId(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onCreatePlaceForDay={can('place_edit', trip) ? (dayId) => { setEditingPlace(null); setPlaceFormDayId(dayId); setShowPlaceForm(true); setMobileSidebarOpen(null) } : undefined} onDayDetail={(day) => { setShowDayDetail(day); setSelectedPlaceId(null); selectAssignment(null) }} onRemoveAssignment={handleRemoveAssignment} onEditPlace={(place, assignmentId) => { setEditingPlace(place); setEditingAssignmentId(assignmentId || null); setPlaceFormDayId(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onDeletePlace={(placeId) => handleDeletePlace(placeId)} accommodations={tripAccommodations} routeShown={routeShown} routeProfile={routeProfile} onToggleRoute={() => setRouteShown(v => !v)} onSetRouteProfile={setRouteProfile} onNavigateToFiles={() => { setMobileSidebarOpen(null); handleTabChange('dateien') }} onExpandedDaysChange={setExpandedDayIds} pushUndo={pushUndo} canUndo={canUndo} lastActionLabel={lastActionLabel} onUndo={handleUndo} onEditTransport={can('day_edit', trip) ? (reservation) => { setEditingTransport(reservation); setTransportModalDayId(reservation.day_id ?? null); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onEditReservation={can('reservation_edit', trip) ? (r) => { setEditingReservation(r); setShowReservationModal(true); setMobileSidebarOpen(null) } : undefined} initialScrollTop={mobilePlanScrollTopRef.current} onScrollTopChange={(top) => { mobilePlanScrollTopRef.current = top }} showRouteToolsWhenExpanded isMobile />
: <PlacesSidebar tripId={tripId} places={places} categories={categories} assignments={assignments} accommodations={tripAccommodations} selectedDayId={selectedDayId} onClearSelectedDay={() => handleSelectDay(null)} selectedPlaceId={selectedPlaceId} onPlaceClick={(placeId) => { handlePlaceClick(placeId); setMobileSidebarOpen(null) }} onAddPlace={() => { setEditingPlace(null); setPlaceFormDayId(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onAssignToDay={handleAssignToDay} onEditPlace={(place) => { openPlaceEditor(place); setMobileSidebarOpen(null) }} onDeletePlace={(placeId) => handleDeletePlace(placeId)} onBulkDeletePlaces={(ids) => setDeletePlaceIds(ids)} onBulkDeleteConfirm={(ids) => confirmDeletePlaces(ids)} onBulkChangeCategory={(ids, catId) => confirmChangeCategory(ids, catId)} days={days} isMobile pushUndo={pushUndo} initialScrollTop={mobilePlacesScrollTopRef.current} onScrollTopChange={(top) => { mobilePlacesScrollTopRef.current = top }} />
}
</div>
@@ -1218,6 +1226,15 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
? `${t('trip.confirm.deletePlaces', { count: deletePlaceIds?.length ?? 0 })} ${deletePlacesNote}`
: t('trip.confirm.deletePlaces', { count: deletePlaceIds?.length ?? 0 })}
/>
+ <ConfirmDialog
+ isOpen={clearDayId != null}
+ onClose={cancelClearDay}
+ onConfirm={() => { void confirmClearDay() }}
+ title={clearDayTitle}
+ message={t('dayplan.clearDayBody')}
+ confirmLabel={t('dayplan.clearDay')}
+ danger
+ />
<ConfirmDialog
isOpen={!!stayRelease}
onClose={() => setStayRelease(null)}
diff --git a/client/src/pages/atlas/atlasModel.test.ts b/client/src/pages/atlas/atlasModel.test.ts
index ccdf92e23..952e50887 100644
--- a/client/src/pages/atlas/atlasModel.test.ts
+++ b/client/src/pages/atlas/atlasModel.test.ts
@@ -1,6 +1,7 @@
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import {
A2_TO_A3,
+ visitedRegionCount,
bucketTooltipHeight,
bucketTooltipNeedsScroll,
bucketTooltipPlacement,
@@ -14,6 +15,8 @@ import {
regionCacheEvictions,
withCountryMarkedVisited,
wishlistA3Codes,
+ wishlistRegionCodes,
+ groupCountryPlaces,
countryColor,
COUNTRY_COLORS,
REGION_CACHE_MAX,
@@ -222,6 +225,12 @@ describe('countryColor', () => {
});
describe('wishlistA3Codes', () => {
+ it('leaves a country alone when only one of its regions is wished for (#1901)', () => {
+ const result = wishlistA3Codes([bucketItem({ country_code: 'DE', region_code: 'DE-BY' })], new Set());
+ expect(result.size).toBe(0);
+ expect(wishlistRegionCodes([bucketItem({ region_code: 'de-by' }), bucketItem({ region_code: null })])).toEqual(new Set(['DE-BY']));
+ });
+
it('resolves a bucket-list country to its A3 code', () => {
const result = wishlistA3Codes([bucketItem({ country_code: 'JP' })], new Set());
expect(result).toEqual(new Set(['JPN']));
@@ -410,3 +419,36 @@ describe('bucketTooltipNeedsScroll (#2153)', () => {
expect(bucketTooltipNeedsScroll(201, 200)).toBe(false);
});
});
+
+describe('visitedRegionCount (#1639)', () => {
+ const regions = {
+ US: [{ status: 'visited' as const }, { status: 'planned' as const }, {}],
+ DE: [{ status: 'visited' as const }],
+ }
+ it('counts visited regions over every country, and in one of them', () => {
+ expect(visitedRegionCount(regions)).toBe(3)
+ expect(visitedRegionCount(regions, 'US')).toBe(2)
+ expect(visitedRegionCount(regions, 'FR')).toBe(0)
+ expect(visitedRegionCount({})).toBe(0)
+ })
+})
+
+describe('groupCountryPlaces (#2174)', () => {
+ const detail = {
+ trips: [{ id: 1, title: 'Berlin' }, { id: 2, title: 'Munich' }, { id: 3, title: 'Empty' }],
+ places: [
+ { id: 10, name: 'Reichstag', lat: 0, lng: 0, trip_id: 1, address: 'Platz der Republik' },
+ { id: 11, name: 'Brandenburg Gate', lat: 0, lng: 0, trip_id: 1, address: 'Pariser Platz' },
+ { id: 12, name: 'Marienplatz', lat: 0, lng: 0, trip_id: 2, address: null },
+ ],
+ }
+ it('groups by trip in trip order, places by name, and drops empty trips', () => {
+ const groups = groupCountryPlaces(detail)
+ expect(groups.map(g => g.trip.title)).toEqual(['Berlin', 'Munich'])
+ expect(groups[0].places.map(p => p.name)).toEqual(['Brandenburg Gate', 'Reichstag'])
+ })
+ it('searches name and address', () => {
+ expect(groupCountryPlaces(detail, 'platz').flatMap(g => g.places.map(p => p.id))).toEqual([11, 10, 12])
+ expect(groupCountryPlaces(detail, 'nothing')).toEqual([])
+ })
+})
diff --git a/client/src/pages/atlas/atlasModel.ts b/client/src/pages/atlas/atlasModel.ts
index 65e5678f6..1843ad665 100644
--- a/client/src/pages/atlas/atlasModel.ts
+++ b/client/src/pages/atlas/atlasModel.ts
@@ -115,6 +115,8 @@ export interface BucketItem {
country_code: string | null
notes: string | null
target_date: string | null
+ /** A state or province wished for (#1901), ISO 3166-2 like "DE-BY". */
+ region_code?: string | null
/** ISO-8601 of the stay that fulfilled this wish, or null while it is still a wish. */
visited_at?: string | null
/** Who decided it was reached: 'manual' or 'dawarich' (#2279). */
@@ -181,12 +183,19 @@ export function isBucketDuplicateError(err: unknown): boolean {
export function wishlistA3Codes(bucketList: BucketItem[], visitedA3: Set<string>): Set<string> {
const result = new Set<string>()
for (const item of bucketList) {
+ // A wished-for region hatches that region, not its whole country (#1901).
+ if (item.region_code) continue
const a3 = item.country_code ? A2_TO_A3[item.country_code] : undefined
if (a3 && !visitedA3.has(a3)) result.add(a3)
}
return result
}
+/** The states and provinces on the bucket list (#1901), as the region boundaries name them. */
+export function wishlistRegionCodes(bucketList: Pick<BucketItem, 'region_code'>[]): Set<string> {
+ return new Set(bucketList.map(i => i.region_code?.toUpperCase()).filter((c): c is string => !!c))
+}
+
// Palette for the Atlas map's country fills (visited: solid, wishlist: hatched).
export const COUNTRY_COLORS = ['#6366f1', '#ec4899', '#14b8a6', '#f97316', '#8b5cf6', '#ef4444', '#3b82f6', '#22c55e', '#06b6d4', '#f43f5e', '#a855f7', '#10b981', '#0ea5e9', '#e11d48', '#0d9488', '#7c3aed', '#2563eb', '#dc2626', '#059669', '#d946ef']
@@ -284,3 +293,38 @@ export function countryCodeToFlag(code: string): string {
// 2. Runtime augmentation — the geoData load effect adds entries for every feature
// that has a valid ISO_A2, covering territories not present below.
export const A2_TO_A3: Record<string, string> = {"AF":"AFG","AL":"ALB","DZ":"DZA","AD":"AND","AO":"AGO","AG":"ATG","AR":"ARG","AM":"ARM","AU":"AUS","AT":"AUT","AZ":"AZE","BS":"BHS","BH":"BHR","BD":"BGD","BB":"BRB","BY":"BLR","BE":"BEL","BZ":"BLZ","BJ":"BEN","BT":"BTN","BO":"BOL","BA":"BIH","BW":"BWA","BR":"BRA","BN":"BRN","BG":"BGR","BF":"BFA","BI":"BDI","CV":"CPV","KH":"KHM","CM":"CMR","CA":"CAN","CF":"CAF","TD":"TCD","CL":"CHL","CN":"CHN","CO":"COL","KM":"COM","CG":"COG","CD":"COD","CR":"CRI","CI":"CIV","HR":"HRV","CU":"CUB","CY":"CYP","CZ":"CZE","DK":"DNK","DJ":"DJI","DM":"DMA","DO":"DOM","EC":"ECU","EG":"EGY","SV":"SLV","GQ":"GNQ","ER":"ERI","EE":"EST","SZ":"SWZ","ET":"ETH","FJ":"FJI","FI":"FIN","FR":"FRA","GA":"GAB","GM":"GMB","GE":"GEO","DE":"DEU","GH":"GHA","GR":"GRC","GD":"GRD","GT":"GTM","GN":"GIN","GW":"GNB","GY":"GUY","HT":"HTI","HN":"HND","HU":"HUN","IS":"ISL","IN":"IND","ID":"IDN","IR":"IRN","IQ":"IRQ","IE":"IRL","IL":"ISR","IT":"ITA","JM":"JAM","JP":"JPN","JO":"JOR","KZ":"KAZ","KE":"KEN","KI":"KIR","XK":"XKX","KP":"PRK","KR":"KOR","KW":"KWT","KG":"KGZ","LA":"LAO","LV":"LVA","LB":"LBN","LS":"LSO","LR":"LBR","LY":"LBY","LI":"LIE","LT":"LTU","LU":"LUX","MG":"MDG","MW":"MWI","MY":"MYS","MV":"MDV","ML":"MLI","MT":"MLT","MR":"MRT","MU":"MUS","MX":"MEX","MD":"MDA","MN":"MNG","ME":"MNE","MA":"MAR","MZ":"MOZ","MM":"MMR","NA":"NAM","NP":"NPL","NL":"NLD","NZ":"NZL","NI":"NIC","NE":"NER","NG":"NGA","MK":"MKD","NO":"NOR","OM":"OMN","PK":"PAK","PA":"PAN","PG":"PNG","PY":"PRY","PE":"PER","PH":"PHL","PL":"POL","PT":"PRT","QA":"QAT","RO":"ROU","RU":"RUS","RW":"RWA","SA":"SAU","SN":"SEN","RS":"SRB","SL":"SLE","SG":"SGP","SK":"SVK","SI":"SVN","SB":"SLB","SO":"SOM","ZA":"ZAF","SS":"SSD","ES":"ESP","LK":"LKA","SD":"SDN","SR":"SUR","SE":"SWE","CH":"CHE","SY":"SYR","TW":"TWN","TJ":"TJK","TZ":"TZA","TH":"THA","TL":"TLS","TG":"TGO","TT":"TTO","TN":"TUN","TR":"TUR","TM":"TKM","UG":"UGA","UA":"UKR","AE":"ARE","GB":"GBR","US":"USA","UY":"URY","UZ":"UZB","VU":"VUT","VE":"VEN","VN":"VNM","YE":"YEM","ZM":"ZMB","ZW":"ZWE"}
+
+/**
+ * How many states, provinces or regions have been visited (#1639), over every
+ * country or in one of them. A region on the wish list only is not counted, the
+ * same way a planned country is not in the country count.
+ */
+export function visitedRegionCount(
+ regions: Record<string, { status?: VisitStatus }[]>,
+ countryCode?: string,
+): number {
+ const lists = countryCode ? [regions[countryCode] || []] : Object.values(regions)
+ return lists.reduce((n, list) => n + list.filter(r => (r.status ?? 'visited') === 'visited').length, 0)
+}
+
+export interface CountryPlaceGroup {
+ trip: { id: number; title: string }
+ places: import('../../types').AtlasPlace[]
+}
+
+/**
+ * A country's places by the trip they belong to (#2174), trips in the order the
+ * detail lists them and places by name, narrowed to a search over name and address.
+ * A trip nothing matches drops out.
+ */
+export function groupCountryPlaces(detail: Pick<CountryDetail, 'places' | 'trips'>, query = '', locale?: string): CountryPlaceGroup[] {
+ const q = query.trim().toLocaleLowerCase(locale)
+ const hit = (p: import('../../types').AtlasPlace) =>
+ !q || p.name.toLocaleLowerCase(locale).includes(q) || (p.address || '').toLocaleLowerCase(locale).includes(q)
+ return detail.trips
+ .map(trip => ({
+ trip,
+ places: detail.places.filter(p => p.trip_id === trip.id && hit(p)).sort((a, b) => a.name.localeCompare(b.name, locale)),
+ }))
+ .filter(g => g.places.length > 0)
+}
diff --git a/client/src/pages/atlas/useAtlas.ts b/client/src/pages/atlas/useAtlas.ts
index 4f5dca239..7b9e9fa85 100644
--- a/client/src/pages/atlas/useAtlas.ts
+++ b/client/src/pages/atlas/useAtlas.ts
@@ -9,12 +9,13 @@ import { isVectorStyle } from '../../utils/tileUrl'
import apiClient, { mapsApi, pluginsApi, type PluginAtlasLayer } from '../../api/client'
import L from 'leaflet'
import type { GeoJsonFeatureCollection } from '../../types'
-import { A2_TO_A3, countryStatus, visitMonth, findBucketDuplicate, isBucketDuplicateError, isCountryVisible, normalizeRegionName, regionCacheEvictions, withCountryMarkedVisited, wishlistA3Codes, countryColor, REGION_CACHE_MAX, bucketTooltipWidth, bucketTooltipPlacement, bucketTooltipNeedsScroll, type AtlasData, type AtlasPlaceHit, type CountryDetail, type BucketItem } from './atlasModel'
+import { A2_TO_A3, countryStatus, visitedRegionCount, visitMonth, findBucketDuplicate, isBucketDuplicateError, isCountryVisible, normalizeRegionName, regionCacheEvictions, withCountryMarkedVisited, wishlistA3Codes, wishlistRegionCodes, countryColor, REGION_CACHE_MAX, bucketTooltipWidth, bucketTooltipPlacement, bucketTooltipNeedsScroll, type AtlasData, type AtlasPlaceHit, type CountryDetail, type BucketItem } from './atlasModel'
import { continentForCountry, escapeHtml, type VisitStatus } from '@trek/shared'
import { useGlassGlare } from '../../components/Atlas/useGlassGlare'
import { dawarichApi } from '../../api/dawarich'
import { useToast } from '../../components/shared/Toast'
import { getApiErrorMessage } from '../../types'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
const PLANNED_KEY = 'trek_atlas_show_planned'
@@ -26,6 +27,46 @@ function hexToRgba(hex: string, alpha: number): string {
return `rgba(${r},${g},${b},${alpha})`
}
+/**
+ * The same diagonal stripes for the region layer, which draws with SVG where a
+ * CanvasPattern means nothing (#1901): an SVG pattern kept in one hidden defs
+ * block, referenced by `url(#id)`. Built once per colour and theme.
+ */
+function svgWishlistFill(color: string, dark: boolean): string {
+ const id = `trek-wish-${color.replace('#', '')}-${dark ? 'd' : 'l'}`
+ if (typeof document === 'undefined') return color
+ if (!document.getElementById(id)) {
+ const ns = 'http://www.w3.org/2000/svg'
+ let host: Element | null = document.getElementById('trek-wish-patterns')
+ if (!host) {
+ host = document.createElementNS(ns, 'svg')
+ host.id = 'trek-wish-patterns'
+ host.setAttribute('width', '0')
+ host.setAttribute('height', '0')
+ host.setAttribute('aria-hidden', 'true')
+ host.setAttribute('style', 'position:absolute')
+ host.appendChild(document.createElementNS(ns, 'defs'))
+ document.body.appendChild(host)
+ }
+ const pattern = document.createElementNS(ns, 'pattern')
+ pattern.id = id
+ pattern.setAttribute('patternUnits', 'userSpaceOnUse')
+ pattern.setAttribute('width', '8')
+ pattern.setAttribute('height', '8')
+ const bg = document.createElementNS(ns, 'rect')
+ bg.setAttribute('width', '8')
+ bg.setAttribute('height', '8')
+ bg.setAttribute('fill', hexToRgba(color, dark ? 0.14 : 0.2))
+ const stripes = document.createElementNS(ns, 'path')
+ stripes.setAttribute('d', 'M-1,9 L9,-1 M-1,1 L1,-1 M7,9 L9,7')
+ stripes.setAttribute('stroke', color)
+ stripes.setAttribute('stroke-width', '2')
+ pattern.append(bg, stripes)
+ host.firstElementChild!.appendChild(pattern)
+ }
+ return `url(#${id})`
+}
+
// Diagonal-stripe CanvasPattern for the wishlist country fill, in that
// country's own "if visited" color — built once per render pass so it
// survives Leaflet's Canvas renderer (ctx.fillStyle accepts a CanvasPattern
@@ -79,6 +120,7 @@ function useCountryNames(language: string): (code: string) => string {
*/
export function useAtlas() {
const { t, language } = useTranslation()
+ const placeLang = usePlaceLanguage()
const { settings } = useSettingsStore()
const navigate = useNavigate()
const toast = useToast()
@@ -118,6 +160,8 @@ export function useAtlas() {
const [mobileSidebarOpen, setMobileSidebarOpen] = useState<boolean>(false)
const [selectedCountry, setSelectedCountry] = useState<string | null>(null)
const [countryDetail, setCountryDetail] = useState<CountryDetail | null>(null)
+ // The list of a country's places, opened from its detail (#2174).
+ const [placesOpen, setPlacesOpen] = useState(false)
const [geoData, setGeoData] = useState<GeoJsonFeatureCollection | null>(null)
const [visitedRegions, setVisitedRegions] = useState<Record<string, { code: string; name: string; placeCount: number; manuallyMarked?: boolean; status?: VisitStatus }[]>>({})
const [pluginLayers, setPluginLayers] = useState<PluginAtlasLayer[]>([])
@@ -750,6 +794,8 @@ export function useAtlas() {
}
const isVisitedFeature = (f: any) => matchesRegions(f, visitedRegionCodes, visitedRegionNamesByCountry)
const isPlannedFeature = (f: any) => matchesRegions(f, plannedRegionCodes, plannedRegionNamesByCountry)
+ // States and provinces on the bucket list, hatched like a wished-for country (#1901).
+ const wishedRegionCodes = wishlistRegionCodes(bucketList)
// Include every region feature of the countries in view: visited ones get colored
// fill, unvisited get outline only (clicking one is how a region gets marked)
@@ -784,6 +830,16 @@ export function useAtlas() {
}
}
const visited = isVisitedFeature(feature)
+ if (!visited && wishedRegionCodes.has(String(feature?.properties?.iso_3166_2 || '').toUpperCase())) {
+ const wishColor = A2_TO_A3[countryA2] ? countryColor(A2_TO_A3[countryA2]) : '#6366f1'
+ return {
+ fillColor: svgWishlistFill(wishColor, dark),
+ fillOpacity: 1,
+ color: wishColor,
+ weight: 1,
+ dashArray: '3 2',
+ }
+ }
return visited ? {
fillColor: a2ColorMap[countryA2] || '#6366f1',
fillOpacity: 0.85,
@@ -869,7 +925,7 @@ export function useAtlas() {
// visitedCountries belongs here: the region colours are derived from it, and without
// the dep this effect kept painting regions from a stale country list.
rebuildRegionLayerRef.current(true)
- }, [regionGeoLoaded, visitedRegions, dark, t, visitedCountries, showPlanned])
+ }, [regionGeoLoaded, visitedRegions, dark, t, visitedCountries, showPlanned, bucketList])
const handleMarkCountry = (code: string, name: string): void => {
setConfirmAction({ type: 'choose', code, name })
@@ -896,7 +952,7 @@ export function useAtlas() {
// newer one the user has already typed past.
const seq = ++placeSearchSeqRef.current
placeSearchTimerRef.current = setTimeout(() => {
- mapsApi.search(query, language)
+ mapsApi.search(query, placeLang)
.then(result => {
if (seq !== placeSearchSeqRef.current) return
// The provider blob is deliberately open (Google and OSM disagree on
@@ -1069,7 +1125,7 @@ export function useAtlas() {
if (!bucketSearch.trim()) return
setBucketSearching(true)
try {
- const result = await mapsApi.search(bucketSearch, language)
+ const result = await mapsApi.search(bucketSearch, placeLang)
setBucketSearchResults(result.places || [])
} catch (err) { console.error('Bucket-list place search failed:', err) } finally { setBucketSearching(false) }
}
@@ -1164,6 +1220,7 @@ export function useAtlas() {
const stats = data?.stats || { totalTrips: 0, totalPlaces: 0, totalCountries: 0, totalDays: 0 }
const countries = data?.countries || []
+ const regionsVisited = useMemo(() => visitedRegionCount(visitedRegions), [visitedRegions])
return {
t, language, navigate, resolveName, dark, loading,
@@ -1172,7 +1229,7 @@ export function useAtlas() {
data, setData, stats, countries, selectedCountry, countryDetail,
visitedCountries, visibleCountries, showPlanned, togglePlanned,
loadCountryDetail, handleUnmarkCountry, select_country_from_search,
- visitedRegions, setVisitedRegions,
+ visitedRegions, setVisitedRegions, regionsVisited, placesOpen, setPlacesOpen,
atlas_country_search, set_atlas_country_search,
atlas_country_results, set_atlas_country_results,
atlas_country_open, set_atlas_country_open, atlas_country_options,
diff --git a/client/src/pages/sharedTrip/SharedDayCard.tsx b/client/src/pages/sharedTrip/SharedDayCard.tsx
index b3b1b059b..0097a4f65 100644
--- a/client/src/pages/sharedTrip/SharedDayCard.tsx
+++ b/client/src/pages/sharedTrip/SharedDayCard.tsx
@@ -30,6 +30,8 @@ export interface SharedDayCardProps {
placeCount: number
stopNumber: Record<number, number>
categories: { id: number; color?: string | null; icon?: string | null }[]
+ /** A "travel and stays" link (#1712) counts no places and says nothing about an empty plan. */
+ travelOnly?: boolean
}
/**
@@ -40,6 +42,8 @@ export interface SharedDayCardProps {
export function SharedDayCard(p: SharedDayCardProps) {
const { t, locale } = useTranslation()
const { day } = p
+ // A stays-only day on a travel link is its head alone: its hotel pill says it all.
+ const hasBody = !(p.travelOnly && p.items.length === 0)
const date = day.date
? new Date(`${day.date}T00:00:00Z`).toLocaleDateString(locale, { weekday: 'short', day: 'numeric', month: 'short', timeZone: 'UTC' })
: null
@@ -66,11 +70,11 @@ export function SharedDayCard(p: SharedDayCardProps) {
</span>
<span className="mt-1.5 flex min-w-0 flex-wrap items-center gap-1">
{p.stays.map(stay => <StayPill key={stay.id} stay={stay} dayId={day.id} />)}
- <SoftPill>{p.placeCount} {t('shared.places')}</SoftPill>
+ {!p.travelOnly && <SoftPill>{p.placeCount} {t('shared.places')}</SoftPill>}
</span>
</span>
</button>
- <button
+ {hasBody && <button
type="button"
onClick={p.onToggleCollapse}
aria-label={p.collapsed ? t('common.expand') : t('common.collapse')}
@@ -78,10 +82,10 @@ export function SharedDayCard(p: SharedDayCardProps) {
className="grid h-7 w-7 flex-none place-items-center rounded-full text-content-muted hover:bg-surface-card hover:text-content"
>
{p.collapsed ? <ChevronRight size={15} strokeWidth={2} /> : <ChevronDown size={15} strokeWidth={2} />}
- </button>
+ </button>}
</div>
- {!p.collapsed && (
+ {hasBody && !p.collapsed && (
<div className="flex flex-col gap-0.5 border-t border-edge-faint p-1.5">
{p.items.length === 0 ? (
<p className="px-2 py-2.5 text-content-faint" style={fs(12, 'body')}>{t('dayplan.emptyDay')}</p>
@@ -125,14 +129,14 @@ function StayPill({ stay, dayId }: { stay: SharedDayCardProps['stays'][number];
)
}
-interface PlaceRowProps {
+export interface PlaceRowProps {
place: SharedPlaceLike & { id: number; image_url?: string | null }
notes?: string | null
number?: number
category: { color?: string | null; icon?: string | null } | null
}
-function PlaceRow({ place, notes, number, category }: PlaceRowProps) {
+export function PlaceRow({ place, notes, number, category }: PlaceRowProps) {
const { locale } = useTranslation()
const timeFormat = useSettingsStore(s => s.settings.time_format)
const color = safeHexColor(category?.color, '#6366f1')
diff --git a/client/src/pages/sharedTrip/SharedPlanView.tsx b/client/src/pages/sharedTrip/SharedPlanView.tsx
index 53502cda2..f9278dd32 100644
--- a/client/src/pages/sharedTrip/SharedPlanView.tsx
+++ b/client/src/pages/sharedTrip/SharedPlanView.tsx
@@ -2,7 +2,8 @@ import { getMergedItems, getTransportForDay, hidesOnMiddleDay } from '../../util
import { isDayInAccommodationRange } from '../../utils/dayOrder'
import { SharedDayCard } from './SharedDayCard'
import { SharedMap, type MapPlace } from './SharedMap'
-import { stopNumbers } from './sharedTripModel'
+import { SharedUnplannedCard } from './SharedUnplannedCard'
+import { dayHasEntries, stopNumbers, unplannedPlaces } from './sharedTripModel'
interface Assignment {
id: number
@@ -18,7 +19,7 @@ interface SharedPlanViewProps {
days?: { id: number; day_number: number; title?: string | null; date?: string | null }[]
assignments?: Record<string, Assignment[]>
dayNotes?: Record<string, { id: number; text: string; time?: string | null; sort_order?: number | null }[]>
- places?: MapPlace[]
+ places?: (MapPlace & { category_id?: number | null })[]
reservations?: { id: number; type: string; title: string; day_id?: number | null; end_day_id?: number | null }[]
accommodations?: { id: number; place_name?: string | null; start_day_id?: number | null; end_day_id?: number | null }[]
categories?: { id: number; color?: string | null; icon?: string | null }[]
@@ -29,6 +30,8 @@ interface SharedPlanViewProps {
onPickDayOnMap: (id: number | null) => void
collapsedDays: ReadonlySet<number>
onToggleDay: (id: number) => void
+ /** The owner shared only travel and stays (#1712): empty days and the unplanned pool stay out. */
+ travelOnly?: boolean
}
/**
@@ -36,7 +39,7 @@ interface SharedPlanViewProps {
* them and staying in view while they scroll. On a phone the map comes first
* and the days follow under it.
*/
-export function SharedPlanView({ data, selectedDay, onSelectDay, onPickDayOnMap, collapsedDays, onToggleDay }: SharedPlanViewProps) {
+export function SharedPlanView({ data, selectedDay, onSelectDay, onPickDayOnMap, collapsedDays, onToggleDay, travelOnly = false }: SharedPlanViewProps) {
const days = [...(data.days || [])].sort((a, b) => a.day_number - b.day_number)
const assignments = data.assignments || {}
@@ -98,6 +101,8 @@ export function SharedPlanView({ data, selectedDay, onSelectDay, onPickDayOnMap,
dayTransports: transports,
dayId: day.id,
}).filter(item => !(item.type === 'transport' && hidesOnMiddleDay(item.data, day.id)))
+ const stays = (data.accommodations || []).filter(a => isDayInAccommodationRange(day, a.start_day_id, a.end_day_id, days))
+ if (travelOnly && !dayHasEntries(items.length, stays.length)) return null
return (
<SharedDayCard
key={day.id}
@@ -108,15 +113,17 @@ export function SharedPlanView({ data, selectedDay, onSelectDay, onPickDayOnMap,
onSelect={() => onSelectDay(selectedDay === day.id ? null : day.id)}
onToggleCollapse={() => onToggleDay(day.id)}
items={items}
- stays={(data.accommodations || []).filter(a => isDayInAccommodationRange(day, a.start_day_id, a.end_day_id, days))}
+ stays={stays}
// A share can still carry an assignment for a deleted place. The list
// skips those rows, so the count must not count them either.
placeCount={stops.filter(a => a.place).length}
stopNumber={stopNumbers(stops).byAssignment}
categories={data.categories || []}
+ travelOnly={travelOnly}
/>
)
})}
+ {!travelOnly && <SharedUnplannedCard places={unplannedPlaces(data.places || [], assignments)} categories={data.categories || []} />}
</div>
</div>
)
diff --git a/client/src/pages/sharedTrip/SharedUnplannedCard.tsx b/client/src/pages/sharedTrip/SharedUnplannedCard.tsx
new file mode 100644
index 000000000..bbc96be0b
--- /dev/null
+++ b/client/src/pages/sharedTrip/SharedUnplannedCard.tsx
@@ -0,0 +1,53 @@
+import { useState } from 'react'
+import { ChevronDown, ChevronRight, MapPin } from 'lucide-react'
+import { fs, NEUTRAL_TINT } from '../../components/shared/DialogShell'
+import { SoftPill } from '../../components/Planner/planParts'
+import { useTranslation } from '../../i18n'
+import { PlaceRow, type PlaceRowProps } from './SharedDayCard'
+
+interface SharedUnplannedCardProps {
+ places: (PlaceRowProps['place'] & { category_id?: number | null; category?: PlaceRowProps['category'] })[]
+ categories: { id: number; color?: string | null; icon?: string | null }[]
+}
+
+/**
+ * The places the trip has collected but not put on a day yet (#1758), under the
+ * days and drawn like one of them, so a shared link shows the whole plan and not
+ * only its scheduled half.
+ */
+export function SharedUnplannedCard({ places, categories }: SharedUnplannedCardProps) {
+ const { t } = useTranslation()
+ const [collapsed, setCollapsed] = useState(false)
+ if (places.length === 0) return null
+ return (
+ <article className="overflow-hidden rounded-2xl border border-edge-faint bg-surface-card">
+ <div className="flex items-center gap-2.5 py-2.5 pl-2.5 pr-2" style={{ background: NEUTRAL_TINT }}>
+ <span className="grid h-8 w-8 flex-none place-items-center rounded-[10px] bg-surface-card text-content-muted shadow-sm">
+ <MapPin size={14} strokeWidth={2} />
+ </span>
+ <span className="min-w-0 flex-1 truncate font-bold text-content" style={fs(13.5, 'body')}>{t('shared.unplanned')}</span>
+ <SoftPill>{places.length} {t('shared.places')}</SoftPill>
+ <button
+ type="button"
+ onClick={() => setCollapsed(c => !c)}
+ aria-label={collapsed ? t('common.expand') : t('common.collapse')}
+ aria-expanded={!collapsed}
+ className="grid h-7 w-7 flex-none place-items-center rounded-full text-content-muted hover:bg-surface-card hover:text-content"
+ >
+ {collapsed ? <ChevronRight size={15} strokeWidth={2} /> : <ChevronDown size={15} strokeWidth={2} />}
+ </button>
+ </div>
+ {!collapsed && (
+ <div className="flex flex-col gap-0.5 border-t border-edge-faint p-1.5">
+ {places.map(place => (
+ <PlaceRow
+ key={place.id}
+ place={place}
+ category={categories.find(c => c.id === place.category_id) ?? place.category ?? null}
+ />
+ ))}
+ </div>
+ )}
+ </article>
+ )
+}
diff --git a/client/src/pages/sharedTrip/sharedTripModel.test.ts b/client/src/pages/sharedTrip/sharedTripModel.test.ts
index 38f04ac19..9cd4c12d9 100644
--- a/client/src/pages/sharedTrip/sharedTripModel.test.ts
+++ b/client/src/pages/sharedTrip/sharedTripModel.test.ts
@@ -1,8 +1,8 @@
import { describe, it, expect } from 'vitest'
import { AxiosError, AxiosHeaders } from 'axios'
import {
- coverSrc, formatDateRange, formatDurationMinutes, groupInOrder, isHttpUrl, isSharedTripPayload, legFacts, linkHost,
- sharedTripLoadError, spanLabelKey, stopNumbers, transportFacts,
+ coverSrc, dayHasEntries, formatDateRange, formatDurationMinutes, groupInOrder, isHttpUrl, isSharedTripPayload, legFacts, linkHost,
+ sharedTripLoadError, spanLabelKey, stopNumbers, transportFacts, unplannedPlaces,
} from './sharedTripModel'
describe('sharedTripModel (#2320)', () => {
@@ -159,3 +159,18 @@ describe('sharedTripModel, the redesigned page', () => {
expect(legFacts({ airline: 'Emirates', flight_number: 'EK350' }, 'Platform')).toEqual(['Emirates', 'EK350'])
})
})
+
+describe('unplanned places and day entries (#1758, #1712)', () => {
+ it('keeps the pool places no day has picked up, in pool order', () => {
+ const places = [{ id: 3 }, { id: 1 }, { id: 2 }]
+ const assignments = { 10: [{ place: { id: 1 } }, { place: null }], 11: [] }
+ expect(unplannedPlaces(places, assignments)).toEqual([{ id: 3 }, { id: 2 }])
+ expect(unplannedPlaces([], assignments)).toEqual([])
+ })
+
+ it('counts a day with an entry or a night booked', () => {
+ expect(dayHasEntries(0, 0)).toBe(false)
+ expect(dayHasEntries(1, 0)).toBe(true)
+ expect(dayHasEntries(0, 1)).toBe(true)
+ })
+})
diff --git a/client/src/pages/sharedTrip/sharedTripModel.ts b/client/src/pages/sharedTrip/sharedTripModel.ts
index 06bdcb2a8..4b70535b5 100644
--- a/client/src/pages/sharedTrip/sharedTripModel.ts
+++ b/client/src/pages/sharedTrip/sharedTripModel.ts
@@ -204,6 +204,24 @@ export function legFacts(leg: LegLike, platformLabel: string): string[] {
.filter((f): f is string => !!f)
}
+/** The pool's places no day has picked up yet (#1758), in the pool's own order. */
+export function unplannedPlaces<P extends { id: number }>(
+ places: P[],
+ assignments: Record<string, { place?: { id: number } | null }[]>,
+): P[] {
+ const planned = new Set<number>()
+ for (const rows of Object.values(assignments)) for (const a of rows) if (a.place) planned.add(a.place.id)
+ return places.filter(p => !planned.has(p.id))
+}
+
+/**
+ * A day worth a card on a "travel and stays" link (#1712): one that has something
+ * on it or a night booked. The rest would be a column of empty days.
+ */
+export function dayHasEntries(itemCount: number, stayCount: number): boolean {
+ return itemCount > 0 || stayCount > 0
+}
+
function safeJson(text: string): unknown {
try {
return JSON.parse(text || '{}')
diff --git a/client/src/pages/tripPlanner/useDayClear.ts b/client/src/pages/tripPlanner/useDayClear.ts
new file mode 100644
index 000000000..af146b88b
--- /dev/null
+++ b/client/src/pages/tripPlanner/useDayClear.ts
@@ -0,0 +1,81 @@
+import { useCallback, useMemo, useState } from 'react'
+import { useTripStore } from '../../store/tripStore'
+import { dayLabel } from '../../utils/dayLabel'
+import type { Day } from '../../types'
+import type { RoadtripVias } from '../../components/Roadtrip/useRoadtripVias'
+
+type Translate = (key: string, params?: Record<string, string | number>) => string
+
+interface DayClearOptions {
+ tripId: number
+ days: Day[]
+ canEditDays: boolean
+ t: Translate
+ locale: string
+ toast: { error: (message: string) => unknown }
+ roadtripVias: Pick<RoadtripVias, 'byDay' | 'reanchor'>
+ updateRouteForDay: (dayId: number) => void
+ pushUndo: (label: string, undoFn: () => Promise<void> | void, dayIds?: number[]) => void
+}
+
+export interface DayClear {
+ /** The day the question is asked about, or null while none is open. */
+ clearDayId: number | null
+ /** "Clear Tue, Oct 13?", the day named the way the day list names it. */
+ clearDayTitle: string
+ handleClearDay: (dayId: number) => void
+ cancelClearDay: () => void
+ confirmClearDay: () => Promise<void>
+}
+
+const byNumber = (a: Day, b: Day): number => (a.day_number ?? 0) - (b.day_number ?? 0)
+
+/**
+ * Taking every place off a day in one go (#2470), for both shells. The day, its notes
+ * and its bookings stay; the places stay in the trip. Asked first, since it is one tap
+ * for what used to be a row of them, and undoable afterwards: the undo plans the same
+ * places back in their old order.
+ */
+export function useDayClear(options: DayClearOptions): DayClear {
+ const { tripId, days, canEditDays, t, locale, toast, roadtripVias, updateRouteForDay, pushUndo } = options
+ const [clearDayId, setClearDayId] = useState<number | null>(null)
+
+ const ordered = useMemo(() => [...days].sort(byNumber), [days])
+ const index = clearDayId == null ? -1 : ordered.findIndex(d => d.id === clearDayId)
+ const target = index < 0 ? null : ordered[index]
+ const clearDayTitle = target ? t('dayplan.clearDayTitle', { day: dayLabel(target, index, t, locale) }) : ''
+
+ const handleClearDay = useCallback((dayId: number) => {
+ if (!canEditDays) return
+ if ((useTripStore.getState().assignments[String(dayId)] ?? []).length === 0) return
+ setClearDayId(dayId)
+ }, [canEditDays])
+
+ const cancelClearDay = useCallback(() => setClearDayId(null), [])
+
+ const confirmClearDay = useCallback(async () => {
+ if (clearDayId == null) return
+ const dayId = clearDayId
+ setClearDayId(null)
+ const cleared = [...(useTripStore.getState().assignments[String(dayId)] ?? [])].sort((a, b) => a.order_index - b.order_index)
+ // With no stop left, every detour of the day has nothing to bend, so the anchors go too.
+ const viaIds = (roadtripVias.byDay[dayId] ?? []).map(v => v.id)
+ try {
+ await useTripStore.getState().clearDayAssignments(tripId, dayId)
+ if (viaIds.length > 0) await roadtripVias.reanchor(dayId, { vias: [], remove: viaIds })
+ } catch (err: unknown) {
+ toast.error(err instanceof Error ? err.message : t('common.unknownError'))
+ return
+ }
+ updateRouteForDay(dayId)
+ const placeIds = cleared.map(a => a.place?.id).filter((id): id is number => id != null)
+ pushUndo(t('undo.clearDay'), async () => {
+ // One after the other: each lands at the position the one before it left free.
+ for (const [position, placeId] of placeIds.entries()) {
+ await useTripStore.getState().assignPlaceToDay(tripId, dayId, placeId, position)
+ }
+ }, [dayId])
+ }, [clearDayId, tripId, roadtripVias, toast, t, updateRouteForDay, pushUndo])
+
+ return { clearDayId, clearDayTitle, handleClearDay, cancelClearDay, confirmClearDay }
+}
diff --git a/client/src/pages/tripPlanner/useTripPlanner.ts b/client/src/pages/tripPlanner/useTripPlanner.ts
index 13bff0ac3..20113d9ce 100644
--- a/client/src/pages/tripPlanner/useTripPlanner.ts
+++ b/client/src/pages/tripPlanner/useTripPlanner.ts
@@ -40,6 +40,7 @@ import { collapsedDayDates } from '../../components/Map/dawarichTrail'
import { useRoadtripCorridor } from '../../components/Roadtrip/useRoadtripCorridor'
import { PHONE_CORRIDOR_OPTIONS } from '../../components/Roadtrip/corridorSearchModel'
import { useRoadtripVias } from '../../components/Roadtrip/useRoadtripVias'
+import { useDayClear } from './useDayClear'
import { useRefuelSearch } from '../../components/Roadtrip/useRefuelSearch'
import type { RefuelCandidate } from '../../components/Roadtrip/refuelSuggestion'
import { useFollowTrack } from '../../components/Roadtrip/useFollowTrack'
@@ -78,7 +79,9 @@ import {
toggleConnectionId, toggleAllConnections as flipAllConnectionsMode,
type StoredConnections,
} from '../../utils/connectionsVisibility'
+import { usePlaceLanguage } from '../../hooks/usePlaceLanguage'
import { plannedPlaceIds, plannedPlaceIdsForDay } from '../../utils/plannedPlaces'
+import { pendingStayPlaceIds } from '../../utils/pendingStays'
import { useDayDelete } from './useDayDelete'
import { useDayAdd } from './useDayAdd'
@@ -103,6 +106,7 @@ export function useTripPlanner() {
const navigate = useNavigate()
const toast = useToast()
const { t, language, locale } = useTranslation()
+ const placeLang = usePlaceLanguage()
const { settings } = useSettingsStore()
const roadtripSettings = useRoadtripSettings(s => s, tripId)
// trip-page plugins mount as tabs inside this trip planner (tripId-scoped).
@@ -319,7 +323,7 @@ export function useTripPlanner() {
const [stayPickerDayId, setStayPickerDayId] = useState<number | null>(null)
const [showPlaceForm, setShowPlaceForm] = useState<boolean>(false)
const [editingPlace, setEditingPlace] = useState<Place | null>(null)
- const [prefillCoords, setPrefillCoords] = useState<{ lat: number; lng: number; name?: string; address?: string; website?: string; phone?: string; osm_id?: string; stop_type?: RoadtripStopType | null; duration_minutes?: number } | null>(null)
+ const [prefillCoords, setPrefillCoords] = useState<{ lat: number; lng: number; name?: string; address?: string; website?: string; phone?: string; osm_id?: string; stop_type?: RoadtripStopType | null; duration_minutes?: number; category?: string } | null>(null)
const [editingAssignmentId, setEditingAssignmentId] = useState<number | null>(null)
// Day context of the open form. Set only by the day-scoped entry points (the
// mobile day toolbar, a long-press on the mobile map); every other opener
@@ -530,6 +534,23 @@ export function useTripPlanner() {
return next
})
}, [tripId])
+ // A locked map stays where the traveller put it (#2010): picking a day or a place no
+ // longer zooms or pans it. Remembered per browser, like the other view toggles; the
+ // first frame of a trip still fits, or the map would open on nothing.
+ const [mapLocked, setMapLocked] = useState<boolean>(() => {
+ try { return localStorage.getItem('trek:map-locked') === '1' } catch { return false }
+ })
+ const mapLockedRef = useRef(mapLocked)
+ mapLockedRef.current = mapLocked
+ const isMobileRef = useRef(isMobile)
+ isMobileRef.current = isMobile
+ const toggleMapLocked = useCallback(() => {
+ setMapLocked(prev => {
+ const next = !prev
+ try { localStorage.setItem('trek:map-locked', next ? '1' : '0') } catch { /* private mode keeps it for the session */ }
+ return next
+ })
+ }, [])
// The recorded route from Dawarich (#2279), per trip and per session for the
// same reason as the overview above: it answers "what actually happened on
// this trip", which is a question about one trip rather than a preference.
@@ -693,6 +714,7 @@ export function useTripPlanner() {
const [expandedDayIds, setExpandedDayIds] = useState<Set<number> | null>(null)
+ const compactUnplanned = useSettingsStore(s => s.settings.map_compact_unplanned === true)
const mapPlaces = useMemo(() => {
// Build set of place IDs assigned to collapsed days
const hiddenPlaceIds = new Set<number>()
@@ -725,6 +747,8 @@ export function useTripPlanner() {
: plannedPlaceIds({ assignments, accommodations: tripAccommodations, reservations }))
: null
+ const compactIds = compactUnplanned ? plannedPlaceIds({ assignments, accommodations: tripAccommodations, reservations }) : null
+ const pendingIds = pendingStayPlaceIds(tripAccommodations, reservations)
return places.filter(p => {
if (!p.lat || !p.lng) return false
if (placesFilter === 'tracks' && !p.route_geometry) return false
@@ -740,10 +764,15 @@ export function useTripPlanner() {
if (placesFilter === 'unplanned' && plannedIds && plannedIds.has(p.id)) return false
if (placesFilter === 'planned' && plannedIds && !plannedIds.has(p.id)) return false
return true
+ }).map(p => {
+ // How the map tells a place apart (#2024, #2281); untouched places keep their identity.
+ const compact = !!compactIds && !compactIds.has(p.id)
+ const pending = pendingIds.has(p.id)
+ return compact || pending ? { ...p, _compact: compact, _pending: pending } : p
})
- }, [places, placesCategoryFilter, placesFilter, assignments, expandedDayIds, selectedDayId, days, tripAccommodations, reservations])
+ }, [places, placesCategoryFilter, placesFilter, assignments, expandedDayIds, selectedDayId, days, tripAccommodations, reservations, compactUnplanned])
- const { route, routeSegments, routeVias, routeInfo, setRoute, setRouteInfo, updateRouteForDay } = useRouteCalculation({ assignments } as any, selectedDayId, routeShown, routeProfile, tripAccommodations)
+ const { route, routeWalking, routeSegments, routeVias, routeInfo, setRoute, setRouteInfo, updateRouteForDay } = useRouteCalculation({ assignments } as any, selectedDayId, routeShown, routeProfile, tripAccommodations)
// Road trip mode already draws the whole trip its own way, so the overview stands
// down there rather than drawing a second set of lines over it.
const overviewActive = overviewShown && !roadtripMode
@@ -834,7 +863,8 @@ export function useTripPlanner() {
const handleSelectDay = useCallback((dayId: number | null, skipFit?: boolean) => {
tripActions.setSelectedDay(dayId)
- if (!skipFit) setFitKey(k => k + 1)
+ // The lock is a desktop control; the phone always follows the day.
+ if (!skipFit && !(mapLockedRef.current && !isMobileRef.current)) setFitKey(k => k + 1)
setMobileSidebarOpen(null)
updateRouteForDay(dayId)
}, [updateRouteForDay])
@@ -899,17 +929,17 @@ export function useTripPlanner() {
setShowPlaceForm(true)
try {
const { mapsApi } = await import('../../api/client')
- const data = await mapsApi.reverse(lat, lng, language)
+ const data = await mapsApi.reverse(lat, lng, placeLang)
if (data.name || data.address) {
setPrefillCoords(prev => prev ? { ...prev, name: data.name || '', address: data.address || '' } : prev)
}
} catch { /* best effort */ }
- }, [language])
+ }, [placeLang])
// Open the Add-Place form pre-filled from an OSM "explore" POI marker — all the
// data already comes from the POI, so no reverse-geocode is needed.
const openAddPlaceFromPoi = useCallback((
- poi: { lat: number; lng: number; name: string; address: string | null; website: string | null; phone: string | null; osm_id: string },
+ poi: { lat: number; lng: number; name: string; address: string | null; website: string | null; phone: string | null; osm_id: string; category?: string | null; poi_type?: string | null },
dayId?: number | null,
/** Index within that day. Omitted, the place is appended, which is what every caller did before. */
position?: number | null,
@@ -933,6 +963,8 @@ export function useTripPlanner() {
// A plugin POI's `plugin:<pluginId>:<id>` rides along as it is. The server never
// takes that prefix for a Google place id, so the details column makes no Google call.
osm_id: poi.osm_id,
+ // What the map search filed it under, so the form can preselect a category (#2282).
+ category: poi.poi_type || poi.category || undefined,
stop_type: stop?.stopType ?? null,
duration_minutes: stop?.dwellMinutes,
})
@@ -2593,6 +2625,10 @@ export function useTripPlanner() {
canEditDays: can('day_edit', trip), t, locale, toast, onDeleted: afterDayDeleted,
})
+ const dayClear = useDayClear({
+ tripId, days, canEditDays: can('day_edit', trip), t, locale, toast, roadtripVias, updateRouteForDay, pushUndo,
+ })
+
const handleSaveReservation = async (data: Record<string, string | number | null> & { title: string }) => {
try {
// Imported hotel with a reviewed address but no existing place picked: match
@@ -2959,17 +2995,19 @@ export function useTripPlanner() {
bookingDetail, openBookingDetail, openBookingFromDayList, closeBookingDetail, bookingDetailEditor, bookingDetailChangeRoute, showBookingOnMap, isBookingOnMap,
reservationPrefill, transportPrefill, importReviewActive, startImportReview, advanceImportReview,
receiptExpense, clearReceiptExpense: () => setReceiptExpense(null),
+ mapLocked, toggleMapLocked,
routeShown, setRouteShown, autoShowRoute, transitRoutesShown, routeProfile, setRouteProfile, routeVias, fitKey, setFitKey,
mobileSidebarOpen, setMobileSidebarOpen, mobilePlanScrollTopRef, mobilePlacesScrollTopRef,
deletePlaceId, setDeletePlaceId, deletePlaceIds, setDeletePlaceIds, deletePlaceNote, deletePlacesNote,
visibleConnections, roadtripConnections, toggleConnection, allConnectionsShown, toggleAllConnections, mapTransportDetail, setMapTransportDetail,
isMobile, isTouch,
expandedDayIds, setExpandedDayIds, mapPlaces,
- route, routeSegments, routeInfo, setRoute, setRouteInfo, updateRouteForDay,
+ route, routeWalking, routeSegments, routeInfo, setRoute, setRouteInfo, updateRouteForDay,
handleSelectDay, handlePlaceClick, handleMarkerClick, handleMapClick, handleMapContextMenu, openAddPlaceFromPoi, handlePoiClick,
handleSavePlace, openPlaceEditor, handleDeletePlace, confirmDeletePlace, confirmDeletePlaces, confirmChangeCategory,
handleAssignToDay, handleMoveToDay, handleRemoveAssignment, handleReorder, handleReorderDays, handleAddDay, dayAdd, handleUpdateDayTitle,
...dayDelete,
+ ...dayClear,
handleSaveReservation, handleSaveTransport, handleDeleteReservation,
selectedPlace, dayOrderMap, dayPlaces,
mapTileUrl, fontStyle, splashDone,
diff --git a/client/src/repo/assignmentRepo.ts b/client/src/repo/assignmentRepo.ts
index eee44f54a..b17795cfc 100644
--- a/client/src/repo/assignmentRepo.ts
+++ b/client/src/repo/assignmentRepo.ts
@@ -14,6 +14,27 @@ export interface AssignmentTimes {
}
export const assignmentRepo = {
+ /**
+ * Empties a day (#2470). Offline the cached day loses its places right away and the
+ * clear waits in the queue, where the server applies it to whatever the day holds on
+ * replay, so a place added meanwhile by someone else goes with the rest.
+ */
+ async clearDay(tripId: number | string, dayId: number): Promise<void> {
+ if (!isEffectivelyOffline()) {
+ await assignmentsApi.clearDay(tripId, dayId)
+ await offlineDb.days.where('id').equals(dayId).modify(day => { day.assignments = [] })
+ return
+ }
+ await offlineDb.transaction('rw', offlineDb.days, offlineDb.mutationQueue, async () => {
+ await mutationQueue.enqueue({
+ id: generateUUID(), tripId: Number(tripId), method: 'DELETE',
+ url: `/trips/${tripId}/days/${dayId}/assignments`,
+ body: undefined, resource: 'dayAssignments', entityId: dayId,
+ })
+ await offlineDb.days.where('id').equals(dayId).modify(day => { day.assignments = [] })
+ })
+ },
+
async setEndDay(tripId: number | string, assignment: Assignment, endDay: boolean): Promise<Assignment> {
if (!isEffectivelyOffline()) {
const saved = await saveAssignmentEndDay(tripId, assignment.id, { end_day: endDay })
@@ -32,6 +53,25 @@ export const assignmentRepo = {
return updated
},
+ /** Takes a stop out of the day's route or puts it back (#2532), offline too. */
+ async setRouteExcluded(tripId: number | string, assignment: Assignment, excluded: boolean): Promise<Assignment> {
+ if (!isEffectivelyOffline()) {
+ const saved = assignmentSchema.parse((await assignmentsApi.setRouteExcluded(tripId, assignment.id, excluded)).assignment)
+ await cacheAssignment(saved)
+ return saved
+ }
+ const updated = { ...assignment, route_excluded: excluded }
+ await offlineDb.transaction('rw', offlineDb.days, offlineDb.mutationQueue, async () => {
+ await mutationQueue.enqueue({
+ id: generateUUID(), tripId: Number(tripId), method: 'PUT',
+ url: `/trips/${tripId}/assignments/${assignment.id}/route`,
+ body: { excluded }, resource: 'assignments', entityId: assignment.id,
+ })
+ await cacheAssignment(updated)
+ })
+ return updated
+ },
+
/**
* A visit's own Start and End, the pair the time route takes.
*
diff --git a/client/src/store/journeyStore.ts b/client/src/store/journeyStore.ts
index 5b144ce2d..34f346496 100644
--- a/client/src/store/journeyStore.ts
+++ b/client/src/store/journeyStore.ts
@@ -64,6 +64,8 @@ export interface JourneyEntry {
stats_excluded?: boolean
/** A trip-derived suggestion the traveller waved away. Never sent by the server; the read paths drop it. */
dismissed?: boolean
+ /** A draft (#696): contributors see it, the journey's public share page does not. */
+ is_draft?: boolean
photos: JourneyPhoto[]
created_at: number
updated_at: number
diff --git a/client/src/store/slices/assignmentsSlice.ts b/client/src/store/slices/assignmentsSlice.ts
index 2db8a5031..bdf2d9e3c 100644
--- a/client/src/store/slices/assignmentsSlice.ts
+++ b/client/src/store/slices/assignmentsSlice.ts
@@ -11,9 +11,11 @@ type GetState = StoreApi<TripStoreState>['getState']
export interface AssignmentsSlice {
setAssignmentEndDay: (tripId: number | string, dayId: number, assignmentId: number, endDay: boolean) => Promise<void>
+ setAssignmentRouteExcluded: (tripId: number | string, dayId: number, assignmentId: number, excluded: boolean) => Promise<void>
setAssignmentTimes: (tripId: number | string, dayId: number, assignmentId: number, times: AssignmentTimes) => Promise<void>
assignPlaceToDay: (tripId: number | string, dayId: number | string, placeId: number | string, position?: number | null) => Promise<Assignment | undefined>
removeAssignment: (tripId: number | string, dayId: number | string, assignmentId: number) => Promise<void>
+ clearDayAssignments: (tripId: number | string, dayId: number) => Promise<void>
reorderAssignments: (tripId: number | string, dayId: number | string, orderedIds: number[]) => Promise<void>
moveAssignment: (tripId: number | string, assignmentId: number, fromDayId: number | string, toDayId: number | string, toOrderIndex?: number | null) => Promise<void>
setAssignments: (assignments: AssignmentsMap) => void
@@ -37,6 +39,21 @@ export const createAssignmentsSlice = (set: SetState, get: GetState): Assignment
throw err
}
},
+ setAssignmentRouteExcluded: async (tripId, dayId, assignmentId, excluded) => {
+ const assignment = get().assignments[String(dayId)]?.find(a => a.id === assignmentId)
+ if (!assignment || assignmentId < 0) return
+ const apply = (value: boolean) => set(state => ({
+ assignments: { ...state.assignments, [String(dayId)]: (state.assignments[String(dayId)] || []).map(a => a.id === assignmentId ? { ...a, route_excluded: value } : a) },
+ }))
+ apply(excluded)
+ try {
+ const saved = await assignmentRepo.setRouteExcluded(tripId, assignment, excluded)
+ apply(saved.route_excluded === true)
+ } catch (err: unknown) {
+ apply(assignment.route_excluded === true)
+ throw err
+ }
+ },
setAssignmentTimes: async (tripId, dayId, assignmentId, times) => {
const assignment = get().assignments[String(dayId)]?.find(a => a.id === assignmentId)
if (!assignment || assignmentId < 0) return
@@ -157,6 +174,17 @@ export const createAssignmentsSlice = (set: SetState, get: GetState): Assignment
}
},
+ clearDayAssignments: async (tripId, dayId) => {
+ const prevAssignments = get().assignments
+ set(state => ({ assignments: { ...state.assignments, [String(dayId)]: [] } }))
+ try {
+ await assignmentRepo.clearDay(tripId, dayId)
+ } catch (err: unknown) {
+ set({ assignments: prevAssignments })
+ throw new Error(getApiErrorMessage(err, 'Error removing assignment'))
+ }
+ },
+
reorderAssignments: async (tripId, dayId, orderedIds) => {
const prevAssignments = get().assignments
const dayItems = get().assignments[String(dayId)] || []
diff --git a/client/src/store/slices/packingSlice.test.ts b/client/src/store/slices/packingSlice.test.ts
index 0c07e517c..5408f0d51 100644
--- a/client/src/store/slices/packingSlice.test.ts
+++ b/client/src/store/slices/packingSlice.test.ts
@@ -1,5 +1,6 @@
// FE-STORE-PACKING-001 to FE-STORE-PACKING-002 (reorder, #969)
// FE-STORE-PACKING-003 to FE-STORE-PACKING-015 (three-tier sharing #858, mutation and error paths)
+// FE-STORE-PACKING-016 to FE-STORE-PACKING-017 (packed count, #2296)
import { http, HttpResponse } from 'msw';
import { server } from '../../../tests/helpers/msw/server';
import { resetAllStores, seedStore } from '../../../tests/helpers/store';
@@ -282,4 +283,43 @@ describe('packingSlice', () => {
expect(useTripStore.getState().packingItems[0].checked).toBe(0);
expect(addToast).toHaveBeenCalledWith('Write failed', 'error', undefined);
});
+
+ it('FE-STORE-PACKING-016: setPackedCount counts ahead of the server and ticks the item once full', async () => {
+ const item = buildPackingItem({ id: 1, trip_id: 1, checked: 0, quantity: 3 });
+ seedStore(useTripStore, { packingItems: [item] });
+ const bodies: unknown[] = [];
+ server.use(
+ http.put('/api/trips/1/packing/1', async ({ request }) => {
+ bodies.push(await request.json());
+ return HttpResponse.json({ item: { ...item, checked: 1, packed_quantity: null } });
+ })
+ );
+
+ const pending = useTripStore.getState().setPackedCount(1, 1, 2);
+ expect(useTripStore.getState().packingItems[0]).toMatchObject({ packed_quantity: 2, checked: 0 });
+ await pending;
+ await useTripStore.getState().setPackedCount(1, 1, 3);
+ expect(useTripStore.getState().packingItems[0]).toMatchObject({ packed_quantity: null, checked: 1 });
+ expect(bodies).toEqual([{ packed_quantity: 2 }, { packed_quantity: 3 }]);
+ });
+
+ it('FE-STORE-PACKING-017: setPackedCount rolls back and notifies on failure; ticking clears a count', async () => {
+ const item = buildPackingItem({ id: 1, trip_id: 1, checked: 0, quantity: 5, packed_quantity: 1 });
+ seedStore(useTripStore, { packingItems: [item] });
+ server.use(
+ http.put('/api/trips/1/packing/1', () =>
+ HttpResponse.json({ error: 'Write failed' }, { status: 500 })
+ )
+ );
+ await useTripStore.getState().setPackedCount(1, 1, 4);
+ expect(useTripStore.getState().packingItems[0]).toMatchObject({ packed_quantity: 1, checked: 0 });
+ expect(addToast).toHaveBeenCalledWith('Write failed', 'error', undefined);
+
+ // A missing item is a no-op, not a request.
+ await useTripStore.getState().setPackedCount(1, 99, 1);
+
+ server.use(http.put('/api/trips/1/packing/1', () => HttpResponse.json({ item: { ...item, checked: 1, packed_quantity: null } })));
+ await useTripStore.getState().togglePackingItem(1, 1, true);
+ expect(useTripStore.getState().packingItems[0]).toMatchObject({ packed_quantity: null, checked: 1 });
+ });
});
diff --git a/client/src/store/slices/packingSlice.ts b/client/src/store/slices/packingSlice.ts
index 8f1d82f9f..cd0c1c556 100644
--- a/client/src/store/slices/packingSlice.ts
+++ b/client/src/store/slices/packingSlice.ts
@@ -5,6 +5,7 @@ import type { TripStoreState } from '../tripStore'
import type { PackingItem } from '../../types'
import { getApiErrorMessage } from '../../types'
import { notify } from '../notify'
+import { resolvePackedState } from '@trek/shared'
type SetState = StoreApi<TripStoreState>['setState']
type GetState = StoreApi<TripStoreState>['getState']
@@ -14,6 +15,8 @@ export interface PackingSlice {
updatePackingItem: (tripId: number | string, id: number, data: Partial<PackingItem>) => Promise<PackingItem>
deletePackingItem: (tripId: number | string, id: number) => Promise<void>
togglePackingItem: (tripId: number | string, id: number, checked: boolean) => Promise<void>
+ /** Count how many pieces of a multi-piece item are packed (#2296). */
+ setPackedCount: (tripId: number | string, id: number, count: number) => Promise<void>
reorderPackingItems: (tripId: number | string, orderedIds: number[]) => Promise<void>
// Three-tier sharing (#858)
setPackingItemSharing: (tripId: number | string, id: number, visibility: 'common' | 'personal' | 'shared', recipientIds: number[]) => Promise<void>
@@ -57,9 +60,11 @@ export const createPackingSlice = (set: SetState, get: GetState): PackingSlice =
},
togglePackingItem: async (tripId, id, checked) => {
+ const prev = get().packingItems.find(item => item.id === id)
+ // Ticking decides for the whole item, so a partial count goes with it (#2296).
set(state => ({
packingItems: state.packingItems.map(item =>
- item.id === id ? { ...item, checked: checked ? 1 : 0 } : item
+ item.id === id ? { ...item, checked: checked ? 1 : 0, packed_quantity: null } : item
)
}))
try {
@@ -69,13 +74,30 @@ export const createPackingSlice = (set: SetState, get: GetState): PackingSlice =
// silently would just flip the checkbox with no explanation. Surface it.
set(state => ({
packingItems: state.packingItems.map(item =>
- item.id === id ? { ...item, checked: checked ? 0 : 1 } : item
+ item.id === id ? { ...item, checked: checked ? 0 : 1, packed_quantity: prev?.packed_quantity ?? null } : item
)
}))
notify(getApiErrorMessage(err, 'Error updating item'), 'error')
}
},
+ setPackedCount: async (tripId, id, count) => {
+ const prev = get().packingItems.find(item => item.id === id)
+ if (!prev) return
+ // The server's own rule, run ahead of it so the counter answers at once.
+ const next = resolvePackedState(
+ { checked: prev.checked ? 1 : 0, packed_quantity: prev.packed_quantity ?? null },
+ { bodyKeys: ['packed_quantity'], packed_quantity: count, quantity: prev.quantity || 1 },
+ )
+ set(state => ({ packingItems: state.packingItems.map(item => item.id === id ? { ...item, ...next } : item) }))
+ try {
+ await packingRepo.update(tripId, id, { packed_quantity: count })
+ } catch (err: unknown) {
+ set(state => ({ packingItems: state.packingItems.map(item => item.id === id ? prev : item) }))
+ notify(getApiErrorMessage(err, 'Error updating item'), 'error')
+ }
+ },
+
reorderPackingItems: async (tripId, orderedIds) => {
const prev = get().packingItems
// Optimistic reorder: rebuild the array in the requested order, reindexing
diff --git a/client/src/store/slices/placesSlice.ts b/client/src/store/slices/placesSlice.ts
index 64fdf9e44..578272678 100644
--- a/client/src/store/slices/placesSlice.ts
+++ b/client/src/store/slices/placesSlice.ts
@@ -13,6 +13,7 @@ export interface PlacesSlice {
addPlace: (tripId: number | string, placeData: Partial<Place> & { name: string }) => Promise<Place>
updatePlace: (tripId: number | string, placeId: number, placeData: Partial<Place>) => Promise<Place>
uploadPlaceImage: (tripId: number | string, placeId: number, file: File) => Promise<Place>
+ setPlaceImageFromFile: (tripId: number | string, placeId: number, fileId: number) => Promise<Place>
ratePlace: (tripId: number | string, placeId: number, rating: number | null) => Promise<Place>
deletePlace: (tripId: number | string, placeId: number) => Promise<void>
deletePlacesMany: (tripId: number | string, placeIds: number[]) => Promise<void>
@@ -108,6 +109,18 @@ export const createPlacesSlice = (set: SetState, get: GetState): PlacesSlice =>
}
},
+ setPlaceImageFromFile: async (tripId, placeId, fileId) => {
+ // Online-only like the upload: the server copies the file, so there is nothing to
+ // do offline that the next sync could replay.
+ try {
+ const data = await placesApi.imageFromFile(tripId, placeId, fileId)
+ applyUpdatedPlace(set, placeId, data.place)
+ return data.place
+ } catch (err: unknown) {
+ throw new Error(getApiErrorMessage(err, 'Error uploading image'))
+ }
+ },
+
ratePlace: async (tripId, placeId, rating) => {
// Casts (or clears, rating null) the current user's own star vote (#1435)
// and applies the returned place with the fresh average.
diff --git a/client/src/store/studioStore.ts b/client/src/store/studioStore.ts
index b4b4a6dda..3cb9fe08d 100644
--- a/client/src/store/studioStore.ts
+++ b/client/src/store/studioStore.ts
@@ -1,5 +1,8 @@
import { create } from 'zustand'
-import type { BookDocument, BookElement, BookFrame, BookSpread } from '@trek/shared'
+import type { BookDocument, BookElement, BookFrame, BookLayout, BookSpread } from '@trek/shared'
+import { MAX_BOOK_LAYOUTS, MAX_SPREAD_ELEMENTS } from '@trek/shared'
+import { pastedElements, type StudioClipboard } from '../components/Studio/studioClipboard'
+import { applySavedLayout, layoutFromSpread } from '../components/Studio/savedLayouts'
/**
* The book being edited.
@@ -25,6 +28,8 @@ interface StudioState {
future: BookDocument[]
/** The document as it was when the current gesture started. */
gestureBase: BookDocument | null
+ /** Elements copied for pasting onto any page of the book (#2316). Kept across page switches. */
+ clipboard: StudioClipboard | null
load: (doc: BookDocument) => void
setActiveSpread: (i: number) => void
@@ -51,6 +56,16 @@ interface StudioState {
removeElements: (spreadIndex: number, ids: string[]) => void
duplicate: (spreadIndex: number, ids: string[]) => void
raise: (spreadIndex: number, id: string, to: 'front' | 'back' | 'up' | 'down') => void
+ /** Copy elements of a spread to the clipboard (#2316). */
+ copy: (spreadIndex: number, ids: string[]) => void
+ /** Put the clipboard onto a spread, as one undo step, and select what arrived. */
+ paste: (spreadIndex: number) => void
+
+ /** Keep a spread's arrangement as one of the book's layouts (#2316). Returns false when the book is full. */
+ saveLayout: (spreadIndex: number, name: string) => boolean
+ removeLayout: (id: string) => void
+ /** Lay a spread out on a saved layout, keeping its pictures and words. */
+ applyLayout: (spreadIndex: number, id: string) => void
/** Insert an empty spread after `index`, and select it. */
addSpread: (index: number) => void
@@ -119,6 +134,7 @@ export const useStudioStore = create<StudioState>((set, get) => ({
past: [],
future: [],
gestureBase: null,
+ clipboard: null,
load: doc => set({ doc, selection: [], activeSpread: 0, past: [], future: [], gestureBase: null }),
setActiveSpread: i => set({ activeSpread: i, selection: [] }),
@@ -220,6 +236,45 @@ export const useStudioStore = create<StudioState>((set, get) => ({
return { ...sp, elements: els }
})),
+ copy: (spreadIndex, ids) => {
+ const sp = get().doc?.spreads[spreadIndex]
+ if (!sp) return
+ const elements = sp.elements.filter(e => ids.includes(e.id))
+ if (elements.length) set({ clipboard: { fromSpreadId: sp.id, elements } })
+ },
+
+ paste: spreadIndex => {
+ const { clipboard, doc } = get()
+ const target = doc?.spreads[spreadIndex]
+ if (!clipboard || !doc || !target) return
+ // The spread's own cap: a paste that would push it past what the contract
+ // accepts takes what fits rather than making the book unsaveable.
+ const room = Math.max(0, MAX_SPREAD_ELEMENTS - target.elements.length)
+ const copies = pastedElements(clipboard, target, doc.page).slice(0, room)
+ if (!copies.length) return
+ get().commit(d => replaceSpread(d, spreadIndex, sp => ({ ...sp, elements: [...sp.elements, ...copies] })))
+ set({ selection: copies.map(e => e.id) })
+ },
+
+ saveLayout: (spreadIndex, name) => {
+ const doc = get().doc
+ const sp = doc?.spreads[spreadIndex]
+ if (!doc || !sp || !sp.elements.length) return false
+ if ((doc.layouts ?? []).length >= MAX_BOOK_LAYOUTS) return false
+ const layout: BookLayout = layoutFromSpread(sp, doc.page, name)
+ get().commit(d => ({ ...d, layouts: [...(d.layouts ?? []), layout] }))
+ return true
+ },
+
+ removeLayout: id => get().commit(d => ({ ...d, layouts: (d.layouts ?? []).filter(l => l.id !== id) })),
+
+ applyLayout: (spreadIndex, id) => {
+ const layout = get().doc?.layouts?.find(l => l.id === id)
+ if (!layout) return
+ get().commit(d => replaceSpread(d, spreadIndex, sp => applySavedLayout(sp, layout, d.page)))
+ set({ selection: [] })
+ },
+
/*
* ── Spread management ────────────────────────────────────────────────
*
diff --git a/client/src/store/vacayStore.ts b/client/src/store/vacayStore.ts
index 164cc8145..7ddadfb36 100644
--- a/client/src/store/vacayStore.ts
+++ b/client/src/store/vacayStore.ts
@@ -15,6 +15,7 @@ import type {
VacayUpdateStatsRequest, VacayShareRequest, VacayShareUpdateRequest,
VacayYearSettingsRequest,
} from '@trek/shared'
+import { toggledCompanyHolidays, type CompanyHoliday } from '../components/Vacay/companyHolidays'
const ax = apiClient
@@ -43,7 +44,7 @@ interface VacayYearsResponse {
interface VacayEntriesResponse {
entries: VacayEntry[]
- companyHolidays: { date: string; note?: string }[]
+ companyHolidays: CompanyHoliday[]
}
interface VacayStatsResponse {
@@ -78,7 +79,7 @@ interface VacayApi {
removeYear: (year: number) => Promise<VacayYearsResponse>
getEntries: (year: number) => Promise<VacayEntriesResponse>
toggleEntry: (date: string, targetUserId?: number, fraction?: 0.5 | 1, kind?: 'vacation' | 'comp') => Promise<unknown>
- toggleCompanyHoliday: (date: string) => Promise<unknown>
+ toggleCompanyHoliday: (date: string, fraction?: number) => Promise<unknown>
getStats: (year: number) => Promise<VacayStatsResponse>
updateStats: (year: number, days: number, targetUserId?: number) => Promise<unknown>
getHolidays: (year: number, country: string) => Promise<VacayHolidayRaw[]>
@@ -109,7 +110,7 @@ const api: VacayApi = {
removeYear: (year) => ax.delete(`/addons/vacay/years/${year}`).then((r: AxiosResponse) => r.data),
getEntries: (year) => ax.get(`/addons/vacay/entries/${year}`).then((r: AxiosResponse) => r.data),
toggleEntry: (date, targetUserId, fraction, kind) => ax.post('/addons/vacay/entries/toggle', { date, target_user_id: targetUserId, fraction, kind } satisfies VacayToggleEntryRequest).then((r: AxiosResponse) => r.data),
- toggleCompanyHoliday: (date) => ax.post('/addons/vacay/entries/company-holiday', { date } satisfies VacayCompanyHolidayRequest).then((r: AxiosResponse) => r.data),
+ toggleCompanyHoliday: (date, fraction) => ax.post('/addons/vacay/entries/company-holiday', { date, fraction: fraction === 0.5 ? 0.5 : 1 } satisfies VacayCompanyHolidayRequest).then((r: AxiosResponse) => r.data),
getStats: (year) => ax.get(`/addons/vacay/stats/${year}`).then((r: AxiosResponse) => r.data),
updateStats: (year, days, targetUserId) => ax.put(`/addons/vacay/stats/${year}`, { vacation_days: days, target_user_id: targetUserId } satisfies VacayUpdateStatsRequest).then((r: AxiosResponse) => r.data),
getHolidays: (year, country) => ax.get(`/addons/vacay/holidays/${year}/${country}`).then((r: AxiosResponse) => r.data),
@@ -184,7 +185,7 @@ interface VacayState {
isFused: boolean
years: number[]
entries: VacayEntry[]
- companyHolidays: { date: string; note?: string }[]
+ companyHolidays: CompanyHoliday[]
stats: VacayStat[]
selectedYear: number
selectedUserId: number | null
@@ -212,7 +213,8 @@ interface VacayState {
removeYear: (year: number) => Promise<void>
loadEntries: (year?: number) => Promise<void>
toggleEntry: (date: string, targetUserId?: number, fraction?: 0.5 | 1, kind?: 'vacation' | 'comp') => Promise<void>
- toggleCompanyHoliday: (date: string) => Promise<void>
+ /** Whole (1) or half (0.5) company holiday (#2439); the same size again clears it. */
+ toggleCompanyHoliday: (date: string, fraction?: number) => Promise<void>
loadStats: (year?: number) => Promise<void>
updateVacationDays: (year: number, days: number, targetUserId?: number) => Promise<void>
loadHolidays: (year?: number) => Promise<void>
@@ -367,16 +369,15 @@ export const useVacayStore = create<VacayState>((set, get) => ({
}
},
- toggleCompanyHoliday: async (date: string) => {
+ toggleCompanyHoliday: async (date: string, fraction = 1) => {
// Optimistic like toggleEntry; a company holiday also overrides personal
// entries on that day, so refetch entries afterwards to reconcile.
const prevEntries = get().entries
const prevCompany = get().companyHolidays
const prevStats = get().stats
- const has = prevCompany.some(h => h.date === date)
- set({ companyHolidays: has ? prevCompany.filter(h => h.date !== date) : [...prevCompany, { date }] })
+ set({ companyHolidays: toggledCompanyHolidays(prevCompany, date, fraction) })
try {
- await api.toggleCompanyHoliday(date)
+ await api.toggleCompanyHoliday(date, fraction)
await get().loadEntries()
await get().loadStats()
} catch (e) {
diff --git a/client/src/styles/studio.css b/client/src/styles/studio.css
index 45ca9344b..ffb0bec2e 100644
--- a/client/src/styles/studio.css
+++ b/client/src/styles/studio.css
@@ -2064,3 +2064,14 @@
font-weight: 600;
white-space: nowrap;
}
+
+/* ----------------- saved layouts (#2316) ----------------- *
+ * The book's own layouts sit above the built-in ones, with the save button
+ * closing their group, so what a click keeps and where it goes read as one.
+ */
+.trek-dash .st-saved-layouts { display: flex; flex-direction: column; margin-bottom: 14px; }
+.trek-dash .st-saved-layouts .st-hint { margin: 0 0 4px; }
+.trek-dash .st-saved-layouts .st-add-page { margin-top: 8px; }
+.trek-dash .st-saved-layouts .st-add-page:disabled { opacity: .5; cursor: default; }
+.trek-dash .st-saved-layouts .st-add-page:disabled:hover { background: none; border-color: var(--line-2); color: var(--ink-3); }
+.trek-dash .st-saved-layouts .st-builtin-label { margin-top: 18px; }
diff --git a/client/src/types.ts b/client/src/types.ts
index 100bd1dc3..454866594 100644
--- a/client/src/types.ts
+++ b/client/src/types.ts
@@ -127,6 +127,8 @@ export interface Settings {
/** Display currency for Costs. Empty/null = follow each trip's own currency. */
default_currency: string | null
language: string
+ /** Language for place names and addresses in search (#1799); empty follows `language`. */
+ place_language?: string
temperature_unit: string
distance_unit?: DistanceUnit
time_format: string
@@ -134,6 +136,10 @@ export interface Settings {
week_start?: WeekStart
show_place_description: boolean
blur_booking_codes?: boolean
+ /** Day headings lead with the calendar date and name the trip day second (#1953). */
+ day_date_first?: boolean
+ /** Places not planned into any day are drawn as small markers without their photo (#2024). */
+ map_compact_unplanned?: boolean
map_booking_labels?: boolean
map_poi_pill_enabled?: boolean
map_always_show_routes?: boolean
@@ -356,6 +362,8 @@ export interface AtlasPlace {
name: string
lat: number | null
lng: number | null
+ address?: string | null
+ trip_id?: number
}
// GeoJSON types (simplified for atlas map)
diff --git a/client/src/utils/dayLabel.test.ts b/client/src/utils/dayLabel.test.ts
index 4a107b626..2fcedf317 100644
--- a/client/src/utils/dayLabel.test.ts
+++ b/client/src/utils/dayLabel.test.ts
@@ -1,6 +1,6 @@
// FE-UTIL-DAYLABEL-001 to FE-UTIL-DAYLABEL-003
import { describe, it, expect } from 'vitest'
-import { dayLabel } from './dayLabel'
+import { dayHeadingParts, dayLabel } from './dayLabel'
const t = (key: string, params?: Record<string, string | number>) => `${key}:${params?.n}`
@@ -20,3 +20,18 @@ describe('dayLabel', () => {
expect(dayLabel({ title: null, date: 'not-a-date' }, 4, t, 'en-US')).toBe('dayplan.dayN:5')
})
})
+
+describe('dayHeadingParts', () => {
+ it('FE-UTIL-DAYLABEL-004: the name leads by default and the date follows', () => {
+ expect(dayHeadingParts('Day 2', 'Mon, Aug 17', false)).toEqual({ primary: 'Day 2', secondary: 'Mon, Aug 17' })
+ })
+
+ it('FE-UTIL-DAYLABEL-005: planning by the calendar puts the date first', () => {
+ expect(dayHeadingParts('Day 2', 'Mon, Aug 17', true)).toEqual({ primary: 'Mon, Aug 17', secondary: 'Day 2' })
+ })
+
+ it('FE-UTIL-DAYLABEL-006: a day without a date keeps its name in front either way', () => {
+ expect(dayHeadingParts('Day 2', null, true)).toEqual({ primary: 'Day 2', secondary: null })
+ expect(dayHeadingParts('Day 2', '', false)).toEqual({ primary: 'Day 2', secondary: null })
+ })
+})
diff --git a/client/src/utils/dayLabel.ts b/client/src/utils/dayLabel.ts
index 74f4d05cb..01383d453 100644
--- a/client/src/utils/dayLabel.ts
+++ b/client/src/utils/dayLabel.ts
@@ -28,3 +28,13 @@ export function dayDate(iso: string, locale: string): string | null {
if (Number.isNaN(date.getTime())) return null
return date.toLocaleDateString(locale, { weekday: 'short', day: 'numeric', month: 'short' })
}
+
+/**
+ * A day heading's two parts in reading order. The day's name ("Day 3" or its own
+ * title) leads, unless the traveller plans by the calendar and asked for the date
+ * first (#1953). A day without a date always leads with its name.
+ */
+export function dayHeadingParts(name: string, date: string | null | undefined, dateFirst: boolean): { primary: string; secondary: string | null } {
+ if (dateFirst && date) return { primary: date, secondary: name }
+ return { primary: name, secondary: date || null }
+}
diff --git a/client/src/utils/dayMerge.ts b/client/src/utils/dayMerge.ts
index 485bc6305..f7bbf50df 100644
--- a/client/src/utils/dayMerge.ts
+++ b/client/src/utils/dayMerge.ts
@@ -5,7 +5,7 @@ import { rideSeatAfter, sameDayRide, type CarrierBooking, type SeatItem } from '
// the two drift.
import { orderedEndpoints } from './flightLegs'
-export const TRANSPORT_TYPES = new Set(['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other'])
+export const TRANSPORT_TYPES = new Set(['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other'])
export interface MergedItem {
type: 'place' | 'note' | 'transport'
diff --git a/client/src/utils/pendingStays.ts b/client/src/utils/pendingStays.ts
new file mode 100644
index 000000000..5caf017a6
--- /dev/null
+++ b/client/src/utils/pendingStays.ts
@@ -0,0 +1,33 @@
+import type { Accommodation, Reservation } from '../types'
+
+/**
+ * The stays whose booking is not confirmed yet (#2281), by accommodation id.
+ *
+ * Read the way every other booking pill reads it: confirmed is confirmed, anything
+ * else still waits. A stay without a booking at all is not pending, it is simply a
+ * place to sleep that nobody booked through TREK.
+ */
+export function pendingStayIds(reservations: Pick<Reservation, 'accommodation_id' | 'status'>[]): Set<number> {
+ const ids = new Set<number>()
+ for (const r of reservations) {
+ if (r.accommodation_id != null && r.status !== 'confirmed') ids.add(Number(r.accommodation_id))
+ }
+ return ids
+}
+
+/** The places of those stays, for the map to draw their markers as not yet certain. */
+export function pendingStayPlaceIds(
+ accommodations: Pick<Accommodation, 'id' | 'place_id'>[],
+ reservations: Pick<Reservation, 'accommodation_id' | 'status'>[],
+): Set<number> {
+ const pending = pendingStayIds(reservations)
+ const ids = new Set<number>()
+ for (const acc of accommodations) {
+ if (acc.place_id != null && pending.has(acc.id)) ids.add(acc.place_id)
+ }
+ // A place that also hosts a confirmed stay is certain enough to draw plainly.
+ for (const acc of accommodations) {
+ if (acc.place_id != null && !pending.has(acc.id) && reservations.some(r => Number(r.accommodation_id) === acc.id && r.status === 'confirmed')) ids.delete(acc.place_id)
+ }
+ return ids
+}
diff --git a/client/src/utils/placeLocality.test.ts b/client/src/utils/placeLocality.test.ts
new file mode 100644
index 000000000..5d6914584
--- /dev/null
+++ b/client/src/utils/placeLocality.test.ts
@@ -0,0 +1,19 @@
+// FE-UTIL-LOCALITY-001 to FE-UTIL-LOCALITY-003
+import { describe, it, expect } from 'vitest'
+import { placeLocality } from './placeLocality'
+
+describe('placeLocality', () => {
+ it('FE-UTIL-LOCALITY-001: a resolved place is named in the reader language with its region', () => {
+ expect(placeLocality({ country_code: 'DE', region_name: 'Brandenburg' }, 'de')).toEqual({ country: 'Deutschland', region: 'Brandenburg' })
+ expect(placeLocality({ country_code: 'fr', region_name: 'Île-de-France' }, 'en')).toEqual({ country: 'France', region: 'Île-de-France' })
+ })
+
+ it('FE-UTIL-LOCALITY-002: an unresolved place falls back to the country its address ends on', () => {
+ expect(placeLocality({ address: 'Pariser Platz, 10117 Berlin, Germany' }, 'en')).toEqual({ country: 'Germany', region: null })
+ expect(placeLocality({ address: 'Mildred-Harnack-Straße 11, 10243 Berlin' }, 'en')).toEqual({ country: null, region: null })
+ })
+
+ it('FE-UTIL-LOCALITY-003: nothing to go on gives nulls', () => {
+ expect(placeLocality({ address: null }, 'en')).toEqual({ country: null, region: null })
+ })
+})
diff --git a/client/src/utils/placeLocality.ts b/client/src/utils/placeLocality.ts
new file mode 100644
index 000000000..aad25361a
--- /dev/null
+++ b/client/src/utils/placeLocality.ts
@@ -0,0 +1,43 @@
+export interface PlaceLocality {
+ /** The country's name in the reader's language, or as the address spells it. */
+ country: string | null
+ /** State, province or prefecture, as resolved from the position. */
+ region: string | null
+}
+
+interface LocatedPlace {
+ address?: string | null
+ country_code?: string | null
+ region_name?: string | null
+}
+
+const hasDigits = (part: string) => /\d/.test(part)
+const hasLetters = (part: string) => /\p{L}/u.test(part)
+
+/** The last part of a formatted address is the country, when it reads like one. */
+function countryFromAddress(address: string | null | undefined): string | null {
+ const parts = (address ?? '').split(',').map(p => p.trim()).filter(Boolean)
+ if (parts.length < 2) return null
+ const last = parts[parts.length - 1]
+ return !hasDigits(last) && hasLetters(last) ? last : null
+}
+
+/**
+ * Where a place lies, for filtering the trip's places (#2537).
+ *
+ * Both halves come from the position the server resolved, which is exact: the country
+ * code, named in the reader's language, and the region. A city is not offered, since a
+ * formatted address cannot tell one apart reliably (it names the borough before Berlin
+ * and the county before Schönefeld). A place not resolved yet falls back to the country
+ * its address ends on.
+ */
+export function placeLocality(place: LocatedPlace, language: string): PlaceLocality {
+ let country: string | null = null
+ if (place.country_code) {
+ try { country = new Intl.DisplayNames([language], { type: 'region' }).of(place.country_code.toUpperCase()) ?? null } catch { country = null }
+ }
+ return {
+ country: country ?? countryFromAddress(place.address),
+ region: place.region_name || null,
+ }
+}
diff --git a/client/tests/helpers/mobileTrip.ts b/client/tests/helpers/mobileTrip.ts
index 45bfdd3c2..b705d0ff0 100644
--- a/client/tests/helpers/mobileTrip.ts
+++ b/client/tests/helpers/mobileTrip.ts
@@ -21,7 +21,7 @@ export function buildTripActions(): Record<string, ReturnType<typeof vi.fn>> {
'deleteDay', 'deletePlacesMany', 'deleteReservation', 'deleteTodoItem', 'insertDay', 'loadBudgetItems',
'loadFiles', 'loadReservations', 'loadTrip', 'moveAssignment', 'moveDayNote', 'ratePlace',
'refreshDays', 'removeAssignment', 'removePackingContributor', 'reorderAssignments',
- 'reorderDays', 'setAssignments', 'setPackingItemSharing', 'setSelectedDay',
+ 'reorderDays', 'setAssignments', 'setPackedCount', 'setPackingItemSharing', 'setSelectedDay',
'toggleBudgetMemberPaid', 'togglePackingItem', 'toggleReservationStatus', 'toggleTodoItem',
'updateDayNote', 'updateDayTitle', 'updatePackingItem', 'updatePlace', 'updatePlacesMany',
'updateReservation', 'updateTodoItem', 'updateTrip', 'uploadPlaceImage',
diff --git a/client/tests/unit/mobile/trip/MDaySheet.test.tsx b/client/tests/unit/mobile/trip/MDaySheet.test.tsx
index f3a2582bf..f35bec892 100644
--- a/client/tests/unit/mobile/trip/MDaySheet.test.tsx
+++ b/client/tests/unit/mobile/trip/MDaySheet.test.tsx
@@ -341,11 +341,13 @@ describe('MDaySheet', () => {
expect(screen.getByText('Hotel Sacher')).toBeInTheDocument()
expect(screen.getByText('Philharmonikerstrasse 4')).toBeInTheDocument()
expect(screen.getByText('15:00 – 18:00')).toBeInTheDocument()
- expect(screen.getByText('11:00')).toBeInTheDocument()
+ // The arrival day names the desk time that matters that day, not the departure (#2393).
+ expect(screen.queryByText('11:00')).not.toBeInTheDocument()
expect(screen.getByText('ABC123')).toBeInTheDocument()
expect(screen.getByText('Confirmed · #X9')).toBeInTheDocument()
- // start_day_id is this day, end_day_id a later one → check-in badge plus the stat label.
- expect(screen.getAllByText('Check-in')).toHaveLength(2)
+ // start_day_id is this day, end_day_id a later one → the check-in time carries the
+ // state in its own label, so the head drops the badge (#2393).
+ expect(screen.getAllByText('Check-in')).toHaveLength(1)
// Tapping the stay edits the stay; the place is one tap further right (#2001).
fireEvent.click(screen.getByText('Hotel Sacher'))
@@ -359,17 +361,27 @@ describe('MDaySheet', () => {
expect(shell.openSheet).toHaveBeenCalledWith('accommodation', { dayId: 2 })
})
- it('FE-MOB-DAYSH-024: labels a stay that both starts and ends on this day', async () => {
+ it('FE-MOB-DAYSH-024: a stay that both starts and ends on this day shows both desk times', async () => {
const acc = [{ ...ACCOMMODATIONS[0], end_day_id: 2 }] as unknown as Accommodation[]
await renderSheet(makePlanner({ tripAccommodations: acc }))
+ expect(screen.getByText('15:00 – 18:00')).toBeInTheDocument()
+ expect(screen.getByText('11:00')).toBeInTheDocument()
+ expect(screen.queryByText('Check-in & Check-out')).not.toBeInTheDocument()
+ })
+
+ it('FE-MOB-DAYSH-024b: a stay without desk times keeps its badge in the head', async () => {
+ const acc = [{ ...ACCOMMODATIONS[0], end_day_id: 2, check_in: null, check_in_end: null, check_out: null }] as unknown as Accommodation[]
+ await renderSheet(makePlanner({ tripAccommodations: acc }))
expect(screen.getByText('Check-in & Check-out')).toBeInTheDocument()
})
it('FE-MOB-DAYSH-025: labels the check-out day and a plain mid-stay day', async () => {
const checkOutDay = [{ ...ACCOMMODATIONS[0], start_day_id: 1, end_day_id: 2 }] as unknown as Accommodation[]
const { unmount } = await renderSheet(makePlanner({ tripAccommodations: checkOutDay }))
- // Badge plus the check-out stat label.
- expect(screen.getAllByText('Check-out')).toHaveLength(2)
+ // Only the check-out stat, which carries the state itself.
+ expect(screen.getAllByText('Check-out')).toHaveLength(1)
+ expect(screen.getByText('11:00')).toBeInTheDocument()
+ expect(screen.queryByText('15:00 – 18:00')).not.toBeInTheDocument()
expect(screen.queryByText('Stay')).not.toBeInTheDocument()
unmount()
diff --git a/client/tests/unit/mobile/trip/MPackingListTab.test.tsx b/client/tests/unit/mobile/trip/MPackingListTab.test.tsx
index 4020009bc..f7e03d38a 100644
--- a/client/tests/unit/mobile/trip/MPackingListTab.test.tsx
+++ b/client/tests/unit/mobile/trip/MPackingListTab.test.tsx
@@ -13,7 +13,7 @@ import { resetAllStores, seedStore } from '../../../helpers/store'
import { act, fireEvent, render, screen, waitFor, within } from '../../../helpers/render'
import * as fileDownload from '../../../../src/utils/fileDownload'
-// FE-MOB-PACKTAB-001 to FE-MOB-PACKTAB-046 (plus 060-068)
+// FE-MOB-PACKTAB-001 to FE-MOB-PACKTAB-046 (plus 060-069)
const ME = 7
const ANNA = { id: 11, username: 'anna', avatar: null, avatar_url: 'https://cdn.example/anna.png' } as unknown as TripMember
@@ -636,7 +636,7 @@ describe('MPackingListTab', () => {
fireEvent.click(screen.getByRole('button', { name: 'Passport' }))
expect(planner.tripActions.togglePackingItem).toHaveBeenCalledWith(3, 1, false)
- expect(within(itemRow('Socks')).getByText('3×')).toBeInTheDocument()
+ expect(within(itemRow('Socks')).getByText('0/3')).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Passport' })).toHaveAttribute('aria-pressed', 'true')
})
@@ -978,4 +978,20 @@ describe('MPackingListTab', () => {
await act(async () => { fireEvent.click(screen.getByRole('button', { name: 'packing.exportPrint' })) })
expect(await screen.findByTitle(/Packing List/)).toBeInTheDocument()
})
+
+ it('FE-MOB-PACKTAB-069: counts the packed pieces of a multi-piece item, read-only for a viewer (#2296)', async () => {
+ const socks = packItem({ id: 3, name: 'Socks', category: 'Clothing', quantity: 3, packed_quantity: 1 })
+ const { planner, view } = await setup({ items: [socks] })
+ const row = itemRow('Socks')
+ expect(within(row).getByRole('group', { name: 'packing.packedCount:1,3' })).toBeInTheDocument()
+ fireEvent.click(within(row).getByRole('button', { name: 'packing.packedMore' }))
+ expect(planner.tripActions.setPackedCount).toHaveBeenCalledWith(3, 3, 2)
+ fireEvent.click(within(row).getByRole('button', { name: 'packing.packedLess' }))
+ expect(planner.tripActions.setPackedCount).toHaveBeenCalledWith(3, 3, 0)
+
+ view.unmount()
+ await setup({ items: [socks], planner: { can: vi.fn(() => false) } })
+ expect(within(itemRow('Socks')).getByText('1/3')).toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: 'packing.packedMore' })).not.toBeInTheDocument()
+ })
})
diff --git a/client/tests/unit/mobile/trip/MTaskSheet.test.tsx b/client/tests/unit/mobile/trip/MTaskSheet.test.tsx
index 31cd3c403..4de7af30b 100644
--- a/client/tests/unit/mobile/trip/MTaskSheet.test.tsx
+++ b/client/tests/unit/mobile/trip/MTaskSheet.test.tsx
@@ -165,6 +165,8 @@ describe('MTaskSheet', () => {
expect(screen.getAllByText('todo.detail.title').length).toBeGreaterThan(0)
expect(screen.getByPlaceholderText('todo.namePlaceholder')).toHaveValue('Book flights')
+ // A saved description reads as rendered Markdown until tapped (#2558).
+ fireEvent.click(screen.getByText('Direct if possible'))
expect(screen.getByPlaceholderText('todo.descriptionPlaceholder')).toHaveValue('Direct if possible')
expect(screen.getByRole('button', { name: 'todo.detail.save' })).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'todo.detail.delete' })).toBeInTheDocument()
diff --git a/client/tests/unit/studio/studioClipboardLayouts.test.ts b/client/tests/unit/studio/studioClipboardLayouts.test.ts
new file mode 100644
index 000000000..1a82dbc23
--- /dev/null
+++ b/client/tests/unit/studio/studioClipboardLayouts.test.ts
@@ -0,0 +1,161 @@
+import { describe, it, expect, beforeEach } from 'vitest'
+import type { BookDocument, BookElement, BookPageSetup, BookSpread } from '@trek/shared'
+import {
+ MAX_BOOK_LAYOUTS, bookBadgeElementSchema, bookLayoutSchema, bookPageSetupSchema, bookPhotoElementSchema,
+ bookShapeElementSchema, bookTextElementSchema,
+} from '@trek/shared'
+import { pastedElements } from '../../../src/components/Studio/studioClipboard'
+import {
+ applySavedLayout, layoutFromSpread, layoutPreview, layoutRole, nextLayoutName,
+} from '../../../src/components/Studio/savedLayouts'
+import { useStudioStore } from '../../../src/store/studioStore'
+
+/**
+ * Copying between pages and a book's own layouts (#2316).
+ *
+ * What matters is what lands in the document: fresh ids on every copy, because
+ * the book is edited by several people at once; nothing pasted off the paper;
+ * and a layout that keeps the design while the page it is applied to keeps its
+ * pictures, its words and its own day and coordinates.
+ */
+
+const page: BookPageSetup = bookPageSetupSchema.parse({ preset: 'square-210', pageWidth: 210, pageHeight: 210, bleed: 3, safe: 5 })
+
+const text = (id: string, words: string, size = 10, over: Record<string, unknown> = {}): BookElement =>
+ bookTextElementSchema.parse({ id, kind: 'text', frame: { x: 20, y: 20, w: 80, h: 20 }, text: words, size, ...over }) as BookElement
+const photo = (id: string, photoId: number | null, x = 10): BookElement =>
+ bookPhotoElementSchema.parse({ id, kind: 'photo', frame: { x, y: 60, w: 60, h: 60 }, photoId, frameStyle: 'polaroid' }) as BookElement
+const shape = (id: string): BookElement =>
+ bookShapeElementSchema.parse({ id, kind: 'shape', frame: { x: 0, y: 150, w: 420, h: 60 } }) as BookElement
+const badge = (id: string, variant: string, words: string): BookElement =>
+ bookBadgeElementSchema.parse({ id, kind: 'badge', variant, frame: { x: 5, y: 5, w: 30, h: 8 }, text: words }) as BookElement
+
+const spread = (id: string, elements: BookElement[], role: BookSpread['role'] = 'inner'): BookSpread =>
+ ({ id, role, background: null, elements, parked: [], entryId: null })
+
+function load(doc: Partial<BookDocument>) {
+ useStudioStore.getState().load({ version: 1, title: 'T', page, spreads: [], ...doc } as BookDocument)
+}
+
+describe('pastedElements', () => {
+ it('FE-STUDIO-CLIP-001: every paste gets fresh ids and arrives unlocked where it was', () => {
+ const clip = { fromSpreadId: 'a', elements: [{ ...photo('p1', 5), locked: true } as BookElement] }
+ const first = pastedElements(clip, spread('b', []), page)
+ const second = pastedElements(clip, spread('b', []), page)
+ expect(first[0].id).not.toBe('p1')
+ expect(first[0].id).not.toBe(second[0].id)
+ expect(first[0]).toMatchObject({ locked: false, frame: { x: 10, y: 60, w: 60, h: 60 } })
+ })
+
+ it('FE-STUDIO-CLIP-002: back on its own page the copy steps aside, onto a single page it is pulled inside', () => {
+ const onRight = { ...photo('p1', 5, 300) } as BookElement
+ const same = pastedElements({ fromSpreadId: 'a', elements: [onRight] }, spread('a', []), page)
+ expect(same[0].frame).toMatchObject({ x: 304, y: 64 })
+ const cover = pastedElements({ fromSpreadId: 'a', elements: [onRight] }, spread('c', [], 'cover'), page)
+ expect(cover[0].frame).toMatchObject({ x: 150, w: 60 })
+ const wide = pastedElements({ fromSpreadId: 'a', elements: [shape('s1')] }, spread('c', [], 'cover'), page)
+ expect(wide[0].frame).toMatchObject({ x: 0, w: 210 })
+ })
+})
+
+describe('saved layouts', () => {
+ it('FE-STUDIO-LAYOUT-001: a kept layout is the design without the pictures, and reads through the contract', () => {
+ const layout = layoutFromSpread(spread('a', [photo('p1', 5), text('t1', 'Harbour', 22)]), page, 'Layout 1')
+ expect(layout.elements[0]).toMatchObject({ kind: 'photo', photoId: null, frameStyle: 'polaroid' })
+ expect(layout).toMatchObject({ role: 'inner', pageWidth: 210, pageHeight: 210, name: 'Layout 1' })
+ expect(bookLayoutSchema.safeParse(layout).success).toBe(true)
+ expect(layoutRole(spread('c', [], 'cover'))).toBe('single')
+ })
+
+ it('FE-STUDIO-LAYOUT-002: names count on past the ones taken', () => {
+ const l = (name: string) => ({ ...layoutFromSpread(spread('a', []), page, name) })
+ expect(nextLayoutName([], 'Layout')).toBe('Layout 1')
+ expect(nextLayoutName([l('Layout 2')], 'Layout')).toBe('Layout 3')
+ })
+
+ it('FE-STUDIO-LAYOUT-003: applying keeps the page\'s pictures, words and marks, in the layout\'s design', () => {
+ const drawn = spread('a', [
+ shape('s1'), photo('p1', 1), photo('p2', 2, 80),
+ text('t-title', 'Old title', 24), text('t-body', 'Old story', 10, { binding: { source: 'entry.story' } }),
+ text('t-label', 'CHAPTER', 8), badge('b1', 'day', 'DAY 1'),
+ ])
+ const layout = layoutFromSpread(drawn, page, 'Layout 1')
+ const target = spread('b', [
+ photo('q1', 11), text('u-title', 'Reykjavík', 22), badge('c1', 'day', 'DAY 2'),
+ ])
+ const out = applySavedLayout(target, layout, page)
+ const kinds = out.elements.map(e => e.kind)
+ expect(kinds).toEqual(['shape', 'photo', 'photo', 'text', 'text', 'badge'])
+ const photos = out.elements.filter(e => e.kind === 'photo') as Extract<BookElement, { kind: 'photo' }>[]
+ expect(photos.map(p => p.photoId)).toEqual([11, null])
+ expect(photos[0].frameStyle).toBe('polaroid')
+ const texts = out.elements.filter(e => e.kind === 'text') as Extract<BookElement, { kind: 'text' }>[]
+ // The title takes the largest box; the bound story box had nothing to take and is left out; the label stays.
+ expect(texts.map(t => [t.text, t.size])).toEqual([['Reykjavík', 24], ['CHAPTER', 8]])
+ const day = out.elements.find(e => e.kind === 'badge') as Extract<BookElement, { kind: 'badge' }>
+ expect(day.text).toBe('DAY 2')
+ expect(new Set(out.elements.map(e => e.id)).size).toBe(out.elements.length)
+ expect(out.elements.some(e => ['s1', 'p1', 't-title', 'b1'].includes(e.id))).toBe(false)
+ })
+
+ it('FE-STUDIO-LAYOUT-004: what the layout has no room for is parked, and a new trim scales the design', () => {
+ const layout = { ...layoutFromSpread(spread('a', [photo('p1', 1)]), page, 'L'), pageWidth: 105, pageHeight: 105 }
+ const out = applySavedLayout(spread('b', [photo('q1', 11), photo('q2', 12), text('u', 'Words')]), layout, page)
+ expect(out.elements[0].frame).toMatchObject({ x: 20, y: 120, w: 120, h: 120 })
+ expect(out.parked.map(e => (e.kind === 'photo' ? e.photoId : e.kind))).toEqual([12, 'text'])
+ })
+
+ it('FE-STUDIO-LAYOUT-005: the card draws the layout on this book\'s page, as a single page when it is one', () => {
+ const layout = { ...layoutFromSpread(spread('c', [photo('p1', 1)], 'cover'), page, 'L'), pageWidth: 105 }
+ const preview = layoutPreview(layout, page)
+ expect(preview.role).toBe('first')
+ expect(preview.elements[0].frame.x).toBe(20)
+ })
+})
+
+describe('studio store: clipboard and layouts', () => {
+ beforeEach(() => useStudioStore.setState({ clipboard: null }))
+
+ it('FE-STUDIO-STORE-CLIP-001: copy on one page, paste on another, as one undo step with the copy selected', () => {
+ load({ spreads: [spread('a', [photo('p1', 5), text('t1', 'Keep')]), spread('b', [])] })
+ const s = useStudioStore.getState()
+ s.copy(0, ['p1'])
+ s.paste(1)
+ const after = useStudioStore.getState()
+ const pasted = after.doc!.spreads[1].elements
+ expect(pasted).toHaveLength(1)
+ expect(pasted[0]).toMatchObject({ kind: 'photo', photoId: 5 })
+ expect(after.selection).toEqual([pasted[0].id])
+ after.undo()
+ expect(useStudioStore.getState().doc!.spreads[1].elements).toHaveLength(0)
+ })
+
+ it('FE-STUDIO-STORE-CLIP-002: nothing copied, nothing pasted; an unknown id copies nothing', () => {
+ load({ spreads: [spread('a', [photo('p1', 5)])] })
+ const s = useStudioStore.getState()
+ s.paste(0)
+ s.copy(0, ['missing'])
+ expect(useStudioStore.getState().clipboard).toBeNull()
+ expect(useStudioStore.getState().doc!.spreads[0].elements).toHaveLength(1)
+ })
+
+ it('FE-STUDIO-STORE-LAYOUT-001: save, apply to another page, delete', () => {
+ load({ spreads: [spread('a', [photo('p1', 1), text('t1', 'Title', 24)]), spread('b', [photo('q1', 9)])] })
+ expect(useStudioStore.getState().saveLayout(0, 'Layout 1')).toBe(true)
+ const layout = useStudioStore.getState().doc!.layouts![0]
+ useStudioStore.getState().applyLayout(1, layout.id)
+ const applied = useStudioStore.getState().doc!.spreads[1].elements
+ expect(applied.map(e => e.kind)).toEqual(['photo', 'text'])
+ expect(applied[0]).toMatchObject({ photoId: 9 })
+ useStudioStore.getState().removeLayout(layout.id)
+ expect(useStudioStore.getState().doc!.layouts).toEqual([])
+ })
+
+ it('FE-STUDIO-STORE-LAYOUT-002: an empty page is not a layout, and a full book says no', () => {
+ const full = Array.from({ length: MAX_BOOK_LAYOUTS }, (_, i) => layoutFromSpread(spread('x', []), page, `L${i}`))
+ load({ spreads: [spread('a', []), spread('b', [photo('p', 1)])], layouts: full })
+ expect(useStudioStore.getState().saveLayout(0, 'Empty')).toBe(false)
+ expect(useStudioStore.getState().saveLayout(1, 'One too many')).toBe(false)
+ expect(useStudioStore.getState().doc!.layouts).toHaveLength(MAX_BOOK_LAYOUTS)
+ })
+})
diff --git a/server/.env.example b/server/.env.example
index e1c78fd8d..d783aa7f3 100644
--- a/server/.env.example
+++ b/server/.env.example
@@ -42,6 +42,7 @@ OIDC_SCOPE=openid email profile # Fully overrides the default. Add extra scopes
DEMO_MODE=false # Demo mode - resets data hourly
+# RESTORE_FROM_BACKUP=/app/data/backup.zip # Restore this backup on the first start, before any setup. Ignored once a database exists.
# BACKUP_UPLOAD_LIMIT_MB=500 # Max size (MB) of a backup archive you can upload when restoring. Raise it if your backup exceeds 500 MB. If you sit behind a reverse proxy, raise its upload limit too (e.g. nginx client_max_body_size).
# TREK_DB_JOURNAL_MODE=WAL # SQLite journal mode (DELETE, TRUNCATE, PERSIST, MEMORY, WAL, OFF). WAL is fastest and the right choice on local disk. Set DELETE if the data directory lives on network storage (Azure App Service, an SMB/NFS volume on a NAS) — WAL coordinates writers through a shared-memory file that those filesystems do not implement reliably. The mode is stored inside the database file, so it survives a restart; changing this applies on the next boot.
diff --git a/server/src/app-config/derive.ts b/server/src/app-config/derive.ts
index a7de06d3b..961c5f031 100644
--- a/server/src/app-config/derive.ts
+++ b/server/src/app-config/derive.ts
@@ -304,6 +304,8 @@ export function deriveBackup(raw: RawEnv) {
maxDecompressedMb: positiveNumberOr(raw.BACKUP_MAX_DECOMPRESSED_MB, 5 * 1024),
/** backupService only bundles data/.encryption_key into archives when the key does NOT come from env. */
encryptionKeyFromEnv: !!raw.ENCRYPTION_KEY,
+ /** Archive restored on the first start, while no database exists yet (#1089). Null when unset or blank. */
+ restoreFromBackup: raw.RESTORE_FROM_BACKUP?.trim() || null,
};
}
diff --git a/server/src/app-config/env.schema.ts b/server/src/app-config/env.schema.ts
index 58c725802..33f31d233 100644
--- a/server/src/app-config/env.schema.ts
+++ b/server/src/app-config/env.schema.ts
@@ -161,6 +161,8 @@ export const envSchema = z.object({
TREK_PLACE_PHOTO_DIR: anyString,
BACKUP_UPLOAD_LIMIT_MB: positiveNumber,
BACKUP_MAX_DECOMPRESSED_MB: positiveNumber,
+ // A backup archive to restore on the very first start, before any setup (#1089).
+ RESTORE_FROM_BACKUP: anyString,
// Admin / demo
ADMIN_EMAIL: anyString,
diff --git a/server/src/db/migrations.ts b/server/src/db/migrations.ts
index 1ff260f6e..05280c1d7 100644
--- a/server/src/db/migrations.ts
+++ b/server/src/db/migrations.ts
@@ -5336,6 +5336,72 @@ function runMigrations(db: Database.Database): void {
* is a no-op.
*/
() => createPlaceRegionsFollowPlaceTrigger(db),
+
+ /*
+ * A stop kept on the day but left out of its route (#2532): shown as a pin, not
+ * driven to. 0 routes it like every stop before this existed.
+ */
+ () => {
+ const has = db.prepare("SELECT 1 FROM pragma_table_info('day_assignments') WHERE name = 'route_excluded'").get();
+ if (!has) db.exec('ALTER TABLE day_assignments ADD COLUMN route_excluded INTEGER NOT NULL DEFAULT 0');
+ },
+
+ /*
+ * How many of an item are packed so far (#2296), for "7 of 10 shirts". NULL is the
+ * plain checkbox every item has had, and `checked` stays the answer to "done?".
+ */
+ () => {
+ const has = db.prepare("SELECT 1 FROM pragma_table_info('packing_items') WHERE name = 'packed_quantity'").get();
+ if (!has) db.exec('ALTER TABLE packing_items ADD COLUMN packed_quantity INTEGER');
+ },
+
+ /*
+ * A bucket-list wish for one state or province rather than the whole country
+ * (#1901). NULL keeps every existing wish a country wish.
+ */
+ () => {
+ const has = db.prepare("SELECT 1 FROM pragma_table_info('bucket_list') WHERE name = 'region_code'").get();
+ if (!has) db.exec('ALTER TABLE bucket_list ADD COLUMN region_code TEXT');
+ },
+
+ /*
+ * Half company holidays (#2439): 0.5 covers the morning or afternoon and leaves
+ * the other half open for a half vacation day. 1 is what every holiday was.
+ */
+ () => {
+ const has = db.prepare("SELECT 1 FROM pragma_table_info('vacay_company_holidays') WHERE name = 'fraction'").get();
+ if (!has) db.exec('ALTER TABLE vacay_company_holidays ADD COLUMN fraction REAL NOT NULL DEFAULT 1');
+ },
+
+ /*
+ * A journey entry still being written (#696): contributors see it, the public
+ * share page does not. Its own flag, since `visibility` defaults to 'private' on
+ * every entry and filtering on it would empty every shared journey.
+ */
+ () => {
+ const has = db.prepare("SELECT 1 FROM pragma_table_info('journey_entries') WHERE name = 'is_draft'").get();
+ if (!has) db.exec('ALTER TABLE journey_entries ADD COLUMN is_draft INTEGER NOT NULL DEFAULT 0');
+ },
+
+ /*
+ * Two narrower ways to share a trip (#1712): only the travel (flights, trains,
+ * stays) without the day's activities, and without the place photos. Both off
+ * keeps every existing link exactly as it was.
+ */
+ () => {
+ const hasTravel = db.prepare("SELECT 1 FROM pragma_table_info('share_tokens') WHERE name = 'share_travel_only'").get();
+ if (!hasTravel) db.exec('ALTER TABLE share_tokens ADD COLUMN share_travel_only INTEGER NOT NULL DEFAULT 0');
+ const hasImages = db.prepare("SELECT 1 FROM pragma_table_info('share_tokens') WHERE name = 'share_hide_images'").get();
+ if (!hasImages) db.exec('ALTER TABLE share_tokens ADD COLUMN share_hide_images INTEGER NOT NULL DEFAULT 0');
+ },
+ /**
+ * A note on a settle-up payment (#2340), as expenses already have one:
+ * "paid back in cash at the airport". Null on every existing payment.
+ */
+ () => {
+ const has = db.prepare("SELECT 1 FROM pragma_table_info('budget_settlements') WHERE name = 'note'").get();
+ if (!has) db.exec('ALTER TABLE budget_settlements ADD COLUMN note TEXT');
+ },
];
if (currentVersion < migrations.length) {
diff --git a/server/src/index.ts b/server/src/index.ts
index 198b07771..9c4641aab 100644
--- a/server/src/index.ts
+++ b/server/src/index.ts
@@ -8,7 +8,10 @@ import path from 'node:path';
import fs from 'node:fs';
import http from 'node:http';
import type { INestApplication } from '@nestjs/common';
-import { buildApp, getHttpServer } from './bootstrap';
+// bootstrap is required inside bootstrap() below, not imported here: importing
+// it opens the database, and a first-start restore (#1089) has to put the
+// backup's database in place before that happens.
+import type * as Bootstrap from './bootstrap';
// data/tmp is the driver-agnostic global scratch dir (restore-upload spool,
// mirror stream staging) and stays boot-created here. Driver-owned roots — the
@@ -87,7 +90,10 @@ async function bootstrap(): Promise<void> {
// global pipeline + /uploads + every /api domain + the platform/transport routes
// (/mcp, /.well-known, OAuth SDK, SPA catch-all). buildApp() owns the composition
// order; it is shared with the integration-test harness so they can't drift.
+ const restore = await restoreBeforeTheDatabaseOpens();
+ const { buildApp, getHttpServer } = require('./bootstrap') as typeof Bootstrap;
nestApp = await buildApp();
+ if (restore.restored) await finishFirstBootRestore(nestApp, restore);
// The server buildApp created and bound /ws to. Creating a second one here
// would serve the REST API fine and leave the gateway attached to a socket
// nobody listens on.
@@ -110,6 +116,43 @@ async function bootstrap(): Promise<void> {
else server.listen(PORT, onListen);
}
+/**
+ * RESTORE_FROM_BACKUP on a first start (#1089), before anything opens the
+ * database. See nest/backup/boot-restore.ts for when it runs and why it fails
+ * the start rather than coming up empty.
+ */
+async function restoreBeforeTheDatabaseOpens() {
+ const { restoreOnFirstBoot } = require('./nest/backup/boot-restore') as typeof import('./nest/backup/boot-restore');
+ const env = readEnv();
+ const dataDir = path.join(__dirname, '../data');
+ return restoreOnFirstBoot({
+ archive: env.backup.restoreFromBackup,
+ dbFile: env.db.trekDbFile || path.join(dataDir, 'travel.db'),
+ dataDir,
+ });
+}
+
+/**
+ * The uploads go in once storage is up, through the same driver every upload
+ * uses, so an instance on S3 gets them in S3. A failure here leaves the restored
+ * database running and says where the files are, rather than stopping a start
+ * whose data is already in place.
+ */
+async function finishFirstBootRestore(
+ app: INestApplication,
+ restore: { uploads: string | null; staging: string },
+): Promise<void> {
+ const { StorageService } = require('./nest/storage/storage.service') as typeof import('./nest/storage/storage.service');
+ const { rehydrateUploads } = require('./nest/backup/backup.impl') as typeof import('./nest/backup/backup.impl');
+ try {
+ if (restore.uploads) await rehydrateUploads(app.get(StorageService), restore.uploads);
+ fs.rmSync(restore.staging, { recursive: true, force: true });
+ console.log('[restore] Backup restored. Sign in with an account from the backup.');
+ } catch (err) {
+ console.error(`[restore] The database was restored, but the uploads could not be copied (${err instanceof Error ? err.message : String(err)}). They are still in ${restore.staging}.`);
+ }
+}
+
bootstrap().catch((err) => {
console.error('Fatal: failed to bootstrap server', err);
process.exit(1);
diff --git a/server/src/nest/assignments/assignments.controller.ts b/server/src/nest/assignments/assignments.controller.ts
index 7d32e03c0..f1c0b6513 100644
--- a/server/src/nest/assignments/assignments.controller.ts
+++ b/server/src/nest/assignments/assignments.controller.ts
@@ -20,6 +20,7 @@ import {
AssignmentEndDayDto,
AssignmentNotesDto,
AssignmentTransportDto,
+ AssignmentRouteDto,
AssignmentParticipantsDto,
} from './assignments.dto';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
@@ -93,6 +94,26 @@ export class DayAssignmentsController {
return { success: true };
}
+ // Declared before ':id' so the bare collection path is never read as an id (#2470).
+ @RequirePermission('day_edit')
+ @Delete()
+ clear(
+ @CurrentUser() user: User,
+ @Param('tripId') tripId: string,
+ @Param('dayId') dayId: string,
+ @Headers('x-socket-id') socketId?: string,
+ ) {
+ if (!this.assignments.dayExists(dayId, tripId)) {
+ throw new HttpException({ error: 'Day not found' }, 404);
+ }
+ const removedIds = this.assignments.clearDay(dayId);
+ for (const assignmentId of removedIds) {
+ this.assignments.broadcast(tripId, 'assignment:deleted', { assignmentId, dayId: Number(dayId) }, socketId);
+ }
+ if (removedIds.length > 0) this.assignments.reconcile(tripId, socketId);
+ return { success: true, removedIds };
+ }
+
@RequirePermission('day_edit')
@Delete(':id')
remove(
@@ -237,6 +258,23 @@ export class AssignmentOpsController {
return { assignment };
}
+ @RequirePermission('day_edit')
+ @Put(':id/route')
+ route(
+ @CurrentUser() user: User,
+ @Param('tripId') tripId: string,
+ @Param('id') id: string,
+ @Body() body: AssignmentRouteDto,
+ @Headers('x-socket-id') socketId?: string,
+ ) {
+ if (!this.assignments.getAssignmentForTrip(id, tripId)) {
+ throw new HttpException({ error: 'Assignment not found' }, 404);
+ }
+ const assignment = this.assignments.setRouteExcluded(id, body.excluded);
+ this.assignments.broadcast(tripId, 'assignment:updated', { assignment }, socketId);
+ return { assignment };
+ }
+
@RequirePermission('day_edit')
@Put(':id/participants')
setParticipants(
diff --git a/server/src/nest/assignments/assignments.dto.ts b/server/src/nest/assignments/assignments.dto.ts
index b7ffa0a72..caee2f667 100644
--- a/server/src/nest/assignments/assignments.dto.ts
+++ b/server/src/nest/assignments/assignments.dto.ts
@@ -7,6 +7,7 @@ import {
assignmentEndDayRequestSchema,
assignmentNotesRequestSchema,
assignmentTransportRequestSchema,
+ assignmentRouteRequestSchema,
assignmentParticipantsRequestSchema,
} from '@trek/shared';
@@ -24,4 +25,5 @@ export class AssignmentTimeDto extends createZodDto(assignmentTimeRequestSchema)
export class AssignmentEndDayDto extends createZodDto(assignmentEndDayRequestSchema) {}
export class AssignmentNotesDto extends createZodDto(assignmentNotesRequestSchema) {}
export class AssignmentTransportDto extends createZodDto(assignmentTransportRequestSchema) {}
+export class AssignmentRouteDto extends createZodDto(assignmentRouteRequestSchema) {}
export class AssignmentParticipantsDto extends createZodDto(assignmentParticipantsRequestSchema) {}
diff --git a/server/src/nest/assignments/assignments.mcp.ts b/server/src/nest/assignments/assignments.mcp.ts
index 1fa212be1..6c1e25f56 100644
--- a/server/src/nest/assignments/assignments.mcp.ts
+++ b/server/src/nest/assignments/assignments.mcp.ts
@@ -107,6 +107,30 @@ export class AssignmentsMcp {
return ok({ success: true });
}
+ @Tool({
+ name: 'clear_day_assignments',
+ description: 'Remove every place from one day in a single step. The day itself, its notes and its bookings stay; the places stay in the trip and can be planned again. Returns the removed assignment ids.',
+ inputSchema: {
+ tripId: z.number().int().positive(),
+ dayId: z.number().int().positive(),
+ },
+ annotations: TOOL_ANNOTATIONS_DELETE,
+ access: { group: 'places', mode: 'write' },
+ })
+ async clearDayAssignments(
+ { tripId, dayId }: { tripId: number; dayId: number },
+ ctx: McpContext,
+ ) {
+ if (this.auth.isDemoUser(ctx.userId)) return demoDenied();
+ if (!this.assignments.verifyTripAccess(tripId, ctx.userId)) return noAccess();
+ if (!this.guards.hasTripPermission('day_edit', tripId, ctx.userId)) return permissionDenied();
+ if (!this.assignments.dayExists(dayId, tripId)) return errorResult('Day not found.');
+ const removedIds = this.assignments.clearDay(dayId);
+ for (const assignmentId of removedIds) this.guards.safeBroadcast(tripId, 'assignment:deleted', { assignmentId, dayId });
+ if (removedIds.length > 0) this.assignments.reconcile(tripId);
+ return ok({ success: true, removedIds });
+ }
+
@Tool({
name: 'update_assignment_time',
description: 'Set the start and/or end time for a place assignment on a day (e.g. "09:00", "11:30"). Pass null to clear a time.',
@@ -199,6 +223,30 @@ export class AssignmentsMcp {
return ok({ assignment });
}
+ @Tool({
+ name: 'set_assignment_route_excluded',
+ description: 'Keep a place on its day but leave it out of that day route, or put it back. An excluded stop still shows in the day plan and on the map, and the route runs from the stop before it straight to the one after. Use it for a place only visited on foot from somewhere nearby, or one that is just a point of interest.',
+ inputSchema: {
+ tripId: z.number().int().positive(),
+ assignmentId: z.number().int().positive(),
+ excluded: z.boolean().describe('true leaves the stop out of the route, false routes it again'),
+ },
+ annotations: TOOL_ANNOTATIONS_WRITE,
+ access: { group: 'places', mode: 'write' },
+ })
+ async setAssignmentRouteExcluded(
+ { tripId, assignmentId, excluded }: { tripId: number; assignmentId: number; excluded: boolean },
+ ctx: McpContext,
+ ) {
+ if (this.auth.isDemoUser(ctx.userId)) return demoDenied();
+ if (!this.assignments.verifyTripAccess(tripId, ctx.userId)) return noAccess();
+ if (!this.guards.hasTripPermission('day_edit', tripId, ctx.userId)) return permissionDenied();
+ if (!this.assignments.getAssignmentForTrip(assignmentId, tripId)) return errorResult('Assignment not found.');
+ const assignment = this.assignments.setRouteExcluded(assignmentId, excluded);
+ this.guards.safeBroadcast(tripId, 'assignment:updated', { assignment });
+ return ok({ assignment });
+ }
+
@Tool({
name: 'move_assignment',
description: 'Move a place assignment to a different day.',
diff --git a/server/src/nest/assignments/assignments.service.ts b/server/src/nest/assignments/assignments.service.ts
index f48add544..06329b908 100644
--- a/server/src/nest/assignments/assignments.service.ts
+++ b/server/src/nest/assignments/assignments.service.ts
@@ -202,6 +202,19 @@ export class AssignmentsService {
this.dbs.run('DELETE FROM day_assignments WHERE id = ?', id);
}
+ /**
+ * Empties a day: every place comes off it in one transaction, while the day, its
+ * notes and its bookings stay (#2470). Returns the removed ids so each can be
+ * announced the way a single unassign is.
+ */
+ clearDay(dayId: string | number): number[] {
+ return this.dbs.transaction(() => {
+ const ids = this.dbs.all<{ id: number }>('SELECT id FROM day_assignments WHERE day_id = ?', dayId).map(r => r.id);
+ this.dbs.run('DELETE FROM day_assignments WHERE day_id = ?', dayId);
+ return ids;
+ });
+ }
+
reorderAssignments(dayId: string | number, orderedIds: number[]): void {
const update = this.dbs.prepare('UPDATE day_assignments SET order_index = ? WHERE id = ? AND day_id = ?');
this.dbs.transaction(() => {
@@ -411,6 +424,15 @@ export class AssignmentsService {
return this.getAssignmentWithPlace(Number(id));
}
+ /**
+ * Keep a stop on the day but out of its route (#2532): it stays in the list and on
+ * the map, and the route runs from the stop before it straight to the one after.
+ */
+ setRouteExcluded(id: string | number, excluded: boolean) {
+ this.dbs.run('UPDATE day_assignments SET route_excluded = ? WHERE id = ?', excluded ? 1 : 0, id);
+ return this.getAssignmentWithPlace(Number(id));
+ }
+
/**
* Both callers have already proven the assignment sits on `tripId`; this
* settles the other half, that the ids in the body do too. Off-roster ids drop
diff --git a/server/src/nest/atlas/atlas.controller.ts b/server/src/nest/atlas/atlas.controller.ts
index 9e99bdc0f..49745d13c 100644
--- a/server/src/nest/atlas/atlas.controller.ts
+++ b/server/src/nest/atlas/atlas.controller.ts
@@ -152,9 +152,9 @@ export class AtlasController {
if (!body.name?.trim()) {
throw new HttpException({ error: 'Name is required' }, 400);
}
- const { name, lat, lng, country_code, notes, target_date } = body;
+ const { name, lat, lng, country_code, notes, target_date, region_code } = body;
try {
- return { item: this.atlas.createBucketItem(user.id, { name, lat, lng, country_code, notes, target_date }) };
+ return { item: this.atlas.createBucketItem(user.id, { name, lat, lng, country_code, notes, target_date, region_code }) };
} catch (err) {
// #1898: the same wish twice is a conflict, not a server error. Bespoke
// { error } body like the neighbouring 400/404s.
diff --git a/server/src/nest/atlas/atlas.mcp.ts b/server/src/nest/atlas/atlas.mcp.ts
index 42b8813f7..ad3a94ad5 100644
--- a/server/src/nest/atlas/atlas.mcp.ts
+++ b/server/src/nest/atlas/atlas.mcp.ts
@@ -2,7 +2,7 @@ import {
McpController, Tool, Resource, type McpContext,
TOOL_ANNOTATIONS_READONLY, TOOL_ANNOTATIONS_WRITE,
TOOL_ANNOTATIONS_DELETE, TOOL_ANNOTATIONS_NON_IDEMPOTENT,
- demoDenied, ok,
+ demoDenied, errorResult, ok,
} from '../../nest-mcp';
import { z } from 'zod';
import { ADDON_IDS } from '../../addons';
@@ -77,18 +77,23 @@ export class AtlasMcp {
// "same place, different date" case the report calls for was unreachable.
// update_bucket_list_item has had the field all along.
target_date: z.string().nullable().optional().describe('When you plan to go, e.g. "2027-05"'),
+ region_code: z.string().regex(/^[A-Za-z]{2}-[A-Za-z0-9]{1,8}$/).optional().describe('ISO 3166-2 code of a state or province on the wish list, e.g. "US-CA"; needs country_code and has to belong to it. Hatches that region on the Atlas map'),
},
annotations: TOOL_ANNOTATIONS_NON_IDEMPOTENT,
when: atlasAddonOn,
access: { group: 'atlas', mode: 'write' },
})
async createBucketListItem(
- { name, lat, lng, country_code, notes, target_date }: { name: string; lat?: number; lng?: number; country_code?: string; notes?: string; target_date?: string | null },
+ { name, lat, lng, country_code, notes, target_date, region_code }: { name: string; lat?: number; lng?: number; country_code?: string; notes?: string; target_date?: string | null; region_code?: string },
ctx: McpContext,
) {
if (this.auth.isDemoUser(ctx.userId)) return demoDenied();
+ // The same rule the REST contract enforces: a region comes with its own country.
+ if (region_code && (!country_code || !region_code.toUpperCase().startsWith(`${country_code.toUpperCase()}-`))) {
+ return errorResult('region_code must belong to country_code.');
+ }
try {
- const item = this.atlas.createBucketItem(ctx.userId, { name, lat, lng, country_code, notes, target_date });
+ const item = this.atlas.createBucketItem(ctx.userId, { name, lat, lng, country_code, notes, target_date, region_code });
return ok({ item });
} catch (err) {
if (err instanceof BucketItemExistsError) return bucketDuplicateResult();
diff --git a/server/src/nest/atlas/atlas.service.ts b/server/src/nest/atlas/atlas.service.ts
index 77ebae710..81f6308c1 100644
--- a/server/src/nest/atlas/atlas.service.ts
+++ b/server/src/nest/atlas/atlas.service.ts
@@ -47,6 +47,7 @@ export type CreateBucketData = {
country_code?: string | null;
notes?: string | null;
target_date?: string | null;
+ region_code?: string | null;
};
export type UpdateBucketData = {
@@ -95,6 +96,18 @@ function blankToNull(value: string | null | undefined): string | null {
return value === undefined || value === null || value === '' ? null : value;
}
+/**
+ * A wished-for region as stored (#1901): ISO 3166-2, upper case as the region
+ * boundaries carry it, and only when it lies in the item's own country. Anything
+ * else is no region, which keeps a caller that skips the contract (the plugin RPC)
+ * from pinning a wish to somebody else's map.
+ */
+export function bucketRegionCode(region: string | null | undefined, country: string | null): string | null {
+ const code = blankToNull(region)?.toUpperCase() ?? null;
+ if (!code || !country || !/^[A-Z]{2}-[A-Z0-9]{1,8}$/.test(code)) return null;
+ return code.startsWith(`${country.toUpperCase()}-`) ? code : null;
+}
+
/**
* Who ticked a country off, for the detail sheet.
*
@@ -986,7 +999,7 @@ export class AtlasService {
if (this.findDuplicateBucketItem(userId, identity)) throw new BucketItemExistsError();
const result = this.db
.prepare(
- 'INSERT INTO bucket_list (user_id, name, lat, lng, country_code, notes, target_date) VALUES (?, ?, ?, ?, ?, ?, ?)',
+ 'INSERT INTO bucket_list (user_id, name, lat, lng, country_code, notes, target_date, region_code) VALUES (?, ?, ?, ?, ?, ?, ?, ?)',
)
.run(
userId,
@@ -996,6 +1009,7 @@ export class AtlasService {
identity.country_code,
data.notes ?? null,
identity.target_date,
+ bucketRegionCode(data.region_code, identity.country_code),
);
return this.db.prepare('SELECT * FROM bucket_list WHERE id = ?').get(result.lastInsertRowid);
}
diff --git a/server/src/nest/backup/backup-archive.ts b/server/src/nest/backup/backup-archive.ts
new file mode 100644
index 000000000..eedcce72f
--- /dev/null
+++ b/server/src/nest/backup/backup-archive.ts
@@ -0,0 +1,123 @@
+import fs from 'fs';
+import path from 'path';
+import unzipper from 'unzipper';
+import type Database from 'better-sqlite3';
+import { readEnv } from '../../app-config';
+import { openDatabase } from '../../db/connection';
+
+/**
+ * Reading a backup archive, without touching the live database.
+ *
+ * Split out of backup.impl.ts so the restore that runs before the database is
+ * opened (boot-restore.ts, #1089) can use the same guards as the one in the
+ * admin panel: importing backup.impl.ts opens the database as a side effect,
+ * which is exactly what a first-boot restore has to happen before.
+ */
+
+// Frozen at import on purpose (legacy timing, see backup.impl.ts).
+const backupEnv = readEnv().backup;
+export const MAX_BACKUP_UPLOAD_SIZE = backupEnv.uploadLimitMb * 1024 * 1024; // compressed
+export const MAX_BACKUP_DECOMPRESSED_SIZE = backupEnv.maxDecompressedMb * 1024 * 1024;
+
+/** A refusal in the restore route's own words and status. */
+export interface ArchiveRefusal {
+ error: string;
+ status: number;
+}
+
+/**
+ * Unpack an archive into `extractDir`, or say why not.
+ *
+ * Fast reject on the central-directory's declared size, then extract entry-by-entry
+ * enforcing the ACTUAL decompressed bytes. The declared uncompressedSize is
+ * attacker-declarable — a zip bomb can under-report it and expand past the cap during
+ * extraction — so the real guard counts bytes as they are written and aborts once the
+ * running total crosses the cap. Each entry's resolved path is also confined to
+ * extractDir (a `../` entry that escaped the root — zip-slip — is refused).
+ *
+ * A refusal leaves nothing behind. Any other failure is thrown, also with the
+ * directory removed.
+ */
+export async function extractBackupArchive(zipPath: string, extractDir: string): Promise<ArchiveRefusal | null> {
+ const directory = await unzipper.Open.file(zipPath);
+ const claimedSize = directory.files.reduce((sum, f) => sum + (f.uncompressedSize || 0), 0);
+ if (claimedSize > MAX_BACKUP_DECOMPRESSED_SIZE) {
+ return { error: 'Backup exceeds the maximum decompressed size.', status: 400 };
+ }
+
+ fs.mkdirSync(extractDir, { recursive: true });
+ let decompressedBytes = 0;
+ for (const entry of directory.files) {
+ if (entry.type === 'Directory') continue;
+ const dest = path.join(extractDir, entry.path);
+ const rel = path.relative(extractDir, dest);
+ if (rel.startsWith('..') || path.isAbsolute(rel)) {
+ fs.rmSync(extractDir, { recursive: true, force: true });
+ return { error: 'Invalid backup: an entry path escapes the archive root.', status: 400 };
+ }
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
+ try {
+ await new Promise<void>((resolve, reject) => {
+ const source = entry.stream();
+ const out = fs.createWriteStream(dest);
+ source.on('data', (chunk: Buffer) => {
+ decompressedBytes += chunk.length;
+ if (decompressedBytes > MAX_BACKUP_DECOMPRESSED_SIZE) {
+ source.destroy();
+ out.destroy();
+ reject(new Error('DECOMPRESSED_CAP_EXCEEDED'));
+ }
+ });
+ source.on('error', reject);
+ out.on('error', reject);
+ out.on('finish', resolve);
+ source.pipe(out);
+ });
+ } catch (err) {
+ fs.rmSync(extractDir, { recursive: true, force: true });
+ if (err instanceof Error && err.message === 'DECOMPRESSED_CAP_EXCEEDED') {
+ return { error: 'Backup exceeds the maximum decompressed size.', status: 400 };
+ }
+ throw err;
+ }
+ }
+ return null;
+}
+
+/**
+ * Whether an unpacked archive holds a TREK database that can be put in place:
+ * present, intact, and carrying the tables every TREK has. Read-only; the file
+ * is closed again before this returns.
+ */
+export function checkBackupDatabase(extractDir: string): ArchiveRefusal | null {
+ const extractedDb = path.join(extractDir, 'travel.db');
+ if (!fs.existsSync(extractedDb)) {
+ return { error: 'Invalid backup: travel.db not found', status: 400 };
+ }
+
+ let uploadedDb: InstanceType<typeof Database> | null = null;
+ try {
+ uploadedDb = openDatabase(extractedDb, { readonly: true });
+
+ const integrityResult = uploadedDb.prepare('PRAGMA integrity_check').get() as { integrity_check: string };
+ if (integrityResult.integrity_check !== 'ok') {
+ return { error: `Uploaded database failed integrity check: ${integrityResult.integrity_check}`, status: 400 };
+ }
+
+ const requiredTables = ['users', 'trips', 'trip_members', 'places', 'days'];
+ const existingTables = uploadedDb
+ .prepare("SELECT name FROM sqlite_master WHERE type='table'")
+ .all() as { name: string }[];
+ const tableNames = new Set(existingTables.map(t => t.name));
+ for (const table of requiredTables) {
+ if (!tableNames.has(table)) {
+ return { error: `Uploaded database is missing required table: ${table}. This does not appear to be a TREK backup.`, status: 400 };
+ }
+ }
+ return null;
+ } catch {
+ return { error: 'Uploaded file is not a valid SQLite database', status: 400 };
+ } finally {
+ uploadedDb?.close();
+ }
+}
diff --git a/server/src/nest/backup/backup.impl.ts b/server/src/nest/backup/backup.impl.ts
index 509be1695..7ee08cfd3 100644
--- a/server/src/nest/backup/backup.impl.ts
+++ b/server/src/nest/backup/backup.impl.ts
@@ -1,13 +1,11 @@
import archiver from 'archiver';
-import unzipper from 'unzipper';
import path from 'path';
import { pipeline } from 'node:stream/promises';
import { readEnv } from '../../app-config';
import fs from 'fs';
-import type Database from 'better-sqlite3';
-import { openDatabase } from '../../db/connection';
import { db, closeDb, reinitialize } from '../../db/database';
import { VALID_INTERVALS } from './auto-backup.settings';
+import { checkBackupDatabase, extractBackupArchive } from './backup-archive';
import { invalidatePermissionsCache } from '../permissions/permissions-cache';
import { pluginsCodeRoot, pluginsDataRoot } from '../plugins/paths';
import { stageExtractedPluginTrees, applyStagedRestoreNow } from '../plugins/plugin-backup';
@@ -24,16 +22,9 @@ const dataDir = path.join(__dirname, '../../../data');
// Compressed upload cap for restore archives. Defaults to 500 MB, raisable via
// BACKUP_UPLOAD_LIMIT_MB for instances whose backups (uploads/ included) grow
-// past that. Malformed values abort boot (app-config fail-fast validation);
-// frozen at import on purpose (legacy timing).
-const backupEnv = readEnv().backup;
-export const MAX_BACKUP_UPLOAD_SIZE = backupEnv.uploadLimitMb * 1024 * 1024; // compressed
-// Upper bound on the TOTAL decompressed size of a restore archive (the upload
-// limit only caps the compressed bytes). Default 5 GB, raisable via
-// BACKUP_MAX_DECOMPRESSED_MB for an instance whose own backups (now including the
-// plugin trees) legitimately grow past it — otherwise its own backups become
-// unrestorable.
-export const MAX_BACKUP_DECOMPRESSED_SIZE = backupEnv.maxDecompressedMb * 1024 * 1024;
+// past that. Upper bound on the TOTAL decompressed size: default 5 GB, raisable
+// via BACKUP_MAX_DECOMPRESSED_MB. Both live beside the archive reader now.
+export { MAX_BACKUP_UPLOAD_SIZE, MAX_BACKUP_DECOMPRESSED_SIZE } from './backup-archive';
// ---------------------------------------------------------------------------
// Helpers
@@ -350,7 +341,7 @@ const isBackupCategory = (dir: string): dir is (typeof BACKUP_UPLOAD_CATEGORIES)
* with a warning (2026-08-17 decision): new archives never contain them, and
* the category mapping stays structural in both directions.
*/
-async function rehydrateUploads(storage: StorageService, extractedUploads: string): Promise<void> {
+export async function rehydrateUploads(storage: StorageService, extractedUploads: string): Promise<void> {
const walk = (dir: string): string[] =>
fs.readdirSync(dir, { withFileTypes: true }).flatMap((e) => {
const p = path.join(dir, e.name);
@@ -380,88 +371,15 @@ export async function restoreFromZip(storage: StorageService, zipPath: string):
const extractDir = path.join(dataDir, `restore-${Date.now()}`);
let reinitFailed: unknown = null;
try {
- // Fast reject on the central-directory's declared size, then extract entry-by-entry
- // enforcing the ACTUAL decompressed bytes. The declared uncompressedSize is
- // attacker-declarable — a zip bomb can under-report it and expand past the cap during
- // extraction — so the real guard counts bytes as they are written and aborts once the
- // running total crosses the cap. Each entry's resolved path is also confined to
- // extractDir (a `../` entry that escaped the root — zip-slip — is refused).
- const directory = await unzipper.Open.file(zipPath);
- const claimedSize = directory.files.reduce((sum, f) => sum + (f.uncompressedSize || 0), 0);
- if (claimedSize > MAX_BACKUP_DECOMPRESSED_SIZE) {
- return { success: false, error: 'Backup exceeds the maximum decompressed size.', status: 400 };
- }
-
- fs.mkdirSync(extractDir, { recursive: true });
- let decompressedBytes = 0;
- for (const entry of directory.files) {
- if (entry.type === 'Directory') continue;
- const dest = path.join(extractDir, entry.path);
- const rel = path.relative(extractDir, dest);
- if (rel.startsWith('..') || path.isAbsolute(rel)) {
- fs.rmSync(extractDir, { recursive: true, force: true });
- return { success: false, error: 'Invalid backup: an entry path escapes the archive root.', status: 400 };
- }
- fs.mkdirSync(path.dirname(dest), { recursive: true });
- try {
- await new Promise<void>((resolve, reject) => {
- const source = entry.stream();
- const out = fs.createWriteStream(dest);
- source.on('data', (chunk: Buffer) => {
- decompressedBytes += chunk.length;
- if (decompressedBytes > MAX_BACKUP_DECOMPRESSED_SIZE) {
- source.destroy();
- out.destroy();
- reject(new Error('DECOMPRESSED_CAP_EXCEEDED'));
- }
- });
- source.on('error', reject);
- out.on('error', reject);
- out.on('finish', resolve);
- source.pipe(out);
- });
- } catch (err) {
- fs.rmSync(extractDir, { recursive: true, force: true });
- if (err instanceof Error && err.message === 'DECOMPRESSED_CAP_EXCEEDED') {
- return { success: false, error: 'Backup exceeds the maximum decompressed size.', status: 400 };
- }
- throw err;
- }
- }
-
- const extractedDb = path.join(extractDir, 'travel.db');
- if (!fs.existsSync(extractedDb)) {
- fs.rmSync(extractDir, { recursive: true, force: true });
- return { success: false, error: 'Invalid backup: travel.db not found', status: 400 };
- }
-
- let uploadedDb: InstanceType<typeof Database> | null = null;
- try {
- uploadedDb = openDatabase(extractedDb, { readonly: true });
-
- const integrityResult = uploadedDb.prepare('PRAGMA integrity_check').get() as { integrity_check: string };
- if (integrityResult.integrity_check !== 'ok') {
- fs.rmSync(extractDir, { recursive: true, force: true });
- return { success: false, error: `Uploaded database failed integrity check: ${integrityResult.integrity_check}`, status: 400 };
- }
+ const refused = await extractBackupArchive(zipPath, extractDir);
+ if (refused) return { success: false, ...refused };
- const requiredTables = ['users', 'trips', 'trip_members', 'places', 'days'];
- const existingTables = uploadedDb
- .prepare("SELECT name FROM sqlite_master WHERE type='table'")
- .all() as { name: string }[];
- const tableNames = new Set(existingTables.map(t => t.name));
- for (const table of requiredTables) {
- if (!tableNames.has(table)) {
- fs.rmSync(extractDir, { recursive: true, force: true });
- return { success: false, error: `Uploaded database is missing required table: ${table}. This does not appear to be a TREK backup.`, status: 400 };
- }
- }
- } catch (err) {
+ const unreadable = checkBackupDatabase(extractDir);
+ if (unreadable) {
fs.rmSync(extractDir, { recursive: true, force: true });
- return { success: false, error: 'Uploaded file is not a valid SQLite database', status: 400 };
- } finally {
- uploadedDb?.close();
+ return { success: false, ...unreadable };
}
+ const extractedDb = path.join(extractDir, 'travel.db');
closeDb();
diff --git a/server/src/nest/backup/boot-restore.ts b/server/src/nest/backup/boot-restore.ts
new file mode 100644
index 000000000..e6ecb68b6
--- /dev/null
+++ b/server/src/nest/backup/boot-restore.ts
@@ -0,0 +1,93 @@
+import fs from 'fs';
+import path from 'path';
+import { stageExtractedPluginTrees } from '../plugins/plugin-backup';
+import { checkBackupDatabase, extractBackupArchive } from './backup-archive';
+
+/**
+ * Restoring a backup on the very first start (#1089).
+ *
+ * Moving an instance used to mean setting up a new one first: fetch the admin
+ * password from the logs, sign in, click through the welcome, then restore in
+ * the admin panel and throw the fresh admin away again. With
+ * RESTORE_FROM_BACKUP pointing at an archive, the first start restores it
+ * instead, and the instance comes up as the one the backup was taken from.
+ *
+ * ── When it runs ─────────────────────────────────────────────────────────
+ *
+ * Only while there is no database yet. The variable is typically left in the
+ * compose file after the move, and a restart must not roll the instance back to
+ * the day it moved; with a database present it is ignored with a warning.
+ *
+ * It runs before the database is opened, not after: the archive's database is
+ * migrated on the normal open, the admin seed finds its users and adds none, and
+ * the at-rest key the archive carries is in place before anything reads it. A
+ * restore after startup would need a restart for that key, which is the setup
+ * step this exists to remove.
+ *
+ * ── Why not an upload on the setup screen ────────────────────────────────
+ *
+ * A restore that anyone may run on an empty instance is a takeover: whoever
+ * reaches it first installs their own admins. The environment belongs to
+ * whoever runs the container, so that is where the switch lives.
+ *
+ * ── When it fails ────────────────────────────────────────────────────────
+ *
+ * Loudly, and without starting. An empty instance coming up instead would be
+ * worse than no instance: its new database would then stop the restore from
+ * ever running on the next start.
+ */
+
+export interface BootRestorePlan {
+ /** The archive to restore, or null when the variable is not set. */
+ archive: string | null;
+ /** Where the database lives: TREK_DB_FILE, or data/travel.db. */
+ dbFile: string;
+ /** The data directory, for the scratch space and the at-rest key. */
+ dataDir: string;
+}
+
+export type BootRestoreOutcome =
+ | { restored: false; reason: 'unset' | 'database-exists' }
+ /** `uploads` is the unpacked uploads tree, to hand to storage once it is up. Null when the archive had none. */
+ | { restored: true; uploads: string | null; staging: string };
+
+export class BootRestoreError extends Error {}
+
+export async function restoreOnFirstBoot(plan: BootRestorePlan): Promise<BootRestoreOutcome> {
+ if (!plan.archive) return { restored: false, reason: 'unset' };
+ if (fs.existsSync(plan.dbFile)) {
+ console.warn(`[restore] RESTORE_FROM_BACKUP is set, but ${plan.dbFile} already exists. The backup is only restored on a first start; remove the variable to silence this.`);
+ return { restored: false, reason: 'database-exists' };
+ }
+ if (!fs.existsSync(plan.archive) || !fs.statSync(plan.archive).isFile()) {
+ throw new BootRestoreError(`RESTORE_FROM_BACKUP: no backup archive at ${plan.archive}`);
+ }
+
+ console.log(`[restore] Restoring ${plan.archive} before the first start`);
+ const staging = path.join(plan.dataDir, `restore-boot-${Date.now()}`);
+ const refused = await extractBackupArchive(plan.archive, staging);
+ if (refused) throw new BootRestoreError(`RESTORE_FROM_BACKUP: ${refused.error}`);
+
+ const unreadable = checkBackupDatabase(staging);
+ if (unreadable) {
+ fs.rmSync(staging, { recursive: true, force: true });
+ throw new BootRestoreError(`RESTORE_FROM_BACKUP: ${unreadable.error}`);
+ }
+
+ fs.mkdirSync(path.dirname(plan.dbFile), { recursive: true });
+ // Copied in beside the target and renamed, so a crash leaves either nothing or a whole file.
+ const tmp = `${plan.dbFile}.restore-tmp`;
+ fs.copyFileSync(path.join(staging, 'travel.db'), tmp);
+ fs.renameSync(tmp, plan.dbFile);
+
+ // The key the archive's secrets were encrypted with. An ENCRYPTION_KEY in the
+ // environment still wins over the file, exactly as on any other start.
+ const key = path.join(staging, '.encryption_key');
+ if (fs.existsSync(key)) fs.copyFileSync(key, path.join(plan.dataDir, '.encryption_key'));
+
+ // Plugin trees are swapped in by the runtime's own boot reconcile.
+ stageExtractedPluginTrees(staging);
+
+ const uploads = path.join(staging, 'uploads');
+ return { restored: true, uploads: fs.existsSync(uploads) ? uploads : null, staging };
+}
diff --git a/server/src/nest/budget/budget.controller.ts b/server/src/nest/budget/budget.controller.ts
index 7ceb4fb62..aa77a7289 100644
--- a/server/src/nest/budget/budget.controller.ts
+++ b/server/src/nest/budget/budget.controller.ts
@@ -99,7 +99,7 @@ export class BudgetController {
tripId,
{
from_user_id: body.from_user_id, to_user_id: body.to_user_id, amount: body.amount,
- currency: body.currency, settled_at: body.settled_at, fallback_fx: body.fallback_fx,
+ currency: body.currency, settled_at: body.settled_at, note: body.note, fallback_fx: body.fallback_fx,
},
user.id,
);
@@ -127,6 +127,7 @@ export class BudgetController {
amount: body.amount,
currency: body.currency,
settled_at: body.settled_at,
+ note: body.note,
fallback_fx: body.fallback_fx,
});
if (!settlement) {
diff --git a/server/src/nest/budget/budget.mcp.ts b/server/src/nest/budget/budget.mcp.ts
index e5f52d1e3..ff5a61423 100644
--- a/server/src/nest/budget/budget.mcp.ts
+++ b/server/src/nest/budget/budget.mcp.ts
@@ -432,7 +432,7 @@ export class BudgetMcp {
@Tool({
name: 'create_settlement',
- description: "Record a settle-up payment: from_user_id paid to_user_id the given amount to settle shared expenses. The amount is in the trip's base currency unless `currency` says otherwise. Use get_settlement_summary first to find who owes whom and how much. When the server has no exchange rate for a foreign `currency`, the payment counts in no balance and is listed under `unconverted` in get_settlement_summary until freeze_budget_rates pins one.",
+ description: "Record a settle-up payment: from_user_id paid to_user_id the given amount to settle shared expenses, optionally with a note. The amount is in the trip's base currency unless `currency` says otherwise. Use get_settlement_summary first to find who owes whom and how much. When the server has no exchange rate for a foreign `currency`, the payment counts in no balance and is listed under `unconverted` in get_settlement_summary until freeze_budget_rates pins one.",
inputSchema: {
tripId: z.number().int().positive(),
from_user_id: z.number().int().positive().describe('User ID of the member who paid'),
@@ -440,13 +440,14 @@ export class BudgetMcp {
amount: z.number().positive().describe('Amount paid, in `currency`'),
currency: z.string().max(10).nullable().optional().describe("ISO currency code the payment was made in (e.g. \"USD\"); defaults to the trip currency. Its FX rate is frozen now, so the transfer keeps cancelling its expense when live rates drift."),
settled_at: z.string().max(40).nullable().optional().describe('Day the payment actually happened, YYYY-MM-DD. Omitted means no day is stored and the ledger files the payment under the day it was recorded.'),
+ note: z.string().max(500).nullable().optional().describe('A short note on the payment, such as how or where it was paid'),
},
annotations: TOOL_ANNOTATIONS_NON_IDEMPOTENT,
when: budgetAddonOn,
access: { group: 'budget', mode: 'write' },
})
async createSettlement(
- { tripId, from_user_id, to_user_id, amount, currency, settled_at }: { tripId: number; from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null },
+ { tripId, from_user_id, to_user_id, amount, currency, settled_at, note }: { tripId: number; from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null; note?: string | null },
ctx: McpContext,
) {
if (this.isDemoUser(ctx.userId)) return demoDenied();
@@ -454,7 +455,7 @@ export class BudgetMcp {
if (!this.guards.hasTripPermission('budget_edit', tripId, ctx.userId)) return permissionDenied();
// Freeze-then-write composite, same as the REST path: the rate for the display
// currency is frozen at entry time (#1445).
- const settlement = await this.budget.createSettlement(tripId, { from_user_id, to_user_id, amount, currency, settled_at }, ctx.userId);
+ const settlement = await this.budget.createSettlement(tripId, { from_user_id, to_user_id, amount, currency, settled_at, note }, ctx.userId);
if (!settlement) return errorResult('Settlement not found.');
this.guards.safeBroadcast(tripId, 'budget:settlement-created', { settlement });
return ok({ settlement });
@@ -462,7 +463,7 @@ export class BudgetMcp {
@Tool({
name: 'update_settlement',
- description: 'Update a recorded settle-up payment (who paid, who received, the amount and the currency it was made in). Every field is a full replace, so restate the ones that stay the same. When the server has no exchange rate for a foreign `currency`, the payment counts in no balance and is listed under `unconverted` in get_settlement_summary until freeze_budget_rates pins one.',
+ description: 'Update a recorded settle-up payment (who paid, who received, the amount, the currency it was made in and its note). Every field is a full replace, so restate the ones that stay the same. When the server has no exchange rate for a foreign `currency`, the payment counts in no balance and is listed under `unconverted` in get_settlement_summary until freeze_budget_rates pins one.',
inputSchema: {
tripId: z.number().int().positive(),
settlementId: z.number().int().positive(),
@@ -471,13 +472,14 @@ export class BudgetMcp {
amount: z.number().positive().describe('Amount paid, in `currency`'),
currency: z.string().max(10).nullable().optional().describe('ISO currency code the payment was made in (e.g. "USD"); null puts it back in the trip currency. Omit to leave it as recorded, which also keeps the rate frozen at settle time.'),
settled_at: z.string().max(40).nullable().optional().describe('Date the payment actually happened, YYYY-MM-DD. Omit to leave it as recorded.'),
+ note: z.string().max(500).nullable().optional().describe('A short note on the payment; null or blank clears it. Omit to leave it as recorded.'),
},
annotations: TOOL_ANNOTATIONS_WRITE,
when: budgetAddonOn,
access: { group: 'budget', mode: 'write' },
})
async updateSettlement(
- { tripId, settlementId, from_user_id, to_user_id, amount, currency, settled_at }: { tripId: number; settlementId: number; from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null },
+ { tripId, settlementId, from_user_id, to_user_id, amount, currency, settled_at, note }: { tripId: number; settlementId: number; from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null; note?: string | null },
ctx: McpContext,
) {
if (this.isDemoUser(ctx.userId)) return demoDenied();
@@ -485,7 +487,7 @@ export class BudgetMcp {
if (!this.guards.hasTripPermission('budget_edit', tripId, ctx.userId)) return permissionDenied();
// Freeze-then-write composite, same as the REST path: an edit that leaves the
// currency alone keeps the rate frozen at settle time.
- const settlement = await this.budget.updateSettlement(settlementId, tripId, { from_user_id, to_user_id, amount, currency, settled_at });
+ const settlement = await this.budget.updateSettlement(settlementId, tripId, { from_user_id, to_user_id, amount, currency, settled_at, note });
if (!settlement) return errorResult('Settlement not found.');
this.guards.safeBroadcast(tripId, 'budget:settlement-updated', { settlement });
return ok({ settlement });
diff --git a/server/src/nest/budget/budget.service.ts b/server/src/nest/budget/budget.service.ts
index 4a0aa1101..2b1c5ec35 100644
--- a/server/src/nest/budget/budget.service.ts
+++ b/server/src/nest/budget/budget.service.ts
@@ -13,11 +13,17 @@ type Trip = TripAccess;
type SettlementRow = {
id: number; trip_id: string; from_user_id: number; to_user_id: number;
amount: number; currency: string | null; exchange_rate: number | null;
- created_at: string; settled_at: string | null; created_by_user_id: number | null;
+ created_at: string; settled_at: string | null; note?: string | null; created_by_user_id: number | null;
from_username: string; from_avatar: string | null;
to_username: string; to_avatar: string | null;
};
+/** A settle-up note as stored (#2340): trimmed, and nothing at all when blank. */
+function settlementNote(note: string | null | undefined): string | null {
+ const trimmed = (note ?? '').trim();
+ return trimmed ? trimmed : null;
+}
+
/** How the costs UI used to smuggle an itemized receipt through the note field. */
const LEGACY_TICKET_PREFIX = 'TICKETJSON:';
@@ -1481,7 +1487,7 @@ export class BudgetService {
// Settlement usernames use COALESCE(display_name, username) like every item
// query (the legacy raw fu.username was the odd one out).
private static readonly SETTLEMENT_SELECT = `
- SELECT s.id, s.trip_id, s.from_user_id, s.to_user_id, s.amount, s.currency, s.exchange_rate, s.created_at, s.settled_at, s.created_by_user_id,
+ SELECT s.id, s.trip_id, s.from_user_id, s.to_user_id, s.amount, s.currency, s.exchange_rate, s.created_at, s.settled_at, s.note, s.created_by_user_id,
COALESCE(fu.display_name, fu.username) AS from_username, fu.avatar AS from_avatar,
COALESCE(tu.display_name, tu.username) AS to_username, tu.avatar AS to_avatar
FROM budget_settlements s
@@ -1494,7 +1500,7 @@ export class BudgetService {
id: r.id, trip_id: r.trip_id,
from_user_id: r.from_user_id, to_user_id: r.to_user_id,
amount: r.amount, currency: r.currency ?? null, exchange_rate: r.exchange_rate ?? 1,
- created_at: r.created_at, settled_at: r.settled_at ?? null, created_by_user_id: r.created_by_user_id,
+ created_at: r.created_at, settled_at: r.settled_at ?? null, note: r.note ?? null, created_by_user_id: r.created_by_user_id,
from_username: r.from_username, from_avatar_url: avatarUrl({ avatar: r.from_avatar }),
to_username: r.to_username, to_avatar_url: avatarUrl({ avatar: r.to_avatar }),
};
@@ -1521,15 +1527,16 @@ export class BudgetService {
/** Raw settlement insert (no FX freeze) — the REST path wraps it in createSettlement. */
insertSettlement(
tripId: string | number,
- data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; exchange_rate?: number; settled_at?: string | null },
+ data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; exchange_rate?: number; settled_at?: string | null; note?: string | null },
createdByUserId?: number,
) {
const result = this.db.run(
- 'INSERT INTO budget_settlements (trip_id, from_user_id, to_user_id, amount, currency, exchange_rate, settled_at, created_by_user_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)',
+ 'INSERT INTO budget_settlements (trip_id, from_user_id, to_user_id, amount, currency, exchange_rate, settled_at, note, created_by_user_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)',
tripId, data.from_user_id, data.to_user_id, Math.round(data.amount * 100) / 100,
data.currency ? data.currency.toUpperCase() : null,
data.exchange_rate != null ? data.exchange_rate : 1,
data.settled_at || null,
+ settlementNote(data.note),
createdByUserId ?? null,
);
return this.getSettlement(Number(result.lastInsertRowid), tripId);
@@ -1539,7 +1546,7 @@ export class BudgetService {
applySettlementUpdate(
id: string | number,
tripId: string | number,
- data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; exchange_rate?: number; settled_at?: string | null },
+ data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; exchange_rate?: number; settled_at?: string | null; note?: string | null },
) {
const row = this.db.get('SELECT id FROM budget_settlements WHERE id = ? AND trip_id = ?', id, tripId);
if (!row) return null;
@@ -1548,13 +1555,15 @@ export class BudgetService {
from_user_id = ?, to_user_id = ?, amount = ?,
currency = CASE WHEN ? THEN ? ELSE currency END,
exchange_rate = CASE WHEN ? IS NOT NULL THEN ? ELSE exchange_rate END,
- settled_at = CASE WHEN ? THEN ? ELSE settled_at END
+ settled_at = CASE WHEN ? THEN ? ELSE settled_at END,
+ note = CASE WHEN ? THEN ? ELSE note END
WHERE id = ?
`,
data.from_user_id, data.to_user_id, Math.round(data.amount * 100) / 100,
data.currency !== undefined ? 1 : 0, data.currency ? data.currency.toUpperCase() : null,
data.exchange_rate !== undefined ? 1 : null, data.exchange_rate !== undefined ? data.exchange_rate : 1,
data.settled_at !== undefined ? 1 : 0, data.settled_at || null,
+ data.note !== undefined ? 1 : 0, settlementNote(data.note),
id,
);
return this.getSettlement(id, tripId);
@@ -1629,7 +1638,7 @@ export class BudgetService {
return roster.has(data.from_user_id) && roster.has(data.to_user_id);
}
- async createSettlement(tripId: string | number, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null; fallback_fx?: BudgetFallbackFx }, userId: number) {
+ async createSettlement(tripId: string | number, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null; note?: string | null; fallback_fx?: BudgetFallbackFx }, userId: number) {
if (!this.settlementPartiesOnTrip(tripId, data)) return null;
// Freeze the FX rate for the display currency the amount was entered in so the
// transfer keeps cancelling its expense when live rates drift (#1445).
@@ -1637,7 +1646,7 @@ export class BudgetService {
return this.insertSettlement(tripId, data, userId);
}
- async updateSettlement(id: string | number, tripId: string | number, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null; fallback_fx?: BudgetFallbackFx }) {
+ async updateSettlement(id: string | number, tripId: string | number, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; settled_at?: string | null; note?: string | null; fallback_fx?: BudgetFallbackFx }) {
// Pass the settlement's stored currency so an edit that doesn't change it keeps
// the already-frozen rate (#1445) — otherwise a live-rate drift would re-open a
// settled position on an unrelated edit.
diff --git a/server/src/nest/common/place-image-upload.ts b/server/src/nest/common/place-image-upload.ts
index b8f304a4a..c87ef3837 100644
--- a/server/src/nest/common/place-image-upload.ts
+++ b/server/src/nest/common/place-image-upload.ts
@@ -2,6 +2,8 @@ import path from 'path';
import type { Options } from 'multer';
export const MAX_PLACE_IMAGE_SIZE = 20 * 1024 * 1024; // 20 MB — same cap as covers.
+/** The picture types a place image may be, whether uploaded or taken from an attachment. */
+export const PLACE_IMAGE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif', '.webp'];
/**
* fileFilter for the custom place-image upload (#1136), shared by the
@@ -11,8 +13,7 @@ export const MAX_PLACE_IMAGE_SIZE = 20 * 1024 * 1024; // 20 MB — same cap as c
*/
export const PLACE_IMAGE_FILE_FILTER: Options['fileFilter'] = (_req, file, cb) => {
const ext = path.extname(file.originalname).toLowerCase();
- const allowed = ['.jpg', '.jpeg', '.png', '.gif', '.webp'];
- if (file.mimetype.startsWith('image/') && !file.mimetype.includes('svg') && allowed.includes(ext)) {
+ if (file.mimetype.startsWith('image/') && !file.mimetype.includes('svg') && PLACE_IMAGE_EXTENSIONS.includes(ext)) {
cb(null, true);
} else {
// Carry statusCode so TrekExceptionFilter maps the rejection to a 400 rather
diff --git a/server/src/nest/common/rowShape.ts b/server/src/nest/common/rowShape.ts
index 4e0b36fdf..7a08e73b0 100644
--- a/server/src/nest/common/rowShape.ts
+++ b/server/src/nest/common/rowShape.ts
@@ -21,6 +21,8 @@ export function formatAssignmentWithPlace(a: AssignmentRow, tags: Partial<Tag>[]
end_day: a.end_day === 1,
leg_transport_mode: a.leg_transport_mode ?? null,
incoming_leg_transport_mode: a.incoming_leg_transport_mode ?? null,
+ // Kept on the day but not driven to (#2532).
+ route_excluded: a.route_excluded === 1,
// Which booking put this stop here, if a booking did. The day list has nothing
// else to tell it from a place the traveller added, and it must not draw the
// hotel a second time under the overnight block that already names it.
diff --git a/server/src/nest/days/days.service.ts b/server/src/nest/days/days.service.ts
index 2d672828b..6fe8eb545 100644
--- a/server/src/nest/days/days.service.ts
+++ b/server/src/nest/days/days.service.ts
@@ -130,6 +130,7 @@ export class DaysService {
day_id: a.day_id,
order_index: a.order_index,
end_day: a.end_day === 1,
+ route_excluded: a.route_excluded === 1,
notes: a.notes,
// Repeated here for the same reason stop_type is: the day list hides the stop
// a booking wrote, and this copy is one of the paths that feed it.
diff --git a/server/src/nest/journey/journey-domain.service.ts b/server/src/nest/journey/journey-domain.service.ts
index a312fe370..82e619419 100644
--- a/server/src/nest/journey/journey-domain.service.ts
+++ b/server/src/nest/journey/journey-domain.service.ts
@@ -1291,6 +1291,7 @@ export class JourneyDomainService {
pros_cons?: { pros: string[]; cons: string[] };
visibility?: string;
sort_order?: number;
+ is_draft?: boolean;
},
sid?: string,
): JourneyEntryWire | null {
@@ -1309,8 +1310,8 @@ export class JourneyDomainService {
const res = this.db
.prepare(
`
- INSERT INTO journey_entries (journey_id, author_id, type, title, story, entry_date, entry_time, location_name, location_lat, location_lng, country_code, mood, weather, tags, pros_cons, visibility, sort_order, created_at, updated_at)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+ INSERT INTO journey_entries (journey_id, author_id, type, title, story, entry_date, entry_time, location_name, location_lat, location_lng, country_code, mood, weather, tags, pros_cons, visibility, sort_order, is_draft, created_at, updated_at)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
`,
)
.run(
@@ -1331,6 +1332,7 @@ export class JourneyDomainService {
prosConsJson,
data.visibility || 'private',
(maxOrder?.m ?? -1) + 1,
+ data.is_draft ? 1 : 0,
now,
now,
);
@@ -1364,6 +1366,7 @@ export class JourneyDomainService {
sort_order: number;
stats_excluded: boolean;
dismissed: boolean;
+ is_draft: boolean;
}>,
sid?: string,
): JourneyEntryWire | null {
@@ -1394,6 +1397,7 @@ export class JourneyDomainService {
'sort_order',
'stats_excluded',
'dismissed',
+ 'is_draft',
]);
for (const [key, val] of Object.entries(data)) {
@@ -1405,7 +1409,7 @@ export class JourneyDomainService {
} else if (key === 'pros_cons') {
fields.push('pros_cons = ?');
values.push(val && typeof val === 'object' ? JSON.stringify(val) : val);
- } else if (key === 'stats_excluded' || key === 'dismissed') {
+ } else if (key === 'stats_excluded' || key === 'dismissed' || key === 'is_draft') {
// INTEGER columns, and better-sqlite3 refuses to bind a boolean.
fields.push(`${key} = ?`);
values.push(val ? 1 : 0);
@@ -1474,6 +1478,30 @@ export class JourneyDomainService {
return true;
}
+ /**
+ * The photos of one entry in a new order (#824), in one transaction. The list has
+ * to be exactly the entry's photos, each once, so a stale or foreign id cannot
+ * slip in. The order is kept on this entry's own links: a photo that also sits on
+ * another entry keeps its place there.
+ */
+ reorderEntryPhotos(entryId: number, userId: number, orderedIds: number[], sid?: string): boolean {
+ const entry = this.db.prepare('SELECT id, journey_id FROM journey_entries WHERE id = ?').get(entryId) as { id: number; journey_id: number } | undefined;
+ if (!entry || !this.canEdit(entry.journey_id, userId)) return false;
+ const held = (this.db.prepare('SELECT journey_photo_id FROM journey_entry_photos WHERE entry_id = ?').all(entryId) as { journey_photo_id: number }[])
+ .map(r => r.journey_photo_id);
+ const asked = new Set(orderedIds);
+ if (asked.size !== orderedIds.length || held.length !== orderedIds.length || held.some(id => !asked.has(id))) return false;
+
+ const update = this.db.prepare('UPDATE journey_entry_photos SET sort_order = ? WHERE entry_id = ? AND journey_photo_id = ?');
+ this.db.connection.transaction(() => {
+ orderedIds.forEach((id, index) => update.run(index, entryId, id));
+ this.db.prepare('UPDATE journey_entries SET updated_at = ? WHERE id = ?').run(this.ts(), entryId);
+ })();
+ const updated = decodeEntryRow(this.db.prepare('SELECT * FROM journey_entries WHERE id = ?').get(entryId) as JourneyEntry);
+ this.broadcastJourneyEvent(entry.journey_id, 'journey:entry:updated', { entry: updated }, sid);
+ return true;
+ }
+
deleteEntry(entryId: number, userId: number, sid?: string): boolean {
const entry = this.db.prepare('SELECT * FROM journey_entries WHERE id = ?').get(entryId) as JourneyEntry | undefined;
if (!entry) return false;
diff --git a/server/src/nest/journey/journey-entry-row.ts b/server/src/nest/journey/journey-entry-row.ts
index 6ee9545d6..6e0116956 100644
--- a/server/src/nest/journey/journey-entry-row.ts
+++ b/server/src/nest/journey/journey-entry-row.ts
@@ -26,21 +26,23 @@ import type { JourneyEntry } from '../../types';
* the reason the JSON does, so that a client comparing it with `=== true` is
* comparing against something that can be true on every path.
*/
-export interface JourneyEntryWire extends Omit<JourneyEntry, 'tags' | 'pros_cons' | 'stats_excluded' | 'dismissed'> {
+export interface JourneyEntryWire extends Omit<JourneyEntry, 'tags' | 'pros_cons' | 'stats_excluded' | 'dismissed' | 'is_draft'> {
tags: string[];
pros_cons: { pros: string[]; cons: string[] } | null;
stats_excluded: boolean;
dismissed: boolean;
+ is_draft: boolean;
}
/** Decode a row's JSON columns and its flags. The one place that knows how they are stored. */
export function decodeEntryRow(row: JourneyEntry): JourneyEntryWire {
- const { tags, pros_cons, stats_excluded, dismissed, ...rest } = row;
+ const { tags, pros_cons, stats_excluded, dismissed, is_draft, ...rest } = row;
return {
...rest,
tags: tags ? JSON.parse(tags) : [],
pros_cons: pros_cons ? JSON.parse(pros_cons) : null,
stats_excluded: !!stats_excluded,
dismissed: !!dismissed,
+ is_draft: !!is_draft,
};
}
diff --git a/server/src/nest/journey/journey-share.service.ts b/server/src/nest/journey/journey-share.service.ts
index 1a0ad5477..2d86ff8de 100644
--- a/server/src/nest/journey/journey-share.service.ts
+++ b/server/src/nest/journey/journey-share.service.ts
@@ -6,6 +6,16 @@ import { decodeEntryRow } from './journey-entry-row';
import { GALLERY_CHRONOLOGICAL_ORDER } from './journey-gallery-order';
import { SettingsService } from '../settings/settings.service';
+/**
+ * A photo whose every entry is a draft (#696) stays off the public page, and so do
+ * its bytes. One that also sits on a published entry, or on no entry at all (a
+ * plain gallery photo), is shown. `gp` is the journey_photos row.
+ */
+const NOT_DRAFT_ONLY_PHOTO = `NOT (
+ EXISTS (SELECT 1 FROM journey_entry_photos d JOIN journey_entries de ON de.id = d.entry_id WHERE d.journey_photo_id = gp.id AND de.is_draft = 1)
+ AND NOT EXISTS (SELECT 1 FROM journey_entry_photos p JOIN journey_entries pe ON pe.id = p.entry_id WHERE p.journey_photo_id = gp.id AND pe.is_draft = 0)
+)`;
+
interface JourneySharePermissions {
share_timeline?: boolean;
share_gallery?: boolean;
@@ -126,7 +136,7 @@ export class JourneyShareService {
SELECT gp.photo_id, tkp.owner_id, gp.journey_id
FROM journey_photos gp
JOIN trek_photos tkp ON tkp.id = gp.photo_id
- WHERE gp.photo_id = ? AND gp.journey_id = ?
+ WHERE gp.photo_id = ? AND gp.journey_id = ? AND ${NOT_DRAFT_ONLY_PHOTO}
`).get(photoId, row.journey_id) as any;
if (!photo) return null;
const journey = this.db.prepare('SELECT user_id FROM journeys WHERE id = ?').get(row.journey_id) as any;
@@ -144,7 +154,7 @@ export class JourneyShareService {
FROM journey_photos gp
JOIN trek_photos tkp ON tkp.id = gp.photo_id
JOIN journeys j ON j.id = gp.journey_id
- WHERE tkp.asset_id = ? AND gp.journey_id = ?
+ WHERE tkp.asset_id = ? AND gp.journey_id = ? AND ${NOT_DRAFT_ONLY_PHOTO}
`).get(assetId, row.journey_id) as any;
// Only resolve assets that actually belong to this shared journey.
if (!photo) return null;
@@ -164,7 +174,7 @@ export class JourneyShareService {
// Entries with photos
const entries = this.db.prepare(`
SELECT je.* FROM journey_entries je
- WHERE je.journey_id = ? AND je.type != 'skeleton' AND je.dismissed = 0
+ WHERE je.journey_id = ? AND je.type != 'skeleton' AND je.dismissed = 0 AND je.is_draft = 0
ORDER BY je.entry_date, je.sort_order
`).all(row.journey_id) as any[];
@@ -190,7 +200,7 @@ export class JourneyShareService {
tp.media_type, tp.duration_ms, tp.taken_at, tp.lat, tp.lng
FROM journey_photos gp
JOIN trek_photos tp ON tp.id = gp.photo_id
- WHERE gp.journey_id = ?
+ WHERE gp.journey_id = ? AND ${NOT_DRAFT_ONLY_PHOTO}
${GALLERY_CHRONOLOGICAL_ORDER}
`).all(row.journey_id) as any[];
diff --git a/server/src/nest/journey/journey.controller.ts b/server/src/nest/journey/journey.controller.ts
index e088f0f0e..6efe07463 100644
--- a/server/src/nest/journey/journey.controller.ts
+++ b/server/src/nest/journey/journey.controller.ts
@@ -36,7 +36,8 @@ import {
JourneyAddTripDto, JourneyContributorAddDto, JourneyContributorUpdateDto, JourneyCreateDto,
JourneyEntryCreateDto, JourneyEntryPhotoUploadDto, JourneyEntryUpdateDto, JourneyGalleryVideoDto,
JourneyLinkPhotoDto, JourneyPhotoUpdateDto, JourneyPreferencesDto, JourneyProviderPhotosDto,
- JourneyReorderEntriesDto, JourneyShareLinkDto, JourneyUpdateDto,
+ JourneyReorderEntriesDto,
+ JourneyReorderEntryPhotosDto, JourneyShareLinkDto, JourneyUpdateDto,
BookSaveDto,
} from './journey.dto';
import { isVideoMime, isVideoExtension, MAX_VIDEO_SIZE } from '../files/files.constants';
@@ -206,6 +207,14 @@ export class JourneyController {
return result;
}
+ @Put('entries/:entryId/photos/reorder')
+ reorderEntryPhotos(@CurrentUser() user: User, @Param('entryId') entryId: string, @Body() body: JourneyReorderEntryPhotosDto, @Headers('x-socket-id') socketId?: string) {
+ if (!this.journey.reorderEntryPhotos(Number(entryId), user.id, body.orderedIds, socketId)) {
+ throw new HttpException({ error: 'Entry not found' }, 404);
+ }
+ return { success: true };
+ }
+
@Delete('entries/:entryId')
deleteEntry(@CurrentUser() user: User, @Param('entryId') entryId: string, @Headers('x-socket-id') socketId?: string) {
if (!this.journey.deleteEntry(Number(entryId), user.id, socketId)) {
diff --git a/server/src/nest/journey/journey.dto.ts b/server/src/nest/journey/journey.dto.ts
index 4e63e0e6f..373be5cf9 100644
--- a/server/src/nest/journey/journey.dto.ts
+++ b/server/src/nest/journey/journey.dto.ts
@@ -13,6 +13,7 @@ import {
journeyPreferencesRequestSchema,
journeyProviderPhotosRequestSchema,
journeyReorderEntriesRequestSchema,
+ journeyReorderEntryPhotosRequestSchema,
journeyShareLinkRequestSchema,
journeyUpdateRequestSchema,
bookSaveRequestSchema,
@@ -41,6 +42,7 @@ export class JourneyAddTripDto extends createZodDto(journeyAddTripRequestSchema)
export class JourneyEntryCreateDto extends createZodDto(journeyEntryCreateRequestSchema) {}
export class JourneyEntryUpdateDto extends createZodDto(journeyEntryUpdateRequestSchema) {}
export class JourneyReorderEntriesDto extends createZodDto(journeyReorderEntriesRequestSchema) {}
+export class JourneyReorderEntryPhotosDto extends createZodDto(journeyReorderEntryPhotosRequestSchema) {}
export class JourneyContributorAddDto extends createZodDto(journeyContributorRequestSchema) {}
export class JourneyContributorUpdateDto extends createZodDto(journeyContributorUpdateRequestSchema) {}
export class JourneyPreferencesDto extends createZodDto(journeyPreferencesRequestSchema) {}
diff --git a/server/src/nest/journey/journey.mcp.ts b/server/src/nest/journey/journey.mcp.ts
index 3e8c53124..58dc98414 100644
--- a/server/src/nest/journey/journey.mcp.ts
+++ b/server/src/nest/journey/journey.mcp.ts
@@ -347,6 +347,7 @@ export class JourneyMcp {
visibility: ENTRY_VISIBILITY.optional().describe('Defaults to private; "shared" and "public" expose the entry through the journey share link'),
type: ENTRY_TYPE.optional().describe('Defaults to "entry"; "skeleton" is the stub TREK derives from a trip place and hides behind the hide-skeletons preference'),
sort_order: z.number().int().min(0).optional(),
+ is_draft: z.boolean().optional().describe('True keeps the entry a draft: contributors see it, the journey share link does not'),
},
annotations: TOOL_ANNOTATIONS_NON_IDEMPOTENT,
when: journeyAddonOn,
@@ -357,7 +358,7 @@ export class JourneyMcp {
journeyId: number; entry_date: string; title?: string; story?: string; entry_time?: string;
location_name?: string; location_lat?: number; location_lng?: number; mood?: string; weather?: string;
tags?: string[]; pros_cons?: { pros: string[]; cons: string[] }; visibility?: EntryVisibility;
- type?: EntryType; sort_order?: number;
+ type?: EntryType; sort_order?: number; is_draft?: boolean;
},
ctx: McpContext,
) {
@@ -371,7 +372,7 @@ export class JourneyMcp {
@Tool({
name: 'update_journey_entry',
- description: 'Update an existing journey entry: its text, date, place, coordinates, weather, tags, verdict, visibility, or whether it counts as a stop. Fields left out keep their value; pass null to clear one. To move an entry within its day use reorder_journey_entries rather than setting sort_order here.',
+ description: 'Update an existing journey entry: its text, date, place, coordinates, weather, tags, verdict, visibility, whether it is a draft, or whether it counts as a stop. Fields left out keep their value; pass null to clear one. To move an entry within its day use reorder_journey_entries rather than setting sort_order here.',
inputSchema: {
entryId: z.number().int().positive(),
title: z.string().max(300).nullable().optional(),
@@ -390,6 +391,7 @@ export class JourneyMcp {
sort_order: z.number().int().min(0).optional(),
stats_excluded: z.boolean().optional().describe('True leaves the entry in the journal but takes it off the journey route and out of its distance, countries and step count (see get_journey_stats); false puts it back. For the home airport, a stopover, the place the trip was planned from'),
dismissed: z.boolean().optional().describe('True waves a trip-derived suggestion away: it leaves the journey without being deleted, so the trip sync does not offer it again. restore_journey_suggestions brings every dismissed one back'),
+ is_draft: z.boolean().optional().describe('True turns the entry into a draft that the journey share link leaves out; false publishes it'),
},
annotations: TOOL_ANNOTATIONS_WRITE,
when: journeyAddonOn,
@@ -402,7 +404,7 @@ export class JourneyMcp {
location_lng?: number | null; mood?: string | null; weather?: string | null;
tags?: string[] | null; pros_cons?: { pros: string[]; cons: string[] } | null;
visibility?: EntryVisibility; type?: EntryType; sort_order?: number; stats_excluded?: boolean;
- dismissed?: boolean;
+ dismissed?: boolean; is_draft?: boolean;
},
ctx: McpContext,
) {
@@ -446,6 +448,25 @@ export class JourneyMcp {
return ok({ success: true });
}
+ @Tool({
+ name: 'reorder_journey_entry_photos',
+ description: 'Put the photos of one journey entry in a new order. Pass every photo id the entry holds (the journey photo ids list_journey_entries returns), each once, first photo first. The first one is the entry cover.',
+ inputSchema: {
+ entryId: z.number().int().positive(),
+ orderedIds: z.array(z.number().int().positive()).min(1).max(500),
+ },
+ annotations: TOOL_ANNOTATIONS_WRITE,
+ when: journeyAddonOn,
+ access: { group: 'journey', mode: 'write' },
+ })
+ reorderJourneyEntryPhotos({ entryId, orderedIds }: { entryId: number; orderedIds: number[] }, ctx: McpContext) {
+ if (this.auth.isDemoUser(ctx.userId)) return demoDenied();
+ if (!this.journey.reorderEntryPhotos(entryId, ctx.userId, orderedIds, undefined)) {
+ return notFound('Entry not found, access denied, or the ids are not exactly the photos of this entry.');
+ }
+ return ok({ success: true });
+ }
+
@Tool({
name: 'add_journey_contributor',
description: 'Add a contributor to a journey. Owner only.',
diff --git a/server/src/nest/journey/journey.service.ts b/server/src/nest/journey/journey.service.ts
index 4c2f64b6b..e54f16685 100644
--- a/server/src/nest/journey/journey.service.ts
+++ b/server/src/nest/journey/journey.service.ts
@@ -60,6 +60,7 @@ export class JourneyService {
updateEntry(entryId: number, userId: number, data: Parameters<typeof this.journey.updateEntry>[2], sid?: string) { return this.journey.updateEntry(entryId, userId, data, sid); }
deleteEntry(entryId: number, userId: number, sid?: string) { return this.journey.deleteEntry(entryId, userId, sid); }
reorderEntries(id: number, userId: number, orderedIds: number[], sid?: string) { return this.journey.reorderEntries(id, userId, orderedIds, sid); }
+ reorderEntryPhotos(entryId: number, userId: number, orderedIds: number[], sid?: string) { return this.journey.reorderEntryPhotos(entryId, userId, orderedIds, sid); }
// Photos
addPhoto(entryId: number, userId: number, filePath: string, thumbnailPath: string | undefined, caption: string | undefined, media?: { mediaType?: string; durationMs?: number | null }) { return this.journey.addPhoto(entryId, userId, filePath, thumbnailPath, caption, media); }
diff --git a/server/src/nest/maps/maps-nearby.helpers.ts b/server/src/nest/maps/maps-nearby.helpers.ts
new file mode 100644
index 000000000..4a15c2b4a
--- /dev/null
+++ b/server/src/nest/maps/maps-nearby.helpers.ts
@@ -0,0 +1,100 @@
+import { normalizePlaceWebsite } from '@trek/shared';
+import { haversineMetres, OVERPASS_QUERY_TIMEOUT_S } from './maps.helpers';
+
+/** What "near" means when the caller does not say: a short walk. */
+export const NEARBY_DEFAULT_RADIUS_M = 500;
+/** Google's own ceiling for one nearby answer, and the most a picker lists. */
+export const NEARBY_DEFAULT_LIMIT = 20;
+
+/** The OSM keys a place worth visiting is tagged with. Street furniture is not among them. */
+const NEARBY_OSM_KEYS = 'amenity|tourism|shop|leisure|historic';
+
+export interface NearbyOsmElement {
+ type: string;
+ id: number;
+ lat?: number;
+ lon?: number;
+ center?: { lat: number; lon: number };
+ tags?: Record<string, string>;
+}
+
+/**
+ * Named places of any kind around a point (#976). Without a category the answer
+ * can be large in a city centre, so the circle is the caller's and the row count
+ * is capped at a few times the limit: enough to sort by distance, not the square
+ * kilometre.
+ */
+export function nearbyOverpassQuery(lat: number, lng: number, radius: number, limit: number): string {
+ const around = `(around:${Math.round(radius)},${lat},${lng})`;
+ return `[out:json][timeout:${OVERPASS_QUERY_TIMEOUT_S}];\nnwr${around}[name][~"^(${NEARBY_OSM_KEYS})$"~"."];\nout center tags ${limit * 3};`;
+}
+
+/** The OSM kind of a place, as `category` in the other search answers: a shop reads `shop_<type>`. */
+function osmKind(tags: Record<string, string>): string | null {
+ for (const key of NEARBY_OSM_KEYS.split('|')) {
+ const value = tags[key];
+ if (!value || value === 'yes') continue;
+ return key === 'shop' ? `shop_${value}` : value;
+ }
+ return null;
+}
+
+/** Overpass elements as the place records a search answers with, nearest first. */
+export function overpassNearbyRecords(
+ elements: NearbyOsmElement[],
+ origin: { lat: number; lng: number },
+ lang: string,
+ limit: number,
+): Record<string, unknown>[] {
+ const out: Record<string, unknown>[] = [];
+ for (const el of elements) {
+ const tags = el.tags || {};
+ const name = tags[`name:${lang}`] || tags.int_name || tags.name;
+ const lat = el.lat ?? el.center?.lat;
+ const lng = el.lon ?? el.center?.lon;
+ if (!name || lat == null || lng == null) continue;
+ // Shut for good is not somewhere to go, the same rule the POI search keeps.
+ if (tags.disused === 'yes' || tags.abandoned === 'yes') continue;
+ const address = [tags['addr:street'], tags['addr:housenumber'], tags['addr:postcode'], tags['addr:city']]
+ .filter(Boolean)
+ .join(' ');
+ out.push({
+ google_place_id: null,
+ osm_id: `${el.type}:${el.id}`,
+ name,
+ address,
+ lat,
+ lng,
+ rating: null,
+ website: normalizePlaceWebsite(tags.website) ?? normalizePlaceWebsite(tags['contact:website']),
+ phone: tags.phone || tags['contact:phone'] || null,
+ category: osmKind(tags),
+ source: 'openstreetmap',
+ });
+ }
+ return nearestFirst(out, origin, limit);
+}
+
+/**
+ * Stamps each record with its distance from the point and keeps the nearest.
+ * Every source goes through here, so the answer reads the same whoever gave it.
+ */
+export function nearestFirst(
+ records: Record<string, unknown>[],
+ origin: { lat: number; lng: number },
+ limit: number,
+): Record<string, unknown>[] {
+ return records
+ .filter(r => typeof r.lat === 'number' && typeof r.lng === 'number')
+ .map(r => ({ ...r, distance_m: Math.round(haversineMetres(origin.lat, origin.lng, r.lat as number, r.lng as number)) }))
+ .sort((a, b) => a.distance_m - b.distance_m)
+ .slice(0, limit);
+}
+
+/**
+ * The cache key for one nearby question. Rounded to about ten metres, so the same
+ * photo location asked twice (an import of a whole album) costs one lookup.
+ */
+export function nearbyCacheKey(lat: number, lng: number, radius: number, limit: number, lang: string): string {
+ return `${lat.toFixed(4)},${lng.toFixed(4)}|${radius}|${limit}|${lang}`;
+}
diff --git a/server/src/nest/maps/maps.controller.ts b/server/src/nest/maps/maps.controller.ts
index 3e3d55f07..011800af6 100644
--- a/server/src/nest/maps/maps.controller.ts
+++ b/server/src/nest/maps/maps.controller.ts
@@ -27,7 +27,7 @@ import { StorageService } from '../storage/storage.service';
import { isClientAbortError } from '../storage/storage.types';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
import { CurrentUser } from '../auth/current-user.decorator';
-import { MapsSearchDto, MapsAutocompleteDto, MapsResolveUrlDto } from './maps.dto';
+import { MapsSearchDto, MapsNearbyDto, MapsAutocompleteDto, MapsResolveUrlDto } from './maps.dto';
/** Google's session-token shape: URL-safe ASCII, at most 36 characters. The
* autocomplete body is validated by the Zod pipe; the details query is not,
@@ -83,6 +83,21 @@ export class MapsController {
}
}
+ // Places of any kind around a point, nearest first (#976).
+ @Post('nearby')
+ @HttpCode(200)
+ async nearby(
+ @CurrentUser() user: User,
+ @Body() body: MapsNearbyDto,
+ @Query('lang') lang?: string,
+ ): Promise<MapsSearchResult> {
+ try {
+ return await this.maps.nearbyPlaces(user.id, body.lat, body.lng, { radius: body.radius, limit: body.limit, lang });
+ } catch (err: unknown) {
+ throw toHttpException(err, 'Nearby search error', 500);
+ }
+ }
+
// OSM-only POI explore: places of a category within the current map viewport.
@Get('pois')
async pois(
diff --git a/server/src/nest/maps/maps.dto.ts b/server/src/nest/maps/maps.dto.ts
index bcfc88bb3..0e363cf6b 100644
--- a/server/src/nest/maps/maps.dto.ts
+++ b/server/src/nest/maps/maps.dto.ts
@@ -1,6 +1,7 @@
import { createZodDto } from 'nestjs-zod';
import {
mapsSearchRequestSchema,
+ mapsNearbyRequestSchema,
mapsAutocompleteRequestSchema,
mapsResolveUrlRequestSchema,
} from '@trek/shared';
@@ -12,5 +13,6 @@ import {
* shared/ remain the single source of truth for the wire contract.
*/
export class MapsSearchDto extends createZodDto(mapsSearchRequestSchema) {}
+export class MapsNearbyDto extends createZodDto(mapsNearbyRequestSchema) {}
export class MapsAutocompleteDto extends createZodDto(mapsAutocompleteRequestSchema) {}
export class MapsResolveUrlDto extends createZodDto(mapsResolveUrlRequestSchema) {}
diff --git a/server/src/nest/maps/maps.mcp.ts b/server/src/nest/maps/maps.mcp.ts
index a242c12fd..d79fa4547 100644
--- a/server/src/nest/maps/maps.mcp.ts
+++ b/server/src/nest/maps/maps.mcp.ts
@@ -82,6 +82,31 @@ export class MapsMcp {
return ok(result);
}
+ /** The MCP side of POST /api/maps/nearby (#976), with the same caps. */
+ @Tool({
+ name: 'search_nearby_places',
+ description: 'List named places of any kind around a coordinate, nearest first, each with its distance in metres (`distance_m`). No category and no name needed: use it for "what is at this spot", e.g. where a photo was taken. Answers from the TREK place index first, from Google Places only when the instance has a key and the index found nothing, and from OpenStreetMap otherwise; `source` says which. Prefer search_pois for one kind of place across a whole area, and search_place when the user named the place.',
+ inputSchema: {
+ lat: z.number().min(-90).max(90),
+ lng: z.number().min(-180).max(180),
+ radius: z.number().int().min(50).max(5000).optional().describe('Search radius in metres, 500 when left out'),
+ limit: z.number().int().min(1).max(20).optional().describe('How many places, 20 when left out'),
+ lang: z.string().max(35).optional().describe('Language for the place names, e.g. "de" or "ja"'),
+ },
+ annotations: TOOL_ANNOTATIONS_READONLY,
+ access: { group: 'geo', mode: 'read' },
+ })
+ async searchNearbyPlaces(
+ { lat, lng, radius, limit, lang }: { lat: number; lng: number; radius?: number; limit?: number; lang?: string },
+ ctx: McpContext,
+ ) {
+ try {
+ return ok(await this.maps.nearbyPlaces(ctx.userId, lat, lng, { radius, limit, lang }));
+ } catch {
+ return errorResult('Nearby search failed.');
+ }
+ }
+
/**
* The MCP side of GET /api/maps/pois, the "explore" pill on the trip map. Not
* part of the 1:1 move above: the route had no tool at all, which left the
diff --git a/server/src/nest/maps/maps.service.ts b/server/src/nest/maps/maps.service.ts
index 28b833bd1..5f9c77de8 100644
--- a/server/src/nest/maps/maps.service.ts
+++ b/server/src/nest/maps/maps.service.ts
@@ -64,6 +64,14 @@ import {
type GoogleOpeningHours,
type OverpassPoi,
} from './maps.helpers';
+import {
+ NEARBY_DEFAULT_LIMIT,
+ NEARBY_DEFAULT_RADIUS_M,
+ nearbyCacheKey,
+ nearbyOverpassQuery,
+ nearestFirst,
+ overpassNearbyRecords,
+} from './maps-nearby.helpers';
// ── Google API call counter ───────────────────────────────────────────────────
@@ -125,9 +133,17 @@ function googleFetch(rawEndpoint: string, label: string, init?: RequestInit): Pr
// ── Interfaces ───────────────────────────────────────────────────────────────
+function nominatimCategory(item: { class?: string; type?: string }): string | null {
+ if (!item.class || !item.type || item.type === 'yes') return null;
+ return item.class === 'shop' ? `shop_${item.type}` : item.type;
+}
+
interface NominatimResult {
osm_type: string;
osm_id: string;
+ /** The main OSM tag, key and value: `class` "tourism" with `type` "hotel". */
+ class?: string;
+ type?: string;
name?: string;
display_name?: string;
lat: string;
@@ -345,6 +361,27 @@ interface GooglePlaceResult {
googleMapsUri?: string;
}
+/** A Google place as the record every search answers with. */
+function googlePlaceRecord(p: GooglePlaceResult): Record<string, unknown> {
+ return {
+ google_place_id: p.id,
+ google_ftid: googleFtidFromMapsUrl(p.googleMapsUri),
+ name: p.displayName?.text || '',
+ address: p.formattedAddress || '',
+ // `?? null`, not `|| null`: 0 is a real coordinate (equator / prime meridian).
+ lat: p.location?.latitude ?? null,
+ lng: p.location?.longitude ?? null,
+ rating: p.rating || null,
+ website: normalizePlaceWebsite(p.websiteUri),
+ phone: p.nationalPhoneNumber || null,
+ types: p.types || [],
+ source: 'google',
+ };
+}
+
+/** A place that has shut down for good is never the answer to "where should we go" (#1341). */
+const isOpenGooglePlace = (p: GooglePlaceResult) => p.businessStatus !== 'CLOSED_PERMANENTLY';
+
interface GoogleAutocompleteSuggestion {
placePrediction?: {
placeId: string;
@@ -587,6 +624,12 @@ const POI_CACHE_MAX = 500;
* nobody reads and every mirror pays for.
*/
const POI_RESULT_CAP = 240;
+// Places near a point (#976): cached longer than the POI boxes, because the
+// likely caller is an import asking the same photo location again, and Google
+// bills every one of those.
+const NEARBY_CACHE = new Map<string, { at: number; value: { places: Record<string, unknown>[]; source: string } }>();
+const NEARBY_CACHE_TTL_MS = 30 * 60 * 1000;
+const NEARBY_CACHE_MAX = 500;
// POST the query to all mirrors at once and return the first one that answers with
// valid JSON. Throws {status:502} only if every mirror fails. Racing (rather than
@@ -1116,6 +1159,18 @@ export class MapsService {
return row?.value === 'true';
}
+ /**
+ * Whether Amap answers before the index and OpenStreetMap (#1636): only when
+ * the admin picked Amap outright, not when it holds the slot by default, and
+ * only for a search centred inside China. Outside it Amap still answers, with
+ * the wrong place (the Eiffel Tower lands in Macau), so the gate is the point,
+ * not the provider.
+ */
+ private amapAnswersFirst(point?: { lat: number; lng: number }): boolean {
+ if (!point || !Number.isFinite(point.lat) || !Number.isFinite(point.lng)) return false;
+ return this.placesProviderChoice() === 'amap' && !isOutsideChina(point.lat, point.lng);
+ }
+
/** The Amap provider, when Amap holds the keyed slot; null otherwise. */
resolvePlacesProvider(userId: number): AmapPlacesProvider | null {
const keyed = this.keyedProvider(userId);
@@ -1235,6 +1290,9 @@ export class MapsService {
rating: null,
website: null,
phone: null,
+ // What the place is, so the add form can preselect a category (#2282). A shop's
+ // value is the ware ("bakery"), so the key goes first and says it is a shop.
+ category: nominatimCategory(item),
source: 'openstreetmap',
...readWikiIdentity(item.extratags),
};
@@ -2088,6 +2146,19 @@ export class MapsService {
// the same question twice. `null` means it never ran.
let osmAnswer: Record<string, unknown>[] | null = null;
+ // Amap first where the admin picked it and the search is about China (#1636):
+ // there the index and OpenStreetMap are thin and Amap is the map people use.
+ // Its answer is kept, so the Amap slot further down never pays for the same
+ // question twice. A failure drops through to the usual order.
+ let amapAnswer: Record<string, unknown>[] | null = null;
+ if (keyed?.id === 'amap' && this.amapAnswersFirst(locationBias)) {
+ amapAnswer = await keyed.provider.searchText(query, lang, locationBias).catch((err: unknown) => {
+ console.warn('Amap search failed, falling back:', (err as Error).message);
+ return null;
+ });
+ if (amapAnswer && amapAnswer.length > 0) return { places: amapAnswer, source: 'amap' };
+ }
+
// A search sent to Google on purpose, or the admin's "Google only" switch,
// skips the pair the same way: the search then reads exactly as it did
// before 4.3.0 on an install with a key.
@@ -2139,7 +2210,7 @@ export class MapsService {
// Amap in the slot Google otherwise holds: asked only once the index and
// OpenStreetMap came back empty, exactly like the Google call below.
if (keyed?.id === 'amap') {
- const places = await keyed.provider.searchText(query, lang, locationBias);
+ const places = amapAnswer ?? (await keyed.provider.searchText(query, lang, locationBias));
return { places, source: 'amap' };
}
@@ -2193,26 +2264,84 @@ export class MapsService {
// go" (#1341). Temporarily closed stays: a restaurant on holiday next month is
// still worth planning around. Anything without the field is a non-business
// result (a park, a viewpoint) and is kept.
- const places = (data.places || [])
- .filter((p: GooglePlaceResult) => p.businessStatus !== 'CLOSED_PERMANENTLY')
- .map((p: GooglePlaceResult) => ({
- google_place_id: p.id,
- google_ftid: googleFtidFromMapsUrl(p.googleMapsUri),
- name: p.displayName?.text || '',
- address: p.formattedAddress || '',
- // `?? null`, not `|| null`: 0 is a real coordinate (equator / prime meridian).
- lat: p.location?.latitude ?? null,
- lng: p.location?.longitude ?? null,
- rating: p.rating || null,
- website: normalizePlaceWebsite(p.websiteUri),
- phone: p.nationalPhoneNumber || null,
- types: p.types || [],
- source: 'google',
- }));
+ const places = (data.places || []).filter(isOpenGooglePlace).map(googlePlaceRecord);
return { places, source: 'google' };
}
+ // ── Places near a point (#976) ─────────────────────────────────────────────
+
+ /**
+ * Places of any kind around a coordinate, nearest first, in the shape a search
+ * answers with plus `distance_m`. For "what is here" where no name was typed:
+ * a photo's location, a pin on the map.
+ *
+ * Same order as the search: the TREK index first, free and storable; Google
+ * only with a key and only when the index has nothing (or the admin set Google
+ * only); OpenStreetMap otherwise. Google bills per call, so every answer is
+ * cached for a while and the circle and count are capped by the contract.
+ */
+ async nearbyPlaces(
+ userId: number,
+ lat: number,
+ lng: number,
+ opts: { radius?: number; limit?: number; lang?: string } = {},
+ ): Promise<{ places: Record<string, unknown>[]; source: string }> {
+ const radius = opts.radius ?? NEARBY_DEFAULT_RADIUS_M;
+ const limit = opts.limit ?? NEARBY_DEFAULT_LIMIT;
+ const lang = toApiLang(opts.lang);
+ const key = nearbyCacheKey(lat, lng, radius, limit, lang);
+ const cached = NEARBY_CACHE.get(key);
+ if (cached && Date.now() - cached.at < NEARBY_CACHE_TTL_MS) return cached.value;
+
+ const value = await this.lookUpNearby(userId, { lat, lng }, radius, limit, lang);
+ if (NEARBY_CACHE.size >= NEARBY_CACHE_MAX) NEARBY_CACHE.delete(NEARBY_CACHE.keys().next().value as string);
+ NEARBY_CACHE.set(key, { at: Date.now(), value });
+ return value;
+ }
+
+ private async lookUpNearby(
+ userId: number,
+ origin: { lat: number; lng: number },
+ radius: number,
+ limit: number,
+ lang: string,
+ ): Promise<{ places: Record<string, unknown>[]; source: string }> {
+ const keyed = this.keyedProvider(userId);
+ if (this.trekPlacesEnabled() && !this.googleOnly(keyed)) {
+ // Never throws upward, like the search: a slow index drops to the next source.
+ const found = await trekPlacesNearby(origin.lat, origin.lng, { radius, limit }).catch((err: unknown) => {
+ console.warn('TREK Places nearby failed, falling back:', (err as Error).message);
+ return [];
+ });
+ if (found.length > 0) return { places: nearestFirst(found.map(toPlaceRecord), origin, limit), source: 'trek-places' };
+ }
+
+ if (keyed?.id === 'google') {
+ const response = await googleFetch('https://places.googleapis.com/v1/places:searchNearby', 'searchNearby', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': keyed.key, 'X-Goog-FieldMask': SEARCH_TEXT_FIELD_MASK },
+ body: JSON.stringify({
+ maxResultCount: limit,
+ rankPreference: 'DISTANCE',
+ languageCode: lang,
+ locationRestriction: { circle: { center: { latitude: origin.lat, longitude: origin.lng }, radius } },
+ }),
+ });
+ const data = (await response.json()) as { places?: GooglePlaceResult[]; error?: { message?: string } };
+ if (!response.ok) {
+ logKeyFailure('searchNearby', response.status, userId, keyed.source);
+ throw Object.assign(new Error(data.error?.message || 'Google Places API error'), { status: response.status });
+ }
+ const places = (data.places || []).filter(isOpenGooglePlace).map(googlePlaceRecord);
+ return { places: nearestFirst(places, origin, limit), source: 'google' };
+ }
+
+ const osmLang = lang.split('-')[0].toLowerCase();
+ const elements = await overpassFetch(nearbyOverpassQuery(origin.lat, origin.lng, radius, limit));
+ return { places: overpassNearbyRecords(elements, origin, osmLang, limit), source: 'openstreetmap' };
+ }
+
// ── Autocomplete (Google or Nominatim fallback) ────────────────────────────
async autocompletePlaces(
@@ -2233,6 +2362,19 @@ export class MapsService {
// Same contract as search: never throws upward, falls through to what this
// method did before. The admin's "Google only" switch skips the index here
// too, so the suggestions and the search agree on where they come from.
+ // Amap first inside China when the admin picked it, as in the search (#1636).
+ let amapTips: MapsAutocompleteResult['suggestions'] | null = null;
+ const boxCentre = locationBias
+ ? { lat: (locationBias.low.lat + locationBias.high.lat) / 2, lng: (locationBias.low.lng + locationBias.high.lng) / 2 }
+ : undefined;
+ if (keyed?.id === 'amap' && this.amapAnswersFirst(boxCentre)) {
+ amapTips = await keyed.provider.autocomplete(input, lang, locationBias).catch((err: unknown) => {
+ console.warn('Amap autocomplete failed, falling back:', (err as Error).message);
+ return null;
+ });
+ if (amapTips && amapTips.length > 0) return { suggestions: amapTips, source: 'amap' };
+ }
+
if (this.trekPlacesEnabled() && !this.googleOnly(keyed)) {
try {
const centre = locationBias
@@ -2303,7 +2445,7 @@ export class MapsService {
}
if (keyed?.id === 'amap') {
- const suggestions = await keyed.provider.autocomplete(input, lang, locationBias);
+ const suggestions = amapTips ?? (await keyed.provider.autocomplete(input, lang, locationBias));
return { suggestions, source: 'amap' };
}
diff --git a/server/src/nest/packing/packing.controller.ts b/server/src/nest/packing/packing.controller.ts
index fd9485c5c..653a4a863 100644
--- a/server/src/nest/packing/packing.controller.ts
+++ b/server/src/nest/packing/packing.controller.ts
@@ -134,11 +134,11 @@ export class PackingController {
// Privacy state before the change, so a public↔private toggle (#858) can route
// the broadcast correctly instead of leaking a freshly-privatized item.
const before = this.packing.getItemPrivacy(tripId, id);
- const { name, checked, category, weight_grams, bag_id, quantity, is_private } = body;
+ const { name, checked, category, weight_grams, bag_id, quantity, packed_quantity, is_private } = body;
// bodyKeys carries which keys the request actually provided (the presence-
// sentinel protocol); the parsed body only ever holds known schema keys.
// checked arrives as boolean or legacy 0/1 — normalize to the 0/1 the SQL binds.
- const updated = this.packing.updateItem(tripId, id, { name, checked: checked === undefined ? undefined : checked ? 1 : 0, category, weight_grams, bag_id, quantity, is_private }, Object.keys(body), ifMatch, user.id);
+ const updated = this.packing.updateItem(tripId, id, { name, checked: checked === undefined ? undefined : checked ? 1 : 0, category, weight_grams, bag_id, quantity, packed_quantity, is_private }, Object.keys(body), ifMatch, user.id);
if (!updated) {
throw new HttpException({ error: 'Item not found' }, 404);
}
diff --git a/server/src/nest/packing/packing.mcp.ts b/server/src/nest/packing/packing.mcp.ts
index f4e04031d..cb2056b3c 100644
--- a/server/src/nest/packing/packing.mcp.ts
+++ b/server/src/nest/packing/packing.mcp.ts
@@ -155,7 +155,7 @@ export class PackingMcp {
@Tool({
name: 'update_packing_item',
- description: 'Change a packing item: rename it, recategorise it, move it into a bag, set how many are needed, record its weight, or flip it between the common list and your own. Ticking it off is toggle_packing_item; choosing who a private item is shared with is set_packing_item_sharing.',
+ description: 'Change a packing item: rename it, recategorise it, move it into a bag, set how many are needed, count how many are already packed, record its weight, or flip it between the common list and your own. Ticking it off is toggle_packing_item; choosing who a private item is shared with is set_packing_item_sharing.',
inputSchema: {
tripId: z.number().int().positive(),
itemId: z.number().int().positive(),
@@ -163,6 +163,7 @@ export class PackingMcp {
category: z.string().max(100).optional(),
bag_id: packingUpdateItemRequestSchema.shape.bag_id.describe('Bag to pack the item into (ids come from list_packing_bags); null takes it out of its bag'),
quantity: packingUpdateItemRequestSchema.shape.quantity.describe('How many to pack, clamped to 1-999'),
+ packed_quantity: packingUpdateItemRequestSchema.shape.packed_quantity.describe('How many of the quantity are already packed; reaching the quantity ticks the item off, 0 or null clears the count'),
weight_grams: packingUpdateItemRequestSchema.shape.weight_grams.describe('Weight in grams, which feeds the bag fill bar; null clears it'),
is_private: packingUpdateItemRequestSchema.shape.is_private.describe('true takes the item off the common list and onto the caller\'s own'),
},
@@ -171,13 +172,13 @@ export class PackingMcp {
access: { group: 'packing', mode: 'write' },
})
async updatePackingItem(
- { tripId, itemId, name, category, bag_id, quantity, weight_grams, is_private }: { tripId: number; itemId: number; name?: string; category?: string; bag_id?: number | null; quantity?: number; weight_grams?: number | null; is_private?: boolean },
+ { tripId, itemId, name, category, bag_id, quantity, packed_quantity, weight_grams, is_private }: { tripId: number; itemId: number; name?: string; category?: string; bag_id?: number | null; quantity?: number; packed_quantity?: number | null; weight_grams?: number | null; is_private?: boolean },
ctx: McpContext,
) {
if (this.auth.isDemoUser(ctx.userId)) return demoDenied();
if (!this.packing.verifyTripAccess(tripId, ctx.userId)) return noAccess();
if (!this.guards.hasTripPermission('packing_edit', tripId, ctx.userId)) return permissionDenied();
- const fields = { name, category, bag_id, quantity, weight_grams, is_private };
+ const fields = { name, category, bag_id, quantity, packed_quantity, weight_grams, is_private };
// The service reads presence from bodyKeys, so a field has to be named there
// for an explicit null to clear it rather than read as "leave it alone".
const bodyKeys = Object.keys(fields).filter(k => fields[k as keyof typeof fields] !== undefined);
diff --git a/server/src/nest/packing/packing.service.ts b/server/src/nest/packing/packing.service.ts
index 0d2616b33..b775ed77e 100644
--- a/server/src/nest/packing/packing.service.ts
+++ b/server/src/nest/packing/packing.service.ts
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common';
-import type { TrekWsPayload, TrekWsTripEventName } from '@trek/shared';
+import { resolvePackedState, type TrekWsPayload, type TrekWsTripEventName } from '@trek/shared';
import { RealtimeService } from '../realtime/realtime.service';
import { PermissionsService } from '../permissions/permissions.service';
import { avatarUrl } from '../common/avatarUrl';
@@ -276,7 +276,7 @@ export class PackingService {
updateItem(
tripId: string | number,
id: string | number,
- data: { name?: string; checked?: number; category?: string; weight_grams?: number | null; bag_id?: number | null; quantity?: number; is_private?: boolean },
+ data: { name?: string; checked?: number; category?: string; weight_grams?: number | null; bag_id?: number | null; quantity?: number; packed_quantity?: number | null; is_private?: boolean },
bodyKeys: string[],
ifMatch?: string,
actingUserId?: number,
@@ -302,29 +302,37 @@ export class PackingService {
// the visibility filter still has someone to match (#858).
const claimOwner = bodyKeys.includes('is_private') && !!data.is_private && item.owner_id == null && actingUserId != null;
+ // The box and the packed count (#2296) are settled together, so a count
+ // that reaches the quantity ticks the item and a tick clears the count.
+ const quantity = bodyKeys.includes('quantity') ? Math.max(1, Math.min(999, Number(data.quantity) || 1)) : (item.quantity || 1);
+ const packed = resolvePackedState(
+ { checked: item.checked ? 1 : 0, packed_quantity: item.packed_quantity ?? null },
+ { bodyKeys, checked: data.checked, packed_quantity: data.packed_quantity, quantity },
+ );
+
this.db.run(`
UPDATE packing_items SET
name = COALESCE(?, name),
- checked = CASE WHEN ? IS NOT NULL THEN ? ELSE checked END,
+ checked = ?,
+ packed_quantity = ?,
category = COALESCE(?, category),
weight_grams = CASE WHEN ? THEN ? ELSE weight_grams END,
bag_id = CASE WHEN ? THEN ? ELSE bag_id END,
- quantity = CASE WHEN ? THEN ? ELSE quantity END,
+ quantity = ?,
is_private = CASE WHEN ? THEN ? ELSE is_private END,
owner_id = CASE WHEN ? THEN ? ELSE owner_id END,
updated_at = CURRENT_TIMESTAMP
WHERE id = ?
`,
data.name || null,
- data.checked !== undefined ? 1 : null,
- data.checked ? 1 : 0,
+ packed.checked,
+ packed.packed_quantity,
data.category || null,
bodyKeys.includes('weight_grams') ? 1 : 0,
data.weight_grams ?? null,
bodyKeys.includes('bag_id') ? 1 : 0,
data.bag_id ?? null,
- bodyKeys.includes('quantity') ? 1 : 0,
- Math.max(1, Math.min(999, Number(data.quantity) || 1)),
+ quantity,
bodyKeys.includes('is_private') ? 1 : 0,
data.is_private ? 1 : 0,
claimOwner ? 1 : 0,
@@ -361,7 +369,7 @@ export class PackingService {
*/
private getItemInTrip(tripId: string | number, id: string | number, actorId: number | undefined) {
if (actorId == null) return undefined;
- return this.db.get<{ id: number; owner_id: number | null; is_private: number; name: string; category: string | null; quantity: number; weight_grams: number | null; bag_id: number | null; updated_at?: string | null }>(
+ return this.db.get<{ id: number; owner_id: number | null; is_private: number; name: string; category: string | null; checked: number; quantity: number; packed_quantity?: number | null; weight_grams: number | null; bag_id: number | null; updated_at?: string | null }>(
`SELECT * FROM packing_items WHERE id = ? AND trip_id = ? AND ${PackingService.VISIBLE_TO_ACTOR}`,
id, tripId, actorId, actorId,
);
diff --git a/server/src/nest/places/places.controller.ts b/server/src/nest/places/places.controller.ts
index 45492e9be..813c58f48 100644
--- a/server/src/nest/places/places.controller.ts
+++ b/server/src/nest/places/places.controller.ts
@@ -41,6 +41,7 @@ import {
PlaceImportListDto,
PlaceImportMapDto,
PlaceRatingDto,
+ PlaceImageFromFileDto,
PlaceUpdateDto,
} from './places.dto';
@@ -193,6 +194,7 @@ export class PlacesController {
for (const place of result.places) {
this.places.broadcast(tripId, 'place:created', { place }, socketId);
}
+ if (parseBool(body.enrich, false)) this.places.enrichImportedFilePlaces(tripId, user.id, result.places);
return { places: result.places, count: result.count, skipped: result.skipped };
}
@@ -251,6 +253,7 @@ export class PlacesController {
for (const place of result.places) {
this.places.broadcast(tripId, 'place:created', { place }, socketId);
}
+ if (parseBool(body.enrich, false)) this.places.enrichImportedFilePlaces(tripId, user.id, result.places);
return result;
} catch (err: unknown) {
if (err instanceof HttpException) throw err;
@@ -418,6 +421,29 @@ export class PlacesController {
return { place };
}
+ @Put(':id/image/from-file')
+ async imageFromFile(
+ @CurrentUser() user: User,
+ @Param('tripId') tripId: string,
+ @Param('id') id: string,
+ @Body() body: PlaceImageFromFileDto,
+ @Headers('x-socket-id') socketId?: string,
+ ) {
+ const trip = this.requireTrip(tripId, user);
+ this.requireEdit(trip, user);
+ if (isDemoWriteBlocked(this.env, user.email)) {
+ throw new HttpException(DEMO_WRITE_ERROR, 403);
+ }
+ const result = await this.places.setImageFromFile(tripId, id, body.file_id);
+ if (result === 'not_found') throw new HttpException({ error: 'File not found' }, 404);
+ if (result === 'not_image') throw new HttpException({ error: 'Only jpg, png, gif, webp images allowed' }, 400);
+ if (result === 'too_large') throw new HttpException({ error: 'Image too large' }, 400);
+ if (!result || isUpdateConflict(result)) throw new HttpException({ error: 'Place not found' }, 404);
+ this.places.broadcast(tripId, 'place:updated', { place: result }, socketId);
+ this.places.onUpdated(result.id);
+ return { place: result };
+ }
+
@Put(':id/rating')
rate(
@CurrentUser() user: User,
diff --git a/server/src/nest/places/places.dto.ts b/server/src/nest/places/places.dto.ts
index 3f78b7aef..f3d4d1fc1 100644
--- a/server/src/nest/places/places.dto.ts
+++ b/server/src/nest/places/places.dto.ts
@@ -9,6 +9,7 @@ import {
placeExportGpxRequestSchema,
placeRatingRequestSchema,
placeUpdateRequestSchema,
+ placeImageFromFileRequestSchema,
} from '@trek/shared';
/**
@@ -28,6 +29,7 @@ import {
export class PlaceCreateDto extends createZodDto(placeCreateRequestSchema) {}
export class PlaceUpdateDto extends createZodDto(placeUpdateRequestSchema) {}
export class PlaceRatingDto extends createZodDto(placeRatingRequestSchema) {}
+export class PlaceImageFromFileDto extends createZodDto(placeImageFromFileRequestSchema) {}
export class PlaceBulkDeleteDto extends createZodDto(placeBulkDeleteRequestSchema) {}
export class PlaceBulkUpdateDto extends createZodDto(placeBulkUpdateRequestSchema) {}
export class PlaceImportListDto extends createZodDto(placeImportListRequestSchema) {}
diff --git a/server/src/nest/places/places.mcp.ts b/server/src/nest/places/places.mcp.ts
index e28c0cd6c..da83c9da3 100644
--- a/server/src/nest/places/places.mcp.ts
+++ b/server/src/nest/places/places.mcp.ts
@@ -23,6 +23,7 @@ import { noAccess, permissionDenied } from '../../mcp/tools/_shared';
import { DatabaseService } from '../database/database.service';
import { MapsService } from '../maps/maps.service';
import { PlacesService } from './places.service';
+import { isUpdateConflict } from '../common/conflictResult';
import { isDirectionsUrl } from './maps-dir.helpers';
function parseId(value: string | string[]): number | null {
@@ -211,6 +212,33 @@ export class PlacesMcp {
return ok({ place });
}
+ @Tool({
+ name: 'set_place_image_from_file',
+ description: 'Use a picture already attached in the trip (a jpg, png, gif or webp from list_files) as the image of the place. The file is copied, so deleting the attachment later keeps the image.',
+ inputSchema: {
+ tripId: z.number().int().positive(),
+ placeId: z.number().int().positive(),
+ fileId: z.number().int().positive().describe('Id of a trip file that is an image'),
+ },
+ annotations: TOOL_ANNOTATIONS_WRITE,
+ access: { group: 'places', mode: 'write' },
+ })
+ async setPlaceImageFromFile(
+ { tripId, placeId, fileId }: { tripId: number; placeId: number; fileId: number },
+ ctx: McpContext,
+ ) {
+ if (this.auth.isDemoUser(ctx.userId)) return demoDenied();
+ if (!this.db.canAccessTrip(tripId, ctx.userId)) return noAccess();
+ if (!this.guards.hasTripPermission('place_edit', tripId, ctx.userId)) return permissionDenied();
+ const result = await this.places.setImageFromFile(String(tripId), String(placeId), fileId);
+ if (result === 'not_found') return errorResult('File not found.');
+ if (result === 'not_image') return errorResult('That file is not a jpg, png, gif or webp image.');
+ if (result === 'too_large') return errorResult('That image is too large.');
+ if (!result || isUpdateConflict(result)) return errorResult('Place not found.');
+ this.guards.safeBroadcast(tripId, 'place:updated', { place: result });
+ return ok({ place: result });
+ }
+
@Tool({
name: 'rate_place',
description: "Set or clear the current user's 1-5 star rating on a trip place (#1435). Every trip member rates independently; the place shows the average. Omit rating (or pass null) to remove the user's vote. Use the ratings to capture the user's preferences and shape the itinerary around highly-rated places.",
@@ -380,6 +408,7 @@ export class PlacesMcp {
const imported = this.places.importGpx(String(input.tripId), Buffer.from(input.gpx, 'utf8'), { importWaypoints: input.importWaypoints, importRoutes: input.importRoutes, importTracks: input.importTracks, defaultName: input.name });
if (!imported) return errorResult('No matching places found in GPX.');
for (const place of imported.places) this.guards.safeBroadcast(input.tripId, 'place:created', { place });
+ if (input.enrich) this.places.enrichImportedFilePlaces(String(input.tripId), ctx.userId, imported.places);
return ok(imported);
} catch {
return errorResult('Could not import GPX. Check the XML and coordinates.');
diff --git a/server/src/nest/places/places.service.ts b/server/src/nest/places/places.service.ts
index 6bc360182..32dbe1fd6 100644
--- a/server/src/nest/places/places.service.ts
+++ b/server/src/nest/places/places.service.ts
@@ -1,4 +1,5 @@
import { Injectable } from '@nestjs/common';
+import { resolveCountryCodeSync } from '../atlas/atlas-geo';
import { XMLValidator } from 'fast-xml-parser';
import { TRACK_COLORS, placeMatchStrategies, type PlaceMatchCandidate } from '@trek/shared';
import type { TrekWsPayload, TrekWsTripEventName } from '@trek/shared';
@@ -25,7 +26,10 @@ import type { GpxExportDay, GpxExportOptions, GpxExportPlace } from './gpx-expor
import { UnsplashService } from '../unsplash/unsplash.service';
import { PlacePhotoCacheService } from '../place-photos/place-photo-cache.service';
import { type UpdateConflict, isUpdateConflict } from '../common/conflictResult';
-import { reclaimPlaceImage } from './place-image';
+import { placeImageUrl, reclaimPlaceImage } from './place-image';
+import { MAX_PLACE_IMAGE_SIZE, PLACE_IMAGE_EXTENSIONS } from '../common/place-image-upload';
+import { randomUUID } from 'node:crypto';
+import path from 'node:path';
import { JourneyDomainService } from '../journey/journey-domain.service';
import { StorageService } from '../storage/storage.service';
import { AccommodationsService } from '../accommodations/accommodations.service';
@@ -179,9 +183,11 @@ export class PlacesService {
filters: { search?: string; category?: string; tag?: string; assignment?: 'all' | 'unassigned' | 'assigned' },
) {
let query = `
- SELECT DISTINCT p.*, c.name as category_name, c.color as category_color, c.icon as category_icon
+ SELECT DISTINCT p.*, c.name as category_name, c.color as category_color, c.icon as category_icon,
+ pr.country_code as country_code, pr.region_name as region_name
FROM places p
LEFT JOIN categories c ON p.category_id = c.id
+ LEFT JOIN place_regions pr ON pr.place_id = p.id
WHERE p.trip_id = ?
`;
const params: (string | number)[] = [tripId];
@@ -222,6 +228,9 @@ export class PlacesService {
return places.map(p => ({
...p,
+ // The cached region row when the atlas resolved one, else the country the bundled
+ // borders place it in, which needs no network (#2537).
+ country_code: (p as { country_code?: string | null }).country_code ?? resolveCountryCodeSync(p),
category: p.category_id ? {
id: p.category_id,
name: p.category_name,
@@ -234,6 +243,30 @@ export class PlacesService {
}));
}
+ /**
+ * Makes a picture already attached in the trip the place's own image (#1242). The file
+ * is copied, not pointed at: the place keeps its picture when the attachment is deleted,
+ * and the update path reclaims the copy like any other uploaded image. Returns a reason
+ * string when the file cannot serve, the updated place otherwise.
+ */
+ async setImageFromFile(tripId: string, placeId: string, fileId: number): Promise<'not_found' | 'not_image' | 'too_large' | Awaited<ReturnType<PlacesService['update']>>> {
+ const file = this.dbs.get<{ filename: string; original_name: string; mime_type: string | null; file_size: number | null }>(
+ 'SELECT filename, original_name, mime_type, file_size FROM trip_files WHERE id = ? AND trip_id = ? AND deleted_at IS NULL',
+ fileId, tripId,
+ );
+ if (!file) return 'not_found';
+ const ext = path.extname(file.original_name || file.filename).toLowerCase();
+ const mime = file.mime_type ?? '';
+ if (!mime.startsWith('image/') || mime.includes('svg') || !PLACE_IMAGE_EXTENSIONS.includes(ext)) return 'not_image';
+ if (file.file_size != null && file.file_size > MAX_PLACE_IMAGE_SIZE) return 'too_large';
+ const name = `${randomUUID()}${ext}`;
+ const { stream } = await this.storage.getStream('files', path.basename(file.filename));
+ await this.storage.put('places', name, stream, { contentType: mime });
+ const updated = await this.update(tripId, placeId, { image_url: placeImageUrl(name) } as never);
+ if (!updated || isUpdateConflict(updated)) await reclaimPlaceImage(this.storage, placeImageUrl(name));
+ return updated;
+ }
+
// -------------------------------------------------------------------------
// Create place
// -------------------------------------------------------------------------
@@ -1499,6 +1532,16 @@ export class PlacesService {
}
}
+ /**
+ * The Google pass for places a file brought in (#2536). Only its points: a track
+ * or a drawn path is a line, and looking a line up by its name finds a stranger.
+ * Detached like the list imports, and just as quietly a no-op without a key.
+ */
+ enrichImportedFilePlaces(tripId: string, userId: number, places: ImportedPlace[]): void {
+ const points = (places as (ImportedPlace & EnrichablePlace)[]).filter(p => !p.route_geometry);
+ void this.enrichImportedPlaces(tripId, userId, points);
+ }
+
/**
* Everything a just-imported list gets in the background, in one place so the
* Google and Naver call sites cannot drift apart.
diff --git a/server/src/nest/reservations/reservations.mcp.ts b/server/src/nest/reservations/reservations.mcp.ts
index 4e2109423..41155f747 100644
--- a/server/src/nest/reservations/reservations.mcp.ts
+++ b/server/src/nest/reservations/reservations.mcp.ts
@@ -19,7 +19,7 @@ import { transportLegInputSchema, reservationUrlSchema, type TransportLegInput }
// What counts as a transport booking, for the update_transport gate. Every value
// ReservationsPanel renders with a transport icon, so a stored `transit` row is
// editable through the transport tools like any other.
-const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other'] as const;
+const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other'] as const;
// What a caller may ASK for, which is the transport form's own picker
// (client/src/components/Planner/TransportModal.tsx), in its order. The tools
// below used to accept four of these nine, so a bus or a ferry could be planned
@@ -29,7 +29,7 @@ const TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cr
// booking carries a provider itinerary in metadata.transit, and create_transit_journey
// is what writes one. A hand-made `transit` row would be a shape the transit UI
// does not expect.
-const CREATABLE_TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transport_other'] as const;
+const CREATABLE_TRANSPORT_TYPES = ['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transport_other'] as const;
/** Only these two carry per-segment detail: the transport form writes metadata.legs for a flight or a train and for nothing else. */
const LEG_TRANSPORT_TYPES = ['flight', 'train'] as const;
/** Everything the picker offers that is not a transport: create_reservation's half. */
diff --git a/server/src/nest/settings/settings.mcp.ts b/server/src/nest/settings/settings.mcp.ts
index 902f95756..87396d58c 100644
--- a/server/src/nest/settings/settings.mcp.ts
+++ b/server/src/nest/settings/settings.mcp.ts
@@ -44,6 +44,11 @@ const DISPLAY_PREFERENCES = {
(value) => SUPPORTED_LANGUAGE_CODES.includes(value),
{ message: `Expected one of: ${SUPPORTED_LANGUAGE_CODES.join(', ')}` },
),
+ // Place names and addresses in search (#1799); '' follows `language`.
+ place_language: z.union([
+ z.literal(''),
+ z.string().refine((value) => SUPPORTED_LANGUAGE_CODES.includes(value), { message: `Expected "" or one of: ${SUPPORTED_LANGUAGE_CODES.join(', ')}` }),
+ ]),
temperature_unit: z.enum(['celsius', 'fahrenheit']),
distance_unit: z.enum(['metric', 'imperial']),
time_format: z.enum(['12h', '24h']),
diff --git a/server/src/nest/share/share-view.helpers.ts b/server/src/nest/share/share-view.helpers.ts
new file mode 100644
index 000000000..1b5b0cc54
--- /dev/null
+++ b/server/src/nest/share/share-view.helpers.ts
@@ -0,0 +1,51 @@
+/**
+ * The two narrowing options of a public share link (#1712), as pure functions over
+ * the snapshot the service has already read, so they can be tested apart from SQL.
+ */
+
+/** Getting there and sleeping there: every transport type, and the hotel. */
+const TRAVEL_BOOKING_TYPES = new Set([
+ 'flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'cable_car', 'transit', 'transport_other',
+ 'hotel',
+]);
+
+export function isTravelBooking(type: unknown): boolean {
+ return typeof type === 'string' && TRAVEL_BOOKING_TYPES.has(type);
+}
+
+interface ShareSnapshot {
+ assignments: Record<number, Array<{ accommodation_id?: number | null; place?: { id: number; image_url?: string | null } }>>;
+ dayNotes: Record<number, unknown[]>;
+ places: Array<{ id: number; image_url?: string | null }>;
+ reservations: Array<{ type?: unknown }>;
+}
+
+/**
+ * "Only travel and stays": what family or an emergency contact needs to know,
+ * without the museum and the restaurant. A day keeps only the stop its night's
+ * booking wrote, the notes go, the place pool shrinks to where the trip sleeps,
+ * and the bookings to transport and hotels.
+ */
+export function travelOnly<T extends ShareSnapshot>(data: T, stayPlaceIds: ReadonlySet<number>): T {
+ const assignments: T['assignments'] = {};
+ for (const [dayId, rows] of Object.entries(data.assignments)) {
+ const kept = rows.filter(a => a.accommodation_id != null);
+ if (kept.length) assignments[Number(dayId)] = kept;
+ }
+ return {
+ ...data,
+ assignments,
+ dayNotes: {},
+ places: data.places.filter(p => stayPlaceIds.has(p.id)),
+ reservations: data.reservations.filter(r => isTravelBooking(r.type)),
+ };
+}
+
+/** Without the place photos: a link to pass around without the preview images. */
+export function withoutImages<T extends ShareSnapshot>(data: T): T {
+ const assignments: T['assignments'] = {};
+ for (const [dayId, rows] of Object.entries(data.assignments)) {
+ assignments[Number(dayId)] = rows.map(a => (a.place ? { ...a, place: { ...a.place, image_url: null } } : a));
+ }
+ return { ...data, assignments, places: data.places.map(p => ({ ...p, image_url: null })) };
+}
diff --git a/server/src/nest/share/share.controller.ts b/server/src/nest/share/share.controller.ts
index 2a789d629..b8803d714 100644
--- a/server/src/nest/share/share.controller.ts
+++ b/server/src/nest/share/share.controller.ts
@@ -48,6 +48,8 @@ export class TripShareController {
share_packing: body.share_packing,
share_budget: body.share_budget,
share_collab: body.share_collab,
+ share_travel_only: body.share_travel_only,
+ share_hide_images: body.share_hide_images,
});
// 201 only on first creation; an update answers 200, mirroring the legacy route.
res.status(result.created ? 201 : 200);
diff --git a/server/src/nest/share/share.mcp.ts b/server/src/nest/share/share.mcp.ts
index 525fc00ee..1ae9c621d 100644
--- a/server/src/nest/share/share.mcp.ts
+++ b/server/src/nest/share/share.mcp.ts
@@ -56,13 +56,16 @@ export class ShareMcp {
share_packing: z.boolean().optional().default(false).describe('Share packing list'),
share_budget: z.boolean().optional().default(false).describe('Share budget'),
share_collab: z.boolean().optional().default(false).describe('Share collab messages'),
+ share_travel_only: z.boolean().optional().default(false).describe('Narrow the shared plan to transport and stays: no activities, no day notes, only transport and hotel bookings'),
+ share_hide_images: z.boolean().optional().default(false).describe('Leave the place photos out of the shared page'),
},
annotations: TOOL_ANNOTATIONS_WRITE,
access: (ctx) => canShareTrips(ctx.scopes),
})
async createShareLink(
- { tripId, share_map, share_bookings, share_packing, share_budget, share_collab }: {
+ { tripId, share_map, share_bookings, share_packing, share_budget, share_collab, share_travel_only, share_hide_images }: {
tripId: number; share_map?: boolean; share_bookings?: boolean; share_packing?: boolean; share_budget?: boolean; share_collab?: boolean;
+ share_travel_only?: boolean; share_hide_images?: boolean;
},
ctx: McpContext,
) {
@@ -72,7 +75,7 @@ export class ShareMcp {
// The zod .default()s above fill omitted flags, and ShareService applies
// the same defaults again for undefined — no re-defaulting needed here.
const { token, created } = this.share.createOrUpdate(String(tripId), ctx.userId, {
- share_map, share_bookings, share_packing, share_budget, share_collab,
+ share_map, share_bookings, share_packing, share_budget, share_collab, share_travel_only, share_hide_images,
});
return ok({ token, created });
}
diff --git a/server/src/nest/share/share.service.ts b/server/src/nest/share/share.service.ts
index 87d8851ef..b6958bdb7 100644
--- a/server/src/nest/share/share.service.ts
+++ b/server/src/nest/share/share.service.ts
@@ -8,6 +8,7 @@ import { PlacePhotoCacheService } from '../place-photos/place-photo-cache.servic
import { publicReservationSql, publicStaySql } from '../reservations/reservation-visibility';
import { SettingsService } from '../settings/settings.service';
import type { User } from '../../types';
+import { travelOnly, withoutImages } from './share-view.helpers';
type Trip = TripAccess;
@@ -34,6 +35,8 @@ export interface SharePermissions {
share_packing?: boolean;
share_budget?: boolean;
share_collab?: boolean;
+ share_travel_only?: boolean;
+ share_hide_images?: boolean;
}
export interface ShareTokenInfo {
@@ -44,6 +47,8 @@ export interface ShareTokenInfo {
share_packing: boolean;
share_budget: boolean;
share_collab: boolean;
+ share_travel_only: boolean;
+ share_hide_images: boolean;
}
/**
@@ -181,23 +186,26 @@ export class ShareService {
share_packing = false,
share_budget = false,
share_collab = false,
+ share_travel_only = false,
+ share_hide_images = false,
} = permissions;
+ const flags = [share_map, share_bookings, share_packing, share_budget, share_collab, share_travel_only, share_hide_images].map(f => (f ? 1 : 0));
const expiresAt = new Date(Date.now() + 90 * 24 * 60 * 60 * 1000).toISOString();
return this.dbs.transaction(() => {
const existing = this.dbs.get<{ token: string }>('SELECT token FROM share_tokens WHERE trip_id = ?', tripId);
if (existing) {
this.dbs.run(
- 'UPDATE share_tokens SET share_map = ?, share_bookings = ?, share_packing = ?, share_budget = ?, share_collab = ?, expires_at = ? WHERE trip_id = ?',
- share_map ? 1 : 0, share_bookings ? 1 : 0, share_packing ? 1 : 0, share_budget ? 1 : 0, share_collab ? 1 : 0, expiresAt, tripId,
+ 'UPDATE share_tokens SET share_map = ?, share_bookings = ?, share_packing = ?, share_budget = ?, share_collab = ?, share_travel_only = ?, share_hide_images = ?, expires_at = ? WHERE trip_id = ?',
+ ...flags, expiresAt, tripId,
);
return { token: existing.token, created: false };
}
const token = crypto.randomBytes(24).toString('base64url');
this.dbs.run(
- 'INSERT INTO share_tokens (trip_id, token, created_by, share_map, share_bookings, share_packing, share_budget, share_collab, expires_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)',
- tripId, token, userId, share_map ? 1 : 0, share_bookings ? 1 : 0, share_packing ? 1 : 0, share_budget ? 1 : 0, share_collab ? 1 : 0, expiresAt,
+ 'INSERT INTO share_tokens (trip_id, token, created_by, share_map, share_bookings, share_packing, share_budget, share_collab, share_travel_only, share_hide_images, expires_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
+ tripId, token, userId, ...flags, expiresAt,
);
return { token, created: true };
});
@@ -217,6 +225,8 @@ export class ShareService {
share_packing: !!row.share_packing,
share_budget: !!row.share_budget,
share_collab: !!row.share_collab,
+ share_travel_only: !!row.share_travel_only,
+ share_hide_images: !!row.share_hide_images,
};
}
@@ -280,6 +290,8 @@ export class ShareService {
share_packing: !!shareRow.share_packing,
share_budget: !!shareRow.share_budget,
share_collab: !!shareRow.share_collab,
+ share_travel_only: !!shareRow.share_travel_only,
+ share_hide_images: !!shareRow.share_hide_images,
};
// Itinerary — days with assignments/notes, and the place pool
@@ -449,10 +461,20 @@ export class ShareService {
const ownerCartoKey = ownerSettings['carto_api_key'];
const cartoApiKey = typeof ownerCartoKey === 'string' ? ownerCartoKey.trim() : '';
+ // The owner's narrowing options (#1712) apply last, over what the flags
+ // above already let through.
+ let view = { assignments, dayNotes, places, reservations };
+ if (permissions.share_travel_only) {
+ const stayPlaceIds = new Set(this.dbs.all<{ place_id: number }>(
+ `SELECT DISTINCT a.place_id FROM day_accommodations a WHERE a.trip_id = ? AND ${publicStaySql('a')}`, tripId,
+ ).map(r => r.place_id));
+ view = travelOnly(view, stayPlaceIds);
+ }
+ if (permissions.share_hide_images) view = withoutImages(view);
+
return {
trip, baseCurrency, cartoApiKey, categories, permissions,
- days, assignments, dayNotes, places,
- reservations, accommodations,
+ days, ...view, accommodations,
packing, budget,
collab: collabMessages,
};
@@ -468,11 +490,13 @@ export class ShareService {
* mirroring the authenticated bytes endpoint.
*/
async getSharedPlacePhotoKey(token: string, placeId: string): Promise<string | null> {
- const shareRow = this.dbs.get<{ trip_id: string; share_map: number }>(
- "SELECT trip_id, share_map FROM share_tokens WHERE token = ? AND (expires_at IS NULL OR expires_at > datetime('now'))",
+ const shareRow = this.dbs.get<{ trip_id: string; share_map: number; share_hide_images?: number }>(
+ "SELECT trip_id, share_map, share_hide_images FROM share_tokens WHERE token = ? AND (expires_at IS NULL OR expires_at > datetime('now'))",
token,
);
if (!shareRow) return null;
+ // A link that leaves the photos out (#1712) does not serve them either.
+ if (shareRow.share_hide_images) return null;
// Place photos belong to the map/itinerary section — withhold them when the
// owner disabled the map, matching getSharedTripData which no longer returns
// the places (and thus their ids) in that case.
diff --git a/server/src/nest/vacay/vacay.controller.ts b/server/src/nest/vacay/vacay.controller.ts
index 40325877b..5275443a5 100644
--- a/server/src/nest/vacay/vacay.controller.ts
+++ b/server/src/nest/vacay/vacay.controller.ts
@@ -244,7 +244,7 @@ export class VacayController {
@Headers('x-socket-id') socketId?: string,
) {
const planId = this.vacay.getActivePlanId(user.id);
- return this.vacay.toggleCompanyHoliday(planId, body.date, body.note, socketId);
+ return this.vacay.toggleCompanyHoliday(planId, body.date, body.note, socketId, body.fraction);
}
@Get('stats/:year')
diff --git a/server/src/nest/vacay/vacay.mcp.ts b/server/src/nest/vacay/vacay.mcp.ts
index 47f6df03e..b30e07cc9 100644
--- a/server/src/nest/vacay/vacay.mcp.ts
+++ b/server/src/nest/vacay/vacay.mcp.ts
@@ -353,19 +353,20 @@ export class VacayMcp {
@Tool({
name: 'toggle_company_holiday',
- description: 'Toggle a date as a company holiday for the whole plan.',
+ description: 'Toggle a date as a company holiday for the whole plan, whole or half. The same size again removes it; the other size converts it. A half company holiday leaves room for a half vacation day.',
inputSchema: {
date: z.string(),
note: z.string().optional(),
+ half: z.boolean().optional().describe('True makes it a half company holiday (e.g. a free afternoon)'),
},
annotations: TOOL_ANNOTATIONS_NON_IDEMPOTENT,
when: vacayAddonOn,
access: { group: 'vacay', mode: 'write' },
})
- async toggleCompanyHoliday({ date, note }: { date: string; note?: string }, ctx: McpContext) {
+ async toggleCompanyHoliday({ date, note, half }: { date: string; note?: string; half?: boolean }, ctx: McpContext) {
if (this.auth.isDemoUser(ctx.userId)) return demoDenied();
const planId = this.vacay.getActivePlanId(ctx.userId);
- const result = this.vacay.toggleCompanyHoliday(planId, date, note, undefined);
+ const result = this.vacay.toggleCompanyHoliday(planId, date, note, undefined, half ? 0.5 : 1);
return ok(result);
}
diff --git a/server/src/nest/vacay/vacay.rpc.ts b/server/src/nest/vacay/vacay.rpc.ts
index 422f386c6..5775b5683 100644
--- a/server/src/nest/vacay/vacay.rpc.ts
+++ b/server/src/nest/vacay/vacay.rpc.ts
@@ -40,7 +40,7 @@ export class VacayRpc {
const date = this.dateStr(params.date);
const note = typeof params.note === 'string' ? params.note.slice(0, 256) : undefined;
this.requireVacayAddon();
- return this.vacay.toggleCompanyHoliday(this.vacay.getActivePlanId(userId), date, note, undefined);
+ return this.vacay.toggleCompanyHoliday(this.vacay.getActivePlanId(userId), date, note, undefined, params.fraction);
}
private requireVacayUser(ctx: PluginRpcContext, kind: 'reads' | 'writes'): number {
diff --git a/server/src/nest/vacay/vacay.service.ts b/server/src/nest/vacay/vacay.service.ts
index 78b1fa076..f4a637b08 100644
--- a/server/src/nest/vacay/vacay.service.ts
+++ b/server/src/nest/vacay/vacay.service.ts
@@ -520,10 +520,8 @@ export class VacayService {
}
if (company_holidays_enabled === true) {
- const companyDates = this.db.all<{ date: string }>('SELECT date FROM vacay_company_holidays WHERE plan_id = ?', planId);
- for (const { date } of companyDates) {
- this.db.run('DELETE FROM vacay_entries WHERE plan_id = ? AND date = ?', planId, date);
- }
+ const companyDates = this.db.all<{ date: string; fraction: number | null }>('SELECT date, fraction FROM vacay_company_holidays WHERE plan_id = ?', planId);
+ for (const { date, fraction } of companyDates) this.makeRoomForCompanyHoliday(planId, date, fraction ?? 1);
}
const updatedPlan = this.db.get<VacayPlan>('SELECT * FROM vacay_plans WHERE id = ?', planId)!;
@@ -760,7 +758,7 @@ export class VacayService {
const isOwnerFlag = plan.owner_id === userId;
const userIds = this.getPlanUsers(plan.id).map(u => u.id);
- const companyHolidays = this.db.all<{ date: string; note: string }>('SELECT date, note FROM vacay_company_holidays WHERE plan_id = ?', plan.id);
+ const companyHolidays = this.db.all<{ date: string; note: string; fraction: number | null }>('SELECT date, note, fraction FROM vacay_company_holidays WHERE plan_id = ?', plan.id);
if (isOwnerFlag) {
const members = this.db.all<{ user_id: number }>("SELECT user_id FROM vacay_plan_members WHERE plan_id = ? AND status = 'accepted'", plan.id);
@@ -768,7 +766,7 @@ export class VacayService {
const memberPlan = this.getOwnPlan(m.user_id);
this.db.run('UPDATE vacay_entries SET plan_id = ? WHERE plan_id = ? AND user_id = ?', memberPlan.id, plan.id, m.user_id);
for (const ch of companyHolidays) {
- this.db.run('INSERT OR IGNORE INTO vacay_company_holidays (plan_id, date, note) VALUES (?, ?, ?)', memberPlan.id, ch.date, ch.note);
+ this.db.run('INSERT OR IGNORE INTO vacay_company_holidays (plan_id, date, note, fraction) VALUES (?, ?, ?, ?)', memberPlan.id, ch.date, ch.note, ch.fraction ?? 1);
}
}
this.db.run('DELETE FROM vacay_plan_members WHERE plan_id = ?', plan.id);
@@ -776,7 +774,7 @@ export class VacayService {
const ownPlan = this.getOwnPlan(userId);
this.db.run('UPDATE vacay_entries SET plan_id = ? WHERE plan_id = ? AND user_id = ?', ownPlan.id, plan.id, userId);
for (const ch of companyHolidays) {
- this.db.run('INSERT OR IGNORE INTO vacay_company_holidays (plan_id, date, note) VALUES (?, ?, ?)', ownPlan.id, ch.date, ch.note);
+ this.db.run('INSERT OR IGNORE INTO vacay_company_holidays (plan_id, date, note, fraction) VALUES (?, ?, ?, ?)', ownPlan.id, ch.date, ch.note, ch.fraction ?? 1);
}
this.db.run('DELETE FROM vacay_plan_members WHERE plan_id = ? AND user_id = ?', plan.id, userId);
}
@@ -983,7 +981,7 @@ export class VacayService {
// only exposed while the owner has the feature enabled, and dates only —
// the note text may be authored by plan members who aren't part of the share.
const companyHolidays = plan.company_holidays_enabled
- ? this.db.all('SELECT date FROM vacay_company_holidays WHERE plan_id = ? AND date >= ? AND date < ? ORDER BY date', plan.id, start, end)
+ ? this.db.all('SELECT date, fraction FROM vacay_company_holidays WHERE plan_id = ? AND date >= ? AND date < ? ORDER BY date', plan.id, start, end)
: [];
return { share_id: s.id, owner_id: s.owner_id, owner_name: s.username, color, hidden: !!s.hidden, entries, companyHolidays };
});
@@ -1104,9 +1102,13 @@ export class VacayService {
}
toggleEntry(userId: number, planId: number, date: string, fraction?: unknown, kind?: unknown, socketId?: string): { action?: string; fraction?: number; kind?: string; error?: string } {
- const frac = normalizeFraction(fraction);
- const knd = normalizeKind(kind);
const plan = this.db.get<VacayPlan>('SELECT * FROM vacay_plans WHERE id = ?', planId);
+ // Half the day is the company's already (#2439): what is left is half a day.
+ const company = plan?.company_holidays_enabled
+ ? this.db.get<{ fraction: number | null }>('SELECT fraction FROM vacay_company_holidays WHERE plan_id = ? AND date = ?', planId, date)
+ : undefined;
+ const frac = company && (company.fraction ?? 1) < 1 ? 0.5 : normalizeFraction(fraction);
+ const knd = normalizeKind(kind);
const weekendBlocked = plan ? isBlockedWeekend(plan, date) : false;
const existing = this.db.get<{ id: number; fraction: number; kind: string | null }>('SELECT id, fraction, kind FROM vacay_entries WHERE user_id = ? AND date = ? AND plan_id = ?', userId, date, planId);
if (existing) {
@@ -1130,18 +1132,35 @@ export class VacayService {
return { action: 'added', fraction: frac, kind: knd };
}
- toggleCompanyHoliday(planId: number, date: string, note: string | undefined, socketId: string | undefined): { action: string } {
- const existing = this.db.get<{ id: number }>('SELECT id FROM vacay_company_holidays WHERE plan_id = ? AND date = ?', planId, date);
- if (existing) {
- this.db.run('DELETE FROM vacay_company_holidays WHERE id = ?', existing.id);
- this.notifyPlanUsers(planId, socketId);
- return { action: 'removed' };
- } else {
- this.db.run('INSERT INTO vacay_company_holidays (plan_id, date, note) VALUES (?, ?, ?)', planId, date, note || '');
- this.db.run('DELETE FROM vacay_entries WHERE plan_id = ? AND date = ?', planId, date);
- this.notifyPlanUsers(planId, socketId);
- return { action: 'added' };
- }
+ /**
+ * A company holiday on or off, whole or half (#2439). The same click again clears
+ * it; the other size converts it in place, the way a vacation entry toggles. A
+ * whole company holiday leaves no room for leave that day; a half one leaves half.
+ */
+ toggleCompanyHoliday(planId: number, date: string, note: string | undefined, socketId: string | undefined, fraction?: unknown): { action: string; fraction?: number } {
+ const frac = normalizeFraction(fraction);
+ const result = this.db.transaction(() => {
+ const existing = this.db.get<{ id: number; fraction: number | null }>('SELECT id, fraction FROM vacay_company_holidays WHERE plan_id = ? AND date = ?', planId, date);
+ if (existing && (existing.fraction ?? 1) === frac) {
+ this.db.run('DELETE FROM vacay_company_holidays WHERE id = ?', existing.id);
+ return { action: 'removed' };
+ }
+ if (existing) {
+ this.db.run('UPDATE vacay_company_holidays SET fraction = ? WHERE id = ?', frac, existing.id);
+ } else {
+ this.db.run('INSERT INTO vacay_company_holidays (plan_id, date, note, fraction) VALUES (?, ?, ?, ?)', planId, date, note || '', frac);
+ }
+ this.makeRoomForCompanyHoliday(planId, date, frac);
+ return { action: existing ? 'updated' : 'added', fraction: frac };
+ });
+ this.notifyPlanUsers(planId, socketId);
+ return result;
+ }
+
+ /** What a company holiday leaves of the day's leave: nothing for a whole one, half for a half one. */
+ private makeRoomForCompanyHoliday(planId: number, date: string, fraction: number): void {
+ if (fraction >= 1) this.db.run('DELETE FROM vacay_entries WHERE plan_id = ? AND date = ?', planId, date);
+ else this.db.run('UPDATE vacay_entries SET fraction = 0.5 WHERE plan_id = ? AND date = ? AND fraction > 0.5', planId, date);
}
// -------------------------------------------------------------------------
diff --git a/server/src/types.ts b/server/src/types.ts
index 2306f2fa0..acfd3d782 100644
--- a/server/src/types.ts
+++ b/server/src/types.ts
@@ -119,6 +119,7 @@ export interface DayAssignment {
assignment_end_time?: string | null;
end_day?: number;
leg_transport_mode?: string | null;
+ route_excluded?: number;
incoming_leg_transport_mode?: string | null;
/** The lodging booking that put this stop on the day, when one did. */
accommodation_id?: number | null;
@@ -425,6 +426,8 @@ export interface JourneyEntry {
* The wire carries a boolean; journey-entry-row.ts is where the two meet.
*/
stats_excluded: number;
+ /** 1 while the entry is a draft (#696), kept off the public share page. */
+ is_draft?: number;
created_at: number;
updated_at: number;
}
diff --git a/server/tests/e2e/assignments.e2e.test.ts b/server/tests/e2e/assignments.e2e.test.ts
index 36d53a7a4..30bac8979 100644
--- a/server/tests/e2e/assignments.e2e.test.ts
+++ b/server/tests/e2e/assignments.e2e.test.ts
@@ -155,6 +155,40 @@ describe('Assignments e2e (real auth guard + temp SQLite)', () => {
expect(reconcileTripSkeletons).toHaveBeenCalledWith(5, undefined);
});
+ it('200 clear day removes every place of the day and keeps the day (#2470)', async () => {
+ reconcileTripSkeletons.mockClear();
+ const first = seedAssignment(3, 2, 0);
+ const second = seedAssignment(3, 2, 1);
+ const elsewhere = seedAssignment(4, 2, 0);
+ const res = await request(server).delete('/api/trips/5/days/3/assignments').set('Cookie', sessionCookie(1));
+ expect(res.status).toBe(200);
+ expect(res.body.success).toBe(true);
+ expect([...res.body.removedIds].sort()).toEqual([first, second].sort());
+ expect(db.prepare('SELECT COUNT(*) AS n FROM day_assignments WHERE day_id = 3').get()).toEqual({ n: 0 });
+ expect(db.prepare('SELECT id FROM day_assignments WHERE id = ?').get(elsewhere)).toEqual({ id: elsewhere });
+ expect(reconcileTripSkeletons).toHaveBeenCalledWith(5, undefined);
+ });
+
+ it('403 clear day without day_edit, 404 for a foreign day', async () => {
+ seedAssignment();
+ checkPermission.mockReturnValue(false);
+ expect((await request(server).delete('/api/trips/5/days/3/assignments').set('Cookie', sessionCookie(1))).status).toBe(403);
+ checkPermission.mockReturnValue(true);
+ const miss = await request(server).delete('/api/trips/5/days/999/assignments').set('Cookie', sessionCookie(1));
+ expect(miss.status).toBe(404);
+ expect(miss.body).toEqual({ error: 'Day not found' });
+ });
+
+ it('200 route exclude roundtrip, 400 without a boolean (#2532)', async () => {
+ const id = seedAssignment();
+ const res = await request(server).put(`/api/trips/5/assignments/${id}/route`).set('Cookie', sessionCookie(1)).send({ excluded: true });
+ expect(res.status).toBe(200);
+ expect(res.body.assignment).toMatchObject({ id, route_excluded: true });
+ const list = await request(server).get('/api/trips/5/days/3/assignments').set('Cookie', sessionCookie(1));
+ expect(list.body.assignments[0].route_excluded).toBe(true);
+ expect((await request(server).put(`/api/trips/5/assignments/${id}/route`).set('Cookie', sessionCookie(1)).send({ excluded: 'yes' })).status).toBe(400);
+ });
+
it('200 move assignment reconciles journey skeletons', async () => {
reconcileTripSkeletons.mockClear();
const id = seedAssignment();
diff --git a/server/tests/e2e/atlas.e2e.test.ts b/server/tests/e2e/atlas.e2e.test.ts
index e327db6ab..9993f2a91 100644
--- a/server/tests/e2e/atlas.e2e.test.ts
+++ b/server/tests/e2e/atlas.e2e.test.ts
@@ -147,6 +147,16 @@ describe('Atlas e2e (real auth guard + real service + temp SQLite)', () => {
expect(row).toEqual({ name: 'Kyoto', user_id: userId });
});
+ it('keeps a wished-for region, and refuses one outside the item country (#1901)', async () => {
+ const ok = await request(server).post('/api/addons/atlas/bucket-list').set('Cookie', sessionCookie(userId))
+ .send({ name: 'Bayern', country_code: 'DE', region_code: 'DE-BY' });
+ expect(ok.status).toBe(201);
+ expect(ok.body.item.region_code).toBe('DE-BY');
+ const bad = await request(server).post('/api/addons/atlas/bucket-list').set('Cookie', sessionCookie(userId))
+ .send({ name: 'Berlin', country_code: 'FR', region_code: 'DE-BE' });
+ expect(bad.status).toBe(400);
+ });
+
it('404 on delete of a missing bucket item', async () => {
const res = await request(server).delete('/api/addons/atlas/bucket-list/999').set('Cookie', sessionCookie(userId));
expect(res.status).toBe(404);
diff --git a/server/tests/e2e/budget.e2e.test.ts b/server/tests/e2e/budget.e2e.test.ts
index 9724d67fd..54127cb07 100644
--- a/server/tests/e2e/budget.e2e.test.ts
+++ b/server/tests/e2e/budget.e2e.test.ts
@@ -293,6 +293,23 @@ describe('Budget e2e (real auth guard + temp SQLite, real budget SQL)', () => {
expect(row).toEqual({ settled_at: null });
});
+ it('keeps a note on a settlement, leaves it alone when omitted and clears it on blank (#2340)', async () => {
+ const created = await request(server)
+ .post(`/api/trips/${tripId}/budget/settlements`)
+ .set('Cookie', sessionCookie(1))
+ .send({ from_user_id: 2, to_user_id: 1, amount: 10, note: ' Cash at the airport ' });
+ expect(created.status).toBe(201);
+ expect(created.body.settlement.note).toBe('Cash at the airport');
+ const url = `/api/trips/${tripId}/budget/settlements/${created.body.settlement.id}`;
+
+ const kept = await request(server).put(url).set('Cookie', sessionCookie(1)).send({ from_user_id: 2, to_user_id: 1, amount: 12 });
+ expect(kept.body.settlement.note).toBe('Cash at the airport');
+ const cleared = await request(server).put(url).set('Cookie', sessionCookie(1)).send({ from_user_id: 2, to_user_id: 1, amount: 12, note: ' ' });
+ expect(cleared.body.settlement.note).toBeNull();
+ const tooLong = await request(server).put(url).set('Cookie', sessionCookie(1)).send({ from_user_id: 2, to_user_id: 1, amount: 12, note: 'x'.repeat(501) });
+ expect(tooLong.status).toBe(400);
+ });
+
it('404 on settlement update when it does not exist', async () => {
const res = await request(server)
.put(`/api/trips/${tripId}/budget/settlements/424242`)
diff --git a/server/tests/e2e/maps.e2e.test.ts b/server/tests/e2e/maps.e2e.test.ts
index 981d97db7..ed1a1c4a2 100644
--- a/server/tests/e2e/maps.e2e.test.ts
+++ b/server/tests/e2e/maps.e2e.test.ts
@@ -57,6 +57,7 @@ describe('Maps e2e (real auth guard + temp SQLite)', () => {
const maps = app.get(MapsService);
vi.spyOn(maps, 'searchPlaces').mockResolvedValue({ places: [{ name: 'Berlin' }], source: 'osm' });
vi.spyOn(maps, 'reverseGeocode').mockResolvedValue({ name: 'Spot', address: 'Street 1' });
+ vi.spyOn(maps, 'nearbyPlaces').mockResolvedValue({ places: [{ name: 'Cafe', distance_m: 40 }], source: 'trek-places' });
});
afterAll(async () => {
@@ -84,6 +85,19 @@ describe('Maps e2e (real auth guard + temp SQLite)', () => {
expect(res.body).toEqual({ places: [{ name: 'Berlin' }], source: 'osm' });
});
+ it('200 with the places near a point (POST stays 200, not 201)', async () => {
+ const res = await request(server).post('/api/maps/nearby?lang=de').set('Cookie', sessionCookie(1)).send({ lat: 52.5, lng: 13.4 });
+ expect(res.status).toBe(200);
+ expect(res.body).toEqual({ places: [{ name: 'Cafe', distance_m: 40 }], source: 'trek-places' });
+ });
+
+ it('400 on nearby with a circle wider than the contract allows, 401 without a session', async () => {
+ const wide = await request(server).post('/api/maps/nearby').set('Cookie', sessionCookie(1)).send({ lat: 52.5, lng: 13.4, radius: 9000 });
+ expect(wide.status).toBe(400);
+ const anon = await request(server).post('/api/maps/nearby').send({ lat: 52.5, lng: 13.4 });
+ expect(anon.status).toBe(401);
+ });
+
it('200 on reverse geocode', async () => {
const res = await request(server).get('/api/maps/reverse').set('Cookie', sessionCookie(1)).query({ lat: '52.5', lng: '13.4' });
expect(res.status).toBe(200);
diff --git a/server/tests/e2e/packing.e2e.test.ts b/server/tests/e2e/packing.e2e.test.ts
index a754a7cc7..33bb6b481 100644
--- a/server/tests/e2e/packing.e2e.test.ts
+++ b/server/tests/e2e/packing.e2e.test.ts
@@ -353,6 +353,18 @@ describe('Packing e2e (real auth guard + real SQL over temp SQLite)', () => {
expect(res.body.item.checked).toBe(1);
});
+ it('counts packed pieces and ticks the item once the count is full (#2296)', async () => {
+ const id = insertItem(tripId, 'Shirts');
+ await request(server).put(`/api/trips/${tripId}/packing/${id}`).set('Cookie', sessionCookie(1)).send({ quantity: 3 });
+ const partial = await request(server).put(`/api/trips/${tripId}/packing/${id}`).set('Cookie', sessionCookie(1)).send({ packed_quantity: 2 });
+ expect(partial.status).toBe(200);
+ expect(partial.body.item).toMatchObject({ packed_quantity: 2, checked: 0 });
+ const full = await request(server).put(`/api/trips/${tripId}/packing/${id}`).set('Cookie', sessionCookie(1)).send({ packed_quantity: 3 });
+ expect(full.body.item).toMatchObject({ packed_quantity: null, checked: 1 });
+ const negative = await request(server).put(`/api/trips/${tripId}/packing/${id}`).set('Cookie', sessionCookie(1)).send({ packed_quantity: -1 });
+ expect(negative.status).toBe(400);
+ });
+
it('whitespace-only bag name still gets the bespoke 400', async () => {
const res = await request(server).post(`/api/trips/${tripId}/packing/bags`).set('Cookie', sessionCookie(1)).send({ name: ' ' });
expect(res.status).toBe(400);
diff --git a/server/tests/e2e/share.e2e.test.ts b/server/tests/e2e/share.e2e.test.ts
index 09ffd59ac..9f4f57bca 100644
--- a/server/tests/e2e/share.e2e.test.ts
+++ b/server/tests/e2e/share.e2e.test.ts
@@ -151,6 +151,18 @@ describe('Share-link e2e (real auth guard + real SQL over temp SQLite)', () => {
expect(after.body).toEqual({ token: null });
});
+ it('carries the narrowing options through to the public read (#1712)', async () => {
+ const created = await request(server).post(`/api/trips/${tripId}/share-link`).set('Cookie', sessionCookie(1))
+ .send({ share_travel_only: true, share_hide_images: true });
+ const info = await request(server).get(`/api/trips/${tripId}/share-link`).set('Cookie', sessionCookie(1));
+ expect(info.body).toEqual(expect.objectContaining({ share_travel_only: true, share_hide_images: true }));
+ const res = await request(server).get(`/api/shared/${created.body.token}`);
+ expect(res.body.permissions).toEqual(expect.objectContaining({ share_travel_only: true, share_hide_images: true }));
+ expect(res.body.dayNotes).toEqual({});
+ const bad = await request(server).post(`/api/trips/${tripId}/share-link`).set('Cookie', sessionCookie(1)).send({ share_hide_images: 'yes' });
+ expect(bad.status).toBe(400);
+ });
+
it('public shared read is unguarded (200, no cookie)', async () => {
const created = await request(server).post(`/api/trips/${tripId}/share-link`).set('Cookie', sessionCookie(1)).send({});
const res = await request(server).get(`/api/shared/${created.body.token}`);
diff --git a/server/tests/integration/vacay.test.ts b/server/tests/integration/vacay.test.ts
index b10450733..6468c9b2f 100644
--- a/server/tests/integration/vacay.test.ts
+++ b/server/tests/integration/vacay.test.ts
@@ -438,6 +438,19 @@ describe('Vacay company holidays', () => {
expect(res.status).toBe(200);
});
+ it('VACAY-032b — POST /entries/company-holiday takes a half day and refuses any other size (#2439)', async () => {
+ const { user } = createUser(testDb);
+ await request(app).get('/api/addons/vacay/plan').set('Cookie', authCookie(user.id));
+ await request(app).post('/api/addons/vacay/years').set('Cookie', authCookie(user.id)).send({ year: 2025 });
+ const half = await request(app).post('/api/addons/vacay/entries/company-holiday').set('Cookie', authCookie(user.id))
+ .send({ date: '2025-12-24', fraction: 0.5 });
+ expect(half.status).toBe(200);
+ expect(half.body).toMatchObject({ action: 'added', fraction: 0.5 });
+ const odd = await request(app).post('/api/addons/vacay/entries/company-holiday').set('Cookie', authCookie(user.id))
+ .send({ date: '2025-12-24', fraction: 0.25 });
+ expect(odd.status).toBe(400);
+ });
+
it('VACAY-033 — POST /entries/toggle with target_user_id not in plan returns 403', async () => {
const { user: owner } = createUser(testDb);
const { user: outsider } = createUser(testDb);
diff --git a/server/tests/unit/app-config/derive.test.ts b/server/tests/unit/app-config/derive.test.ts
index bc4b83047..0861f7838 100644
--- a/server/tests/unit/app-config/derive.test.ts
+++ b/server/tests/unit/app-config/derive.test.ts
@@ -247,6 +247,12 @@ describe('deriveBackup', () => {
expect(deriveBackup({}).maxDecompressedMb).toBe(5 * 1024);
expect(deriveBackup({ ENCRYPTION_KEY: 'x' }).encryptionKeyFromEnv).toBe(true);
});
+
+ it('reads RESTORE_FROM_BACKUP as a trimmed path, and blank as unset (#1089)', () => {
+ expect(deriveBackup({}).restoreFromBackup).toBeNull();
+ expect(deriveBackup({ RESTORE_FROM_BACKUP: ' ' }).restoreFromBackup).toBeNull();
+ expect(deriveBackup({ RESTORE_FROM_BACKUP: ' /app/data/b.zip ' }).restoreFromBackup).toBe('/app/data/b.zip');
+ });
});
describe('deriveNet', () => {
diff --git a/server/tests/unit/mcp/tools-assignments.test.ts b/server/tests/unit/mcp/tools-assignments.test.ts
index 91b2786bc..6a40a73e6 100644
--- a/server/tests/unit/mcp/tools-assignments.test.ts
+++ b/server/tests/unit/mcp/tools-assignments.test.ts
@@ -285,6 +285,46 @@ describe('Tool: unassign_place', () => {
// reorder_day_assignments
// ---------------------------------------------------------------------------
+describe('Tool: clear_day_assignments (#2470)', () => {
+ it('removes every place from the day and broadcasts each removal', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const day = createDay(testDb, trip.id);
+ const place = createPlace(testDb, trip.id);
+ const a1 = createDayAssignment(testDb, day.id, place.id);
+ const a2 = createDayAssignment(testDb, day.id, place.id);
+ await withHarness(user.id, async (h) => {
+ const data = parseToolResult(await h.client.callTool({ name: 'clear_day_assignments', arguments: { tripId: trip.id, dayId: day.id } })) as any;
+ expect(data.success).toBe(true);
+ expect([...data.removedIds].sort()).toEqual([a1.id, a2.id].sort());
+ expect(testDb.prepare('SELECT COUNT(*) AS n FROM day_assignments WHERE day_id = ?').get(day.id)).toEqual({ n: 0 });
+ expect(broadcastMock).toHaveBeenCalledWith(trip.id, 'assignment:deleted', { assignmentId: a1.id, dayId: day.id });
+ });
+ });
+
+ it('returns an error for a day on another trip', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const otherTrip = createTrip(testDb, user.id);
+ const foreignDay = createDay(testDb, otherTrip.id);
+ await withHarness(user.id, async (h) => {
+ const result = await h.client.callTool({ name: 'clear_day_assignments', arguments: { tripId: trip.id, dayId: foreignDay.id } });
+ expect(result.isError).toBe(true);
+ });
+ });
+
+ it('returns access denied for non-member', async () => {
+ const { user } = createUser(testDb);
+ const { user: other } = createUser(testDb);
+ const trip = createTrip(testDb, other.id);
+ const day = createDay(testDb, trip.id);
+ await withHarness(user.id, async (h) => {
+ const result = await h.client.callTool({ name: 'clear_day_assignments', arguments: { tripId: trip.id, dayId: day.id } });
+ expect(result.isError).toBe(true);
+ });
+ });
+});
+
describe('Tool: reorder_day_assignments', () => {
it('reorders assignments by updating order_index', async () => {
const { user } = createUser(testDb);
diff --git a/server/tests/unit/mcp/tools-atlas.test.ts b/server/tests/unit/mcp/tools-atlas.test.ts
index e20d1c981..b1a84357d 100644
--- a/server/tests/unit/mcp/tools-atlas.test.ts
+++ b/server/tests/unit/mcp/tools-atlas.test.ts
@@ -138,6 +138,20 @@ describe('Tool: unmark_country_visited', () => {
// ---------------------------------------------------------------------------
describe('Tool: create_bucket_list_item', () => {
+ it('stores a wished-for region and refuses one outside its country (#1901)', async () => {
+ const { user } = createUser(testDb);
+ await withHarness(user.id, async (h) => {
+ const ok = parseToolResult(await h.client.callTool({
+ name: 'create_bucket_list_item', arguments: { name: 'Bayern', country_code: 'DE', region_code: 'DE-BY' },
+ })) as any;
+ expect(ok.item.region_code).toBe('DE-BY');
+ const bad = await h.client.callTool({
+ name: 'create_bucket_list_item', arguments: { name: 'Berlin', country_code: 'FR', region_code: 'DE-BE' },
+ });
+ expect(bad.isError).toBe(true);
+ });
+ });
+
it('creates a bucket list item with all fields', async () => {
const { user } = createUser(testDb);
await withHarness(user.id, async (h) => {
diff --git a/server/tests/unit/mcp/tools-budget.test.ts b/server/tests/unit/mcp/tools-budget.test.ts
index cf7adb083..74bfbd4c4 100644
--- a/server/tests/unit/mcp/tools-budget.test.ts
+++ b/server/tests/unit/mcp/tools-budget.test.ts
@@ -641,6 +641,22 @@ describe('Tool: update_budget_item (currency)', () => {
});
});
+ it('records and edits a note on the payment (#2340)', async () => {
+ const { user, other, trip } = tripWithTwo();
+ await withHarness(user.id, async (h) => {
+ const created = parseToolResult(await h.client.callTool({
+ name: 'create_settlement',
+ arguments: { tripId: trip.id, from_user_id: other.id, to_user_id: user.id, amount: 20, note: 'Cash' },
+ })) as any;
+ expect(created.settlement.note).toBe('Cash');
+ const updated = parseToolResult(await h.client.callTool({
+ name: 'update_settlement',
+ arguments: { tripId: trip.id, settlementId: created.settlement.id, from_user_id: other.id, to_user_id: user.id, amount: 20, note: 'Bank transfer' },
+ })) as any;
+ expect(updated.settlement.note).toBe('Bank transfer');
+ });
+ });
+
it('refuses a currency that is not a code', async () => {
const { user } = createUser(testDb);
const trip = createTrip(testDb, user.id);
diff --git a/server/tests/unit/mcp/tools-journey.test.ts b/server/tests/unit/mcp/tools-journey.test.ts
index cdabc0b06..c05a7b2cd 100644
--- a/server/tests/unit/mcp/tools-journey.test.ts
+++ b/server/tests/unit/mcp/tools-journey.test.ts
@@ -143,6 +143,21 @@ describe('Tool: update_journey_entry', () => {
expect(Array.isArray(data.entry.photos)).toBe(true);
});
});
+
+ it('creates a draft and publishes it, as the REST route does (#696)', async () => {
+ const { user } = createUser(testDb);
+ await withHarness(user.id, async (h) => {
+ const journey = (parseToolResult(await h.client.callTool({ name: 'create_journey', arguments: { title: 'J' } })) as any).journey;
+ const draft = (parseToolResult(await h.client.callTool({
+ name: 'create_journey_entry', arguments: { journeyId: journey.id, entry_date: '2026-07-01', title: 'Rough', is_draft: true },
+ })) as any).entry;
+ expect(draft.is_draft).toBe(true);
+ const published = (parseToolResult(await h.client.callTool({
+ name: 'update_journey_entry', arguments: { entryId: draft.id, is_draft: false },
+ })) as any).entry;
+ expect(published.is_draft).toBe(false);
+ });
+ });
});
describe('Tool: update_journey_preferences', () => {
@@ -391,6 +406,19 @@ describe('journey write tools', () => {
});
});
+ it('reorder_journey_entry_photos refuses ids that are not the entry photos (#824)', async () => {
+ const { user } = createUser(testDb);
+ await withHarness(user.id, async (h) => {
+ const journey = await seedJourney(h);
+ const entry = (parseToolResult(await h.client.callTool({
+ name: 'create_journey_entry', arguments: { journeyId: journey.id, entry_date: '2026-07-01', title: 'A' },
+ })) as any).entry;
+ expect((await h.client.callTool({
+ name: 'reorder_journey_entry_photos', arguments: { entryId: entry.id, orderedIds: [999999] },
+ })).isError).toBe(true);
+ });
+ });
+
it('contributor tools add, re-role and remove; each refuses a foreign journey', async () => {
const { user } = createUser(testDb);
const { user: guest } = createUser(testDb);
diff --git a/server/tests/unit/mcp/tools-leg-transport-mode.test.ts b/server/tests/unit/mcp/tools-leg-transport-mode.test.ts
index 00f95c59e..fbd720d1c 100644
--- a/server/tests/unit/mcp/tools-leg-transport-mode.test.ts
+++ b/server/tests/unit/mcp/tools-leg-transport-mode.test.ts
@@ -63,6 +63,37 @@ async function withHarness(userId: number, fn: (h: McpHarness) => Promise<void>)
// set_leg_transport_mode
// ---------------------------------------------------------------------------
+describe('Tool: set_assignment_route_excluded (#2532)', () => {
+ it('takes a stop out of the route and puts it back, broadcasting each change', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const day = createDay(testDb, trip.id);
+ const place = createPlace(testDb, trip.id);
+ const assignment = createDayAssignment(testDb, day.id, place.id);
+ await withHarness(user.id, async (h) => {
+ const out = parseToolResult(await h.client.callTool({ name: 'set_assignment_route_excluded', arguments: { tripId: trip.id, assignmentId: assignment.id, excluded: true } })) as any;
+ expect(out.assignment.route_excluded).toBe(true);
+ expect(testDb.prepare('SELECT route_excluded FROM day_assignments WHERE id = ?').get(assignment.id)).toEqual({ route_excluded: 1 });
+ const back = parseToolResult(await h.client.callTool({ name: 'set_assignment_route_excluded', arguments: { tripId: trip.id, assignmentId: assignment.id, excluded: false } })) as any;
+ expect(back.assignment.route_excluded).toBe(false);
+ expect(broadcastMock).toHaveBeenCalledWith(trip.id, 'assignment:updated', expect.any(Object));
+ });
+ });
+
+ it('rejects an assignment of another trip', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const other = createTrip(testDb, user.id);
+ const day = createDay(testDb, other.id);
+ const place = createPlace(testDb, other.id);
+ const assignment = createDayAssignment(testDb, day.id, place.id);
+ await withHarness(user.id, async (h) => {
+ const result = await h.client.callTool({ name: 'set_assignment_route_excluded', arguments: { tripId: trip.id, assignmentId: assignment.id, excluded: true } });
+ expect(result.isError).toBe(true);
+ });
+ });
+});
+
describe('Tool: set_leg_transport_mode', () => {
it('sets the outgoing leg mode (default direction)', async () => {
const { user } = createUser(testDb);
diff --git a/server/tests/unit/mcp/tools-packing.test.ts b/server/tests/unit/mcp/tools-packing.test.ts
index af0d215b6..2e455dfa9 100644
--- a/server/tests/unit/mcp/tools-packing.test.ts
+++ b/server/tests/unit/mcp/tools-packing.test.ts
@@ -301,6 +301,19 @@ describe('Tool: update_packing_item', () => {
});
});
+ it('counts packed pieces like the REST route does (#2296)', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const item = createPackingItem(testDb, trip.id, { name: 'Shirts' });
+ await withHarness(user.id, async (h) => {
+ await h.client.callTool({ name: 'update_packing_item', arguments: { tripId: trip.id, itemId: item.id, quantity: 4 } });
+ const partial = parseToolResult(await h.client.callTool({ name: 'update_packing_item', arguments: { tripId: trip.id, itemId: item.id, packed_quantity: 3 } })) as any;
+ expect(partial.item).toMatchObject({ packed_quantity: 3, checked: 0 });
+ const full = parseToolResult(await h.client.callTool({ name: 'update_packing_item', arguments: { tripId: trip.id, itemId: item.id, packed_quantity: 4 } })) as any;
+ expect(full.item).toMatchObject({ packed_quantity: null, checked: 1 });
+ });
+ });
+
it('broadcasts packing:updated event', async () => {
const { user } = createUser(testDb);
const trip = createTrip(testDb, user.id);
diff --git a/server/tests/unit/mcp/tools-places.test.ts b/server/tests/unit/mcp/tools-places.test.ts
index 0147c7766..148f18d6a 100644
--- a/server/tests/unit/mcp/tools-places.test.ts
+++ b/server/tests/unit/mcp/tools-places.test.ts
@@ -219,6 +219,23 @@ describe('Tool: create_place', () => {
// update_place
// ---------------------------------------------------------------------------
+describe('Tool: set_place_image_from_file (#1242)', () => {
+ it('refuses a file that is no picture, and one from another trip', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const other = createTrip(testDb, user.id);
+ const place = createPlace(testDb, trip.id);
+ const pdf = Number(testDb.prepare("INSERT INTO trip_files (trip_id, filename, original_name, mime_type) VALUES (?, 'a.pdf', 'a.pdf', 'application/pdf')").run(trip.id).lastInsertRowid);
+ const foreign = Number(testDb.prepare("INSERT INTO trip_files (trip_id, filename, original_name, mime_type) VALUES (?, 'b.jpg', 'b.jpg', 'image/jpeg')").run(other.id).lastInsertRowid);
+ await withHarness(user.id, async (h) => {
+ const notImage = await h.client.callTool({ name: 'set_place_image_from_file', arguments: { tripId: trip.id, placeId: place.id, fileId: pdf } });
+ expect(notImage.isError).toBe(true);
+ const notFound = await h.client.callTool({ name: 'set_place_image_from_file', arguments: { tripId: trip.id, placeId: place.id, fileId: foreign } });
+ expect(notFound.isError).toBe(true);
+ });
+ });
+});
+
describe('Tool: update_place', () => {
it('updates specific fields and preserves others', async () => {
const { user } = createUser(testDb);
diff --git a/server/tests/unit/mcp/tools-settings.test.ts b/server/tests/unit/mcp/tools-settings.test.ts
index fecb115d4..f065fef73 100644
--- a/server/tests/unit/mcp/tools-settings.test.ts
+++ b/server/tests/unit/mcp/tools-settings.test.ts
@@ -259,6 +259,19 @@ describe('Tool: update_display_settings', () => {
});
});
+ it('writes place_language, clears it with "", and refuses a language TREK does not offer (#1799)', async () => {
+ const { user } = createUser(testDb);
+ await withHarness(user.id, async (h) => {
+ const set = parseToolResult(await update(h, { place_language: 'en' })) as any;
+ expect(set.settings.place_language).toBe('en');
+ const refused = await update(h, { place_language: 'klingon' });
+ expect(refused.isError).toBe(true);
+ expect(readSetting(user.id, 'place_language')).toBe('en');
+ const cleared = parseToolResult(await update(h, { place_language: '' })) as any;
+ expect(cleared.settings.place_language).toBe('');
+ });
+ });
+
it('writes week_start and refuses a day outside the three the app offers (#2029)', async () => {
const { user } = createUser(testDb);
await withHarness(user.id, async (h) => {
diff --git a/server/tests/unit/mcp/tools-share.test.ts b/server/tests/unit/mcp/tools-share.test.ts
index a21a6ed6e..153c20acd 100644
--- a/server/tests/unit/mcp/tools-share.test.ts
+++ b/server/tests/unit/mcp/tools-share.test.ts
@@ -71,6 +71,16 @@ describe('Tool: get_share_link', () => {
});
});
+ it('stores the two narrowing options like the REST route (#1712)', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ await withHarness(user.id, async (h) => {
+ await h.client.callTool({ name: 'create_share_link', arguments: { tripId: trip.id, share_travel_only: true, share_hide_images: true } });
+ const link = parseToolResult(await h.client.callTool({ name: 'get_share_link', arguments: { tripId: trip.id } })) as any;
+ expect(link.link).toMatchObject({ share_travel_only: true, share_hide_images: true });
+ });
+ });
+
it('returns access denied for a non-member trip', async () => {
const { user } = createUser(testDb);
const { user: other } = createUser(testDb);
diff --git a/server/tests/unit/mcp/tools-tags-maps-weather.test.ts b/server/tests/unit/mcp/tools-tags-maps-weather.test.ts
index 440f22f94..9adb30ca7 100644
--- a/server/tests/unit/mcp/tools-tags-maps-weather.test.ts
+++ b/server/tests/unit/mcp/tools-tags-maps-weather.test.ts
@@ -422,6 +422,44 @@ describe('Tool: get_place_details', () => {
});
});
+// ---------------------------------------------------------------------------
+// search_nearby_places (#976)
+// ---------------------------------------------------------------------------
+
+describe('Tool: search_nearby_places', () => {
+ it('lists what the index holds around the point, nearest first with the distance', async () => {
+ const { user } = createUser(testDb);
+ trekNearbyMock.mockClear();
+ trekNearbyMock.mockResolvedValueOnce([
+ { gers: 'n-2', name: 'Farther', lat: 48.8611, lng: 2.3364, address: null, contact: null },
+ { gers: 'n-1', name: 'Closer', lat: 48.8607, lng: 2.3376, address: null, contact: null },
+ ]);
+
+ await withHarness(user.id, async (h) => {
+ const result = await h.client.callTool({
+ name: 'search_nearby_places',
+ arguments: { lat: 48.8606, lng: 2.3376, radius: 200, limit: 5 },
+ });
+ const data = parseToolResult(result) as any;
+ expect(data.source).toBe('trek-places');
+ expect(data.places.map((p: any) => p.name)).toEqual(['Closer', 'Farther']);
+ expect(data.places[0].distance_m).toBe(11);
+ expect(trekNearbyMock).toHaveBeenCalledWith(48.8606, 2.3376, { radius: 200, limit: 5 });
+ });
+ });
+
+ it('refuses a circle wider than the REST route allows', async () => {
+ const { user } = createUser(testDb);
+ await withHarness(user.id, async (h) => {
+ const result = await h.client.callTool({
+ name: 'search_nearby_places',
+ arguments: { lat: 48.8606, lng: 2.3376, radius: 5001 },
+ });
+ expect(result.isError).toBe(true);
+ });
+ });
+});
+
// ---------------------------------------------------------------------------
// search_pois (#30)
// ---------------------------------------------------------------------------
diff --git a/server/tests/unit/mcp/tools-vacay.test.ts b/server/tests/unit/mcp/tools-vacay.test.ts
index b8bd5d0d5..c6377325d 100644
--- a/server/tests/unit/mcp/tools-vacay.test.ts
+++ b/server/tests/unit/mcp/tools-vacay.test.ts
@@ -478,6 +478,16 @@ describe('Tool: toggle_company_holiday', () => {
});
});
+ it('makes a half company holiday like the REST route (#2439)', async () => {
+ const { user } = createUser(testDb);
+ await withHarness(user.id, async (h) => {
+ const data = parseToolResult(await h.client.callTool({
+ name: 'toggle_company_holiday', arguments: { date: '2025-12-24', half: true },
+ })) as any;
+ expect(data).toMatchObject({ action: 'added', fraction: 0.5 });
+ });
+ });
+
it('blocks demo user', async () => {
process.env.DEMO_MODE = 'true';
const { user } = createUser(testDb, { email: '[email protected]' });
diff --git a/server/tests/unit/nest/assignments.controller.test.ts b/server/tests/unit/nest/assignments.controller.test.ts
index 09d86a6fc..d868e7720 100644
--- a/server/tests/unit/nest/assignments.controller.test.ts
+++ b/server/tests/unit/nest/assignments.controller.test.ts
@@ -64,9 +64,39 @@ describe('DayAssignmentsController (parity with the legacy day-assignments route
expect(new DayAssignmentsController(s).remove(user, '5', '3', '9', 'sock')).toEqual({ success: true });
expect(reconcile).toHaveBeenCalledWith('5', 'sock');
});
+
+ it('DELETE / (clear day) 404 day, else empties the day and announces every removal (#2470)', () => {
+ expect(thrown(() => new DayAssignmentsController(svc({ dayExists: vi.fn().mockReturnValue(false) } as Partial<AssignmentsService>)).clear(user, '5', '3'))).toEqual({ status: 404, body: { error: 'Day not found' } });
+ const clearDay = vi.fn().mockReturnValue([7, 8]); const broadcast = vi.fn(); const reconcile = vi.fn();
+ const s = svc({ clearDay, broadcast, reconcile } as Partial<AssignmentsService>);
+ expect(new DayAssignmentsController(s).clear(user, '5', '3', 'sock')).toEqual({ success: true, removedIds: [7, 8] });
+ expect(clearDay).toHaveBeenCalledWith('3');
+ expect(broadcast).toHaveBeenCalledWith('5', 'assignment:deleted', { assignmentId: 7, dayId: 3 }, 'sock');
+ expect(broadcast).toHaveBeenCalledWith('5', 'assignment:deleted', { assignmentId: 8, dayId: 3 }, 'sock');
+ expect(reconcile).toHaveBeenCalledWith('5', 'sock');
+ });
+
+ it('DELETE / on an already empty day succeeds without a journey reconcile', () => {
+ const reconcile = vi.fn(); const broadcast = vi.fn();
+ const s = svc({ clearDay: vi.fn().mockReturnValue([]), reconcile, broadcast } as Partial<AssignmentsService>);
+ expect(new DayAssignmentsController(s).clear(user, '5', '3')).toEqual({ success: true, removedIds: [] });
+ expect(broadcast).not.toHaveBeenCalled();
+ expect(reconcile).not.toHaveBeenCalled();
+ });
});
describe('AssignmentOpsController (parity with the per-assignment op routes)', () => {
+ it('PUT /:id/route takes a stop out of the route and back, scoped to the trip (#2532)', () => {
+ const setRouteExcluded = vi.fn().mockReturnValue({ id: 9, route_excluded: true })
+ const s = svc({ getAssignmentForTrip: vi.fn().mockReturnValue({ id: 9 }), setRouteExcluded } as Partial<AssignmentsService>)
+ const controller = new AssignmentOpsController(s)
+ expect(controller.route(user, '5', '9', { excluded: true }, 'sock')).toEqual({ assignment: { id: 9, route_excluded: true } })
+ expect(setRouteExcluded).toHaveBeenCalledWith('9', true)
+ expect(s.broadcast).toHaveBeenCalledWith('5', 'assignment:updated', { assignment: { id: 9, route_excluded: true } }, 'sock')
+ vi.mocked(s.getAssignmentForTrip).mockReturnValue(undefined)
+ expect(thrown(() => controller.route(user, '5', '9', { excluded: false }))).toEqual({ status: 404, body: { error: 'Assignment not found' } })
+ });
+
it('scopes explicit day ends to the trip and broadcasts the saved visit', () => {
const setEndDay = vi.fn().mockReturnValue({ id: 9, end_day: true });
const s = svc({ getAssignmentForTrip: vi.fn().mockReturnValue({ id: 9 }), setEndDay });
diff --git a/server/tests/unit/nest/assignments.service.test.ts b/server/tests/unit/nest/assignments.service.test.ts
index 675a741ac..dbea060d5 100644
--- a/server/tests/unit/nest/assignments.service.test.ts
+++ b/server/tests/unit/nest/assignments.service.test.ts
@@ -249,6 +249,26 @@ describe('deleteAssignment / reorderAssignments', () => {
});
});
+describe('clearDay (#2470)', () => {
+ it('ASG-SVC-013b: removes every place of the day, leaves other days alone, returns the ids', () => {
+ const { trip, day, place } = fixture();
+ const otherDay = createDay(testDb, trip.id);
+ const a1 = createDayAssignment(testDb, day.id, place.id);
+ const a2 = createDayAssignment(testDb, day.id, place.id);
+ const kept = createDayAssignment(testDb, otherDay.id, place.id);
+
+ expect(svc.clearDay(day.id).sort()).toEqual([a1.id, a2.id].sort());
+ expect(testDb.prepare('SELECT COUNT(*) AS n FROM day_assignments WHERE day_id = ?').get(day.id)).toEqual({ n: 0 });
+ expect(testDb.prepare('SELECT id FROM day_assignments WHERE id = ?').get(kept.id)).toEqual({ id: kept.id });
+ expect(testDb.prepare('SELECT id FROM days WHERE id = ?').get(day.id)).toEqual({ id: day.id });
+ });
+
+ it('ASG-SVC-013c: an empty day clears to an empty list', () => {
+ const { day } = fixture();
+ expect(svc.clearDay(day.id)).toEqual([]);
+ });
+});
+
// ── getAssignmentForTrip / moveAssignment ─────────────────────────────────────
describe('getAssignmentForTrip', () => {
@@ -667,5 +687,15 @@ describe('setLegTransportMode', () => {
});
});
+describe('setRouteExcluded (#2532)', () => {
+ it('ASG-SVC-025b: keeps the stop but flags it out of the route, and back', () => {
+ const { day, place } = fixture();
+ const a = createDayAssignment(testDb, day.id, place.id);
+ expect(svc.getAssignmentWithPlace(a.id)!.route_excluded).toBe(false);
+ expect(svc.setRouteExcluded(a.id, true)!.route_excluded).toBe(true);
+ expect(svc.setRouteExcluded(a.id, false)!.route_excluded).toBe(false);
+ });
+});
+
// ASG-SVC-026 pinned the deleted assignments.bridge and died with it — the
// same paths are covered on the service above and via places.mcp injection.
diff --git a/server/tests/unit/nest/atlas.controller.test.ts b/server/tests/unit/nest/atlas.controller.test.ts
index bcad342ee..5b293d64f 100644
--- a/server/tests/unit/nest/atlas.controller.test.ts
+++ b/server/tests/unit/nest/atlas.controller.test.ts
@@ -128,6 +128,12 @@ describe('AtlasController (parity with the legacy /api/addons/atlas route)', ()
expect(createBucketItem).toHaveBeenCalledWith(8, { name: 'Tokyo', lat: 35, lng: 139, country_code: undefined, notes: undefined, target_date: undefined });
});
+ it('forwards a wished-for region, as the MCP tool does (#1901)', () => {
+ const createBucketItem = vi.fn().mockReturnValue({ id: 2 });
+ makeController({ createBucketItem }).createBucketItem(user, { name: 'Bayern', country_code: 'DE', region_code: 'DE-BY' });
+ expect(createBucketItem).toHaveBeenCalledWith(8, expect.objectContaining({ country_code: 'DE', region_code: 'DE-BY' }));
+ });
+
it('404 on update of a missing item', () => {
const updateBucketItem = vi.fn().mockReturnValue(null);
return thrown(() => makeController({ updateBucketItem }).updateBucketItem(user, '9', { name: 'X' })).then((r) =>
diff --git a/server/tests/unit/nest/atlas.service.test.ts b/server/tests/unit/nest/atlas.service.test.ts
index 784635446..719578a2a 100644
--- a/server/tests/unit/nest/atlas.service.test.ts
+++ b/server/tests/unit/nest/atlas.service.test.ts
@@ -42,7 +42,7 @@ import { createUser, createTrip, createReservation } from '../../helpers/factori
import { getCountryFromCoords, getCountryFromAddress, isPointInCountryBox, reverseGeocodeCountry, getRegionGeo, getCountryGeo } from '../../../src/nest/atlas/atlas-geo';
import { cacheKeyFor, getCached, setCached } from '../../../src/nest/geo/nominatim.client';
import { DatabaseService } from '../../../src/nest/database/database.service';
-import { AtlasService, BucketItemExistsError } from '../../../src/nest/atlas/atlas.service';
+import { AtlasService, BucketItemExistsError, bucketRegionCode } from '../../../src/nest/atlas/atlas.service';
// Direct construction over the shared test connection — no TestingModule (repo
// convention for DI-native service unit tests).
@@ -1340,6 +1340,17 @@ describe('atlas quirk fixes', () => {
expect(unmarked.marked_source).toBeNull();
});
+ it('ATLAS-SVC-031b: keeps a wished-for region of the same country, drops any other (#1901)', () => {
+ const { user } = createUser(testDb);
+ const bavaria = atlas.createBucketItem(user.id, { name: 'Bayern', country_code: 'DE', region_code: 'de-by' }) as { region_code: string | null };
+ expect(bavaria.region_code).toBe('DE-BY');
+ const foreign = atlas.createBucketItem(user.id, { name: 'Berlin', country_code: 'FR', region_code: 'DE-BE' }) as { region_code: string | null };
+ expect(foreign.region_code).toBeNull();
+ const noCountry = atlas.createBucketItem(user.id, { name: 'Somewhere', region_code: 'DE-HH' }) as { region_code: string | null };
+ expect(noCountry.region_code).toBeNull();
+ expect(bucketRegionCode('DE-BY; DROP', 'DE')).toBeNull();
+ });
+
it('ATLAS-SVC-032: updateBucketItem persists lat/lng of exactly 0 (equator/prime meridian)', () => {
const { user } = createUser(testDb);
const item = atlas.createBucketItem(user.id, { name: 'Null Island', lat: 10, lng: 10 }) as { id: number };
diff --git a/server/tests/unit/nest/boot-restore.test.ts b/server/tests/unit/nest/boot-restore.test.ts
new file mode 100644
index 000000000..02487c2dd
--- /dev/null
+++ b/server/tests/unit/nest/boot-restore.test.ts
@@ -0,0 +1,132 @@
+/**
+ * BOOT-RESTORE-001..007 — restoring a backup on a first start (#1089).
+ *
+ * Real files, a real archive and a real SQLite file: what is being protected is
+ * the order of things on disk, and a mocked filesystem would only confirm the
+ * calls this file makes. The plugin staging is the one seam stubbed, because
+ * it moves trees under the plugin roots of the machine running the tests.
+ */
+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import archiver from 'archiver';
+import Database from 'better-sqlite3';
+
+const { stageMock } = vi.hoisted(() => ({ stageMock: vi.fn() }));
+vi.mock('../../../src/nest/plugins/plugin-backup', () => ({ stageExtractedPluginTrees: stageMock }));
+
+import { BootRestoreError, restoreOnFirstBoot } from '../../../src/nest/backup/boot-restore';
+
+let root: string;
+let dataDir: string;
+let dbFile: string;
+
+beforeEach(() => {
+ root = fs.mkdtempSync(path.join(os.tmpdir(), 'trek-boot-restore-'));
+ dataDir = path.join(root, 'data');
+ fs.mkdirSync(dataDir);
+ dbFile = path.join(dataDir, 'travel.db');
+ stageMock.mockClear();
+ vi.spyOn(console, 'log').mockImplementation(() => {});
+});
+
+afterEach(() => {
+ vi.restoreAllMocks();
+ fs.rmSync(root, { recursive: true, force: true });
+});
+
+/** A database with the tables every TREK has, and one user to recognise it by. */
+function trekDb(file: string, tables = ['users', 'trips', 'trip_members', 'places', 'days']) {
+ const db = new Database(file);
+ for (const t of tables) db.exec(`CREATE TABLE ${t} (id INTEGER PRIMARY KEY, name TEXT)`);
+ if (tables.includes('users')) db.prepare('INSERT INTO users (name) VALUES (?)').run('from-backup');
+ db.close();
+}
+
+async function archive(entries: Record<string, string | { file: string }>): Promise<string> {
+ const zipPath = path.join(root, 'backup.zip');
+ await new Promise<void>((resolve, reject) => {
+ const out = fs.createWriteStream(zipPath);
+ const zip = archiver('zip');
+ out.on('close', () => resolve());
+ zip.on('error', reject);
+ zip.pipe(out);
+ for (const [name, content] of Object.entries(entries)) {
+ if (typeof content === 'string') zip.append(content, { name });
+ else zip.file(content.file, { name });
+ }
+ void zip.finalize();
+ });
+ return zipPath;
+}
+
+async function goodArchive(extra: Record<string, string> = {}) {
+ const src = path.join(root, 'src.db');
+ trekDb(src);
+ return archive({ 'travel.db': { file: src }, '.encryption_key': 'a'.repeat(64), 'uploads/covers/c.jpg': 'jpeg', ...extra });
+}
+
+describe('restoreOnFirstBoot', () => {
+ it('BOOT-RESTORE-001: without the variable nothing happens', async () => {
+ expect(await restoreOnFirstBoot({ archive: null, dbFile, dataDir })).toEqual({ restored: false, reason: 'unset' });
+ expect(fs.existsSync(dbFile)).toBe(false);
+ });
+
+ it('BOOT-RESTORE-002: on a first start the backup\'s database, key and uploads are put in place', async () => {
+ const zipPath = await goodArchive();
+
+ const out = await restoreOnFirstBoot({ archive: zipPath, dbFile, dataDir });
+
+ expect(out.restored).toBe(true);
+ const db = new Database(dbFile, { readonly: true });
+ expect(db.prepare('SELECT name FROM users').get()).toEqual({ name: 'from-backup' });
+ db.close();
+ expect(fs.readFileSync(path.join(dataDir, '.encryption_key'), 'utf8')).toBe('a'.repeat(64));
+ if (!out.restored) throw new Error('unreachable');
+ expect(fs.readFileSync(path.join(out.uploads!, 'covers', 'c.jpg'), 'utf8')).toBe('jpeg');
+ expect(stageMock).toHaveBeenCalledWith(out.staging);
+ expect(fs.existsSync(`${dbFile}.restore-tmp`)).toBe(false);
+ });
+
+ it('BOOT-RESTORE-003: with a database already there the backup is left alone, so a restart never rolls back', async () => {
+ const zipPath = await goodArchive();
+ trekDb(dbFile, ['users', 'trips', 'trip_members', 'places', 'days']);
+ const before = fs.readFileSync(dbFile);
+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
+
+ expect(await restoreOnFirstBoot({ archive: zipPath, dbFile, dataDir })).toEqual({ restored: false, reason: 'database-exists' });
+ expect(fs.readFileSync(dbFile).equals(before)).toBe(true);
+ expect(warn).toHaveBeenCalledWith(expect.stringContaining('only restored on a first start'));
+ });
+
+ it('BOOT-RESTORE-004: a missing archive stops the start instead of coming up empty', async () => {
+ await expect(restoreOnFirstBoot({ archive: path.join(root, 'nope.zip'), dbFile, dataDir }))
+ .rejects.toBeInstanceOf(BootRestoreError);
+ expect(fs.existsSync(dbFile)).toBe(false);
+ });
+
+ it('BOOT-RESTORE-005: an archive without a database is refused and leaves no scratch behind', async () => {
+ const zipPath = await archive({ 'notes.txt': 'hello' });
+ await expect(restoreOnFirstBoot({ archive: zipPath, dbFile, dataDir }))
+ .rejects.toThrow('RESTORE_FROM_BACKUP: Invalid backup: travel.db not found');
+ expect(fs.existsSync(dbFile)).toBe(false);
+ expect(fs.readdirSync(dataDir).filter(n => n.startsWith('restore-boot-'))).toEqual([]);
+ });
+
+ it('BOOT-RESTORE-006: a database that is not a TREK one is refused', async () => {
+ const src = path.join(root, 'other.db');
+ trekDb(src, ['users']);
+ const zipPath = await archive({ 'travel.db': { file: src } });
+ await expect(restoreOnFirstBoot({ archive: zipPath, dbFile, dataDir }))
+ .rejects.toThrow('missing required table: trips');
+ expect(fs.existsSync(dbFile)).toBe(false);
+ });
+
+ it('BOOT-RESTORE-007: an entry escaping the archive is refused', async () => {
+ const zipPath = await archive({ '../escape.txt': 'x', 'travel.db': 'not a db' });
+ await expect(restoreOnFirstBoot({ archive: zipPath, dbFile, dataDir }))
+ .rejects.toThrow(/escapes the archive root|not a valid SQLite database/);
+ expect(fs.existsSync(dbFile)).toBe(false);
+ });
+});
diff --git a/server/tests/unit/nest/budget.controller.test.ts b/server/tests/unit/nest/budget.controller.test.ts
index 8710f3117..ed6fa5092 100644
--- a/server/tests/unit/nest/budget.controller.test.ts
+++ b/server/tests/unit/nest/budget.controller.test.ts
@@ -119,6 +119,17 @@ describe('BudgetController (parity with the legacy /api/trips/:tripId/budget rou
expect(updateSettlement).toHaveBeenCalledWith('3', '5', expect.objectContaining({ currency: 'EUR', fallback_fx }));
});
+ it('POST and PUT /settlements forward the note, as the MCP tools do (#2340)', async () => {
+ const createSettlement = vi.fn().mockResolvedValue({ id: 3 });
+ const updateSettlement = vi.fn().mockResolvedValue({ id: 3 });
+ const svc = makeService({ createSettlement, updateSettlement } as Partial<BudgetService>);
+ const body = { from_user_id: 1, to_user_id: 2, amount: 10, note: 'Cash' };
+ await new BudgetController(svc).createSettlement(user, '5', body);
+ expect(createSettlement).toHaveBeenCalledWith('5', expect.objectContaining({ note: 'Cash' }), user.id);
+ await new BudgetController(svc).updateSettlement(user, '5', '3', body);
+ expect(updateSettlement).toHaveBeenCalledWith('3', '5', expect.objectContaining({ note: 'Cash' }));
+ });
+
it('DELETE /settlements/:id 404 when missing', () => {
const svc = makeService({ deleteSettlement: vi.fn().mockReturnValue(false) } as Partial<BudgetService>);
expect(thrown(() => new BudgetController(svc).deleteSettlement(user, '5', '7'))).toEqual({
diff --git a/server/tests/unit/nest/budget.service.db.test.ts b/server/tests/unit/nest/budget.service.db.test.ts
index 4d25caa87..3c42bd7c9 100644
--- a/server/tests/unit/nest/budget.service.db.test.ts
+++ b/server/tests/unit/nest/budget.service.db.test.ts
@@ -571,6 +571,20 @@ describe('settlement parties are confined to the trip', () => {
expect(created).toMatchObject({ from_user_id: bob.id, to_user_id: alice.id });
});
+ it('BUDGET-SVC-DB-030b: keeps a trimmed note on a payment and clears a blank one (#2340)', async () => {
+ const { user: alice } = createUser(testDb, { username: 'alice' });
+ const { user: bob } = createUser(testDb, { username: 'bob' });
+ const trip = createTrip(testDb, alice.id);
+ addTripMember(testDb, trip.id, bob.id);
+
+ const created = await budget.createSettlement(trip.id, { from_user_id: bob.id, to_user_id: alice.id, amount: 10, note: ' Bank transfer ' }, alice.id);
+ expect(created).toMatchObject({ note: 'Bank transfer' });
+ const kept = await budget.updateSettlement(created!.id, trip.id, { from_user_id: bob.id, to_user_id: alice.id, amount: 11 });
+ expect(kept).toMatchObject({ amount: 11, note: 'Bank transfer' });
+ const cleared = await budget.updateSettlement(created!.id, trip.id, { from_user_id: bob.id, to_user_id: alice.id, amount: 11, note: '' });
+ expect(cleared).toMatchObject({ note: null });
+ });
+
it('BUDGET-SVC-DB-031: drops an off-trip payer from an item instead of refusing it', () => {
const { user: alice } = createUser(testDb, { username: 'alice' });
const { user: outsider } = createUser(testDb, { username: 'outsider' });
diff --git a/server/tests/unit/nest/journey-domain.service.test.ts b/server/tests/unit/nest/journey-domain.service.test.ts
index 6d0ec3951..14a3929f9 100644
--- a/server/tests/unit/nest/journey-domain.service.test.ts
+++ b/server/tests/unit/nest/journey-domain.service.test.ts
@@ -692,6 +692,16 @@ describe('updateEntry', () => {
* be the boolean on the way out as well as the integer on the way in, and
* the broadcast has to say the same thing the answer does.
*/
+ it('creates and toggles a draft, answering the flag as a boolean (#696)', () => {
+ const { user } = createUser(testDb);
+ const journey = createJourney(testDb, user.id);
+ const created = svc.createEntry(journey.id, user.id, { entry_date: '2026-03-01', title: 'Rough', is_draft: true });
+ expect(created!.is_draft).toBe(true);
+ const published = svc.updateEntry(created!.id, user.id, { is_draft: false });
+ expect(published!.is_draft).toBe(false);
+ expect((testDb.prepare('SELECT is_draft FROM journey_entries WHERE id = ?').get(created!.id) as { is_draft: number }).is_draft).toBe(0);
+ });
+
it('switches a stop off and back on, and answers with the flag as a boolean', () => {
const { user } = createUser(testDb);
const journey = createJourney(testDb, user.id);
@@ -1667,6 +1677,45 @@ function insertEntry(journeyId: number, authorId: number, opts: { entry_date: st
return { id: Number(res.lastInsertRowid) };
}
+describe('reorderEntryPhotos (#824)', () => {
+ function photoOn(journeyId: number, entryIds: number[], order = 0): number {
+ const trek = testDb.prepare("INSERT INTO trek_photos (provider, file_path, created_at) VALUES ('local', '/p.jpg', ?)").run(Date.now()).lastInsertRowid;
+ const gp = Number(testDb.prepare('INSERT INTO journey_photos (journey_id, photo_id, sort_order, created_at) VALUES (?, ?, 0, ?)').run(journeyId, trek, Date.now()).lastInsertRowid);
+ for (const entryId of entryIds) testDb.prepare('INSERT INTO journey_entry_photos (entry_id, journey_photo_id, sort_order, created_at) VALUES (?, ?, ?, ?)').run(entryId, gp, order, Date.now());
+ return gp;
+ }
+ const orderOf = (entryId: number) =>
+ (testDb.prepare('SELECT journey_photo_id FROM journey_entry_photos WHERE entry_id = ? ORDER BY sort_order').all(entryId) as { journey_photo_id: number }[]).map(r => r.journey_photo_id);
+
+ it('JOURNEY-SVC-089b: orders the photos of one entry and leaves the same photo elsewhere alone', () => {
+ const { user } = createUser(testDb);
+ const journey = createJourney(testDb, user.id);
+ const a = insertEntry(journey.id, user.id, { entry_date: '2026-08-01' });
+ const b = insertEntry(journey.id, user.id, { entry_date: '2026-08-02' });
+ const p1 = photoOn(journey.id, [a.id, b.id], 0);
+ const p2 = photoOn(journey.id, [a.id], 1);
+ const p3 = photoOn(journey.id, [a.id], 2);
+ expect(svc.reorderEntryPhotos(a.id, user.id, [p3, p1, p2])).toBe(true);
+ expect(orderOf(a.id)).toEqual([p3, p1, p2]);
+ expect(testDb.prepare('SELECT sort_order FROM journey_entry_photos WHERE entry_id = ? AND journey_photo_id = ?').get(b.id, p1)).toEqual({ sort_order: 0 });
+ });
+
+ it('JOURNEY-SVC-089c: refuses a list that is not exactly the photos of the entry, and a stranger', () => {
+ const { user } = createUser(testDb);
+ const { user: stranger } = createUser(testDb);
+ const journey = createJourney(testDb, user.id);
+ const a = insertEntry(journey.id, user.id, { entry_date: '2026-08-01' });
+ const p1 = photoOn(journey.id, [a.id]);
+ const p2 = photoOn(journey.id, [a.id]);
+ const other = photoOn(journey.id, []);
+ expect(svc.reorderEntryPhotos(a.id, user.id, [p1])).toBe(false);
+ expect(svc.reorderEntryPhotos(a.id, user.id, [p1, other])).toBe(false);
+ expect(svc.reorderEntryPhotos(a.id, user.id, [p1, p1])).toBe(false);
+ expect(svc.reorderEntryPhotos(a.id, stranger.id, [p2, p1])).toBe(false);
+ expect(svc.reorderEntryPhotos(999999, user.id, [p2, p1])).toBe(false);
+ });
+});
+
describe('reorderEntries', () => {
it('JOURNEY-SVC-089: reorder persists and listEntries returns requested order regardless of entry_time', () => {
const { user } = createUser(testDb);
diff --git a/server/tests/unit/nest/journey-share.service.test.ts b/server/tests/unit/nest/journey-share.service.test.ts
index 09630647c..e80a971bd 100644
--- a/server/tests/unit/nest/journey-share.service.test.ts
+++ b/server/tests/unit/nest/journey-share.service.test.ts
@@ -496,6 +496,29 @@ describe('getPublicJourney', () => {
expect(result!.entries[0].title).toBe('Visible Entry');
});
+ it('JOURNEY-SHARE-018b: leaves drafts and the photos only they hold off the public page (#696)', () => {
+ const { user } = createUser(testDb);
+ const journey = createJourney(testDb, user.id);
+ const published = createJourneyEntry(testDb, journey.id, user.id, { title: 'Published', entry_date: '2026-01-10' });
+ const draft = createJourneyEntry(testDb, journey.id, user.id, { title: 'Draft', entry_date: '2026-01-11' });
+ testDb.prepare('UPDATE journey_entries SET is_draft = 1 WHERE id = ?').run(draft.id);
+ const shownPhoto = insertJourneyPhoto(published.id, { ownerId: user.id });
+ const draftPhoto = insertJourneyPhoto(draft.id, { ownerId: user.id });
+ // A photo on both a draft and a published entry is published.
+ const sharedPhoto = insertJourneyPhoto(draft.id, { ownerId: user.id, filePath: '/photos/both.jpg' });
+ const sharedRow = testDb.prepare('SELECT id FROM journey_photos WHERE photo_id = ?').get(sharedPhoto) as { id: number };
+ testDb.prepare('INSERT INTO journey_entry_photos (entry_id, journey_photo_id, sort_order, created_at) VALUES (?, ?, 1, 0)').run(published.id, sharedRow.id);
+ const { token } = svc.createOrUpdateJourneyShareLink(journey.id, user.id, { share_timeline: true, share_gallery: true });
+
+ const result = svc.getPublicJourney(token)!;
+ expect(result.entries.map((e: any) => e.title)).toEqual(['Published']);
+ expect(result.stats.entries).toBe(1);
+ const galleryIds = (result as any).gallery.map((p: any) => p.photo_id).sort();
+ expect(galleryIds).toEqual([shownPhoto, sharedPhoto].sort());
+ expect(svc.validateShareTokenForPhoto(token, draftPhoto)).toBeNull();
+ expect(svc.validateShareTokenForPhoto(token, shownPhoto)).not.toBeNull();
+ });
+
it('JOURNEY-SHARE-019: enriches entries with parsed tags and photos', () => {
const { user } = createUser(testDb);
const journey = createJourney(testDb, user.id);
diff --git a/server/tests/unit/nest/journey.controller.test.ts b/server/tests/unit/nest/journey.controller.test.ts
index 5dca62e07..adef9cbb7 100644
--- a/server/tests/unit/nest/journey.controller.test.ts
+++ b/server/tests/unit/nest/journey.controller.test.ts
@@ -397,6 +397,14 @@ describe('JourneyController', () => {
expect(ctl(svc({ reorderEntries: vi.fn().mockReturnValue(true) } as Partial<JourneyService>)).reorderEntries(user, '9', { orderedIds: [3, 1, 2] })).toEqual({ success: true });
});
+ it('reorderEntryPhotos forwards the order and answers 404 when refused (#824)', () => {
+ const reorderEntryPhotos = vi.fn().mockReturnValue(true);
+ expect(ctl(svc({ reorderEntryPhotos } as Partial<JourneyService>)).reorderEntryPhotos(user, '12', { orderedIds: [3, 1] }, 'sock')).toEqual({ success: true });
+ expect(reorderEntryPhotos).toHaveBeenCalledWith(12, user.id, [3, 1], 'sock');
+ expect(thrown(() => ctl(svc({ reorderEntryPhotos: vi.fn().mockReturnValue(false) } as Partial<JourneyService>)).reorderEntryPhotos(user, '12', { orderedIds: [3] })))
+ .toEqual({ status: 404, body: { error: 'Entry not found' } });
+ });
+
it('restoreSuggestions answers with the count, and refuses a viewer the same way its siblings do', () => {
const restore = vi.fn().mockReturnValue({ restored: 3 });
expect(ctl(svc({ restoreDismissedSuggestions: restore } as Partial<JourneyService>)).restoreSuggestions(user, '9')).toEqual({ restored: 3 });
diff --git a/server/tests/unit/nest/maps.amap.test.ts b/server/tests/unit/nest/maps.amap.test.ts
index 03a1a13b4..2a8bee677 100644
--- a/server/tests/unit/nest/maps.amap.test.ts
+++ b/server/tests/unit/nest/maps.amap.test.ts
@@ -63,6 +63,7 @@ vi.mock('../../../src/nest/maps/trek-places.client', async (importOriginal) => (
import { db } from '../../../src/db/database';
import { DatabaseService } from '../../../src/nest/database/database.service';
import { MapsService } from '../../../src/nest/maps/maps.service';
+import { trekPlacesSearch } from '../../../src/nest/maps/trek-places.client';
import {
AmapPlacesProvider,
AmapTipStash,
@@ -894,6 +895,122 @@ describe('MapsService with Amap in the keyed slot', () => {
});
});
+describe('MapsService: Amap first inside China when picked outright (#1636)', () => {
+ const BEIJING = { lat: 39.9087, lng: 116.3975, radius: 20000 };
+ const PARIS = { lat: 48.8584, lng: 2.2945, radius: 20000 };
+ const BEIJING_BOX = { low: { lat: 39.8, lng: 116.3 }, high: { lat: 40.0, lng: 116.5 } };
+ let spies: { mockRestore: () => void }[] = [];
+ afterEach(() => {
+ spies.forEach(s => s.mockRestore());
+ spies = [];
+ vi.mocked(trekPlacesSearch).mockClear();
+ });
+ function osmAnswers(places: Record<string, unknown>[]) {
+ const spy = vi.spyOn(svc, 'searchNominatim').mockResolvedValue(places as never);
+ spies.push(spy);
+ return spy;
+ }
+ const amapPoi = () => ok({ pois: [{ id: 'B1', name: '天安门', location: TIANANMEN_LOCATION }] });
+
+ it('AMAP-095: picked outright and searching around Beijing, Amap answers before the index and OpenStreetMap', async () => {
+ mockProviderGet.mockReturnValue({ value: 'amap' });
+ keys({ amap: 'akey' });
+ const osm = osmAnswers([{ name: 'Tiananmen (OSM)' }]);
+ const fetchSpy = vi.fn().mockResolvedValue(amapPoi());
+ vi.stubGlobal('fetch', fetchSpy);
+
+ const result = await svc.searchPlaces(1, '天安门', 'zh', BEIJING);
+
+ expect(result.source).toBe('amap');
+ expect(result.places[0].amap_poi_id).toBe('amap:B1');
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
+ expect(osm).not.toHaveBeenCalled();
+ expect(trekPlacesSearch).not.toHaveBeenCalled();
+ });
+
+ it('AMAP-096: an empty Amap answer hands the search on, and Amap is not asked a second time', async () => {
+ mockProviderGet.mockReturnValue({ value: 'amap' });
+ keys({ amap: 'akey' });
+ osmAnswers([]);
+ const fetchSpy = vi.fn().mockResolvedValue(ok({ count: '0', pois: [] }));
+ vi.stubGlobal('fetch', fetchSpy);
+
+ const result = await svc.searchPlaces(1, 'nothing here', 'zh', BEIJING);
+
+ expect(result).toEqual({ places: [], source: 'amap' });
+ expect(trekPlacesSearch).toHaveBeenCalled();
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
+ });
+
+ it('AMAP-097: a search centred outside China keeps the usual order, so the Eiffel Tower does not land in Macau', async () => {
+ mockProviderGet.mockReturnValue({ value: 'amap' });
+ keys({ amap: 'akey' });
+ osmAnswers([{ name: 'Tour Eiffel' }]);
+ const fetchSpy = vi.fn().mockResolvedValue(amapPoi());
+ vi.stubGlobal('fetch', fetchSpy);
+
+ const result = await svc.searchPlaces(1, 'Eiffel Tower', 'en', PARIS);
+
+ expect(result.places[0].name).toBe('Tour Eiffel');
+ expect(fetchSpy).not.toHaveBeenCalled();
+ });
+
+ it('AMAP-098: Amap holding the slot only by default (auto) changes nothing', async () => {
+ mockProviderGet.mockReturnValue(undefined);
+ keys({ amap: 'akey' });
+ osmAnswers([{ name: 'Tiananmen (OSM)' }]);
+ const fetchSpy = vi.fn().mockResolvedValue(amapPoi());
+ vi.stubGlobal('fetch', fetchSpy);
+
+ const result = await svc.searchPlaces(1, '天安门', 'zh', BEIJING);
+
+ expect(result.places[0].name).toBe('Tiananmen (OSM)');
+ expect(fetchSpy).not.toHaveBeenCalled();
+ });
+
+ it('AMAP-099: a failing Amap drops through to the index and OpenStreetMap with a warning', async () => {
+ mockProviderGet.mockReturnValue({ value: 'amap' });
+ keys({ amap: 'akey' });
+ osmAnswers([{ name: 'Tiananmen (OSM)' }]);
+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ spies.push(warn);
+ spies.push(vi.spyOn(console, 'error').mockImplementation(() => {}));
+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(amapError('10003')));
+
+ const result = await svc.searchPlaces(1, '天安门', 'zh', BEIJING);
+
+ expect(result.places[0].name).toBe('Tiananmen (OSM)');
+ expect(warn).toHaveBeenCalledWith('Amap search failed, falling back:', expect.any(String));
+ });
+
+ it('AMAP-100: suggestions around Beijing come from Amap first, once', async () => {
+ mockProviderGet.mockReturnValue({ value: 'amap' });
+ keys({ amap: 'akey' });
+ const fetchSpy = vi.fn().mockResolvedValue(ok({ tips: [{ id: 'T1', name: '天安门', district: '北京市东城区' }] }));
+ vi.stubGlobal('fetch', fetchSpy);
+
+ const result = await svc.autocompletePlaces(1, '天安', 'zh', BEIJING_BOX);
+
+ expect(result.source).toBe('amap');
+ expect(result.suggestions[0].placeId).toBe('amap:T1');
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
+ expect(trekPlacesSearch).not.toHaveBeenCalled();
+ });
+
+ it('AMAP-101: empty Amap suggestions hand on to the index and are not asked for again', async () => {
+ mockProviderGet.mockReturnValue({ value: 'amap' });
+ keys({ amap: 'akey' });
+ const fetchSpy = vi.fn().mockResolvedValue(ok({ tips: [] }));
+ vi.stubGlobal('fetch', fetchSpy);
+
+ const result = await svc.autocompletePlaces(1, 'zzz', 'zh', BEIJING_BOX);
+
+ expect(result).toEqual({ suggestions: [], source: 'amap' });
+ expect(trekPlacesSearch).toHaveBeenCalled();
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
+ });
+});
+
describe('AmapTipStash', () => {
it('AMAP-090: a tip is forgotten once its ten minutes are up', () => {
const tips = new AmapTipStash();
diff --git a/server/tests/unit/nest/maps.controller.test.ts b/server/tests/unit/nest/maps.controller.test.ts
index 9b98a9911..7328eb0cc 100644
--- a/server/tests/unit/nest/maps.controller.test.ts
+++ b/server/tests/unit/nest/maps.controller.test.ts
@@ -80,6 +80,26 @@ describe('MapsController (parity with the legacy /api/maps route)', () => {
});
});
+ describe('POST /nearby', () => {
+ it('forwards the point, the circle, the count and the language', async () => {
+ const nearbyPlaces = vi.fn().mockResolvedValue({ places: [], source: 'trek-places' });
+ const res = await makeController({ nearbyPlaces }).nearby(user, { lat: 52.5, lng: 13.4, radius: 300, limit: 5 }, 'de');
+ expect(res).toEqual({ places: [], source: 'trek-places' });
+ expect(nearbyPlaces).toHaveBeenCalledWith(3, 52.5, 13.4, { radius: 300, limit: 5, lang: 'de' });
+ });
+
+ it('maps a provider error to its status, and anything else to 500', async () => {
+ const refused = vi.fn().mockRejectedValue(withError(429, 'Quota exceeded'));
+ expect(await thrown(() => makeController({ nearbyPlaces: refused }).nearby(user, { lat: 1, lng: 2 }))).toEqual({
+ status: 429, body: { error: 'Quota exceeded' },
+ });
+ const broken = vi.fn().mockRejectedValue('boom');
+ expect(await thrown(() => makeController({ nearbyPlaces: broken }).nearby(user, { lat: 1, lng: 2 }))).toEqual({
+ status: 500, body: { error: 'Nearby search error' },
+ });
+ });
+ });
+
describe('GET /area', () => {
const BOX = { minLat: 54, minLng: 12, maxLat: 54.2, maxLng: 12.3 };
diff --git a/server/tests/unit/nest/maps.nearby.test.ts b/server/tests/unit/nest/maps.nearby.test.ts
new file mode 100644
index 000000000..043dfa106
--- /dev/null
+++ b/server/tests/unit/nest/maps.nearby.test.ts
@@ -0,0 +1,227 @@
+/**
+ * MAPS-NEARBY-001..010 — places around a point, nearest first (#976).
+ *
+ * Three sources in the search's own order: the index, Google with a key, then
+ * OpenStreetMap. What matters is that each answer reads the same (the search
+ * record plus `distance_m`, nearest first), and that Google, which bills per
+ * call, is asked only when the index had nothing and never twice for one spot.
+ */
+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
+
+const { mockNearby } = vi.hoisted(() => ({
+ mockNearby: vi.fn(async (_lat: number, _lng: number, _opts?: { radius?: number; limit?: number }): Promise<unknown[]> => []),
+}));
+vi.mock('../../../src/nest/maps/trek-places.client', async (importOriginal) => ({
+ ...(await importOriginal<typeof import('../../../src/nest/maps/trek-places.client')>()),
+ trekPlacesNearby: mockNearby,
+}));
+
+vi.mock('../../../src/config', () => ({ JWT_SECRET: 'test-secret', ENCRYPTION_KEY: '0'.repeat(64) }));
+
+import { MapsService } from '../../../src/nest/maps/maps.service';
+import {
+ nearbyCacheKey,
+ nearbyOverpassQuery,
+ nearestFirst,
+ overpassNearbyRecords,
+} from '../../../src/nest/maps/maps-nearby.helpers';
+import type { DatabaseService } from '../../../src/nest/database/database.service';
+import type { PlacePhotoCacheService } from '../../../src/nest/place-photos/place-photo-cache.service';
+
+const indexRow = (gers: string, name: string, lat: number, lng: number) => ({
+ gers,
+ name,
+ lat,
+ lng,
+ category: 'cafe',
+ categoryPath: null,
+ confidence: 0.9,
+ address: { freeform: 'Pariser Platz 1', locality: 'Berlin', postcode: '10117', region: null, country: 'DE' },
+ contact: null,
+ brand: null,
+ source: 'overture',
+ hours: null,
+ distanceMetres: 0,
+});
+
+const ORIGINAL_TREK_PLACES = process.env.TREK_PLACES_ENABLED;
+const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
+const error = vi.spyOn(console, 'error').mockImplementation(() => {});
+
+// Every case asks about its own spot: the answers are cached per process, and a
+// shared point would make the second case read the first one's answer.
+let spot = 0;
+function nextPoint() {
+ spot += 1;
+ return { lat: 10 + spot / 10, lng: 20 + spot / 10 };
+}
+
+function make(opts: { index?: boolean; google?: boolean } = {}) {
+ if (opts.index === false) process.env.TREK_PLACES_ENABLED = 'false';
+ else delete process.env.TREK_PLACES_ENABLED;
+ const database = { get: vi.fn(() => undefined) } as unknown as DatabaseService;
+ const svc = new MapsService(database, {} as PlacePhotoCacheService);
+ vi.spyOn(svc, 'keyedProvider').mockReturnValue(
+ opts.google ? ({ id: 'google', key: 'test-key', source: 'user-row' } as ReturnType<MapsService['keyedProvider']>) : null,
+ );
+ return svc;
+}
+
+const jsonResponse = (body: unknown, ok = true, status = 200) => ({ ok, status, json: async () => body });
+
+beforeEach(() => {
+ mockNearby.mockReset();
+ mockNearby.mockResolvedValue([]);
+ warn.mockClear();
+ error.mockClear();
+});
+
+afterEach(() => {
+ vi.unstubAllGlobals();
+ if (ORIGINAL_TREK_PLACES === undefined) delete process.env.TREK_PLACES_ENABLED;
+ else process.env.TREK_PLACES_ENABLED = ORIGINAL_TREK_PLACES;
+});
+
+describe('MapsService.nearbyPlaces', () => {
+ it('MAPS-NEARBY-001: the index answers first, nearest first, with the distance on each record', async () => {
+ const p = nextPoint();
+ mockNearby.mockResolvedValue([
+ indexRow('far', 'Far Cafe', p.lat + 0.003, p.lng),
+ indexRow('near', 'Near Cafe', p.lat + 0.0005, p.lng),
+ ]);
+ const fetchMock = vi.fn();
+ vi.stubGlobal('fetch', fetchMock);
+
+ const out = await make({ google: true }).nearbyPlaces(1, p.lat, p.lng, { radius: 800, limit: 5 });
+
+ expect(mockNearby).toHaveBeenCalledWith(p.lat, p.lng, { radius: 800, limit: 5 });
+ expect(out.source).toBe('trek-places');
+ expect(out.places.map(r => r.name)).toEqual(['Near Cafe', 'Far Cafe']);
+ expect(out.places[0].distance_m).toBe(56);
+ expect(out.places[0].osm_id).toBe('gers:near');
+ // A key is there, and still not spent.
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+
+ it('MAPS-NEARBY-002: with nothing in the index, Google is asked by distance inside the circle', async () => {
+ const p = nextPoint();
+ const fetchMock = vi.fn().mockResolvedValue(jsonResponse({
+ places: [
+ { id: 'g-far', displayName: { text: 'Far' }, location: { latitude: p.lat + 0.002, longitude: p.lng } },
+ { id: 'g-shut', displayName: { text: 'Shut' }, location: { latitude: p.lat, longitude: p.lng }, businessStatus: 'CLOSED_PERMANENTLY' },
+ { id: 'g-near', displayName: { text: 'Near' }, formattedAddress: 'Somewhere 1', location: { latitude: p.lat + 0.0001, longitude: p.lng } },
+ ],
+ }));
+ vi.stubGlobal('fetch', fetchMock);
+
+ const out = await make({ google: true }).nearbyPlaces(1, p.lat, p.lng, { lang: 'de' });
+
+ const [url, init] = fetchMock.mock.calls[0] as [string, RequestInit];
+ expect(url).toContain('places:searchNearby');
+ expect(JSON.parse(init.body as string)).toEqual({
+ maxResultCount: 20,
+ rankPreference: 'DISTANCE',
+ languageCode: 'de',
+ locationRestriction: { circle: { center: { latitude: p.lat, longitude: p.lng }, radius: 500 } },
+ });
+ expect(out.source).toBe('google');
+ expect(out.places.map(r => r.google_place_id)).toEqual(['g-near', 'g-far']);
+ expect(out.places[0]).toMatchObject({ name: 'Near', address: 'Somewhere 1', distance_m: 11, source: 'google' });
+ });
+
+ it('MAPS-NEARBY-003: a Google refusal is an error with its status, not an empty list', async () => {
+ const p = nextPoint();
+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ error: { message: 'Quota exceeded' } }, false, 429)));
+
+ await expect(make({ google: true }).nearbyPlaces(1, p.lat, p.lng)).rejects.toMatchObject({
+ message: 'Quota exceeded',
+ status: 429,
+ });
+ expect(error).toHaveBeenCalledWith(expect.stringContaining('searchNearby failed with 429 userId=1 keySource=user-row'));
+ });
+
+ it('MAPS-NEARBY-004: without a key OpenStreetMap answers, in the asked language, nearest first', async () => {
+ const p = nextPoint();
+ const fetchMock = vi.fn().mockResolvedValue(jsonResponse({
+ elements: [
+ { type: 'node', id: 2, lat: p.lat + 0.001, lon: p.lng, tags: { name: 'Museum', 'name:de': 'Das Museum', tourism: 'museum' } },
+ { type: 'way', id: 3, center: { lat: p.lat + 0.0002, lon: p.lng }, tags: { name: 'Bakery', shop: 'bakery' } },
+ ],
+ }));
+ vi.stubGlobal('fetch', fetchMock);
+
+ const out = await make().nearbyPlaces(1, p.lat, p.lng, { radius: 300, lang: 'de' });
+
+ const body = decodeURIComponent(String((fetchMock.mock.calls[0][1] as RequestInit).body));
+ expect(body).toContain(`around:300,${p.lat},${p.lng}`);
+ expect(out.source).toBe('openstreetmap');
+ expect(out.places.map(r => r.name)).toEqual(['Bakery', 'Das Museum']);
+ expect(out.places[0]).toMatchObject({ osm_id: 'way:3', category: 'shop_bakery', distance_m: 22 });
+ });
+
+ it('MAPS-NEARBY-005: a failing index drops through to the next source and says so', async () => {
+ const p = nextPoint();
+ mockNearby.mockRejectedValue(new Error('index down'));
+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ elements: [] })));
+
+ const out = await make().nearbyPlaces(1, p.lat, p.lng);
+
+ expect(out).toEqual({ places: [], source: 'openstreetmap' });
+ expect(warn).toHaveBeenCalledWith('TREK Places nearby failed, falling back:', 'index down');
+ });
+
+ it('MAPS-NEARBY-006: with the index switched off it is never asked', async () => {
+ const p = nextPoint();
+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ elements: [] })));
+
+ await make({ index: false }).nearbyPlaces(1, p.lat, p.lng);
+
+ expect(mockNearby).not.toHaveBeenCalled();
+ });
+
+ it('MAPS-NEARBY-007: the same spot asked twice costs one lookup', async () => {
+ const p = nextPoint();
+ const fetchMock = vi.fn().mockResolvedValue(jsonResponse({ places: [] }));
+ vi.stubGlobal('fetch', fetchMock);
+ const svc = make({ google: true });
+
+ await svc.nearbyPlaces(1, p.lat, p.lng);
+ await svc.nearbyPlaces(1, p.lat + 0.00001, p.lng);
+
+ expect(fetchMock).toHaveBeenCalledTimes(1);
+ expect(mockNearby).toHaveBeenCalledTimes(1);
+ });
+});
+
+describe('nearby helpers', () => {
+ it('MAPS-NEARBY-008: the Overpass question is a named place of a visitable kind inside the circle, capped', () => {
+ const q = nearbyOverpassQuery(52.5, 13.4, 250.4, 10);
+ expect(q).toContain('nwr(around:250,52.5,13.4)[name][~"^(amenity|tourism|shop|leisure|historic)$"~"."];');
+ expect(q).toContain('out center tags 30;');
+ });
+
+ it('MAPS-NEARBY-009: unnamed, placeless and shut places are left out; the kind reads like a search category', () => {
+ const origin = { lat: 0, lng: 0 };
+ const out = overpassNearbyRecords([
+ { type: 'node', id: 1, lat: 0, lon: 0, tags: { amenity: 'bench' } },
+ { type: 'node', id: 2, tags: { name: 'Nowhere', amenity: 'cafe' } },
+ { type: 'node', id: 3, lat: 0, lon: 0, tags: { name: 'Gone', amenity: 'bar', disused: 'yes' } },
+ { type: 'node', id: 4, lat: 0, lon: 0.001, tags: { int_name: 'Park', leisure: 'park', website: 'park.example', 'addr:street': 'Main', 'addr:housenumber': '5' } },
+ { type: 'node', id: 5, lat: 0, lon: 0, tags: { name: 'Shopish', shop: 'yes', tourism: 'artwork' } },
+ ], origin, 'en', 10);
+ expect(out.map(r => r.name)).toEqual(['Shopish', 'Park']);
+ expect(out[0].category).toBe('artwork');
+ expect(out[1]).toMatchObject({ address: 'Main 5', website: 'https://park.example', category: 'park', distance_m: 111 });
+ });
+
+ it('MAPS-NEARBY-010: records without a position are dropped and the list keeps to the limit; the cache key rounds to ten metres', () => {
+ const out = nearestFirst(
+ [{ name: 'a', lat: 0, lng: 0.002 }, { name: 'b', lat: null, lng: null }, { name: 'c', lat: 0, lng: 0.001 }],
+ { lat: 0, lng: 0 },
+ 1,
+ );
+ expect(out).toEqual([{ name: 'c', lat: 0, lng: 0.001, distance_m: 111 }]);
+ expect(nearbyCacheKey(52.516312, 13.377712, 500, 20, 'de')).toBe(nearbyCacheKey(52.51634, 13.37768, 500, 20, 'de'));
+ expect(nearbyCacheKey(52.5163, 13.3777, 500, 20, 'de')).not.toBe(nearbyCacheKey(52.5163, 13.3777, 500, 20, 'en'));
+ });
+});
diff --git a/server/tests/unit/nest/maps.service.test.ts b/server/tests/unit/nest/maps.service.test.ts
index a0304b68a..3b03a4b08 100644
--- a/server/tests/unit/nest/maps.service.test.ts
+++ b/server/tests/unit/nest/maps.service.test.ts
@@ -883,6 +883,23 @@ describe('searchNominatim (fetch stubbed)', () => {
expect((results[1] as any).lat).toBeNull();
expect((results[1] as any).lng).toBeNull();
});
+
+ it('MAPS-108b: carries what the place is, with a shop named as one (#2282)', async () => {
+ vi.stubGlobal(
+ 'fetch',
+ vi.fn().mockResolvedValue({
+ ok: true,
+ json: async () => [
+ { osm_type: 'node', osm_id: '5', lat: '52.5', lon: '13.4', name: 'Adlon', class: 'tourism', type: 'hotel' },
+ { osm_type: 'node', osm_id: '6', lat: '52.5', lon: '13.4', name: 'Bäcker', class: 'shop', type: 'bakery' },
+ { osm_type: 'node', osm_id: '7', lat: '52.5', lon: '13.4', name: 'Hut', class: 'building', type: 'yes' },
+ { osm_type: 'node', osm_id: '8', lat: '52.5', lon: '13.4', name: 'Bare' },
+ ],
+ }),
+ );
+ const results = await svc.searchNominatim('x');
+ expect(results.map((r: any) => r.category)).toEqual(['hotel', 'shop_bakery', null, null]);
+ });
});
// ── fetchOverpassDetails (fetch stubbed) ─────────────────────────────────────
diff --git a/server/tests/unit/nest/packing.controller.test.ts b/server/tests/unit/nest/packing.controller.test.ts
index d29b867fa..2b9fd436b 100644
--- a/server/tests/unit/nest/packing.controller.test.ts
+++ b/server/tests/unit/nest/packing.controller.test.ts
@@ -209,6 +209,13 @@ describe('PackingController (parity with the legacy /api/trips/:tripId/packing r
expect(broadcast).toHaveBeenCalledWith('5', 'packing:updated', { item: { id: 9, name: 'X' } }, 'sock');
});
+ it('forwards a packed count to the service, as the MCP tool does (#2296)', () => {
+ const updateItem = vi.fn().mockReturnValue({ id: 9, packed_quantity: 3 });
+ const svc = makeService({ updateItem, broadcast: vi.fn() } as Partial<PackingService>);
+ new PackingController(svc).update(user, '5', '9', { packed_quantity: 3 });
+ expect(updateItem).toHaveBeenCalledWith('5', '9', expect.objectContaining({ packed_quantity: 3 }), ['packed_quantity'], undefined, user.id);
+ });
+
it('keeps a private update scoped to the owner (#858)', () => {
const updateItem = vi.fn().mockReturnValue({ id: 9, name: 'X', is_private: 1, owner_id: 1 });
const broadcast = vi.fn();
diff --git a/server/tests/unit/nest/packing.service.test.ts b/server/tests/unit/nest/packing.service.test.ts
index 22ae0c0c7..70d474d67 100644
--- a/server/tests/unit/nest/packing.service.test.ts
+++ b/server/tests/unit/nest/packing.service.test.ts
@@ -683,6 +683,23 @@ describe('legacy-quirk fixes', () => {
// Omitted key leaves the quantity unchanged.
expect((svc.updateItem(trip.id, item.id, { name: 'Wool socks' }, ['name'], undefined, user.id) as any).quantity).toBe(999);
});
+
+ it('PACK-SVC-053b: a packed count keeps the box in step (#2296)', () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const item = svc.createItem(trip.id, { name: 'Shirts', quantity: 10 }, user.id) as any;
+ const put = (data: Record<string, unknown>) => svc.updateItem(trip.id, item.id, data, Object.keys(data), undefined, user.id) as any;
+
+ expect(put({ packed_quantity: 7 })).toMatchObject({ packed_quantity: 7, checked: 0 });
+ // Reaching the quantity ticks the item off and drops the partial count.
+ expect(put({ packed_quantity: 12 })).toMatchObject({ packed_quantity: null, checked: 1 });
+ // Unticking starts over from nothing.
+ expect(put({ checked: 0 })).toMatchObject({ packed_quantity: null, checked: 0 });
+ expect(put({ packed_quantity: 6 })).toMatchObject({ packed_quantity: 6, checked: 0 });
+ // A quantity lowered to the count finishes the item; a rename leaves it alone.
+ expect(put({ name: 'Tees' })).toMatchObject({ packed_quantity: 6, checked: 0 });
+ expect(put({ quantity: 5 })).toMatchObject({ quantity: 5, packed_quantity: null, checked: 1 });
+ });
});
// ── Create-path fields + bag trip scope (#2154) ───────────────────────────────
diff --git a/server/tests/unit/nest/places.controller.test.ts b/server/tests/unit/nest/places.controller.test.ts
index 167ecdd79..65cc26ada 100644
--- a/server/tests/unit/nest/places.controller.test.ts
+++ b/server/tests/unit/nest/places.controller.test.ts
@@ -97,6 +97,24 @@ describe('PlacesController (parity with the legacy /api/trips/:tripId/places rou
});
});
+ describe('file import enrichment (#2536)', () => {
+ const file = { buffer: Buffer.from('gpx'), originalname: 'r.gpx' } as Express.Multer.File;
+ it('hands the imported places to the Google pass only when asked', async () => {
+ const enrichImportedFilePlaces = vi.fn();
+ const s = svc({
+ importGpx: vi.fn().mockReturnValue({ places: [{ id: 1 }], count: 1, skipped: 0 }),
+ importMapFile: vi.fn().mockResolvedValue({ places: [{ id: 2 }], count: 1, summary: { totalPlacemarks: 1 } }),
+ broadcast: vi.fn(), enrichImportedFilePlaces,
+ } as Partial<PlacesService>);
+ const c = new PlacesController(s, new RuntimeEnvService(), storageStub);
+ c.importGpx(user, '5', file, {});
+ expect(enrichImportedFilePlaces).not.toHaveBeenCalled();
+ c.importGpx(user, '5', file, { enrich: 'true' });
+ await c.importMap(user, '5', file, { enrich: 'true' });
+ expect(enrichImportedFilePlaces.mock.calls).toEqual([['5', user.id, [{ id: 1 }]], ['5', user.id, [{ id: 2 }]]]);
+ });
+ });
+
describe('POST /import/map', () => {
const file = { buffer: Buffer.from('<kml/>'), originalname: 'm.kml' } as Express.Multer.File;
it('400 without a file', async () => {
@@ -547,3 +565,23 @@ describe('PlacesController (parity with the legacy /api/trips/:tripId/places rou
});
});
});
+
+describe('PUT /:id/image/from-file (#1242)', () => {
+ it('maps every refusal to its status and broadcasts a success', async () => {
+ const make = (result: unknown, extra: Partial<PlacesService> = {}) =>
+ new PlacesController(svc({ setImageFromFile: vi.fn().mockResolvedValue(result), ...extra } as Partial<PlacesService>), new RuntimeEnvService(), storageStub);
+ expect(await thrownAsync(() => make('not_found').imageFromFile(user, '5', '9', { file_id: 3 }))).toEqual({ status: 404, body: { error: 'File not found' } });
+ expect(await thrownAsync(() => make('not_image').imageFromFile(user, '5', '9', { file_id: 3 }))).toEqual({ status: 400, body: { error: 'Only jpg, png, gif, webp images allowed' } });
+ expect(await thrownAsync(() => make('too_large').imageFromFile(user, '5', '9', { file_id: 3 }))).toEqual({ status: 400, body: { error: 'Image too large' } });
+ expect(await thrownAsync(() => make(null).imageFromFile(user, '5', '9', { file_id: 3 }))).toEqual({ status: 404, body: { error: 'Place not found' } });
+ const broadcast = vi.fn(); const onUpdated = vi.fn()
+ expect(await make({ id: 9 }, { broadcast, onUpdated } as Partial<PlacesService>).imageFromFile(user, '5', '9', { file_id: 3 }, 'sock')).toEqual({ place: { id: 9 } })
+ expect(broadcast).toHaveBeenCalledWith('5', 'place:updated', { place: { id: 9 } }, 'sock')
+ expect(onUpdated).toHaveBeenCalledWith(9)
+ });
+
+ it('403 without place_edit', async () => {
+ expect(await thrownAsync(() => new PlacesController(svc({ canEdit: vi.fn().mockReturnValue(false) }), new RuntimeEnvService(), storageStub).imageFromFile(user, '5', '9', { file_id: 3 }))).toEqual({ status: 403, body: { error: 'No permission' } });
+ });
+});
+
diff --git a/server/tests/unit/nest/places.service.test.ts b/server/tests/unit/nest/places.service.test.ts
index 0989b3712..ed5718581 100644
--- a/server/tests/unit/nest/places.service.test.ts
+++ b/server/tests/unit/nest/places.service.test.ts
@@ -165,6 +165,20 @@ describe('list', () => {
expect(places[0].name).toBe('Eiffel Tower');
});
+ it('PLACE-SVC-005b — carries where each place lies: the cached region, else the bundled borders (#2537)', () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const berlin = createPlace(testDb, trip.id, { name: 'Brandenburger Tor', lat: 52.5163, lng: 13.3777 });
+ const paris = createPlace(testDb, trip.id, { name: 'Louvre', lat: 48.8606, lng: 2.3376 });
+ const nowhere = createPlace(testDb, trip.id, { name: 'Unplaced' });
+ testDb.prepare('UPDATE places SET lat = NULL, lng = NULL, address = NULL WHERE id = ?').run(nowhere.id);
+ testDb.prepare('INSERT INTO place_regions (place_id, country_code, region_code, region_name) VALUES (?, ?, ?, ?)').run(berlin.id, 'DE', 'DE-BE', 'Berlin');
+ const byId = new Map((svc.list(String(trip.id), {}) as any[]).map(p => [p.id, p]));
+ expect(byId.get(berlin.id)).toMatchObject({ country_code: 'DE', region_name: 'Berlin' });
+ expect(byId.get(paris.id)).toMatchObject({ country_code: 'FR', region_name: null });
+ expect(byId.get(nowhere.id)!.country_code).toBeNull();
+ });
+
it('PLACE-SVC-005 — attaches tags array to each place (empty when none)', () => {
const { user } = createUser(testDb);
const trip = createTrip(testDb, user.id);
@@ -1284,6 +1298,13 @@ describe('enrichImportedPlaces', () => {
expect(searchPlaces).not.toHaveBeenCalled();
});
+ it('PLACE-SVC-058b — a file import enriches its points, never its paths (#2536)', async () => {
+ const service = enrichSvc({ getMapsKey: vi.fn(() => null) });
+ const spy = vi.spyOn(service, 'enrichImportedPlaces').mockResolvedValue();
+ service.enrichImportedFilePlaces('1', 1, [{ id: 1 }, { id: 2, route_geometry: '[[1,2],[3,4]]' }]);
+ expect(spy).toHaveBeenCalledWith('1', 1, [{ id: 1 }]);
+ });
+
it('PLACE-SVC-059 — no-ops for an empty batch without touching the provider', async () => {
const getMapsKey = vi.fn(() => 'key');
await enrichSvc({ getMapsKey }).enrichImportedPlaces('1', 1, []);
@@ -1439,6 +1460,36 @@ describe('zero-valued numeric fields', () => {
// ── LIKE metacharacter escaping (#1745) ───────────────────────────────────────
+describe('setImageFromFile (#1242)', () => {
+ const attach = (tripId: number, name: string, mime: string, size = 3) => {
+ fs.writeFileSync(path.join(placesStorageFx.root, name), 'img');
+ return Number(testDb.prepare('INSERT INTO trip_files (trip_id, filename, original_name, file_size, mime_type) VALUES (?, ?, ?, ?, ?)').run(tripId, name, name, size, mime).lastInsertRowid);
+ };
+
+ it('PLACE-SVC-IMGFILE-001 — copies an attached picture in as the place image', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const place = createPlace(testDb, trip.id);
+ const fileId = attach(trip.id, 'holiday.jpg', 'image/jpeg');
+ const updated = await svc.setImageFromFile(String(trip.id), String(place.id), fileId) as any;
+ expect(updated.image_url).toMatch(/^\/uploads\/places\/[0-9a-f-]+\.jpg$/);
+ expect(fs.existsSync(path.join(placesStorageFx.root, path.basename(updated.image_url)))).toBe(true);
+ // A copy: the attachment itself is still there.
+ expect(fs.existsSync(path.join(placesStorageFx.root, 'holiday.jpg'))).toBe(true);
+ });
+
+ it('PLACE-SVC-IMGFILE-002 — refuses a file of another trip, a document and an oversized image', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id);
+ const other = createTrip(testDb, user.id);
+ const place = createPlace(testDb, trip.id);
+ expect(await svc.setImageFromFile(String(trip.id), String(place.id), attach(other.id, 'x.jpg', 'image/jpeg'))).toBe('not_found');
+ expect(await svc.setImageFromFile(String(trip.id), String(place.id), attach(trip.id, 'ticket.pdf', 'application/pdf'))).toBe('not_image');
+ expect(await svc.setImageFromFile(String(trip.id), String(place.id), attach(trip.id, 'vector.svg', 'image/svg+xml'))).toBe('not_image');
+ expect(await svc.setImageFromFile(String(trip.id), String(place.id), attach(trip.id, 'huge.jpg', 'image/jpeg', 50 * 1024 * 1024))).toBe('too_large');
+ });
+});
+
describe('list search escaping', () => {
it('PLACE-SVC-068 — a % or _ in the search term matches literally, not as a wildcard', () => {
const { user } = createUser(testDb);
diff --git a/server/tests/unit/nest/share-view.helpers.test.ts b/server/tests/unit/nest/share-view.helpers.test.ts
new file mode 100644
index 000000000..08cf28743
--- /dev/null
+++ b/server/tests/unit/nest/share-view.helpers.test.ts
@@ -0,0 +1,36 @@
+import { describe, it, expect } from 'vitest';
+import { isTravelBooking, travelOnly, withoutImages } from '../../../src/nest/share/share-view.helpers';
+
+const snapshot = () => ({
+ assignments: {
+ 1: [{ accommodation_id: null, place: { id: 10, image_url: 'a.jpg' } }, { accommodation_id: 5, place: { id: 20, image_url: 'b.jpg' } }],
+ 2: [{ accommodation_id: null, place: { id: 10, image_url: 'a.jpg' } }],
+ },
+ dayNotes: { 1: [{ id: 1 }] },
+ places: [{ id: 10, image_url: 'a.jpg' }, { id: 20, image_url: 'b.jpg' }],
+ reservations: [{ type: 'flight' }, { type: 'restaurant' }, { type: 'hotel' }, { type: 'cable_car' }, { type: null }],
+});
+
+describe('share view helpers (#1712)', () => {
+ it('SHARE-VIEW-001: knows travel bookings from the rest', () => {
+ expect(['flight', 'train', 'ferry', 'cable_car', 'hotel'].every(isTravelBooking)).toBe(true);
+ expect(['restaurant', 'tour', 'event', 'parking', undefined, 3].some(isTravelBooking)).toBe(false);
+ });
+
+ it('SHARE-VIEW-002: travel only keeps the stay stops, the stay places and the travel bookings', () => {
+ const out = travelOnly(snapshot(), new Set([20]));
+ expect(out.assignments).toEqual({ 1: [{ accommodation_id: 5, place: { id: 20, image_url: 'b.jpg' } }] });
+ expect(out.dayNotes).toEqual({});
+ expect(out.places.map(p => p.id)).toEqual([20]);
+ expect(out.reservations.map(r => r.type)).toEqual(['flight', 'hotel', 'cable_car']);
+ });
+
+ it('SHARE-VIEW-003: without images clears every photo and leaves the rest alone', () => {
+ const data = snapshot();
+ const out = withoutImages(data);
+ expect(out.places.every(p => p.image_url === null)).toBe(true);
+ expect(Object.values(out.assignments).flat().every(a => a.place?.image_url === null)).toBe(true);
+ expect(out.reservations).toBe(data.reservations);
+ expect(data.places[0].image_url).toBe('a.jpg');
+ });
+});
diff --git a/server/tests/unit/nest/share.controller.test.ts b/server/tests/unit/nest/share.controller.test.ts
index d1f02b819..b9dbd6be4 100644
--- a/server/tests/unit/nest/share.controller.test.ts
+++ b/server/tests/unit/nest/share.controller.test.ts
@@ -56,6 +56,12 @@ describe('TripShareController', () => {
expect(updatedRes.statusCode).toBe(200);
});
+ it('POST forwards the two narrowing options, as the MCP tool does (#1712)', () => {
+ const createOrUpdate = vi.fn().mockReturnValue({ token: 't', created: true });
+ new TripShareController(svc({ createOrUpdate } as Partial<ShareService>)).create(user, '5', { share_travel_only: true, share_hide_images: true }, res());
+ expect(createOrUpdate).toHaveBeenCalledWith('5', user.id, expect.objectContaining({ share_travel_only: true, share_hide_images: true }));
+ });
+
it('GET 404 without access, 403 without share_manage, returns info or a null token', () => {
expect(thrown(() => new TripShareController(svc({ verifyTripAccess: vi.fn().mockReturnValue(undefined) })).get(user, '5'))).toEqual({ status: 404, body: { error: 'Trip not found' } });
// Reading returns the token itself, so it needs the same permission as
diff --git a/server/tests/unit/nest/share.service.test.ts b/server/tests/unit/nest/share.service.test.ts
index 604eaf0cb..14360102a 100644
--- a/server/tests/unit/nest/share.service.test.ts
+++ b/server/tests/unit/nest/share.service.test.ts
@@ -53,6 +53,7 @@ import { runMigrations } from '../../../src/db/migrations';
import { resetTestDb } from '../../helpers/test-db';
import {
createUser, createTrip, addTripMember, createDay, createPlace, createDayAssignment,
+ createDayAccommodation, createDayNote, createReservation,
} from '../../helpers/factories';
import { DatabaseService } from '../../../src/nest/database/database.service';
import type { PermissionsService } from '../../../src/nest/permissions/permissions.service';
@@ -202,6 +203,8 @@ describe('get and remove', () => {
share_packing: true,
share_budget: false,
share_collab: false,
+ share_travel_only: false,
+ share_hide_images: false,
});
});
@@ -254,6 +257,7 @@ describe('getSharedTripData', () => {
);
expect(data.permissions).toEqual({
share_map: true, share_bookings: true, share_packing: true, share_budget: true, share_collab: true,
+ share_travel_only: false, share_hide_images: false,
});
expect(data.days).toHaveLength(1);
const entries = data.assignments[day.id];
@@ -352,6 +356,40 @@ describe('getSharedTripData', () => {
expect(data.collab).toEqual([]);
});
+ it('SHARE-SVC-019b: travel and stays only keeps transport, hotels and the stay stops (#1712)', () => {
+ const { trip, token } = seedSharedTrip({ share_travel_only: true });
+ const day = createDay(testDb, trip.id);
+ const museum = createPlace(testDb, trip.id, { name: 'Museum' });
+ const hotel = createPlace(testDb, trip.id, { name: 'Hotel' });
+ const stay = createDayAccommodation(testDb, trip.id, hotel.id, day.id, day.id);
+ createDayAssignment(testDb, day.id, museum.id);
+ const stayStop = createDayAssignment(testDb, day.id, hotel.id);
+ testDb.prepare('UPDATE day_assignments SET accommodation_id = ? WHERE id = ?').run(stay.id, stayStop.id);
+ createDayNote(testDb, day.id, trip.id);
+ for (const type of ['flight', 'hotel', 'restaurant', 'tour']) createReservation(testDb, trip.id, { type, title: type });
+
+ const data = svc.getSharedTripData(token)!;
+ expect(data.permissions.share_travel_only).toBe(true);
+ expect(data.assignments[day.id].map((a: any) => a.place.name)).toEqual(['Hotel']);
+ expect(data.dayNotes).toEqual({});
+ expect(data.places.map((p: any) => p.name)).toEqual(['Hotel']);
+ expect(data.reservations.map((r: any) => r.type).sort()).toEqual(['flight', 'hotel']);
+ });
+
+ it('SHARE-SVC-019c: without photos drops every place image and refuses the photo route (#1712)', async () => {
+ const { trip, token } = seedSharedTrip({ share_hide_images: true });
+ const day = createDay(testDb, trip.id);
+ const place = createPlace(testDb, trip.id, { name: 'Louvre' });
+ testDb.prepare("UPDATE places SET image_url = '/api/maps/place-photo/abc/bytes' WHERE id = ?").run(place.id);
+ createDayAssignment(testDb, day.id, place.id);
+
+ const data = svc.getSharedTripData(token)!;
+ expect(data.places[0].image_url).toBeNull();
+ expect(data.assignments[day.id][0].place.image_url).toBeNull();
+ serveKey.mockReturnValue('photos-google/abc');
+ await expect(svc.getSharedPlacePhotoKey(token, 'abc')).resolves.toBeNull();
+ });
+
it('SHARE-SVC-020: baseCurrency falls back trip currency → EUR, with the owner default_currency winning (#1361)', () => {
const { user, trip, token } = seedSharedTrip();
expect(svc.getSharedTripData(token)!.baseCurrency).toBe('EUR');
diff --git a/server/tests/unit/nest/vacay.service.test.ts b/server/tests/unit/nest/vacay.service.test.ts
index 7ca63831a..b98b1c78f 100644
--- a/server/tests/unit/nest/vacay.service.test.ts
+++ b/server/tests/unit/nest/vacay.service.test.ts
@@ -697,6 +697,38 @@ describe('toggleCompanyHoliday', () => {
});
});
+describe('half company holidays (#2439)', () => {
+ const entryOf = (planId: number, date: string) =>
+ testDb.prepare('SELECT fraction FROM vacay_entries WHERE plan_id = ? AND date = ?').get(planId, date) as { fraction: number } | undefined;
+ const holidayOf = (planId: number, date: string) =>
+ testDb.prepare('SELECT fraction FROM vacay_company_holidays WHERE plan_id = ? AND date = ?').get(planId, date) as { fraction: number } | undefined;
+
+ it('VACAY-SVC-036b: a half company holiday halves a whole vacation day instead of wiping it', () => {
+ const { user, plan } = setupUserWithPlan();
+ svc.toggleEntry(user.id, plan.id, '2025-12-24', 1);
+ expect(svc.toggleCompanyHoliday(plan.id, '2025-12-24', 'Christmas Eve', undefined, 0.5)).toEqual({ action: 'added', fraction: 0.5 });
+ expect(entryOf(plan.id, '2025-12-24')?.fraction).toBe(0.5);
+ expect(holidayOf(plan.id, '2025-12-24')?.fraction).toBe(0.5);
+ });
+
+ it('VACAY-SVC-036c: the other size converts the holiday, the same size clears it', () => {
+ const { user, plan } = setupUserWithPlan();
+ svc.toggleCompanyHoliday(plan.id, '2025-12-31', undefined, undefined, 0.5);
+ svc.toggleEntry(user.id, plan.id, '2025-12-31', 0.5);
+ expect(svc.toggleCompanyHoliday(plan.id, '2025-12-31', undefined, undefined, 1)).toEqual({ action: 'updated', fraction: 1 });
+ expect(entryOf(plan.id, '2025-12-31')).toBeUndefined();
+ expect(svc.toggleCompanyHoliday(plan.id, '2025-12-31', undefined, undefined, 1)).toEqual({ action: 'removed' });
+ expect(holidayOf(plan.id, '2025-12-31')).toBeUndefined();
+ });
+
+ it('VACAY-SVC-036d: leave on a half company holiday is half a day, whatever was asked', () => {
+ const { user, plan } = setupUserWithPlan();
+ testDb.prepare('UPDATE vacay_plans SET company_holidays_enabled = 1 WHERE id = ?').run(plan.id);
+ svc.toggleCompanyHoliday(plan.id, '2025-12-24', undefined, undefined, 0.5);
+ expect(svc.toggleEntry(user.id, plan.id, '2025-12-24', 1)).toMatchObject({ action: 'added', fraction: 0.5 });
+ });
+});
+
// ── acceptInvite / declineInvite / cancelInvite ───────────────────────────────
describe('acceptInvite', () => {
diff --git a/shared/src/assignment/assignment.schema.ts b/shared/src/assignment/assignment.schema.ts
index e342c8b98..32287a337 100644
--- a/shared/src/assignment/assignment.schema.ts
+++ b/shared/src/assignment/assignment.schema.ts
@@ -48,6 +48,8 @@ export const assignmentSchema = z.object({
// not a place (booking arrival / morning hotel). null = inherit the day default.
// Inert when the previous timeline element is a place.
incoming_leg_transport_mode: z.string().nullable().optional(),
+ // Kept on the day and on the map, but not part of the day's route (#2532).
+ route_excluded: z.boolean().optional(),
// The lodging booking that put this stop on the day, when one did. The day
// planner already shows that booking as its own overnight block, so it hides
// this row and leaves it to road trip mode, which is the view that needs the
@@ -113,6 +115,12 @@ export const assignmentTransportRequestSchema = z.object({
});
export type AssignmentTransportRequest = z.infer<typeof assignmentTransportRequestSchema>;
+/** Take a stop out of the day's route, or put it back (#2532). */
+export const assignmentRouteRequestSchema = z.object({
+ excluded: z.boolean(),
+});
+export type AssignmentRouteRequest = z.infer<typeof assignmentRouteRequestSchema>;
+
export const assignmentParticipantsRequestSchema = z.object({
user_ids: z.array(z.number()),
});
diff --git a/shared/src/atlas/atlas.schema.spec.ts b/shared/src/atlas/atlas.schema.spec.ts
index ad1ead254..458c5a7e1 100644
--- a/shared/src/atlas/atlas.schema.spec.ts
+++ b/shared/src/atlas/atlas.schema.spec.ts
@@ -33,6 +33,22 @@ describe('markRegionRequestSchema', () => {
});
describe('createBucketItemRequestSchema', () => {
+ it('accepts a region of the item country and refuses any other (#1901)', () => {
+ expect(
+ createBucketItemRequestSchema.safeParse({ name: 'Bayern', country_code: 'DE', region_code: 'DE-BY' }).success,
+ ).toBe(true);
+ expect(
+ createBucketItemRequestSchema.safeParse({ name: 'Bayern', country_code: 'de', region_code: 'de-by' }).success,
+ ).toBe(true);
+ expect(
+ createBucketItemRequestSchema.safeParse({ name: 'Berlin', country_code: 'FR', region_code: 'DE-BE' }).success,
+ ).toBe(false);
+ expect(createBucketItemRequestSchema.safeParse({ name: 'Berlin', region_code: 'DE-BE' }).success).toBe(false);
+ expect(
+ createBucketItemRequestSchema.safeParse({ name: 'X', country_code: 'DE', region_code: 'not a code' }).success,
+ ).toBe(false);
+ });
+
it('requires a name; coordinates and metadata optional/nullable', () => {
expect(createBucketItemRequestSchema.safeParse({ name: 'Tokyo' }).success).toBe(true);
expect(
diff --git a/shared/src/atlas/atlas.schema.ts b/shared/src/atlas/atlas.schema.ts
index 220808196..ebe48d6a1 100644
--- a/shared/src/atlas/atlas.schema.ts
+++ b/shared/src/atlas/atlas.schema.ts
@@ -21,14 +21,29 @@ export const markRegionRequestSchema = z.object({
});
export type MarkRegionRequest = z.infer<typeof markRegionRequestSchema>;
-export const createBucketItemRequestSchema = z.object({
- name: z.string().min(1),
- lat: z.number().nullable().optional(),
- lng: z.number().nullable().optional(),
- country_code: z.string().nullable().optional(),
- notes: z.string().nullable().optional(),
- target_date: z.string().nullable().optional(),
-});
+export const createBucketItemRequestSchema = z
+ .object({
+ name: z.string().min(1),
+ lat: z.number().nullable().optional(),
+ lng: z.number().nullable().optional(),
+ country_code: z.string().nullable().optional(),
+ notes: z.string().nullable().optional(),
+ target_date: z.string().nullable().optional(),
+ // A state or province wished for (#1901), ISO 3166-2 like "DE-BY". It belongs to
+ // the item's country, so it comes with one and starts with it.
+ region_code: z
+ .string()
+ .max(12)
+ .regex(/^[A-Za-z]{2}-[A-Za-z0-9]{1,8}$/)
+ .nullable()
+ .optional(),
+ })
+ .refine(
+ (b) =>
+ !b.region_code ||
+ (!!b.country_code && b.region_code.toUpperCase().startsWith(`${b.country_code.toUpperCase()}-`)),
+ { message: 'region_code must belong to country_code', path: ['region_code'] },
+ );
export type CreateBucketItemRequest = z.infer<typeof createBucketItemRequestSchema>;
export const updateBucketItemRequestSchema = z.object({
diff --git a/shared/src/book/book.schema.spec.ts b/shared/src/book/book.schema.spec.ts
index dbbc38e1e..b1729529b 100644
--- a/shared/src/book/book.schema.spec.ts
+++ b/shared/src/book/book.schema.spec.ts
@@ -1,5 +1,7 @@
import {
+ MAX_BOOK_LAYOUTS,
MAX_SPREAD_ELEMENTS,
+ bookLayoutSchema,
bookBadgeElementSchema,
bookIconElementSchema,
bookSpreadSchema,
@@ -153,6 +155,39 @@ describe('the figures a stats element carries', () => {
});
});
+describe('the layouts a book keeps (#2316)', () => {
+ const layout = (over: Record<string, unknown> = {}) => ({
+ id: 'l1', name: 'Two up', pageWidth: 210, pageHeight: 210, elements: [text({ id: 'a' })], ...over,
+ });
+
+ it('is optional, so a document from before reads unchanged', () => {
+ expect(normalizeBookDocument(doc([text()])).layouts).toBeUndefined();
+ });
+
+ it('reads a layout back with its defaults', () => {
+ const out = normalizeBookDocument({ ...doc([]), layouts: [layout()] });
+ expect(out.layouts).toEqual([
+ expect.objectContaining({ id: 'l1', name: 'Two up', role: 'inner', background: null }),
+ ]);
+ });
+
+ it('drops a layout it cannot read and keeps the book and the others', () => {
+ const out = normalizeBookDocument({
+ ...doc([text({ id: 'kept' })]),
+ layouts: [layout({ id: 'bad', name: '' }), layout({ id: 'good' })],
+ });
+ expect(out.spreads[0]!.elements.map((el) => el.id)).toEqual(['kept']);
+ expect(out.layouts!.map((l) => l.id)).toEqual(['good']);
+ });
+
+ it('refuses more layouts than the cap in one parse, and keeps the first ones on salvage', () => {
+ const many = Array.from({ length: MAX_BOOK_LAYOUTS + 2 }, (_, i) => layout({ id: `l${i}` }));
+ expect(bookLayoutSchema.array().max(MAX_BOOK_LAYOUTS).safeParse(many).success).toBe(false);
+ const out = normalizeBookDocument({ ...doc([unreadable]), layouts: many });
+ expect(out.layouts).toHaveLength(MAX_BOOK_LAYOUTS);
+ });
+});
+
describe('normalizeBookDocument', () => {
it('keeps the nine elements it can read when the tenth is from another version', () => {
const nine = Array.from({ length: 9 }, (_, i) => text({ id: `t${i + 1}`, text: `line ${i + 1}` }));
diff --git a/shared/src/book/book.schema.ts b/shared/src/book/book.schema.ts
index cc4a58dfe..857a42009 100644
--- a/shared/src/book/book.schema.ts
+++ b/shared/src/book/book.schema.ts
@@ -812,12 +812,38 @@ export const bookPageSetupSchema = z.object({
});
export type BookPageSetup = z.infer<typeof bookPageSetupSchema>;
+/** How many layouts a book keeps for reuse (#2316). */
+export const MAX_BOOK_LAYOUTS = 24;
+
+/**
+ * A spread's arrangement, kept to lay other pages out with (#2316).
+ *
+ * The design as drawn, in the millimetres of the page it was drawn on, with the
+ * pictures taken out: applying it to another page pours that page's photos and
+ * words into it, and the page size it came from scales it onto a book whose
+ * trim changed since. Stored in the book rather than per person, so everyone
+ * editing the book sees and uses the same set.
+ */
+export const bookLayoutSchema = z.object({
+ id: z.string().min(1).max(40),
+ name: z.string().trim().min(1).max(60),
+ /** Double spread or single page: a layout only fits the kind it was drawn on. */
+ role: z.enum(['inner', 'single']).default('inner'),
+ pageWidth: z.number().positive().max(2000),
+ pageHeight: z.number().positive().max(2000),
+ background: hex.nullable().default(null),
+ elements: z.array(bookElementSchema).max(MAX_SPREAD_ELEMENTS).default([]),
+});
+export type BookLayout = z.infer<typeof bookLayoutSchema>;
+
export const bookDocumentSchema = z.object({
/** In the document, not in a column: a format bump must not need a migration. */
version: z.literal(1).catch(1).default(1),
title: z.string().max(MAX_BOOK_TITLE).default(''),
page: bookPageSetupSchema.default(() => bookPageSetupSchema.parse({})),
spreads: z.array(bookSpreadSchema).max(MAX_SPREADS).default([]),
+ /** The book's own layouts (#2316). Optional so a document from before still reads. */
+ layouts: z.array(bookLayoutSchema).max(MAX_BOOK_LAYOUTS).optional(),
});
export type BookDocument = z.infer<typeof bookDocumentSchema>;
@@ -866,8 +892,11 @@ function withoutUnreadableElements(raw: unknown): unknown {
? list.filter(el => bookElementSchema.safeParse(el).success).slice(0, MAX_SPREAD_ELEMENTS)
: list);
+ const layouts = (doc as { layouts?: unknown }).layouts;
return {
...doc,
+ // A saved layout is a convenience: one that no longer reads is dropped, not the book.
+ ...(Array.isArray(layouts) ? { layouts: layouts.filter(l => bookLayoutSchema.safeParse(l).success).slice(0, MAX_BOOK_LAYOUTS) } : {}),
spreads: doc.spreads.map(sp => {
if (!sp || typeof sp !== 'object') return sp;
const spread = sp as { elements?: unknown; parked?: unknown };
diff --git a/shared/src/budget/budget.schema.ts b/shared/src/budget/budget.schema.ts
index 085f9ee29..05953d82d 100644
--- a/shared/src/budget/budget.schema.ts
+++ b/shared/src/budget/budget.schema.ts
@@ -263,6 +263,8 @@ export const budgetSettlementSchema = z.object({
// vs. created_at. Null/absent on rows recorded before this column existed; the
// ledger falls back to `created_at`'s date for those.
settled_at: z.string().nullable().optional(),
+ // A free-text note on the payment (#2340). Null when none was written.
+ note: z.string().nullable().optional(),
created_by_user_id: z.number().nullable().optional(),
from_username: z.string().optional(),
from_avatar_url: z.string().nullable().optional(),
@@ -280,6 +282,8 @@ export const budgetCreateSettlementRequestSchema = z.object({
// The day the transfer happened. Null when the caller sets none; the ledger then
// uses the day it was recorded, which is where every older payment already sits.
settled_at: z.string().nullable().optional(),
+ // A free-text note on the payment (#2340); blank stores none.
+ note: z.string().max(500).nullable().optional(),
// Rates to freeze `currency` with when the server has none of its own.
fallback_fx: budgetFallbackFxSchema.optional(),
});
@@ -292,6 +296,8 @@ export const budgetUpdateSettlementRequestSchema = z.object({
amount: z.number(),
currency: z.string().nullable().optional(),
settled_at: z.string().nullable().optional(),
+ // Omitted leaves the note as it is; null or blank clears it (#2340).
+ note: z.string().max(500).nullable().optional(),
fallback_fx: budgetFallbackFxSchema.optional(),
});
export type BudgetUpdateSettlementRequest = z.infer<typeof budgetUpdateSettlementRequestSchema>;
diff --git a/shared/src/i18n/ar/atlas.ts b/shared/src/i18n/ar/atlas.ts
index 4c6e5138f..07c872294 100644
--- a/shared/src/i18n/ar/atlas.ts
+++ b/shared/src/i18n/ar/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'الدول',
'atlas.trips': 'الرحلات',
'atlas.places': 'الأماكن',
+ 'atlas.placesShow': 'عرض الأماكن في هذا البلد',
+ 'atlas.placesSearch': 'البحث عن أماكن',
+ 'atlas.placesNone': 'لا يوجد مكان مطابق',
'atlas.unmark': 'إزالة',
'atlas.confirmMark': 'تعيين هذا البلد كمُزار؟',
'atlas.confirmUnmark': 'إزالة هذا البلد من قائمة المُزارة؟',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'الأيام',
'atlas.visitedCountries': 'الدول التي تمت زيارتها',
'atlas.cities': 'المدن',
+ 'atlas.regions': 'المناطق',
'atlas.noData': 'لا توجد بيانات سفر بعد',
'atlas.noDataHint': 'أنشئ رحلة وأضف أماكن لرؤية خريطتك العالمية',
'atlas.nextTrip': 'الرحلة القادمة',
diff --git a/shared/src/i18n/ar/budget.ts b/shared/src/i18n/ar/budget.ts
index e13d0b12a..a0ffdf20b 100644
--- a/shared/src/i18n/ar/budget.ts
+++ b/shared/src/i18n/ar/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'مثل: عشاء، هدايا تذكارية، وقود…',
'costs.note': 'ملاحظة',
'costs.notePlaceholder': 'ما الذي شملته، ومن يدين بماذا…',
+ 'costs.paymentNotePlaceholder': 'دُفع نقدًا، بتحويل بنكي…',
'costs.addNote': 'إضافة ملاحظة',
'costs.showNote': 'عرض الملاحظة',
'costs.hideNote': 'إخفاء الملاحظة',
diff --git a/shared/src/i18n/ar/dayplan.ts b/shared/src/i18n/ar/dayplan.ts
index e02fc80c7..e95a8203d 100644
--- a/shared/src/i18n/ar/dayplan.ts
+++ b/shared/src/i18n/ar/dayplan.ts
@@ -59,6 +59,8 @@ const dayplan: TranslationStrings = {
'dayplan.confirmed': 'مؤكد',
'dayplan.pendingRes': 'قيد الانتظار',
'dayplan.pdfTooltip': 'تصدير خطة اليوم بصيغة PDF',
+ 'dayplan.pdfMine': 'خطتي بصيغة PDF',
+ 'dayplan.pdfMineSub': 'الأنشطة والحجوزات التي تشارك فيها فقط',
'dayplan.gpxTooltip': 'تصدير كملف GPX للخرائط دون اتصال وأجهزة GPS',
'dayplan.gpxAll': 'الرحلة كاملة',
'dayplan.gpxPlaces': 'الأماكن فقط',
@@ -91,6 +93,13 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'حذف اليوم',
'dayplan.deleteDayTitle': 'حذف {day}؟',
'dayplan.deleteDayBody': 'سيُزال اليوم من الرحلة. لا يمكن التراجع عن ذلك.',
+ 'dayplan.excludeFromRoute': 'استبعاد من المسار',
+ 'dayplan.includeInRoute': 'إعادة إلى المسار',
+ 'dayplan.offRoute': 'خارج المسار',
+ 'dayplan.offRouteHint': 'يبقى في اليوم وعلى الخريطة، لكن المسار يتخطاه',
+ 'dayplan.clearDay': 'إفراغ اليوم',
+ 'dayplan.clearDayTitle': 'إفراغ {day}؟',
+ 'dayplan.clearDayBody': 'ستُزال كل الأماكن من هذا اليوم. تبقى الأماكن في الرحلة، ويحتفظ اليوم بملاحظاته وحجوزاته.',
'dayplan.deleteDayEmpty': 'لا يوجد شيء مخطط لهذا اليوم.',
'dayplan.impactPlaces': 'الأماكن المخططة: {count}',
'dayplan.impactPlacesHint': 'تبقى في قائمة الأماكن.',
diff --git a/shared/src/i18n/ar/inspector.ts b/shared/src/i18n/ar/inspector.ts
index 413aad04a..c329ea177 100644
--- a/shared/src/i18n/ar/inspector.ts
+++ b/shared/src/i18n/ar/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'حجز قيد الانتظار',
'inspector.google': 'Google Maps',
'inspector.navigation': 'التنقل',
+ 'inspector.otherMapApp': 'تطبيق خرائط آخر',
'inspector.openWith': 'الفتح باستخدام',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'فتح الموقع الإلكتروني',
diff --git a/shared/src/i18n/ar/journey.ts b/shared/src/i18n/ar/journey.ts
index 9922270ff..988404e68 100644
--- a/shared/src/i18n/ar/journey.ts
+++ b/shared/src/i18n/ar/journey.ts
@@ -57,6 +57,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journey', // en-fallback
'journey.subtitle': 'Track your travels as they happen', // en-fallback
'journey.new': 'New Journey', // en-fallback
+ 'journey.lightbox.zoomIn': 'تكبير',
+ 'journey.lightbox.zoomOut': 'تصغير',
+ 'journey.lightbox.zoomReset': 'العودة إلى الصورة كاملة',
'journey.create': 'Create', // en-fallback
'journey.titlePlaceholder': 'Where are you going?', // en-fallback
'journey.empty': 'No journeys yet', // en-fallback
@@ -127,6 +130,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Add Entry', // en-fallback
'journey.detail.jumpToTop': 'العودة إلى الأعلى',
'journey.detail.jumpToLast': 'الانتقال إلى آخر مدخل',
+ 'journey.detail.dayJump': 'الانتقال إلى يوم',
+ 'journey.detail.dayJumpCount': 'الأيام: {count}',
'journey.detail.newEntry': 'New Entry', // en-fallback
'journey.detail.editEntry': 'Edit Entry', // en-fallback
'journey.detail.noEntries': 'No entries yet', // en-fallback
@@ -431,6 +436,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'قائمة',
'journey.studio.kind.icon': 'أيقونة',
'journey.studio.duplicate': 'تكرار',
+ 'journey.studio.copyToPage': 'نسخ للصق في أي صفحة (Ctrl+C)',
+ 'journey.studio.paste': 'لصق (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'انسخ شيئًا أولًا، ثم الصقه في أي صفحة',
+ 'journey.studio.myLayouts': 'تخطيطاتي',
+ 'journey.studio.myLayoutsEmpty': 'احتفظ بصفحة رتّبتها، ورتّب صفحات أخرى بالطريقة نفسها. تبقى صورها ونصوصها كما هي.',
+ 'journey.studio.saveLayout': 'حفظ هذه الصفحة كتخطيط',
+ 'journey.studio.saveLayoutHint': 'يحتفظ بالترتيب دون الصور، لكل محرري هذا الكتاب',
+ 'journey.studio.saveLayoutFull': 'يحتفظ هذا الكتاب بما يصل إلى 24 تخطيطًا. احذف واحدًا لحفظ آخر.',
+ 'journey.studio.deleteLayout': 'حذف التخطيط',
+ 'journey.studio.layoutName': 'تخطيط',
+ 'journey.studio.builtInLayouts': 'مدمجة',
'journey.studio.style': 'النمط',
'journey.studio.shows': 'المعروض',
'journey.studio.size': 'الحجم',
@@ -623,6 +639,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'تبقى المحطة في اليوميات لكنها لا تُحتسب ضمن المسافة أو الدول أو الخريطة في Studio.',
'journey.entry.offRoute': 'خارج المسار',
+ 'journey.entry.draft': 'مسودة',
+ 'journey.editor.draft': 'مسودة',
+ 'journey.editor.draftHint': 'لا يرى هذا المدخل سواك وسوى المساهمين الآخرين. تستبعده اليوميات المشتركة حتى توقف هذا الخيار.',
+ 'journey.editor.tripSuggestionHint': 'يقع هذا اليوم ضمن هذه الرحلة. اربطه لتنضم أماكنها إلى هذه اليوميات.',
+ 'journey.editor.tripSuggestionLater': 'ليس الآن',
'journey.suggestions.dismiss': 'تجاهل هذا الاقتراح',
'journey.suggestions.dismissed': 'تم تجاهل الاقتراح',
'journey.suggestions.restore': 'استعادة الاقتراحات المتجاهَلة',
diff --git a/shared/src/i18n/ar/map.ts b/shared/src/i18n/ar/map.ts
index 0cc93aeed..2da3dfe29 100644
--- a/shared/src/i18n/ar/map.ts
+++ b/shared/src/i18n/ar/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'تعذر تحديد موقعك.',
'map.location.timeout': 'استغرق تحديد موقعك وقتًا طويلًا. حاول مرة أخرى تحت سماء مكشوفة.',
'map.overview.show': 'عرض الرحلة كاملة',
+ 'map.lock.lock': 'قفل عرض الخريطة',
+ 'map.lock.unlock': 'دع الخريطة تتبع التحديد',
'map.overview.hide': 'إخفاء الرحلة كاملة',
'map.overview.total': 'المسافة الإجمالية',
'map.attribution': 'مصادر الخريطة',
diff --git a/shared/src/i18n/ar/mobileTrip.ts b/shared/src/i18n/ar/mobileTrip.ts
index fc887761a..4e4a26b4a 100644
--- a/shared/src/i18n/ar/mobileTrip.ts
+++ b/shared/src/i18n/ar/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'على الخريطة',
'mobileTrip.profileDriving': 'بالسيارة',
'mobileTrip.profileWalking': 'سيرًا على الأقدام',
+ 'mobileTrip.profileCycling': 'بالدراجة',
'mobileTrip.renameDay': 'إعادة تسمية اليوم',
'mobileTrip.resBadge': 'حجز',
'mobileTrip.showOnMap': 'إظهار على الخريطة',
diff --git a/shared/src/i18n/ar/packing.ts b/shared/src/i18n/ar/packing.ts
index 39d310387..f87fd2ec3 100644
--- a/shared/src/i18n/ar/packing.ts
+++ b/shared/src/i18n/ar/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'تعديل العنصر',
'packing.itemName': 'الاسم',
'packing.itemQuantity': 'الكمية',
+ 'packing.packedCount': 'تم حزم {packed} من {total}',
+ 'packing.packedMore': 'حزم قطعة أخرى',
+ 'packing.packedLess': 'حزم قطعة أقل',
'packing.itemWeight': 'الوزن (غ)',
'packing.title': 'قائمة التجهيز',
'packing.empty': 'قائمة التجهيز فارغة',
diff --git a/shared/src/i18n/ar/places.ts b/shared/src/i18n/ar/places.ts
index c595766e2..98cf7b963 100644
--- a/shared/src/i18n/ar/places.ts
+++ b/shared/src/i18n/ar/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'عرض الرحلة كاملة',
'places.filterTracks': 'المسارات',
'places.filterByRating': 'تصفية حسب التقييم',
+ 'places.filterByLocation': 'تصفية حسب البلد أو المنطقة',
+ 'places.allLocations': 'كل الدول',
'places.filterShow': 'عرض',
'places.clearSearch': 'مسح البحث',
'places.yourRating': 'تقييمك',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'الفئة',
'places.noCategory': 'بلا فئة',
'places.newCategory': 'فئة جديدة',
+ 'places.openInMaps': 'فتح في الخرائط',
'places.categoryNamePlaceholder': 'اسم الفئة',
'places.formTime': 'الوقت',
'places.startTime': 'البداية',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'ابحث عن أماكن...',
'places.mapsSearchError': 'فشل البحث عن المكان.',
'places.searchGoogleInstead': 'ليس المكان الصحيح؟ ابحث في Google بدلًا من ذلك',
+ 'places.nearby': 'أماكن قريبة من هذه العلامة',
+ 'places.nearbyNone': 'لم يُعثر على شيء قرب هذه العلامة',
'places.loadingDetails': 'جارٍ تحميل تفاصيل المكان…',
'places.osmHint':
'يتم البحث عبر OpenStreetMap (بدون صور أو ساعات عمل أو تقييمات). أضف مفتاح Google API في الإعدادات للحصول على جميع التفاصيل.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'إثراء الأماكن عبر Google',
'places.enrichOnImportHint':
'يبحث عن كل مكان مستورد لإضافة الصور والعنوان وبيانات الاتصال. يتطلب مفتاح خرائط Google.',
+ 'places.enrichOnImportFileHint':
+ 'يبحث بعد الاستيراد عن كل نقطة مستوردة في Google ويضيف صورتها وعنوانها وموقعها الإلكتروني ورقم هاتفها. تبقى المسارات والخطوط كما هي.',
'places.uploadImage': 'رفع صورة',
'places.changeImage': 'تغيير الصورة',
'places.removeImage': 'إزالة الصورة',
+ 'places.chooseImage': 'اختر صورة',
+ 'places.uploadFromDevice': 'رفع من الجهاز',
+ 'places.fromAttachedFiles': 'من الملفات المرفقة',
'places.imageUploadError': 'تعذّر رفع الصورة',
'places.imageRemoveError': 'تعذّر إزالة الصورة',
};
diff --git a/shared/src/i18n/ar/reservations.ts b/shared/src/i18n/ar/reservations.ts
index 414a30eb5..ce828eda2 100644
--- a/shared/src/i18n/ar/reservations.ts
+++ b/shared/src/i18n/ar/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'أخرى',
'reservations.type.bus': 'حافلة',
'reservations.type.ferry': 'عبّارة',
+ 'reservations.type.cable_car': 'تلفريك',
'reservations.type.bicycle': 'دراجة',
'reservations.type.taxi': 'سيارة أجرة',
'reservations.type.transit': 'النقل العام',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'إعادة ضبط عوامل التصفية',
'reservations.noMatches': 'لا شيء يطابق عوامل التصفية هذه',
'reservations.viewOptions': 'خيارات العرض',
+ 'reservations.exportCsv': 'تصدير كجدول بيانات (CSV)',
+ 'reservations.export.type': 'النوع',
+ 'reservations.export.title': 'العنوان',
+ 'reservations.export.start': 'البداية',
+ 'reservations.export.end': 'النهاية',
+ 'reservations.export.from': 'من',
+ 'reservations.export.to': 'إلى',
+ 'reservations.export.location': 'الموقع',
+ 'reservations.export.confirmation': 'رقم التأكيد',
+ 'reservations.export.notes': 'ملاحظات',
'reservations.resetView': 'إعادة ضبط العرض',
'reservations.group.label': 'التجميع حسب',
'reservations.group.status': 'الحالة',
diff --git a/shared/src/i18n/ar/settings.ts b/shared/src/i18n/ar/settings.ts
index a97c52adb..b63a714b1 100644
--- a/shared/src/i18n/ar/settings.ts
+++ b/shared/src/i18n/ar/settings.ts
@@ -325,6 +325,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'تُعرض المبالغ في التكاليف محوّلة إلى هذه العملة للعرض فقط — تبقى المبالغ الأصلية دون تغيير.',
'settings.currencyTrip': 'عملة الرحلة',
+ 'settings.placeLanguage': 'أسماء الأماكن',
+ 'settings.placeLanguageApp': 'مثل لغة التطبيق',
+ 'settings.placeLanguageHint': 'اللغة التي يجيب بها البحث عن الأماكن والاقتراحات والعناوين. إذا لم يكن للمكان اسم بهذه اللغة، يُعرض اسمه المحلي.',
'settings.passkey.title': 'مفاتيح المرور',
'settings.passkey.description':
'سجّل الدخول بشكل أسرع وأكثر مقاومة للتصيّد باستخدام مفتاح مرور — ببصمة إصبعك أو وجهك أو رمز PIN أو مفتاح أمان مادي. تبقى كلمة المرور كنسخة احتياطية.',
@@ -468,6 +471,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'البدء',
+ 'settings.dayDateFirst': 'التاريخ أولًا في عناوين الأيام',
+ 'settings.compactUnplanned': 'علامات مصغّرة للأماكن غير المخطط لها',
+ 'settings.compactUnplannedHint': 'تظهر الأماكن غير المخطط لها في أي يوم كعلامات صغيرة بلا صورة، لتبرز المحطات المخطط لها.',
+ 'settings.dayDateFirstHint': 'ابدأ كل يوم بتاريخه في التقويم، واعرض "اليوم 1" أو عنوان اليوم الخاص بجانبه.',
'settings.startPage': 'صفحة البدء',
'settings.startPageDashboard': 'لوحة التحكم',
'settings.startPageActiveTrip': 'الرحلة النشطة',
diff --git a/shared/src/i18n/ar/share.ts b/shared/src/i18n/ar/share.ts
index 0e24dd09f..eb5cfd283 100644
--- a/shared/src/i18n/ar/share.ts
+++ b/shared/src/i18n/ar/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'الأمتعة',
'share.permBudget': 'التكاليف',
'share.permCollab': 'الدردشة',
+ 'share.options': 'خيارات',
+ 'share.optTravelOnly': 'التنقل والإقامة فقط',
+ 'share.optTravelOnlyHint': 'يعرض التنقل والإقامة فقط، دون الأنشطة وملاحظات الأيام والأيام الفارغة',
+ 'share.optHideImages': 'بدون صور',
+ 'share.optHideImagesHint': 'يستبعد صور الأماكن من الصفحة المشتركة',
};
export default share;
diff --git a/shared/src/i18n/ar/shared.ts b/shared/src/i18n/ar/shared.ts
index 3138dec49..b315dbea2 100644
--- a/shared/src/i18n/ar/shared.ts
+++ b/shared/src/i18n/ar/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'الدردشة',
'shared.days': 'أيام',
'shared.places': 'أماكن',
+ 'shared.unplanned': 'لم يُخطَّط بعد',
'shared.other': 'أخرى',
'shared.totalBudget': 'إجمالي التكاليف',
'shared.messages': 'رسائل',
diff --git a/shared/src/i18n/ar/todo.ts b/shared/src/i18n/ar/todo.ts
index 8630abcc7..10b68e50f 100644
--- a/shared/src/i18n/ar/todo.ts
+++ b/shared/src/i18n/ar/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'بلا قائمة',
'todo.namePlaceholder': 'اسم المهمة',
'todo.descriptionPlaceholder': 'وصف (اختياري)',
+ 'todo.editDescription': 'انقر للتعديل، الروابط تُفتح مباشرة',
'todo.unassigned': 'غير مُسنَد',
'todo.noCategory': 'بلا قائمة',
'todo.hasDescription': 'له وصف',
diff --git a/shared/src/i18n/ar/undo.ts b/shared/src/i18n/ar/undo.ts
index 08ff7f079..df5cedb90 100644
--- a/shared/src/i18n/ar/undo.ts
+++ b/shared/src/i18n/ar/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'تراجع: {action}',
'undo.assignPlace': 'تم تعيين المكان لليوم',
'undo.removeAssignment': 'تم إزالة المكان من اليوم',
+ 'undo.clearDay': 'تم إفراغ اليوم',
'undo.reorder': 'تمت إعادة ترتيب الأماكن',
'undo.optimize': 'تم تحسين المسار',
'undo.deletePlace': 'تم حذف المكان',
diff --git a/shared/src/i18n/az/atlas.ts b/shared/src/i18n/az/atlas.ts
index dcf322c63..a3c213579 100644
--- a/shared/src/i18n/az/atlas.ts
+++ b/shared/src/i18n/az/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Ölkələr',
'atlas.trips': 'Səyahətlər',
'atlas.places': 'Məkanlar',
+ 'atlas.placesShow': 'Bu ölkədəki məkanları göstər',
+ 'atlas.placesSearch': 'Məkanları axtar',
+ 'atlas.placesNone': 'Uyğun məkan yoxdur',
'atlas.unmark': 'Sil',
'atlas.confirmMark':
@@ -46,6 +49,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Gün',
'atlas.visitedCountries': 'Ziyarət edilmiş ölkələr',
'atlas.cities': 'Şəhərlər',
+ 'atlas.regions': 'Regionlar',
'atlas.noData': 'Hələ səyahət məlumatı yoxdur',
'atlas.noDataHint':
'Dünya xəritənizi görmək üçün səyahət yaradın və məkanlar əlavə edin',
diff --git a/shared/src/i18n/az/budget.ts b/shared/src/i18n/az/budget.ts
index e6a774830..627e494f7 100644
--- a/shared/src/i18n/az/budget.ts
+++ b/shared/src/i18n/az/budget.ts
@@ -123,6 +123,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'məs. Şam yeməyi, suvenirlər, yanacaq…',
'costs.note': 'Qeyd',
'costs.notePlaceholder': 'Nələri əhatə etdiyi, kimin nə qədər qaytarmalı olduğu…',
+ 'costs.paymentNotePlaceholder': 'Nağd ödənilib, bank köçürməsi ilə…',
'costs.addNote': 'Qeyd əlavə et',
'costs.showNote': 'Qeydi göstər',
'costs.hideNote': 'Qeydi gizlət',
diff --git a/shared/src/i18n/az/dayplan.ts b/shared/src/i18n/az/dayplan.ts
index 424064f6c..d37870d1c 100644
--- a/shared/src/i18n/az/dayplan.ts
+++ b/shared/src/i18n/az/dayplan.ts
@@ -88,6 +88,8 @@ const dayplan: TranslationStrings = {
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Günlük planı PDF kimi ixrac et',
+ 'dayplan.pdfMine': 'Mənim planım PDF kimi',
+ 'dayplan.pdfMineSub': 'Yalnız iştirak etdiyiniz fəaliyyətlər və rezervasiyalar',
'dayplan.gpxTooltip':
'Oflayn xəritələr və GPS cihazları üçün GPX kimi ixrac et',
'dayplan.gpxAll': 'Bütün səyahət',
@@ -117,6 +119,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Günü sil',
'dayplan.deleteDayTitle': '{day} silinsin?',
'dayplan.deleteDayBody': 'Gün səyahətdən silinəcək. Bunu geri qaytarmaq mümkün deyil.',
+ 'dayplan.excludeFromRoute': 'Marşruta daxil etmə',
+ 'dayplan.includeInRoute': 'Yenidən marşruta əlavə et',
+ 'dayplan.offRoute': 'Marşrutdan kənar',
+ 'dayplan.offRouteHint': 'Gündə və xəritədə qalır, lakin marşrut onu buraxır',
+ 'dayplan.clearDay': 'Günü təmizlə',
+ 'dayplan.clearDayTitle': '{day} təmizlənsin?',
+ 'dayplan.clearDayBody':
+ 'Bütün məkanlar bu gündən çıxarılır. Məkanlar səyahətdə qalır, gün isə öz qeydlərini və rezervasiyalarını saxlayır.',
'dayplan.deleteDayEmpty': 'Bu gün üçün heç nə planlaşdırılmayıb.',
'dayplan.impactPlaces': 'Planlaşdırılmış məkanlar: {count}',
'dayplan.impactPlacesHint': 'Onlar məkanlar siyahısında qalır.',
diff --git a/shared/src/i18n/az/inspector.ts b/shared/src/i18n/az/inspector.ts
index d2f2b1e06..93886d738 100644
--- a/shared/src/i18n/az/inspector.ts
+++ b/shared/src/i18n/az/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Gözləyən rezervasiya',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Naviqasiya',
+ 'inspector.otherMapApp': 'Başqa xəritə tətbiqi',
'inspector.openWith': 'Bununla aç',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Veb-saytı aç',
diff --git a/shared/src/i18n/az/journey.ts b/shared/src/i18n/az/journey.ts
index 58cac2850..81cfff69e 100644
--- a/shared/src/i18n/az/journey.ts
+++ b/shared/src/i18n/az/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Səyahət gündəliyi',
'journey.subtitle': 'Səyahətlərinizi baş verdiyi anda qeyd edin',
'journey.new': 'Yeni səyahət gündəliyi',
+ 'journey.lightbox.zoomIn': 'Yaxınlaşdır',
+ 'journey.lightbox.zoomOut': 'Uzaqlaşdır',
+ 'journey.lightbox.zoomReset': 'Tam fotoya qayıt',
'journey.create': 'Yarat',
'journey.titlePlaceholder': 'Haraya gedirsiniz?',
'journey.empty': 'Hələ səyahət gündəliyi yoxdur',
@@ -95,6 +98,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Qeyd əlavə et',
'journey.detail.jumpToTop': 'Yuxarı qayıt',
'journey.detail.jumpToLast': 'Sonuncu qeydə keç',
+ 'journey.detail.dayJump': 'Günə keç',
+ 'journey.detail.dayJumpCount': '{count} gün',
'journey.detail.newEntry': 'Yeni qeyd',
'journey.detail.editEntry': 'Qeydi redaktə et',
'journey.detail.noEntries': 'Hələ qeyd yoxdur',
@@ -514,6 +519,20 @@ const journey: TranslationStrings = {
'journey.studio.kind.icon': 'İkon',
'journey.studio.duplicate': 'Dublikat yarat',
+ 'journey.studio.copyToPage': 'İstənilən səhifəyə yapışdırmaq üçün kopyala (Ctrl+C)',
+ 'journey.studio.paste': 'Yapışdır (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Əvvəlcə nəyisə kopyalayın, sonra onu istənilən səhifəyə yapışdırın',
+ 'journey.studio.myLayouts': 'Mənim tərtibatlarım',
+ 'journey.studio.myLayoutsEmpty':
+ 'Tərtib etdiyiniz səhifəni saxlayın və digər səhifələri eyni şəkildə düzün. Onların fotoları və mətnləri qalır.',
+ 'journey.studio.saveLayout': 'Bu səhifəni tərtibat kimi saxla',
+ 'journey.studio.saveLayoutHint':
+ 'Düzülüşü fotolar olmadan saxlayır, bu kitabın bütün redaktorları üçün',
+ 'journey.studio.saveLayoutFull':
+ 'Bu kitab ən çox 24 tərtibat saxlayır. Yenisini saxlamaq üçün birini silin.',
+ 'journey.studio.deleteLayout': 'Tərtibatı sil',
+ 'journey.studio.layoutName': 'Tərtibat',
+ 'journey.studio.builtInLayouts': 'Daxili',
'journey.studio.style': 'Üslub',
'journey.studio.shows': 'Göstərir',
'journey.studio.size': 'Ölçü',
@@ -747,6 +766,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Dayanacaq gündəlikdə qalır, lakin məsafə, ölkələr və Studiodakı xəritənin hesablanmasına daxil edilmir.',
'journey.entry.offRoute': 'Marşrutdan kənar',
+ 'journey.entry.draft': 'Qaralama',
+ 'journey.editor.draft': 'Qaralama',
+ 'journey.editor.draftHint':
+ 'Bu qeydi yalnız siz və digər iştirakçılar görür. Siz bunu söndürənə qədər paylaşılan səyahət gündəliyi onu göstərmir.',
+ 'journey.editor.tripSuggestionHint':
+ 'Bu gün bu səyahətə düşür. Onu əlaqələndirin və məkanları bu səyahət gündəliyinə qoşulsun.',
+ 'journey.editor.tripSuggestionLater': 'İndi yox',
'journey.suggestions.dismiss': 'Bu təklifi bağla',
'journey.suggestions.dismissed': 'Təklif bağlandı',
diff --git a/shared/src/i18n/az/map.ts b/shared/src/i18n/az/map.ts
index bf316b715..ab1d04057 100644
--- a/shared/src/i18n/az/map.ts
+++ b/shared/src/i18n/az/map.ts
@@ -34,6 +34,8 @@ const map: TranslationStrings = {
'Məkanınızı müəyyən etmək çox vaxt apardı. Səmanın daha açıq göründüyü yerdə yenidən cəhd edin.',
'map.overview.show': 'Bütün səyahəti göstər',
+ 'map.lock.lock': 'Xəritə görünüşünü kilidlə',
+ 'map.lock.unlock': 'Xəritə seçimi izləsin',
'map.overview.hide': 'Bütün səyahəti gizlət',
'map.overview.total': 'Ümumi məsafə',
'map.attribution': 'Xəritə mənbələri',
diff --git a/shared/src/i18n/az/mobileTrip.ts b/shared/src/i18n/az/mobileTrip.ts
index 6a312ffd7..3b62dc47d 100644
--- a/shared/src/i18n/az/mobileTrip.ts
+++ b/shared/src/i18n/az/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Xəritədə',
'mobileTrip.profileDriving': 'Avtomobillə',
'mobileTrip.profileWalking': 'Piyada',
+ 'mobileTrip.profileCycling': 'Velosipedlə',
'mobileTrip.renameDay': 'Günün adını dəyiş',
'mobileTrip.resBadge': 'Rezervasiya',
'mobileTrip.showOnMap': 'Xəritədə göstər',
diff --git a/shared/src/i18n/az/packing.ts b/shared/src/i18n/az/packing.ts
index bda9dfcb3..65fb93883 100644
--- a/shared/src/i18n/az/packing.ts
+++ b/shared/src/i18n/az/packing.ts
@@ -10,6 +10,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Elementi redaktə et',
'packing.itemName': 'Ad',
'packing.itemQuantity': 'Say',
+ 'packing.packedCount': '{total} ədəddən {packed} yığılıb',
+ 'packing.packedMore': 'Bir ədəd çox yığ',
+ 'packing.packedLess': 'Bir ədəd az yığ',
'packing.itemWeight': 'Çəki (qram)',
'packing.title': 'Baqaj siyahısı',
diff --git a/shared/src/i18n/az/places.ts b/shared/src/i18n/az/places.ts
index f76feb499..f6b46362d 100644
--- a/shared/src/i18n/az/places.ts
+++ b/shared/src/i18n/az/places.ts
@@ -61,6 +61,8 @@ const places: TranslationStrings = {
'places.filterTracks': 'İzlər',
'places.filterByRating': 'Reytinqə görə filtrlə',
+ 'places.filterByLocation': 'Ölkə və ya regiona görə filtrlə',
+ 'places.allLocations': 'Bütün ölkələr',
'places.filterShow': 'Göstər',
'places.clearSearch': 'Axtarışı təmizlə',
'places.yourRating': 'Sizin reytinqiniz',
@@ -88,6 +90,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kateqoriya',
'places.noCategory': 'Kateqoriya yoxdur',
'places.newCategory': 'Yeni kateqoriya',
+ 'places.openInMaps': 'Xəritələrdə aç',
'places.categoryNamePlaceholder': 'Kateqoriyanın adı',
'places.formTime': 'Vaxt',
'places.startTime': 'Başlanğıc',
@@ -104,6 +107,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Məkanları axtarın...',
'places.mapsSearchError': 'Məkan axtarışı uğursuz oldu.',
'places.searchGoogleInstead': 'Axtardığınız məkan deyil? Əvəzində Google-da axtarın',
+ 'places.nearby': 'Bu nişanın yaxınlığındakı məkanlar',
+ 'places.nearbyNone': 'Bu nişanın yaxınlığında heç nə tapılmadı',
'places.loadingDetails': 'Məkan təfərrüatları yüklənir…',
'places.osmHint':
'OpenStreetMap axtarışından istifadə edilir (fotolar, iş saatları və reytinqlər yoxdur). Tam təfərrüatlar üçün tənzimləmələrdə Google API açarı əlavə edin.',
@@ -145,10 +150,15 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Məkan məlumatlarını Google vasitəsilə tamamla',
'places.enrichOnImportHint':
'Foto, ünvan və əlaqə məlumatlarını əlavə etmək üçün idxal edilən hər məkanı axtarır. Google Maps açarınızdan istifadə edir.',
+ 'places.enrichOnImportFileHint':
+ 'İdxaldan sonra hər nöqtəni Google-da axtarır və onun fotosunu, ünvanını, veb saytını və telefonunu əlavə edir. Yollar və izlər olduğu kimi qalır.',
'places.uploadImage': 'Şəkil yüklə',
'places.changeImage': 'Şəkli dəyiş',
'places.removeImage': 'Şəkli sil',
+ 'places.chooseImage': 'Şəkil seç',
+ 'places.uploadFromDevice': 'Cihazdan yüklə',
+ 'places.fromAttachedFiles': 'Əlavə edilmiş fayllardan',
'places.imageUploadError': 'Şəkli yükləmək mümkün olmadı',
'places.imageRemoveError': 'Şəkli silmək mümkün olmadı',
};
diff --git a/shared/src/i18n/az/reservations.ts b/shared/src/i18n/az/reservations.ts
index 266a6e0c2..55a0f30d4 100644
--- a/shared/src/i18n/az/reservations.ts
+++ b/shared/src/i18n/az/reservations.ts
@@ -73,6 +73,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Digər',
'reservations.type.bus': 'Avtobus',
'reservations.type.ferry': 'Bərə',
+ 'reservations.type.cable_car': 'Kanat yolu',
'reservations.type.bicycle': 'Velosiped',
'reservations.type.taxi': 'Taksi',
'reservations.type.transit': 'İctimai nəqliyyat',
@@ -228,6 +229,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Filtrləri sıfırla',
'reservations.noMatches': 'Bu filtrlərə uyğun heç nə yoxdur',
'reservations.viewOptions': 'Görünüş seçimləri',
+ 'reservations.exportCsv': 'Cədvəl kimi ixrac et (CSV)',
+ 'reservations.export.type': 'Növ',
+ 'reservations.export.title': 'Başlıq',
+ 'reservations.export.start': 'Başlanğıc',
+ 'reservations.export.end': 'Son',
+ 'reservations.export.from': 'Haradan',
+ 'reservations.export.to': 'Haraya',
+ 'reservations.export.location': 'Yer',
+ 'reservations.export.confirmation': 'Təsdiq',
+ 'reservations.export.notes': 'Qeydlər',
'reservations.resetView': 'Görünüşü sıfırla',
'reservations.group.label': 'Qruplaşdır',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/az/settings.ts b/shared/src/i18n/az/settings.ts
index 195ffa261..9aa9881e9 100644
--- a/shared/src/i18n/az/settings.ts
+++ b/shared/src/i18n/az/settings.ts
@@ -429,6 +429,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Xərclər bölməsindəki məbləğlər yalnız göstərilmək üçün bu valyutaya çevrilir — ilkin məbləğlər dəyişmir.',
'settings.currencyTrip': 'Səyahət valyutası',
+ 'settings.placeLanguage': 'Məkan adları',
+ 'settings.placeLanguageApp': 'Tətbiqlə eyni',
+ 'settings.placeLanguageHint':
+ 'Məkan axtarışı, təkliflər və ünvanların göstərildiyi dil. Məkanın bu dildə adı yoxdursa, yerli adı göstərilir.',
'settings.passkey.title': 'Keçid açarları',
'settings.passkey.description':
@@ -595,6 +599,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Dil və region',
'settings.general.travelMap': 'Səyahət və xəritə',
'settings.general.startup': 'Başlanğıc',
+ 'settings.dayDateFirst': 'Gün başlıqlarında əvvəlcə tarix',
+ 'settings.compactUnplanned': 'Planlaşdırılmamış məkanlar üçün kiçik nişanlar',
+ 'settings.compactUnplannedHint':
+ 'Heç bir günə planlaşdırılmamış məkanlar fotosuz kiçik nişanlar kimi göstərilir ki, planlaşdırılmış dayanacaqlar seçilsin.',
+ 'settings.dayDateFirstHint':
+ 'Hər günü təqvim tarixi ilə başlayın, yanında isə "Gün 1" və ya günün öz başlığını göstərin.',
'settings.startPage': 'Başlanğıc səhifəsi',
'settings.startPageDashboard': 'İdarə paneli',
'settings.startPageActiveTrip': 'Aktiv səyahət',
diff --git a/shared/src/i18n/az/share.ts b/shared/src/i18n/az/share.ts
index 8dcc957d5..6a0e3122b 100644
--- a/shared/src/i18n/az/share.ts
+++ b/shared/src/i18n/az/share.ts
@@ -11,5 +11,11 @@ const share: TranslationStrings = {
'share.permPacking': 'Baqaj',
'share.permBudget': 'Xərclər',
'share.permCollab': 'Çat',
+ 'share.options': 'Seçimlər',
+ 'share.optTravelOnly': 'Yalnız səfər və qalma yerləri',
+ 'share.optTravelOnlyHint':
+ 'Fəaliyyətlər, gün qeydləri və boş günlər olmadan yalnız nəqliyyat və yaşayış yerlərini göstərir',
+ 'share.optHideImages': 'Fotosuz',
+ 'share.optHideImagesHint': 'Məkan fotolarını paylaşılan səhifəyə daxil etmir',
};
export default share;
\ No newline at end of file
diff --git a/shared/src/i18n/az/shared.ts b/shared/src/i18n/az/shared.ts
index f9649ef4b..447904ed6 100644
--- a/shared/src/i18n/az/shared.ts
+++ b/shared/src/i18n/az/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Çat',
'shared.days': 'gün',
'shared.places': 'məkan',
+ 'shared.unplanned': 'Hələ planlaşdırılmayıb',
'shared.other': 'Digər',
'shared.totalBudget': 'Ümumi xərclər',
'shared.messages': 'mesaj',
diff --git a/shared/src/i18n/az/todo.ts b/shared/src/i18n/az/todo.ts
index 8aed3cf20..f46af7bf7 100644
--- a/shared/src/i18n/az/todo.ts
+++ b/shared/src/i18n/az/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Siyahısız',
'todo.namePlaceholder': 'Tapşırığın adı',
'todo.descriptionPlaceholder': 'Təsvir (istəyə bağlı)',
+ 'todo.editDescription': 'Redaktə etmək üçün klikləyin, keçidlər birbaşa açılır',
'todo.unassigned': 'Təyin edilməyib',
'todo.noCategory': 'Siyahı yoxdur',
'todo.hasDescription': 'Təsviri var',
diff --git a/shared/src/i18n/az/undo.ts b/shared/src/i18n/az/undo.ts
index 2bd8b2f6c..c2efc13c8 100644
--- a/shared/src/i18n/az/undo.ts
+++ b/shared/src/i18n/az/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Geri qaytar: {action}',
'undo.assignPlace': 'Məkan günə təyin edildi',
'undo.removeAssignment': 'Məkan gündən çıxarıldı',
+ 'undo.clearDay': 'Gün təmizləndi',
'undo.reorder': 'Məkanlar yenidən sıralandı',
'undo.optimize': 'Marşrut optimallaşdırıldı',
'undo.deletePlace': 'Məkan silindi',
diff --git a/shared/src/i18n/br/atlas.ts b/shared/src/i18n/br/atlas.ts
index 37db4763f..7648785d6 100644
--- a/shared/src/i18n/br/atlas.ts
+++ b/shared/src/i18n/br/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Países',
'atlas.trips': 'Viagens',
'atlas.places': 'Lugares',
+ 'atlas.placesShow': 'Mostrar os lugares deste país',
+ 'atlas.placesSearch': 'Buscar lugares',
+ 'atlas.placesNone': 'Nenhum lugar corresponde',
'atlas.unmark': 'Remover',
'atlas.confirmMark': 'Marcar este país como visitado?',
'atlas.confirmUnmark': 'Remover este país da lista de visitados?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Dias',
'atlas.visitedCountries': 'Países visitados',
'atlas.cities': 'Cidades',
+ 'atlas.regions': 'Regiões',
'atlas.noData': 'Ainda sem dados de viagem',
'atlas.noDataHint': 'Crie uma viagem e adicione lugares para ver o mapa mundial',
'atlas.nextTrip': 'Próxima viagem',
diff --git a/shared/src/i18n/br/budget.ts b/shared/src/i18n/br/budget.ts
index 42b7afc66..e8ed7d58b 100644
--- a/shared/src/i18n/br/budget.ts
+++ b/shared/src/i18n/br/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'ex.: jantar, lembranças, gasolina…',
'costs.note': 'Nota',
'costs.notePlaceholder': 'O que incluía, quem deve o quê…',
+ 'costs.paymentNotePlaceholder': 'Pago em dinheiro, por transferência…',
'costs.addNote': 'Adicionar nota',
'costs.showNote': 'Mostrar nota',
'costs.hideNote': 'Ocultar nota',
diff --git a/shared/src/i18n/br/dayplan.ts b/shared/src/i18n/br/dayplan.ts
index 008e9f193..f0f687afd 100644
--- a/shared/src/i18n/br/dayplan.ts
+++ b/shared/src/i18n/br/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Mapas e GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Exportar plano do dia em PDF',
+ 'dayplan.pdfMine': 'Meu plano em PDF',
+ 'dayplan.pdfMineSub': 'Somente as atividades e reservas de que você participa',
'dayplan.gpxTooltip': 'Exportar como GPX para mapas offline e aparelhos de GPS',
'dayplan.gpxAll': 'Viagem inteira',
'dayplan.gpxPlaces': 'Somente lugares',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Excluir dia',
'dayplan.deleteDayTitle': 'Excluir {day}?',
'dayplan.deleteDayBody': 'O dia é removido da viagem. Isso não pode ser desfeito.',
+ 'dayplan.excludeFromRoute': 'Tirar da rota',
+ 'dayplan.includeInRoute': 'Colocar de volta na rota',
+ 'dayplan.offRoute': 'Fora da rota',
+ 'dayplan.offRouteHint': 'Continua no dia e no mapa, mas a rota o ignora',
+ 'dayplan.clearDay': 'Limpar dia',
+ 'dayplan.clearDayTitle': 'Limpar {day}?',
+ 'dayplan.clearDayBody':
+ 'Todos os lugares saem deste dia. Os lugares continuam na viagem, e o dia mantém suas notas e reservas.',
'dayplan.deleteDayEmpty': 'Nada está planejado para este dia.',
'dayplan.impactPlaces': 'Lugares planejados: {count}',
'dayplan.impactPlacesHint': 'Eles continuam na lista de lugares.',
diff --git a/shared/src/i18n/br/inspector.ts b/shared/src/i18n/br/inspector.ts
index 531528444..d60319f95 100644
--- a/shared/src/i18n/br/inspector.ts
+++ b/shared/src/i18n/br/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Reserva pendente',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navegação',
+ 'inspector.otherMapApp': 'Outro app de mapas',
'inspector.openWith': 'Abrir com',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.saveToCollection': 'Salvar na Coleção',
diff --git a/shared/src/i18n/br/journey.ts b/shared/src/i18n/br/journey.ts
index f76eb7569..f3c9652bc 100644
--- a/shared/src/i18n/br/journey.ts
+++ b/shared/src/i18n/br/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Jornada',
'journey.subtitle': 'Registre suas viagens em tempo real',
'journey.new': 'Nova jornada',
+ 'journey.lightbox.zoomIn': 'Aproximar',
+ 'journey.lightbox.zoomOut': 'Afastar',
+ 'journey.lightbox.zoomReset': 'Voltar à foto inteira',
'journey.create': 'Criar',
'journey.titlePlaceholder': 'Para onde você vai?',
'journey.empty': 'Nenhuma jornada ainda',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Adicionar entrada',
'journey.detail.jumpToTop': 'Voltar ao topo',
'journey.detail.jumpToLast': 'Ir para a última entrada',
+ 'journey.detail.dayJump': 'Ir para um dia',
+ 'journey.detail.dayJumpCount': '{count} dias',
'journey.detail.newEntry': 'Nova entrada',
'journey.detail.editEntry': 'Editar entrada',
'journey.detail.noEntries': 'Nenhuma entrada ainda',
@@ -432,6 +437,18 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Lista',
'journey.studio.kind.icon': 'Ícone',
'journey.studio.duplicate': 'Duplicar',
+ 'journey.studio.copyToPage': 'Copiar, para colar em qualquer página (Ctrl+C)',
+ 'journey.studio.paste': 'Colar (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Copie algo primeiro e depois cole em qualquer página',
+ 'journey.studio.myLayouts': 'Minhas disposições',
+ 'journey.studio.myLayoutsEmpty':
+ 'Guarde uma página que você organizou e disponha outras páginas do mesmo jeito. As fotos e os textos delas continuam.',
+ 'journey.studio.saveLayout': 'Salvar esta página como disposição',
+ 'journey.studio.saveLayoutHint': 'Guarda a disposição sem as fotos, para todos que editam este livro',
+ 'journey.studio.saveLayoutFull': 'Este livro guarda até 24 disposições. Exclua uma para salvar outra.',
+ 'journey.studio.deleteLayout': 'Excluir disposição',
+ 'journey.studio.layoutName': 'Disposição',
+ 'journey.studio.builtInLayouts': 'Prontas',
'journey.studio.style': 'Estilo',
'journey.studio.shows': 'Mostrar',
'journey.studio.size': 'Tamanho',
@@ -626,6 +643,12 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'A parada continua no diário, mas não conta para a distância, os países nem o mapa no Studio.',
'journey.entry.offRoute': 'Fora da rota',
+ 'journey.entry.draft': 'Rascunho',
+ 'journey.editor.draft': 'Rascunho',
+ 'journey.editor.draftHint':
+ 'Só você e os outros colaboradores veem esta entrada. A jornada compartilhada a deixa de fora até você desativar isto.',
+ 'journey.editor.tripSuggestionHint': 'Este dia cai nesta viagem. Vincule-a, e os lugares dela entram nesta jornada.',
+ 'journey.editor.tripSuggestionLater': 'Agora não',
'journey.suggestions.dismiss': 'Descartar esta sugestão',
'journey.suggestions.dismissed': 'Sugestão descartada',
'journey.suggestions.restore': 'Trazer de volta as sugestões descartadas',
diff --git a/shared/src/i18n/br/map.ts b/shared/src/i18n/br/map.ts
index 1c7b88142..713322d21 100644
--- a/shared/src/i18n/br/map.ts
+++ b/shared/src/i18n/br/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Não foi possível determinar sua localização.',
'map.location.timeout': 'A localização demorou demais. Tente de novo com uma visão mais aberta do céu.',
'map.overview.show': 'Mostrar a viagem inteira',
+ 'map.lock.lock': 'Travar a visualização do mapa',
+ 'map.lock.unlock': 'Deixar o mapa seguir a seleção',
'map.overview.hide': 'Ocultar a viagem inteira',
'map.overview.total': 'Distância total',
'map.attribution': 'Créditos do mapa',
diff --git a/shared/src/i18n/br/mobileTrip.ts b/shared/src/i18n/br/mobileTrip.ts
index f351a690a..1de1d5ef2 100644
--- a/shared/src/i18n/br/mobileTrip.ts
+++ b/shared/src/i18n/br/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'No mapa',
'mobileTrip.profileDriving': 'De carro',
'mobileTrip.profileWalking': 'A pé',
+ 'mobileTrip.profileCycling': 'De bicicleta',
'mobileTrip.renameDay': 'Renomear dia',
'mobileTrip.resBadge': 'Reserva',
'mobileTrip.showOnMap': 'Mostrar no mapa',
diff --git a/shared/src/i18n/br/packing.ts b/shared/src/i18n/br/packing.ts
index e3eae12a2..70b189f84 100644
--- a/shared/src/i18n/br/packing.ts
+++ b/shared/src/i18n/br/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Editar item',
'packing.itemName': 'Nome',
'packing.itemQuantity': 'Quantidade',
+ 'packing.packedCount': '{packed} de {total} na mala',
+ 'packing.packedMore': 'Pôr mais um na mala',
+ 'packing.packedLess': 'Tirar um da mala',
'packing.itemWeight': 'Peso (g)',
'packing.title': 'Lista de mala',
'packing.empty': 'A lista de mala está vazia',
diff --git a/shared/src/i18n/br/places.ts b/shared/src/i18n/br/places.ts
index fc3c8763c..1e7d06cea 100644
--- a/shared/src/i18n/br/places.ts
+++ b/shared/src/i18n/br/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Mostrar a viagem inteira',
'places.filterTracks': 'Trilhas',
'places.filterByRating': 'Filtrar por avaliação',
+ 'places.filterByLocation': 'Filtrar por país ou região',
+ 'places.allLocations': 'Todos os países',
'places.filterShow': 'Mostrar',
'places.clearSearch': 'Limpar busca',
'places.yourRating': 'Sua avaliação',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Categoria',
'places.noCategory': 'Sem categoria',
'places.newCategory': 'Nova categoria',
+ 'places.openInMaps': 'Abrir em mapas',
'places.categoryNamePlaceholder': 'Nome da categoria',
'places.formTime': 'Horário',
'places.startTime': 'Início',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Buscar lugares...',
'places.mapsSearchError': 'Falha na busca de lugares.',
'places.searchGoogleInstead': 'Não é o lugar certo? Pesquisar no Google',
+ 'places.nearby': 'Lugares perto deste marcador',
+ 'places.nearbyNone': 'Nada encontrado perto deste marcador',
'places.loadingDetails': 'Carregando detalhes do lugar…',
'places.osmHint':
'Busca via OpenStreetMap (sem fotos, horários ou avaliações). Adicione uma chave Google nas configurações para detalhes completos.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Enriquecer lugares via Google',
'places.enrichOnImportHint':
'Busca cada lugar importado para adicionar fotos, endereço e contato. Usa sua chave do Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Depois pesquisa cada ponto importado no Google e adiciona foto, endereço, site e telefone. Caminhos e trilhas ficam como estão.',
'places.uploadImage': 'Enviar imagem',
'places.changeImage': 'Alterar imagem',
'places.removeImage': 'Remover imagem',
+ 'places.chooseImage': 'Escolher uma imagem',
+ 'places.uploadFromDevice': 'Enviar do dispositivo',
+ 'places.fromAttachedFiles': 'Dos arquivos anexados',
'places.imageUploadError': 'Não foi possível enviar a imagem',
'places.imageRemoveError': 'Não foi possível remover a imagem',
};
diff --git a/shared/src/i18n/br/reservations.ts b/shared/src/i18n/br/reservations.ts
index c59880687..5e6468b8c 100644
--- a/shared/src/i18n/br/reservations.ts
+++ b/shared/src/i18n/br/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Outro',
'reservations.type.bus': 'Ônibus',
'reservations.type.ferry': 'Balsa',
+ 'reservations.type.cable_car': 'Teleférico',
'reservations.type.bicycle': 'Bicicleta',
'reservations.type.taxi': 'Táxi',
'reservations.type.transit': 'Transporte público',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Limpar filtros',
'reservations.noMatches': 'Nada corresponde a esses filtros',
'reservations.viewOptions': 'Opções de visualização',
+ 'reservations.exportCsv': 'Exportar como planilha (CSV)',
+ 'reservations.export.type': 'Tipo',
+ 'reservations.export.title': 'Título',
+ 'reservations.export.start': 'Início',
+ 'reservations.export.end': 'Fim',
+ 'reservations.export.from': 'De',
+ 'reservations.export.to': 'Para',
+ 'reservations.export.location': 'Local',
+ 'reservations.export.confirmation': 'Confirmação',
+ 'reservations.export.notes': 'Notas',
'reservations.resetView': 'Redefinir visualização',
'reservations.group.label': 'Agrupar por',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/br/settings.ts b/shared/src/i18n/br/settings.ts
index 054c19b97..67f5d82a1 100644
--- a/shared/src/i18n/br/settings.ts
+++ b/shared/src/i18n/br/settings.ts
@@ -339,6 +339,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Os valores em Custos são exibidos convertidos para esta moeda apenas para visualização — os valores originais permanecem inalterados.',
'settings.currencyTrip': 'Moeda da viagem',
+ 'settings.placeLanguage': 'Nomes de lugares',
+ 'settings.placeLanguageApp': 'Igual ao app',
+ 'settings.placeLanguageHint':
+ 'O idioma em que a busca de lugares, as sugestões e os endereços respondem. Quando um lugar não tem nome nesse idioma, o nome local é exibido.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Entre mais rápido e com proteção contra phishing usando uma passkey — sua impressão digital, rosto, PIN ou uma chave de segurança física. Sua senha continua disponível como reserva.',
@@ -484,6 +488,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Inicialização',
+ 'settings.dayDateFirst': 'Data primeiro nos títulos dos dias',
+ 'settings.compactUnplanned': 'Marcadores compactos para lugares não planejados',
+ 'settings.compactUnplannedHint':
+ 'Lugares que não estão planejados em nenhum dia aparecem como marcadores pequenos sem foto, para que as paradas planejadas se destaquem.',
+ 'settings.dayDateFirstHint':
+ 'Começar cada dia com a data do calendário e mostrar "Dia 1" ou o título próprio do dia ao lado.',
'settings.startPage': 'Página inicial',
'settings.startPageDashboard': 'Painel',
'settings.startPageActiveTrip': 'Viagem ativa',
diff --git a/shared/src/i18n/br/share.ts b/shared/src/i18n/br/share.ts
index e32f9d9a2..71d163ffb 100644
--- a/shared/src/i18n/br/share.ts
+++ b/shared/src/i18n/br/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Mala',
'share.permBudget': 'Custos',
'share.permCollab': 'Chat',
+ 'share.options': 'Opções',
+ 'share.optTravelOnly': 'Só transporte e hospedagem',
+ 'share.optTravelOnlyHint': 'Mostra apenas transporte e hospedagem, sem atividades, notas do dia e dias vazios',
+ 'share.optHideImages': 'Sem fotos',
+ 'share.optHideImagesHint': 'Deixa as fotos dos lugares fora da página compartilhada',
};
export default share;
diff --git a/shared/src/i18n/br/shared.ts b/shared/src/i18n/br/shared.ts
index 57dde8413..eaf9a7c09 100644
--- a/shared/src/i18n/br/shared.ts
+++ b/shared/src/i18n/br/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'dias',
'shared.places': 'lugares',
+ 'shared.unplanned': 'Ainda não planejado',
'shared.other': 'Outros',
'shared.totalBudget': 'Custos totais',
'shared.messages': 'mensagens',
diff --git a/shared/src/i18n/br/todo.ts b/shared/src/i18n/br/todo.ts
index f13337c8b..1f303b1b6 100644
--- a/shared/src/i18n/br/todo.ts
+++ b/shared/src/i18n/br/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Sem lista',
'todo.namePlaceholder': 'Nome da tarefa',
'todo.descriptionPlaceholder': 'Descrição (opcional)',
+ 'todo.editDescription': 'Clique para editar, os links abrem direto',
'todo.unassigned': 'Não atribuído',
'todo.noCategory': 'Sem lista',
'todo.hasDescription': 'Com descrição',
diff --git a/shared/src/i18n/br/undo.ts b/shared/src/i18n/br/undo.ts
index 58e026307..1462394de 100644
--- a/shared/src/i18n/br/undo.ts
+++ b/shared/src/i18n/br/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Desfazer: {action}',
'undo.assignPlace': 'Local atribuído ao dia',
'undo.removeAssignment': 'Local removido do dia',
+ 'undo.clearDay': 'Dia limpo',
'undo.reorder': 'Locais reordenados',
'undo.optimize': 'Rota otimizada',
'undo.deletePlace': 'Local excluído',
diff --git a/shared/src/i18n/ca/atlas.ts b/shared/src/i18n/ca/atlas.ts
index 215868573..ef1bbced9 100644
--- a/shared/src/i18n/ca/atlas.ts
+++ b/shared/src/i18n/ca/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Països',
'atlas.trips': 'Viatges',
'atlas.places': 'Llocs',
+ 'atlas.placesShow': 'Mostra els llocs d’aquest país',
+ 'atlas.placesSearch': 'Cerca llocs',
+ 'atlas.placesNone': 'Cap lloc coincideix',
'atlas.days': 'Dies',
'atlas.visitedCountries': 'Països visitats',
'atlas.cities': 'Ciutats',
+ 'atlas.regions': 'Regions',
'atlas.noData': 'Encara no hi ha dades de viatge',
'atlas.noDataHint': 'Crea un viatge i afegeix llocs per veure el teu mapa del món',
'atlas.nextTrip': 'Proper viatge',
diff --git a/shared/src/i18n/ca/budget.ts b/shared/src/i18n/ca/budget.ts
index 42b5f19c5..b93468f4b 100644
--- a/shared/src/i18n/ca/budget.ts
+++ b/shared/src/i18n/ca/budget.ts
@@ -106,6 +106,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'p. ex. Sopar, records, benzina…',
'costs.note': 'Nota',
'costs.notePlaceholder': 'Què incloïa, qui deu què…',
+ 'costs.paymentNotePlaceholder': 'Pagat en efectiu, per transferència…',
'costs.addNote': 'Afegeix una nota',
'costs.showNote': 'Mostra la nota',
'costs.hideNote': 'Amaga la nota',
diff --git a/shared/src/i18n/ca/dayplan.ts b/shared/src/i18n/ca/dayplan.ts
index 1159f6b77..2cf5db9f9 100644
--- a/shared/src/i18n/ca/dayplan.ts
+++ b/shared/src/i18n/ca/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Mapes i GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Exporta el pla diari com a PDF',
+ 'dayplan.pdfMine': 'El meu pla en PDF',
+ 'dayplan.pdfMineSub': 'Només les activitats i reserves en què participes',
'dayplan.gpxTooltip': 'Exporta com a GPX per a mapes fora de línia i dispositius GPS',
'dayplan.gpxAll': 'Tot el viatge',
'dayplan.gpxPlaces': 'Només els llocs',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Elimina el dia',
'dayplan.deleteDayTitle': 'Vols eliminar {day}?',
'dayplan.deleteDayBody': "El dia s'elimina del viatge. No es pot desfer.",
+ 'dayplan.excludeFromRoute': 'Treu de la ruta',
+ 'dayplan.includeInRoute': 'Torna a afegir a la ruta',
+ 'dayplan.offRoute': 'Fora de ruta',
+ 'dayplan.offRouteHint': 'Es manté al dia i al mapa, però la ruta el salta',
+ 'dayplan.clearDay': 'Buida el dia',
+ 'dayplan.clearDayTitle': 'Vols buidar {day}?',
+ 'dayplan.clearDayBody':
+ 'Tots els llocs surten d’aquest dia. Els llocs es queden al viatge, i el dia conserva les notes i les reserves.',
'dayplan.deleteDayEmpty': 'No hi ha res planificat aquest dia.',
'dayplan.impactPlaces': 'Llocs planificats: {count}',
'dayplan.impactPlacesHint': 'Es queden a la llista de llocs.',
diff --git a/shared/src/i18n/ca/inspector.ts b/shared/src/i18n/ca/inspector.ts
index df1893253..9f7f5d908 100644
--- a/shared/src/i18n/ca/inspector.ts
+++ b/shared/src/i18n/ca/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Reserva pendent',
'inspector.google': 'Obre a Google Maps',
'inspector.navigation': 'Navegació',
+ 'inspector.otherMapApp': 'Una altra app de mapes',
'inspector.openWith': 'Obre amb',
'inspector.website': 'Obre el lloc web',
'inspector.addRes': 'Reserva',
diff --git a/shared/src/i18n/ca/journey.ts b/shared/src/i18n/ca/journey.ts
index f1cfa3bab..dab83c205 100644
--- a/shared/src/i18n/ca/journey.ts
+++ b/shared/src/i18n/ca/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Travesia',
'journey.subtitle': 'Registra els teus viatges en temps real',
'journey.new': 'Travesia nova',
+ 'journey.lightbox.zoomIn': 'Apropa',
+ 'journey.lightbox.zoomOut': 'Allunya',
+ 'journey.lightbox.zoomReset': 'Torna a la foto sencera',
'journey.create': 'Crea',
'journey.titlePlaceholder': 'A on vas?',
'journey.empty': 'Encara no hi ha travesies',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Afegeix una entrada',
'journey.detail.jumpToTop': 'Torna a dalt',
'journey.detail.jumpToLast': 'Ves a l’última entrada',
+ 'journey.detail.dayJump': 'Ves a un dia',
+ 'journey.detail.dayJumpCount': '{count} dies',
'journey.detail.newEntry': 'Entrada nova',
'journey.detail.editEntry': "Edita l'entrada",
'journey.detail.noEntries': 'Encara no hi ha entrades',
@@ -432,6 +437,19 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Llista',
'journey.studio.kind.icon': 'Icona',
'journey.studio.duplicate': 'Duplica',
+ 'journey.studio.copyToPage': 'Copia, per enganxar a qualsevol pàgina (Ctrl+C)',
+ 'journey.studio.paste': 'Enganxa (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Primer copia alguna cosa i després enganxa-la a qualsevol pàgina',
+ 'journey.studio.myLayouts': 'Les meves disposicions',
+ 'journey.studio.myLayoutsEmpty':
+ 'Guarda una pàgina que hagis organitzat i disposa altres pàgines de la mateixa manera. Les seves fotos i textos es mantenen.',
+ 'journey.studio.saveLayout': 'Desa aquesta pàgina com a disposició',
+ 'journey.studio.saveLayoutHint': 'Conserva la disposició sense les fotos, per a tots els editors d’aquest llibre',
+ 'journey.studio.saveLayoutFull':
+ 'Aquest llibre conserva fins a 24 disposicions. Elimina’n una per desar-ne una altra.',
+ 'journey.studio.deleteLayout': 'Elimina la disposició',
+ 'journey.studio.layoutName': 'Disposició',
+ 'journey.studio.builtInLayouts': 'Predefinides',
'journey.studio.style': 'Estil',
'journey.studio.shows': 'Mostra',
'journey.studio.size': 'Mida',
@@ -625,6 +643,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'La parada es manté al diari, però no compta per a la distància, els països ni el mapa de Studio.',
'journey.entry.offRoute': 'Fora de ruta',
+ 'journey.entry.draft': 'Esborrany',
+ 'journey.editor.draft': 'Esborrany',
+ 'journey.editor.draftHint':
+ 'Només tu i els altres col·laboradors veieu aquesta entrada. La travesia compartida l’omet fins que ho desactivis.',
+ 'journey.editor.tripSuggestionHint':
+ 'Aquest dia cau dins d’aquest viatge. Enllaça’l i els seus llocs s’afegiran a aquesta travesia.',
+ 'journey.editor.tripSuggestionLater': 'Ara no',
'journey.suggestions.dismiss': 'Descarta aquest suggeriment',
'journey.suggestions.dismissed': 'Suggeriment descartat',
'journey.suggestions.restore': 'Recupera els suggeriments descartats',
diff --git a/shared/src/i18n/ca/map.ts b/shared/src/i18n/ca/map.ts
index d3ea045fc..ec0eaf1b9 100644
--- a/shared/src/i18n/ca/map.ts
+++ b/shared/src/i18n/ca/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'No s’ha pogut determinar la teva ubicació.',
'map.location.timeout': 'La localització ha trigat massa. Torna-ho a provar amb una vista més clara del cel.',
'map.overview.show': 'Mostra tot el viatge',
+ 'map.lock.lock': 'Bloqueja la vista del mapa',
+ 'map.lock.unlock': 'Deixa que el mapa segueixi la selecció',
'map.overview.hide': 'Amaga tot el viatge',
'map.overview.total': 'Distància total',
'map.attribution': 'Crèdits del mapa',
diff --git a/shared/src/i18n/ca/mobileTrip.ts b/shared/src/i18n/ca/mobileTrip.ts
index 9c451825d..a8cb6d033 100644
--- a/shared/src/i18n/ca/mobileTrip.ts
+++ b/shared/src/i18n/ca/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Al mapa',
'mobileTrip.profileDriving': 'En cotxe',
'mobileTrip.profileWalking': 'A peu',
+ 'mobileTrip.profileCycling': 'En bicicleta',
'mobileTrip.renameDay': 'Canvia el nom del dia',
'mobileTrip.resBadge': 'Reserva',
'mobileTrip.showOnMap': 'Mostra al mapa',
diff --git a/shared/src/i18n/ca/packing.ts b/shared/src/i18n/ca/packing.ts
index 4ec8def6b..e8c7ef547 100644
--- a/shared/src/i18n/ca/packing.ts
+++ b/shared/src/i18n/ca/packing.ts
@@ -92,6 +92,9 @@ const packing: TranslationStrings = {
'packing.editItem': "Edita l'element",
'packing.itemName': 'Nom',
'packing.itemQuantity': 'Quantitat',
+ 'packing.packedCount': '{packed} de {total} preparats',
+ 'packing.packedMore': 'Prepara’n un més',
+ 'packing.packedLess': 'Prepara’n un menys',
'packing.itemWeight': 'Pes (g)',
'packing.bagLimit': 'Límit de pes',
'packing.setBagLimit': 'Defineix un límit',
diff --git a/shared/src/i18n/ca/places.ts b/shared/src/i18n/ca/places.ts
index 57a59ad24..a20af7c20 100644
--- a/shared/src/i18n/ca/places.ts
+++ b/shared/src/i18n/ca/places.ts
@@ -51,6 +51,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Mostra tot el viatge',
'places.filterTracks': 'Rutes',
'places.filterByRating': 'Filtra per valoració',
+ 'places.filterByLocation': 'Filtra per país o regió',
+ 'places.allLocations': 'Tots els països',
'places.filterShow': 'Mostrar',
'places.clearSearch': 'Esborra la cerca',
'places.yourRating': 'La teva valoració',
@@ -77,6 +79,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Categoria',
'places.noCategory': 'Sense categoria',
'places.newCategory': 'Categoria nova',
+ 'places.openInMaps': 'Obre a mapes',
'places.categoryNamePlaceholder': 'Nom de la categoria',
'places.formTime': 'Hora',
'places.startTime': 'Inici',
@@ -93,6 +96,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Cerca llocs...',
'places.mapsSearchError': 'La cerca de llocs ha fallat.',
'places.searchGoogleInstead': 'No és el lloc correcte? Cerca a Google',
+ 'places.nearby': 'Llocs a prop d’aquest marcador',
+ 'places.nearbyNone': 'No s’ha trobat res a prop d’aquest marcador',
'places.loadingDetails': 'Carregant els detalls del lloc…',
'places.osmHint':
"S'està utilitzant la cerca amb OpenStreetMap (sense fotos, horaris ni valoracions). Afegeix una clau API de Google a Configuració per obtenir tots els detalls.",
@@ -134,9 +139,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Enriquir llocs mitjançant Google',
'places.enrichOnImportHint':
"Obté automàticament adreces, puntuacions i horaris d'obertura des de Google en importar.",
+ 'places.enrichOnImportFileHint':
+ 'Després cerca cada punt importat a Google i n’afegeix la foto, l’adreça, el lloc web i el telèfon. Els camins i els tracks es queden com estan.',
'places.uploadImage': 'Puja una imatge',
'places.changeImage': 'Canvia la imatge',
'places.removeImage': 'Elimina la imatge',
+ 'places.chooseImage': 'Tria una imatge',
+ 'places.uploadFromDevice': 'Puja des del dispositiu',
+ 'places.fromAttachedFiles': 'Dels fitxers adjunts',
'places.imageUploadError': "No s'ha pogut pujar la imatge",
'places.imageRemoveError': "No s'ha pogut eliminar la imatge",
};
diff --git a/shared/src/i18n/ca/reservations.ts b/shared/src/i18n/ca/reservations.ts
index 212f01dd3..99f34fa17 100644
--- a/shared/src/i18n/ca/reservations.ts
+++ b/shared/src/i18n/ca/reservations.ts
@@ -34,6 +34,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Altres',
'reservations.type.bus': 'Autobús',
'reservations.type.ferry': 'Ferri',
+ 'reservations.type.cable_car': 'Telefèric',
'reservations.type.bicycle': 'Bicicleta',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Transport públic',
@@ -197,6 +198,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Restablir els filtres',
'reservations.noMatches': 'Res no coincideix amb aquests filtres',
'reservations.viewOptions': 'Opcions de vista',
+ 'reservations.exportCsv': 'Exporta com a full de càlcul (CSV)',
+ 'reservations.export.type': 'Tipus',
+ 'reservations.export.title': 'Títol',
+ 'reservations.export.start': 'Inici',
+ 'reservations.export.end': 'Final',
+ 'reservations.export.from': 'Des de',
+ 'reservations.export.to': 'Fins a',
+ 'reservations.export.location': 'Ubicació',
+ 'reservations.export.confirmation': 'Confirmació',
+ 'reservations.export.notes': 'Notes',
'reservations.resetView': 'Restablir la vista',
'reservations.group.label': 'Agrupar per',
'reservations.group.status': 'Estat',
diff --git a/shared/src/i18n/ca/settings.ts b/shared/src/i18n/ca/settings.ts
index 9e05533fe..d77563e58 100644
--- a/shared/src/i18n/ca/settings.ts
+++ b/shared/src/i18n/ca/settings.ts
@@ -466,6 +466,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Idioma i regió',
'settings.general.travelMap': 'Viatge i mapa',
'settings.general.startup': 'Inici',
+ 'settings.dayDateFirst': 'Data primer als títols dels dies',
+ 'settings.compactUnplanned': 'Marcadors compactes per als llocs sense planificar',
+ 'settings.compactUnplannedHint':
+ 'Els llocs que no són a cap dia es mostren com a marcadors petits sense foto, perquè les parades planificades destaquin.',
+ 'settings.dayDateFirstHint':
+ 'Comença cada dia amb la seva data de calendari i mostra «Dia 1» o el títol propi del dia al costat.',
'settings.startPage': "Pàgina d'inici",
'settings.startPageDashboard': 'Tauler',
'settings.startPageActiveTrip': 'Viatge actiu',
@@ -565,6 +571,10 @@ const settings: TranslationStrings = {
'settings.notificationPreferences.pluginConfigured':
'Configurat. Gestiona les credencials a la configuració del connector.',
'settings.currencyTrip': 'Divisa del viatge',
+ 'settings.placeLanguage': 'Noms de llocs',
+ 'settings.placeLanguageApp': 'Igual que l’app',
+ 'settings.placeLanguageHint':
+ 'La llengua en què responen la cerca de llocs, els suggeriments i les adreces. Si un lloc no té nom en aquesta llengua, se’n mostra el nom local.',
'settings.alwaysShowRoutes': 'Mostra sempre les rutes de reserva',
'settings.alwaysShowRoutesHint':
'Dibuixa automàticament al mapa la ruta de cada vol, tren i altra reserva — no cal activar-la una per una.',
diff --git a/shared/src/i18n/ca/share.ts b/shared/src/i18n/ca/share.ts
index 3238fa10f..26ca7f76e 100644
--- a/shared/src/i18n/ca/share.ts
+++ b/shared/src/i18n/ca/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Equipatge',
'share.permBudget': 'Pressupost',
'share.permCollab': 'Xat',
+ 'share.options': 'Opcions',
+ 'share.optTravelOnly': 'Només transport i allotjament',
+ 'share.optTravelOnlyHint': 'Mostra només transport i allotjament, sense activitats, notes del dia ni dies buits',
+ 'share.optHideImages': 'Sense fotos',
+ 'share.optHideImagesHint': 'Omet les fotos dels llocs a la pàgina compartida',
};
export default share;
diff --git a/shared/src/i18n/ca/shared.ts b/shared/src/i18n/ca/shared.ts
index 525f13c0a..fe5ff1040 100644
--- a/shared/src/i18n/ca/shared.ts
+++ b/shared/src/i18n/ca/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Xat',
'shared.days': 'dies',
'shared.places': 'llocs',
+ 'shared.unplanned': 'Encara sense planificar',
'shared.other': 'Altres',
'shared.totalBudget': 'Pressupost total',
'shared.messages': 'missatges',
diff --git a/shared/src/i18n/ca/todo.ts b/shared/src/i18n/ca/todo.ts
index 7efd2912e..cc6d2bc13 100644
--- a/shared/src/i18n/ca/todo.ts
+++ b/shared/src/i18n/ca/todo.ts
@@ -10,6 +10,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Sense categoria',
'todo.namePlaceholder': 'Nom de la tasca',
'todo.descriptionPlaceholder': 'Descripció (opcional)',
+ 'todo.editDescription': 'Fes clic per editar, els enllaços s’obren directament',
'todo.unassigned': 'Sense assignar',
'todo.noCategory': 'Sense categoria',
'todo.hasDescription': 'Amb descripció',
diff --git a/shared/src/i18n/ca/undo.ts b/shared/src/i18n/ca/undo.ts
index b04a14e7e..fbddc013d 100644
--- a/shared/src/i18n/ca/undo.ts
+++ b/shared/src/i18n/ca/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Desfés: {action}',
'undo.assignPlace': 'Lloc assignat al dia',
'undo.removeAssignment': 'Lloc eliminat del dia',
+ 'undo.clearDay': 'Dia buidat',
'undo.reorder': 'Llocs reordenats',
'undo.optimize': 'Ruta optimitzada',
'undo.deletePlace': 'Lloc eliminat',
diff --git a/shared/src/i18n/cs/atlas.ts b/shared/src/i18n/cs/atlas.ts
index f20a901af..87e8577cf 100644
--- a/shared/src/i18n/cs/atlas.ts
+++ b/shared/src/i18n/cs/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Země',
'atlas.trips': 'Cesty',
'atlas.places': 'Místa',
+ 'atlas.placesShow': 'Zobrazit místa v této zemi',
+ 'atlas.placesSearch': 'Hledat místa',
+ 'atlas.placesNone': 'Žádné místo neodpovídá',
'atlas.unmark': 'Odebrat',
'atlas.confirmMark': 'Označit tuto zemi jako navštívenou?',
'atlas.confirmUnmark': 'Odebrat tuto zemi ze seznamu navštívených?',
@@ -30,6 +33,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Dní',
'atlas.visitedCountries': 'Navštívené země',
'atlas.cities': 'Města',
+ 'atlas.regions': 'Regiony',
'atlas.noData': 'Zatím žádná cestovatelská data',
'atlas.noDataHint': 'Vytvořte cestu a přidejte místa, abyste viděli svou mapu světa',
'atlas.nextTrip': 'Další cesta',
diff --git a/shared/src/i18n/cs/budget.ts b/shared/src/i18n/cs/budget.ts
index a86caae81..424784b07 100644
--- a/shared/src/i18n/cs/budget.ts
+++ b/shared/src/i18n/cs/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'např. večeře, suvenýry, benzín…',
'costs.note': 'Poznámka',
'costs.notePlaceholder': 'Co zahrnovalo, kdo co dluží…',
+ 'costs.paymentNotePlaceholder': 'Zaplaceno hotově, bankovním převodem…',
'costs.addNote': 'Přidat poznámku',
'costs.showNote': 'Zobrazit poznámku',
'costs.hideNote': 'Skrýt poznámku',
diff --git a/shared/src/i18n/cs/dayplan.ts b/shared/src/i18n/cs/dayplan.ts
index aa88e4764..1c3267348 100644
--- a/shared/src/i18n/cs/dayplan.ts
+++ b/shared/src/i18n/cs/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Mapy a GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Exportovat denní plán do PDF',
+ 'dayplan.pdfMine': 'Můj plán jako PDF',
+ 'dayplan.pdfMineSub': 'Jen aktivity a rezervace, kterých se účastníte',
'dayplan.gpxTooltip': 'Exportovat jako GPX pro offline mapy a GPS zařízení',
'dayplan.gpxAll': 'Celá cesta',
'dayplan.gpxPlaces': 'Jen místa',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Smazat den',
'dayplan.deleteDayTitle': 'Smazat {day}?',
'dayplan.deleteDayBody': 'Den bude z cesty odebrán. Tuto akci nelze vrátit zpět.',
+ 'dayplan.excludeFromRoute': 'Vynechat z trasy',
+ 'dayplan.includeInRoute': 'Vrátit do trasy',
+ 'dayplan.offRoute': 'Mimo trasu',
+ 'dayplan.offRouteHint': 'Zůstává ve dni i na mapě, ale trasa ho vynechá',
+ 'dayplan.clearDay': 'Vyprázdnit den',
+ 'dayplan.clearDayTitle': 'Vyprázdnit {day}?',
+ 'dayplan.clearDayBody':
+ 'Všechna místa se z tohoto dne odeberou. Místa zůstanou v cestě a den si ponechá své poznámky i rezervace.',
'dayplan.deleteDayEmpty': 'Na tento den není nic naplánováno.',
'dayplan.impactPlaces': 'Naplánovaná místa: {count}',
'dayplan.impactPlacesHint': 'Zůstanou v seznamu míst.',
diff --git a/shared/src/i18n/cs/inspector.ts b/shared/src/i18n/cs/inspector.ts
index 0ca346de8..f11fd7dc8 100644
--- a/shared/src/i18n/cs/inspector.ts
+++ b/shared/src/i18n/cs/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Čekající rezervace',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigace',
+ 'inspector.otherMapApp': 'Jiná mapová aplikace',
'inspector.openWith': 'Otevřít v',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Otevřít webové stránky',
diff --git a/shared/src/i18n/cs/journey.ts b/shared/src/i18n/cs/journey.ts
index a943097a2..4cf4d7551 100644
--- a/shared/src/i18n/cs/journey.ts
+++ b/shared/src/i18n/cs/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Cestovní deník',
'journey.subtitle': 'Zaznamenávejte své cesty průběžně',
'journey.new': 'Nový cestovní deník',
+ 'journey.lightbox.zoomIn': 'Přiblížit',
+ 'journey.lightbox.zoomOut': 'Oddálit',
+ 'journey.lightbox.zoomReset': 'Zpět na celou fotku',
'journey.create': 'Vytvořit',
'journey.titlePlaceholder': 'Kam jedete?',
'journey.empty': 'Zatím žádné cestovní deníky',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Přidat záznam',
'journey.detail.jumpToTop': 'Zpět nahoru',
'journey.detail.jumpToLast': 'Přejít na poslední záznam',
+ 'journey.detail.dayJump': 'Přejít na den',
+ 'journey.detail.dayJumpCount': '{count} dní',
'journey.detail.newEntry': 'Nový záznam',
'journey.detail.editEntry': 'Upravit záznam',
'journey.detail.noEntries': 'Zatím žádné záznamy',
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Seznam',
'journey.studio.kind.icon': 'Ikona',
'journey.studio.duplicate': 'Duplikovat',
+ 'journey.studio.copyToPage': 'Kopírovat pro vložení na libovolnou stranu (Ctrl+C)',
+ 'journey.studio.paste': 'Vložit (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Nejprve něco zkopírujte a pak to vložte na libovolnou stranu',
+ 'journey.studio.myLayouts': 'Moje rozvržení',
+ 'journey.studio.myLayoutsEmpty': 'Uložte si stranu, kterou jste uspořádali, a rozvrhněte stejně i další strany. Jejich fotky a texty zůstanou.',
+ 'journey.studio.saveLayout': 'Uložit tuto stranu jako rozvržení',
+ 'journey.studio.saveLayoutHint': 'Uloží uspořádání bez fotek, pro všechny editory této knihy',
+ 'journey.studio.saveLayoutFull': 'Tato kniha pojme až 24 rozvržení. Jedno smažte, abyste mohli uložit další.',
+ 'journey.studio.deleteLayout': 'Smazat rozvržení',
+ 'journey.studio.layoutName': 'Rozvržení',
+ 'journey.studio.builtInLayouts': 'Vestavěná',
'journey.studio.style': 'Styl',
'journey.studio.shows': 'Zobrazení',
'journey.studio.size': 'Velikost',
@@ -625,6 +641,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Zastávka zůstane v deníku, ale nepočítá se do vzdálenosti, zemí ani do mapy v Studio.',
'journey.entry.offRoute': 'Mimo trasu',
+ 'journey.entry.draft': 'Koncept',
+ 'journey.editor.draft': 'Koncept',
+ 'journey.editor.draftHint': 'Tento záznam vidíte jen vy a ostatní přispěvatelé. Sdílený deník ho vynechá, dokud tuto volbu nevypnete.',
+ 'journey.editor.tripSuggestionHint': 'Tento den spadá do této cesty. Propojte ji a její místa se přidají do tohoto deníku.',
+ 'journey.editor.tripSuggestionLater': 'Teď ne',
'journey.suggestions.dismiss': 'Zahodit tento návrh',
'journey.suggestions.dismissed': 'Návrh zahozen',
'journey.suggestions.restore': 'Vrátit zahozené návrhy',
diff --git a/shared/src/i18n/cs/map.ts b/shared/src/i18n/cs/map.ts
index 6884ba718..3a80984e8 100644
--- a/shared/src/i18n/cs/map.ts
+++ b/shared/src/i18n/cs/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Vaši polohu se nepodařilo zjistit.',
'map.location.timeout': 'Zjišťování polohy trvalo příliš dlouho. Zkuste to znovu s volným výhledem na oblohu.',
'map.overview.show': 'Zobrazit celou cestu',
+ 'map.lock.lock': 'Uzamknout zobrazení mapy',
+ 'map.lock.unlock': 'Nechat mapu sledovat výběr',
'map.overview.hide': 'Skrýt celou cestu',
'map.overview.total': 'Celková vzdálenost',
'map.attribution': 'Zdroje mapy',
diff --git a/shared/src/i18n/cs/mobileTrip.ts b/shared/src/i18n/cs/mobileTrip.ts
index 9c4386583..02dd285dc 100644
--- a/shared/src/i18n/cs/mobileTrip.ts
+++ b/shared/src/i18n/cs/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Na mapě',
'mobileTrip.profileDriving': 'Autem',
'mobileTrip.profileWalking': 'Pěšky',
+ 'mobileTrip.profileCycling': 'Na kole',
'mobileTrip.renameDay': 'Přejmenovat den',
'mobileTrip.resBadge': 'Rezervace',
'mobileTrip.showOnMap': 'Zobrazit na mapě',
diff --git a/shared/src/i18n/cs/packing.ts b/shared/src/i18n/cs/packing.ts
index 300688422..d33a84eb3 100644
--- a/shared/src/i18n/cs/packing.ts
+++ b/shared/src/i18n/cs/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Upravit položku',
'packing.itemName': 'Název',
'packing.itemQuantity': 'Množství',
+ 'packing.packedCount': '{packed} z {total} zabaleno',
+ 'packing.packedMore': 'Zabalit o jeden víc',
+ 'packing.packedLess': 'Zabalit o jeden méně',
'packing.itemWeight': 'Hmotnost (g)',
'packing.title': 'Seznam věcí',
'packing.empty': 'Seznam věcí je prázdný',
diff --git a/shared/src/i18n/cs/places.ts b/shared/src/i18n/cs/places.ts
index 180be2b56..cdc9e177c 100644
--- a/shared/src/i18n/cs/places.ts
+++ b/shared/src/i18n/cs/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Zobrazit celou cestu',
'places.filterTracks': 'Trasy',
'places.filterByRating': 'Filtrovat podle hodnocení',
+ 'places.filterByLocation': 'Filtrovat podle země nebo regionu',
+ 'places.allLocations': 'Všechny země',
'places.filterShow': 'Zobrazit',
'places.clearSearch': 'Vymazat hledání',
'places.yourRating': 'Tvé hodnocení',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategorie',
'places.noCategory': 'Bez kategorie',
'places.newCategory': 'Nová kategorie',
+ 'places.openInMaps': 'Otevřít v mapách',
'places.categoryNamePlaceholder': 'Název kategorie',
'places.formTime': 'Čas',
'places.startTime': 'Od',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Hledat místa...',
'places.mapsSearchError': 'Hledání místa se nezdařilo.',
'places.searchGoogleInstead': 'Není to správné místo? Hledat na Googlu',
+ 'places.nearby': 'Místa poblíž tohoto špendlíku',
+ 'places.nearbyNone': 'Poblíž tohoto špendlíku nebylo nic nalezeno',
'places.loadingDetails': 'Načítání podrobností místa…',
'places.osmHint':
'Používáte hledání přes OpenStreetMap (bez fotek a hodnocení). Pro plné detaily přidejte Google API klíč v nastavení.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Obohatit místa přes Google',
'places.enrichOnImportHint':
'Vyhledá každé importované místo a doplní fotky, adresu a kontakty. Vyžaduje klíč Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Poté každý importovaný bod vyhledá na Google a doplní jeho fotku, adresu, web a telefon. Cesty a trasy zůstanou beze změny.',
'places.uploadImage': 'Nahrát obrázek',
'places.changeImage': 'Změnit obrázek',
'places.removeImage': 'Odebrat obrázek',
+ 'places.chooseImage': 'Vybrat obrázek',
+ 'places.uploadFromDevice': 'Nahrát ze zařízení',
+ 'places.fromAttachedFiles': 'Z přiložených souborů',
'places.imageUploadError': 'Obrázek se nepodařilo nahrát',
'places.imageRemoveError': 'Obrázek se nepodařilo odebrat',
};
diff --git a/shared/src/i18n/cs/reservations.ts b/shared/src/i18n/cs/reservations.ts
index ae65e2183..4f3d7d990 100644
--- a/shared/src/i18n/cs/reservations.ts
+++ b/shared/src/i18n/cs/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Jiné',
'reservations.type.bus': 'Autobus',
'reservations.type.ferry': 'Trajekt',
+ 'reservations.type.cable_car': 'Lanovka',
'reservations.type.bicycle': 'Kolo',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Veřejná doprava',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Zrušit filtry',
'reservations.noMatches': 'Těmto filtrům nic neodpovídá',
'reservations.viewOptions': 'Možnosti zobrazení',
+ 'reservations.exportCsv': 'Exportovat jako tabulku (CSV)',
+ 'reservations.export.type': 'Typ',
+ 'reservations.export.title': 'Název',
+ 'reservations.export.start': 'Začátek',
+ 'reservations.export.end': 'Konec',
+ 'reservations.export.from': 'Odkud',
+ 'reservations.export.to': 'Kam',
+ 'reservations.export.location': 'Místo',
+ 'reservations.export.confirmation': 'Potvrzení',
+ 'reservations.export.notes': 'Poznámky',
'reservations.resetView': 'Obnovit zobrazení',
'reservations.group.label': 'Seskupit podle',
'reservations.group.status': 'Stav',
diff --git a/shared/src/i18n/cs/settings.ts b/shared/src/i18n/cs/settings.ts
index 8e0199584..86da01867 100644
--- a/shared/src/i18n/cs/settings.ts
+++ b/shared/src/i18n/cs/settings.ts
@@ -332,6 +332,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Částky v Nákladech se do této měny přepočítávají pouze pro zobrazení – původní částky zůstávají beze změny.',
'settings.currencyTrip': 'Měna cesty',
+ 'settings.placeLanguage': 'Názvy míst',
+ 'settings.placeLanguageApp': 'Stejně jako aplikace',
+ 'settings.placeLanguageHint': 'Jazyk, ve kterém odpovídá vyhledávání míst, návrhy a adresy. Pokud místo v tomto jazyce název nemá, zobrazí se jeho místní název.',
'settings.passkey.title': 'Přístupové klíče',
'settings.passkey.description':
'Přihlašujte se rychleji a s ochranou proti phishingu pomocí přístupového klíče — otiskem prstu, obličejem, PINem nebo hardwarovým klíčem. Vaše heslo zůstává jako záloha.',
@@ -476,6 +479,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Spuštění',
+ 'settings.dayDateFirst': 'Datum na začátku nadpisů dnů',
+ 'settings.compactUnplanned': 'Kompaktní značky pro nenaplánovaná místa',
+ 'settings.compactUnplannedHint': 'Místa, která nejsou naplánovaná v žádném dni, se zobrazí jako malé značky bez fotky, aby plánované zastávky vynikly.',
+ 'settings.dayDateFirstHint': 'Každý den začne kalendářním datem a vedle něj se zobrazí „Den 1“ nebo vlastní název dne.',
'settings.startPage': 'Úvodní stránka',
'settings.startPageDashboard': 'Přehled',
'settings.startPageActiveTrip': 'Aktivní cesta',
diff --git a/shared/src/i18n/cs/share.ts b/shared/src/i18n/cs/share.ts
index 6ab49941c..26b74247f 100644
--- a/shared/src/i18n/cs/share.ts
+++ b/shared/src/i18n/cs/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Balení',
'share.permBudget': 'Náklady',
'share.permCollab': 'Chat',
+ 'share.options': 'Možnosti',
+ 'share.optTravelOnly': 'Jen doprava a ubytování',
+ 'share.optTravelOnlyHint': 'Zobrazí jen dopravu a ubytování, bez aktivit, poznámek ke dnům a prázdných dnů',
+ 'share.optHideImages': 'Bez fotek',
+ 'share.optHideImagesHint': 'Vynechá fotky míst ze sdílené stránky',
};
export default share;
diff --git a/shared/src/i18n/cs/shared.ts b/shared/src/i18n/cs/shared.ts
index b600499d7..d41b6bf4d 100644
--- a/shared/src/i18n/cs/shared.ts
+++ b/shared/src/i18n/cs/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'dní',
'shared.places': 'míst',
+ 'shared.unplanned': 'Zatím nenaplánováno',
'shared.other': 'Ostatní',
'shared.totalBudget': 'Celkové náklady',
'shared.messages': 'zpráv',
diff --git a/shared/src/i18n/cs/todo.ts b/shared/src/i18n/cs/todo.ts
index ddb09cd6f..eebfeb761 100644
--- a/shared/src/i18n/cs/todo.ts
+++ b/shared/src/i18n/cs/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Bez seznamu',
'todo.namePlaceholder': 'Název úkolu',
'todo.descriptionPlaceholder': 'Popis (volitelné)',
+ 'todo.editDescription': 'Kliknutím upravíte, odkazy se otevřou přímo',
'todo.unassigned': 'Nepřiřazeno',
'todo.noCategory': 'Bez seznamu',
'todo.hasDescription': 'Má popis',
diff --git a/shared/src/i18n/cs/undo.ts b/shared/src/i18n/cs/undo.ts
index b2ad2a2e0..24bed2028 100644
--- a/shared/src/i18n/cs/undo.ts
+++ b/shared/src/i18n/cs/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Zpět: {action}',
'undo.assignPlace': 'Místo přiřazeno ke dni',
'undo.removeAssignment': 'Místo odebráno ze dne',
+ 'undo.clearDay': 'Den vyprázdněn',
'undo.reorder': 'Místa přeseřazena',
'undo.optimize': 'Trasa optimalizována',
'undo.deletePlace': 'Místo smazáno',
diff --git a/shared/src/i18n/de/atlas.ts b/shared/src/i18n/de/atlas.ts
index 48a91c684..9f222f175 100644
--- a/shared/src/i18n/de/atlas.ts
+++ b/shared/src/i18n/de/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Länder',
'atlas.trips': 'Reisen',
'atlas.places': 'Orte',
+ 'atlas.placesShow': 'Orte in diesem Land anzeigen',
+ 'atlas.placesSearch': 'Orte suchen',
+ 'atlas.placesNone': 'Kein Ort passt',
'atlas.unmark': 'Entfernen',
'atlas.confirmMark': 'Dieses Land als besucht markieren?',
'atlas.confirmUnmark': 'Dieses Land von der Liste entfernen?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Tage',
'atlas.visitedCountries': 'Besuchte Länder',
'atlas.cities': 'Städte',
+ 'atlas.regions': 'Regionen',
'atlas.noData': 'Noch keine Reisedaten',
'atlas.noDataHint': 'Erstelle einen Trip und füge Orte hinzu',
'atlas.nextTrip': 'Nächster Trip',
diff --git a/shared/src/i18n/de/budget.ts b/shared/src/i18n/de/budget.ts
index 42cce0999..36a4a953b 100644
--- a/shared/src/i18n/de/budget.ts
+++ b/shared/src/i18n/de/budget.ts
@@ -111,6 +111,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'z.B. Abendessen, Souvenirs, Benzin…',
'costs.note': 'Notiz',
'costs.notePlaceholder': 'Was darin enthalten war, wer was zurückzahlt…',
+ 'costs.paymentNotePlaceholder': 'Bar bezahlt, per Überweisung…',
'costs.addNote': 'Notiz hinzufügen',
'costs.showNote': 'Notiz anzeigen',
'costs.hideNote': 'Notiz ausblenden',
diff --git a/shared/src/i18n/de/dayplan.ts b/shared/src/i18n/de/dayplan.ts
index 1b327ac59..2d364ee58 100644
--- a/shared/src/i18n/de/dayplan.ts
+++ b/shared/src/i18n/de/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Karten & GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Tagesplan als PDF exportieren',
+ 'dayplan.pdfMine': 'Mein Plan als PDF',
+ 'dayplan.pdfMineSub': 'Nur die Aktivitäten und Buchungen, an denen du teilnimmst',
'dayplan.gpxTooltip': 'Als GPX für Offline-Karten und GPS-Geräte exportieren',
'dayplan.gpxAll': 'Ganze Reise',
'dayplan.gpxPlaces': 'Nur Orte',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Tag löschen',
'dayplan.deleteDayTitle': '{day} löschen?',
'dayplan.deleteDayBody': 'Der Tag wird aus der Reise entfernt. Das lässt sich nicht rückgängig machen.',
+ 'dayplan.excludeFromRoute': 'Aus der Route nehmen',
+ 'dayplan.includeInRoute': 'Wieder in die Route aufnehmen',
+ 'dayplan.offRoute': 'Nicht auf der Route',
+ 'dayplan.offRouteHint': 'Bleibt im Tag und auf der Karte, wird von der Route aber übersprungen',
+ 'dayplan.clearDay': 'Tag leeren',
+ 'dayplan.clearDayTitle': '{day} leeren?',
+ 'dayplan.clearDayBody':
+ 'Alle Orte werden von diesem Tag entfernt. Die Orte bleiben in der Reise, und der Tag behält seine Notizen und Buchungen.',
'dayplan.deleteDayEmpty': 'An diesem Tag ist nichts geplant.',
'dayplan.impactPlaces': 'Geplante Orte: {count}',
'dayplan.impactPlacesHint': 'Sie bleiben in der Ortsliste.',
diff --git a/shared/src/i18n/de/inspector.ts b/shared/src/i18n/de/inspector.ts
index 0dcb72c28..6502ed1fb 100644
--- a/shared/src/i18n/de/inspector.ts
+++ b/shared/src/i18n/de/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Ausstehende Reservierung',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigation',
+ 'inspector.otherMapApp': 'Andere Karten-App',
'inspector.openWith': 'Öffnen mit',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Webseite öffnen',
diff --git a/shared/src/i18n/de/journey.ts b/shared/src/i18n/de/journey.ts
index f7bbb3170..1d913367b 100644
--- a/shared/src/i18n/de/journey.ts
+++ b/shared/src/i18n/de/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journey',
'journey.subtitle': 'Dokumentiere deine Reisen unterwegs',
'journey.new': 'Neue Journey',
+ 'journey.lightbox.zoomIn': 'Vergrößern',
+ 'journey.lightbox.zoomOut': 'Verkleinern',
+ 'journey.lightbox.zoomReset': 'Zurück zum ganzen Foto',
'journey.create': 'Erstellen',
'journey.titlePlaceholder': 'Wohin geht die Reise?',
'journey.empty': 'Noch keine Journeys',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Eintrag hinzufügen',
'journey.detail.jumpToTop': 'Nach oben',
'journey.detail.jumpToLast': 'Zum letzten Eintrag',
+ 'journey.detail.dayJump': 'Zu einem Tag springen',
+ 'journey.detail.dayJumpCount': '{count} Tage',
'journey.detail.newEntry': 'Neuer Eintrag',
'journey.detail.editEntry': 'Eintrag bearbeiten',
'journey.detail.noEntries': 'Noch keine Einträge',
@@ -432,6 +437,19 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Liste',
'journey.studio.kind.icon': 'Symbol',
'journey.studio.duplicate': 'Duplizieren',
+ 'journey.studio.copyToPage': 'Kopieren, um es auf einer beliebigen Seite einzufügen (Ctrl+C)',
+ 'journey.studio.paste': 'Einfügen (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Kopiere zuerst etwas und füge es dann auf einer beliebigen Seite ein',
+ 'journey.studio.myLayouts': 'Meine Anordnungen',
+ 'journey.studio.myLayoutsEmpty':
+ 'Behalte eine Seite, die du angeordnet hast, und ordne andere Seiten genauso an. Ihre Fotos und Texte bleiben erhalten.',
+ 'journey.studio.saveLayout': 'Diese Seite als Anordnung speichern',
+ 'journey.studio.saveLayoutHint': 'Speichert die Anordnung ohne die Fotos, für alle, die dieses Buch bearbeiten',
+ 'journey.studio.saveLayoutFull':
+ 'Dieses Buch speichert bis zu 24 Anordnungen. Lösche eine, um eine weitere zu speichern.',
+ 'journey.studio.deleteLayout': 'Anordnung löschen',
+ 'journey.studio.layoutName': 'Anordnung',
+ 'journey.studio.builtInLayouts': 'Vorgefertigt',
'journey.studio.style': 'Stil',
'journey.studio.shows': 'Anzeige',
'journey.studio.size': 'Größe',
@@ -626,6 +644,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Die Station bleibt im Tagebuch, zählt aber nicht für Distanz, Länder oder die Karte im Studio.',
'journey.entry.offRoute': 'Nicht auf der Route',
+ 'journey.entry.draft': 'Entwurf',
+ 'journey.editor.draft': 'Entwurf',
+ 'journey.editor.draftHint':
+ 'Nur du und die anderen Mitwirkenden sehen diesen Eintrag. Die geteilte Journey lässt ihn weg, bis du das ausschaltest.',
+ 'journey.editor.tripSuggestionHint':
+ 'Dieser Tag liegt in dieser Reise. Verknüpfe sie, dann kommen ihre Orte in diese Journey.',
+ 'journey.editor.tripSuggestionLater': 'Nicht jetzt',
'journey.suggestions.dismiss': 'Diesen Vorschlag verwerfen',
'journey.suggestions.dismissed': 'Vorschlag verworfen',
'journey.suggestions.restore': 'Verworfene Vorschläge zurückholen',
diff --git a/shared/src/i18n/de/map.ts b/shared/src/i18n/de/map.ts
index 54a0dcd12..b11a0beea 100644
--- a/shared/src/i18n/de/map.ts
+++ b/shared/src/i18n/de/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Dein Standort konnte nicht ermittelt werden.',
'map.location.timeout': 'Die Standortbestimmung hat zu lange gedauert. Versuche es mit freier Sicht zum Himmel erneut.',
'map.overview.show': 'Ganze Reise anzeigen',
+ 'map.lock.lock': 'Kartenansicht fixieren',
+ 'map.lock.unlock': 'Karte der Auswahl folgen lassen',
'map.overview.hide': 'Ganze Reise ausblenden',
'map.overview.total': 'Gesamtstrecke',
'map.attribution': 'Kartenquellen',
diff --git a/shared/src/i18n/de/mobileTrip.ts b/shared/src/i18n/de/mobileTrip.ts
index 274a2a4f2..0f52365ac 100644
--- a/shared/src/i18n/de/mobileTrip.ts
+++ b/shared/src/i18n/de/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Auf Karte',
'mobileTrip.profileDriving': 'Auto',
'mobileTrip.profileWalking': 'Fußweg',
+ 'mobileTrip.profileCycling': 'Fahrrad',
'mobileTrip.renameDay': 'Tag umbenennen',
'mobileTrip.resBadge': 'Buchung',
'mobileTrip.showOnMap': 'Auf Karte anzeigen',
diff --git a/shared/src/i18n/de/packing.ts b/shared/src/i18n/de/packing.ts
index 9dece6d25..de46eb3df 100644
--- a/shared/src/i18n/de/packing.ts
+++ b/shared/src/i18n/de/packing.ts
@@ -10,6 +10,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Objekt bearbeiten',
'packing.itemName': 'Name',
'packing.itemQuantity': 'Menge',
+ 'packing.packedCount': '{packed} von {total} gepackt',
+ 'packing.packedMore': 'Eins mehr packen',
+ 'packing.packedLess': 'Eins weniger packen',
'packing.itemWeight': 'Gewicht (g)',
'packing.title': 'Packliste',
'packing.empty': 'Packliste ist leer',
diff --git a/shared/src/i18n/de/places.ts b/shared/src/i18n/de/places.ts
index 31bd99316..9e0942bc6 100644
--- a/shared/src/i18n/de/places.ts
+++ b/shared/src/i18n/de/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Ganze Reise anzeigen',
'places.filterTracks': 'Tracks',
'places.filterByRating': 'Nach Bewertung filtern',
+ 'places.filterByLocation': 'Nach Land oder Region filtern',
+ 'places.allLocations': 'Alle Länder',
'places.filterShow': 'Anzeigen',
'places.clearSearch': 'Suche leeren',
'places.yourRating': 'Deine Bewertung',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategorie',
'places.noCategory': 'Keine Kategorie',
'places.newCategory': 'Neue Kategorie',
+ 'places.openInMaps': 'In Karten öffnen',
'places.categoryNamePlaceholder': 'Kategoriename',
'places.formTime': 'Uhrzeit',
'places.startTime': 'Startzeit',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Ortssuche...',
'places.mapsSearchError': 'Ortssuche fehlgeschlagen.',
'places.searchGoogleInstead': 'Nicht der richtige Ort? Stattdessen bei Google suchen',
+ 'places.nearby': 'Orte in der Nähe dieser Markierung',
+ 'places.nearbyNone': 'Nichts in der Nähe dieser Markierung gefunden',
'places.loadingDetails': 'Ortsdetails werden geladen…',
'places.osmHint':
'OpenStreetMap-Suche aktiv (ohne Bilder, Öffnungszeiten, Bewertungen). Für erweiterte Daten Google API Key in den Einstellungen hinterlegen.',
@@ -131,11 +136,16 @@ const places: TranslationStrings = {
'places.uploadImage': 'Bild hochladen',
'places.changeImage': 'Bild ändern',
'places.removeImage': 'Bild entfernen',
+ 'places.chooseImage': 'Bild auswählen',
+ 'places.uploadFromDevice': 'Vom Gerät hochladen',
+ 'places.fromAttachedFiles': 'Aus angehängten Dateien',
'places.imageUploadError': 'Bild konnte nicht hochgeladen werden',
'places.imageRemoveError': 'Bild konnte nicht entfernt werden',
'places.addAnyway': 'Trotzdem hinzufügen',
'places.enrichOnImport': 'Orte über Google anreichern',
'places.enrichOnImportHint':
'Sucht jeden importierten Ort nach, um Fotos, Adresse und Kontaktdaten zu ergänzen. Nutzt deinen Google-Maps-Key.',
+ 'places.enrichOnImportFileHint':
+ 'Sucht jeden importierten Punkt danach bei Google und ergänzt Foto, Adresse, Website und Telefonnummer. Pfade und Tracks bleiben, wie sie sind.',
};
export default places;
diff --git a/shared/src/i18n/de/reservations.ts b/shared/src/i18n/de/reservations.ts
index db1ec40f0..422b68a25 100644
--- a/shared/src/i18n/de/reservations.ts
+++ b/shared/src/i18n/de/reservations.ts
@@ -64,6 +64,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Sonstiges',
'reservations.type.bus': 'Bus',
'reservations.type.ferry': 'Fähre',
+ 'reservations.type.cable_car': 'Seilbahn',
'reservations.type.bicycle': 'Fahrrad',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'ÖPNV',
@@ -197,6 +198,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Filter zurücksetzen',
'reservations.noMatches': 'Nichts passt zu diesen Filtern',
'reservations.viewOptions': 'Ansicht anpassen',
+ 'reservations.exportCsv': 'Als Tabelle exportieren (CSV)',
+ 'reservations.export.type': 'Typ',
+ 'reservations.export.title': 'Titel',
+ 'reservations.export.start': 'Beginn',
+ 'reservations.export.end': 'Ende',
+ 'reservations.export.from': 'Von',
+ 'reservations.export.to': 'Nach',
+ 'reservations.export.location': 'Ort',
+ 'reservations.export.confirmation': 'Bestätigung',
+ 'reservations.export.notes': 'Notizen',
'reservations.resetView': 'Ansicht zurücksetzen',
'reservations.group.label': 'Gruppieren nach',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/de/settings.ts b/shared/src/i18n/de/settings.ts
index c2656d36e..49bf50e72 100644
--- a/shared/src/i18n/de/settings.ts
+++ b/shared/src/i18n/de/settings.ts
@@ -341,6 +341,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Beträge unter Kosten werden nur zur Anzeige in diese Währung umgerechnet – die ursprünglichen Beträge bleiben unverändert.',
'settings.currencyTrip': 'Reisewährung',
+ 'settings.placeLanguage': 'Ortsnamen',
+ 'settings.placeLanguageApp': 'Wie die App',
+ 'settings.placeLanguageHint':
+ 'Die Sprache, in der Ortssuche, Vorschläge und Adressen antworten. Hat ein Ort keinen Namen in dieser Sprache, wird sein lokaler Name angezeigt.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Melde dich schneller und phishing-resistent mit einem Passkey an — per Fingerabdruck, Gesicht, PIN oder Hardware-Schlüssel. Dein Passwort bleibt als Backup erhalten.',
@@ -486,6 +490,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Sprache & Region',
'settings.general.travelMap': 'Reise & Karte',
'settings.general.startup': 'Start',
+ 'settings.dayDateFirst': 'Datum zuerst in Tagesüberschriften',
+ 'settings.compactUnplanned': 'Kompakte Markierungen für ungeplante Orte',
+ 'settings.compactUnplannedHint':
+ 'Orte, die keinem Tag zugeordnet sind, erscheinen als kleine Markierungen ohne Foto, damit die geplanten Stopps hervorstechen.',
+ 'settings.dayDateFirstHint':
+ 'Jeden Tag mit seinem Kalenderdatum beginnen und daneben „Tag 1“ oder den eigenen Titel des Tages anzeigen.',
'settings.startPage': 'Startseite',
'settings.startPageDashboard': 'Dashboard',
'settings.startPageActiveTrip': 'Aktive Reise',
diff --git a/shared/src/i18n/de/share.ts b/shared/src/i18n/de/share.ts
index 584a6366d..b12168edf 100644
--- a/shared/src/i18n/de/share.ts
+++ b/shared/src/i18n/de/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Packliste',
'share.permBudget': 'Kosten',
'share.permCollab': 'Chat',
+ 'share.options': 'Optionen',
+ 'share.optTravelOnly': 'Nur Transport und Unterkünfte',
+ 'share.optTravelOnlyHint': 'Zeigt nur Transport und Unterkünfte, ohne Aktivitäten, Tagesnotizen und leere Tage',
+ 'share.optHideImages': 'Ohne Fotos',
+ 'share.optHideImagesHint': 'Lässt die Ortsfotos auf der geteilten Seite weg',
};
export default share;
diff --git a/shared/src/i18n/de/shared.ts b/shared/src/i18n/de/shared.ts
index 3236c4ef2..4504bf3fd 100644
--- a/shared/src/i18n/de/shared.ts
+++ b/shared/src/i18n/de/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'Tage',
'shared.places': 'Orte',
+ 'shared.unplanned': 'Noch nicht geplant',
'shared.other': 'Sonstiges',
'shared.totalBudget': 'Gesamtkosten',
'shared.messages': 'Nachrichten',
diff --git a/shared/src/i18n/de/todo.ts b/shared/src/i18n/de/todo.ts
index 6c55e9f0d..8eaa5f0ff 100644
--- a/shared/src/i18n/de/todo.ts
+++ b/shared/src/i18n/de/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Keine Liste',
'todo.namePlaceholder': 'Aufgabenname',
'todo.descriptionPlaceholder': 'Beschreibung (optional)',
+ 'todo.editDescription': 'Zum Bearbeiten klicken, Links öffnen sich direkt',
'todo.unassigned': 'Nicht zugewiesen',
'todo.noCategory': 'Keine Liste',
'todo.hasDescription': 'Hat Beschreibung',
diff --git a/shared/src/i18n/de/undo.ts b/shared/src/i18n/de/undo.ts
index 04d0dd313..9c9239255 100644
--- a/shared/src/i18n/de/undo.ts
+++ b/shared/src/i18n/de/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Rückgängig: {action}',
'undo.assignPlace': 'Ort einem Tag zugewiesen',
'undo.removeAssignment': 'Ort von Tag entfernt',
+ 'undo.clearDay': 'Tag geleert',
'undo.reorder': 'Orte neu sortiert',
'undo.optimize': 'Route optimiert',
'undo.deletePlace': 'Ort gelöscht',
diff --git a/shared/src/i18n/en/atlas.ts b/shared/src/i18n/en/atlas.ts
index 9bfab8101..7ec17102a 100644
--- a/shared/src/i18n/en/atlas.ts
+++ b/shared/src/i18n/en/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Countries',
'atlas.trips': 'Trips',
'atlas.places': 'Places',
+ 'atlas.placesShow': 'Show the places in this country',
+ 'atlas.placesSearch': 'Search places',
+ 'atlas.placesNone': 'No place matches',
'atlas.unmark': 'Remove',
'atlas.confirmMark': 'Mark this country as visited?',
'atlas.confirmUnmark': 'Remove this country from your visited list?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Days',
'atlas.visitedCountries': 'Visited Countries',
'atlas.cities': 'Cities',
+ 'atlas.regions': 'Regions',
'atlas.noData': 'No travel data yet',
'atlas.noDataHint': 'Create a trip and add places to see your world map',
'atlas.nextTrip': 'Next trip',
diff --git a/shared/src/i18n/en/budget.ts b/shared/src/i18n/en/budget.ts
index babf2ebb0..8e166f094 100644
--- a/shared/src/i18n/en/budget.ts
+++ b/shared/src/i18n/en/budget.ts
@@ -111,6 +111,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'e.g. Dinner, souvenirs, gas…',
'costs.note': 'Note',
'costs.notePlaceholder': 'What it covered, who owes what back…',
+ 'costs.paymentNotePlaceholder': 'Paid in cash, by bank transfer…',
'costs.addNote': 'Add note',
'costs.showNote': 'Show note',
'costs.hideNote': 'Hide note',
diff --git a/shared/src/i18n/en/dayplan.ts b/shared/src/i18n/en/dayplan.ts
index b5ef773d8..2e4b91570 100644
--- a/shared/src/i18n/en/dayplan.ts
+++ b/shared/src/i18n/en/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Maps & GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Export day plan as PDF',
+ 'dayplan.pdfMine': 'My plan as PDF',
+ 'dayplan.pdfMineSub': 'Only the activities and bookings you take part in',
'dayplan.gpxTooltip': 'Export as GPX for offline maps and GPS devices',
'dayplan.gpxAll': 'Whole trip',
'dayplan.gpxPlaces': 'Places only',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Delete day',
'dayplan.deleteDayTitle': 'Delete {day}?',
'dayplan.deleteDayBody': 'The day is removed from the trip. This cannot be undone.',
+ 'dayplan.excludeFromRoute': 'Leave out of route',
+ 'dayplan.includeInRoute': 'Add back to route',
+ 'dayplan.offRoute': 'Off route',
+ 'dayplan.offRouteHint': 'Stays on the day and the map, but the route skips it',
+ 'dayplan.clearDay': 'Clear day',
+ 'dayplan.clearDayTitle': 'Clear {day}?',
+ 'dayplan.clearDayBody':
+ 'Every place comes off this day. The places stay in the trip, and the day keeps its notes and bookings.',
'dayplan.deleteDayEmpty': 'Nothing is planned on this day.',
'dayplan.impactPlaces': 'Planned places: {count}',
'dayplan.impactPlacesHint': 'They stay in the place list.',
diff --git a/shared/src/i18n/en/inspector.ts b/shared/src/i18n/en/inspector.ts
index a70884d6a..0662641ee 100644
--- a/shared/src/i18n/en/inspector.ts
+++ b/shared/src/i18n/en/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Pending Reservation',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigation',
+ 'inspector.otherMapApp': 'Other map app',
'inspector.openWith': 'Open with',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Open Website',
diff --git a/shared/src/i18n/en/journey.ts b/shared/src/i18n/en/journey.ts
index 02f806899..a47e9dbc2 100644
--- a/shared/src/i18n/en/journey.ts
+++ b/shared/src/i18n/en/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journey',
'journey.subtitle': 'Track your travels as they happen',
'journey.new': 'New Journey',
+ 'journey.lightbox.zoomIn': 'Zoom in',
+ 'journey.lightbox.zoomOut': 'Zoom out',
+ 'journey.lightbox.zoomReset': 'Back to full photo',
'journey.create': 'Create',
'journey.titlePlaceholder': 'Where are you going?',
'journey.empty': 'No journeys yet',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Add Entry',
'journey.detail.jumpToTop': 'Back to top',
'journey.detail.jumpToLast': 'Jump to the last entry',
+ 'journey.detail.dayJump': 'Jump to a day',
+ 'journey.detail.dayJumpCount': '{count} days',
'journey.detail.newEntry': 'New Entry',
'journey.detail.editEntry': 'Edit Entry',
'journey.detail.noEntries': 'No entries yet',
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'List',
'journey.studio.kind.icon': 'Icon',
'journey.studio.duplicate': 'Duplicate',
+ 'journey.studio.copyToPage': 'Copy, to paste on any page (Ctrl+C)',
+ 'journey.studio.paste': 'Paste (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Copy something first, then paste it on any page',
+ 'journey.studio.myLayouts': 'My layouts',
+ 'journey.studio.myLayoutsEmpty': 'Keep a page you arranged and lay other pages out the same way. Their photos and words stay.',
+ 'journey.studio.saveLayout': 'Save this page as a layout',
+ 'journey.studio.saveLayoutHint': 'Keeps the arrangement without the photos, for every editor of this book',
+ 'journey.studio.saveLayoutFull': 'This book keeps up to 24 layouts. Delete one to save another.',
+ 'journey.studio.deleteLayout': 'Delete layout',
+ 'journey.studio.layoutName': 'Layout',
+ 'journey.studio.builtInLayouts': 'Built in',
'journey.studio.style': 'Style',
'journey.studio.shows': 'Shows',
'journey.studio.size': 'Size',
@@ -626,6 +642,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'The stop stays in the journal but does not count toward the distance, the countries or the map in Studio.',
'journey.entry.offRoute': 'Off route',
+ 'journey.entry.draft': 'Draft',
+ 'journey.editor.draft': 'Draft',
+ 'journey.editor.draftHint': 'Only you and the other contributors see this entry. The shared journey leaves it out until you switch this off.',
+ 'journey.editor.tripSuggestionHint': 'This day falls in this trip. Link it, and its places join this journey.',
+ 'journey.editor.tripSuggestionLater': 'Not now',
'journey.suggestions.dismiss': 'Dismiss this suggestion',
'journey.suggestions.dismissed': 'Suggestion dismissed',
'journey.suggestions.restore': 'Bring back dismissed suggestions',
diff --git a/shared/src/i18n/en/map.ts b/shared/src/i18n/en/map.ts
index 68a1322a0..d25a85c6f 100644
--- a/shared/src/i18n/en/map.ts
+++ b/shared/src/i18n/en/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Your location could not be determined.',
'map.location.timeout': 'Locating you took too long. Try again with a clearer view of the sky.',
'map.overview.show': 'Show whole trip',
+ 'map.lock.lock': 'Lock the map view',
+ 'map.lock.unlock': 'Let the map follow the selection',
'map.overview.hide': 'Hide whole trip',
'map.overview.total': 'Total distance',
'map.attribution': 'Map credits',
diff --git a/shared/src/i18n/en/mobileTrip.ts b/shared/src/i18n/en/mobileTrip.ts
index 4f93273a6..d42881146 100644
--- a/shared/src/i18n/en/mobileTrip.ts
+++ b/shared/src/i18n/en/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'On map',
'mobileTrip.profileDriving': 'Driving',
'mobileTrip.profileWalking': 'Walking',
+ 'mobileTrip.profileCycling': 'Cycling',
'mobileTrip.renameDay': 'Rename day',
'mobileTrip.resBadge': 'Booking',
'mobileTrip.showOnMap': 'Show on map',
diff --git a/shared/src/i18n/en/packing.ts b/shared/src/i18n/en/packing.ts
index b8cf91929..98a6d40b8 100644
--- a/shared/src/i18n/en/packing.ts
+++ b/shared/src/i18n/en/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Edit item',
'packing.itemName': 'Name',
'packing.itemQuantity': 'Quantity',
+ 'packing.packedCount': '{packed} of {total} packed',
+ 'packing.packedMore': 'Pack one more',
+ 'packing.packedLess': 'Pack one less',
'packing.itemWeight': 'Weight (g)',
'packing.title': 'Packing List',
'packing.empty': 'Packing list is empty',
diff --git a/shared/src/i18n/en/places.ts b/shared/src/i18n/en/places.ts
index af0ad920d..157611d2a 100644
--- a/shared/src/i18n/en/places.ts
+++ b/shared/src/i18n/en/places.ts
@@ -53,6 +53,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Show the whole trip',
'places.filterTracks': 'Tracks',
'places.filterByRating': 'Filter by rating',
+ 'places.filterByLocation': 'Filter by country or region',
+ 'places.allLocations': 'All countries',
/** The button that opens the filter panel, and the panel's name. */
/** Label over the all/unplanned/planned/tracks choice in the filter panel. */
'places.filterShow': 'Show',
@@ -82,6 +84,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Category',
'places.noCategory': 'No Category',
'places.newCategory': 'New category',
+ 'places.openInMaps': 'Open in maps',
'places.categoryNamePlaceholder': 'Category name',
'places.formTime': 'Time',
'places.startTime': 'Start',
@@ -98,6 +101,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Search places...',
'places.mapsSearchError': 'Place search failed.',
'places.searchGoogleInstead': 'Not the right place? Search Google instead',
+ 'places.nearby': 'Places near this pin',
+ 'places.nearbyNone': 'Nothing found near this pin',
'places.loadingDetails': 'Loading place details…',
'places.osmHint':
'Using OpenStreetMap search (no photos, opening hours, or ratings). Add a Google API key in settings for full details.',
@@ -136,9 +141,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Enrich places via Google',
'places.enrichOnImportHint':
'Look up each imported place to fill in photos, address and contact details. Uses your Google Maps key.',
+ 'places.enrichOnImportFileHint':
+ 'Looks each imported point up on Google afterwards and adds its photo, address, website and phone. Paths and tracks stay as they are.',
'places.uploadImage': 'Upload image',
'places.changeImage': 'Change image',
'places.removeImage': 'Remove image',
+ 'places.chooseImage': 'Choose a picture',
+ 'places.uploadFromDevice': 'Upload from device',
+ 'places.fromAttachedFiles': 'From attached files',
'places.imageUploadError': 'Could not upload image',
'places.imageRemoveError': 'Could not remove image',
};
diff --git a/shared/src/i18n/en/reservations.ts b/shared/src/i18n/en/reservations.ts
index e555a60be..2a9e47a87 100644
--- a/shared/src/i18n/en/reservations.ts
+++ b/shared/src/i18n/en/reservations.ts
@@ -63,6 +63,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Other',
'reservations.type.bus': 'Bus',
'reservations.type.ferry': 'Ferry',
+ 'reservations.type.cable_car': 'Cable car',
'reservations.type.bicycle': 'Bicycle',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Public transit',
@@ -196,6 +197,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Reset filters',
'reservations.noMatches': 'Nothing matches these filters',
'reservations.viewOptions': 'View options',
+ 'reservations.exportCsv': 'Export as spreadsheet (CSV)',
+ 'reservations.export.type': 'Type',
+ 'reservations.export.title': 'Title',
+ 'reservations.export.start': 'Start',
+ 'reservations.export.end': 'End',
+ 'reservations.export.from': 'From',
+ 'reservations.export.to': 'To',
+ 'reservations.export.location': 'Location',
+ 'reservations.export.confirmation': 'Confirmation',
+ 'reservations.export.notes': 'Notes',
'reservations.resetView': 'Reset view',
'reservations.group.label': 'Group by',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/en/settings.ts b/shared/src/i18n/en/settings.ts
index f1a3a19b4..537879ad9 100644
--- a/shared/src/i18n/en/settings.ts
+++ b/shared/src/i18n/en/settings.ts
@@ -345,6 +345,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Amounts in Costs are shown converted to this currency for display only — the original amounts are unchanged.',
'settings.currencyTrip': 'Trip currency',
+ 'settings.placeLanguage': 'Place names',
+ 'settings.placeLanguageApp': 'Same as the app',
+ 'settings.placeLanguageHint':
+ 'The language place search, suggestions and addresses answer in. Where a place has no name in that language, its local name is shown.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Sign in faster and phishing-resistant with a passkey — your fingerprint, face, PIN, or a hardware key. Your password stays as a backup.',
@@ -485,6 +489,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Startup',
+ 'settings.dayDateFirst': 'Date first in day headings',
+ 'settings.compactUnplanned': 'Compact markers for unplanned places',
+ 'settings.compactUnplannedHint': 'Places not planned into any day show as small markers without a photo, so the planned stops stand out.',
+ 'settings.dayDateFirstHint': "Lead each day with its calendar date and show \"Day 1\" or the day's own title next to it.",
'settings.startPage': 'Start page',
'settings.startPageDashboard': 'Dashboard',
'settings.startPageActiveTrip': 'Active trip',
diff --git a/shared/src/i18n/en/share.ts b/shared/src/i18n/en/share.ts
index 1230961a3..adf7c76b6 100644
--- a/shared/src/i18n/en/share.ts
+++ b/shared/src/i18n/en/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Packing',
'share.permBudget': 'Costs',
'share.permCollab': 'Chat',
+ 'share.options': 'Options',
+ 'share.optTravelOnly': 'Travel & stays only',
+ 'share.optTravelOnlyHint': 'Shows only transport and accommodation, without activities, day notes and empty days',
+ 'share.optHideImages': 'Without photos',
+ 'share.optHideImagesHint': 'Leaves the place photos out of the shared page',
};
export default share;
diff --git a/shared/src/i18n/en/shared.ts b/shared/src/i18n/en/shared.ts
index 233776254..e5e6ecd2a 100644
--- a/shared/src/i18n/en/shared.ts
+++ b/shared/src/i18n/en/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'days',
'shared.places': 'places',
+ 'shared.unplanned': 'Not planned yet',
'shared.other': 'Other',
'shared.totalBudget': 'Total Costs',
'shared.messages': 'messages',
diff --git a/shared/src/i18n/en/todo.ts b/shared/src/i18n/en/todo.ts
index 1a799a336..1dfbc6c96 100644
--- a/shared/src/i18n/en/todo.ts
+++ b/shared/src/i18n/en/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'No list',
'todo.namePlaceholder': 'Task name',
'todo.descriptionPlaceholder': 'Description (optional)',
+ 'todo.editDescription': 'Click to edit, links open directly',
'todo.unassigned': 'Unassigned',
'todo.noCategory': 'No list',
'todo.hasDescription': 'Has description',
diff --git a/shared/src/i18n/en/undo.ts b/shared/src/i18n/en/undo.ts
index f661cb9d7..77b6259fc 100644
--- a/shared/src/i18n/en/undo.ts
+++ b/shared/src/i18n/en/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Undo: {action}',
'undo.assignPlace': 'Place assigned to day',
'undo.removeAssignment': 'Place removed from day',
+ 'undo.clearDay': 'Day cleared',
'undo.reorder': 'Places reordered',
'undo.optimize': 'Route optimized',
'undo.deletePlace': 'Place deleted',
diff --git a/shared/src/i18n/es/atlas.ts b/shared/src/i18n/es/atlas.ts
index 97ccee865..79c230948 100644
--- a/shared/src/i18n/es/atlas.ts
+++ b/shared/src/i18n/es/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Países',
'atlas.trips': 'Viajes',
'atlas.places': 'Lugares',
+ 'atlas.placesShow': 'Mostrar los lugares de este país',
+ 'atlas.placesSearch': 'Buscar lugares',
+ 'atlas.placesNone': 'Ningún lugar coincide',
'atlas.days': 'Días',
'atlas.visitedCountries': 'Países visitados',
'atlas.cities': 'Ciudades',
+ 'atlas.regions': 'Regiones',
'atlas.noData': 'Aún no hay datos de viaje',
'atlas.noDataHint': 'Crea un viaje y añade lugares para ver tu mapa del mundo',
'atlas.nextTrip': 'Próximo viaje',
diff --git a/shared/src/i18n/es/budget.ts b/shared/src/i18n/es/budget.ts
index b284f1b19..ae24697e2 100644
--- a/shared/src/i18n/es/budget.ts
+++ b/shared/src/i18n/es/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'p. ej. Cena, souvenirs, gasolina…',
'costs.note': 'Nota',
'costs.notePlaceholder': 'Qué incluía, quién debe qué…',
+ 'costs.paymentNotePlaceholder': 'Pagado en efectivo, por transferencia…',
'costs.addNote': 'Añadir nota',
'costs.showNote': 'Mostrar nota',
'costs.hideNote': 'Ocultar nota',
diff --git a/shared/src/i18n/es/dayplan.ts b/shared/src/i18n/es/dayplan.ts
index 9ef0879ad..1d98206f4 100644
--- a/shared/src/i18n/es/dayplan.ts
+++ b/shared/src/i18n/es/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Mapas y GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Exportar plan diario como PDF',
+ 'dayplan.pdfMine': 'Mi plan en PDF',
+ 'dayplan.pdfMineSub': 'Solo las actividades y reservas en las que participas',
'dayplan.gpxTooltip': 'Exportar como GPX para mapas sin conexión y dispositivos GPS',
'dayplan.gpxAll': 'Todo el viaje',
'dayplan.gpxPlaces': 'Solo lugares',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Eliminar día',
'dayplan.deleteDayTitle': '¿Eliminar {day}?',
'dayplan.deleteDayBody': 'El día se quita del viaje. No se puede deshacer.',
+ 'dayplan.excludeFromRoute': 'Quitar de la ruta',
+ 'dayplan.includeInRoute': 'Volver a añadir a la ruta',
+ 'dayplan.offRoute': 'Fuera de ruta',
+ 'dayplan.offRouteHint': 'Sigue en el día y en el mapa, pero la ruta lo omite',
+ 'dayplan.clearDay': 'Vaciar día',
+ 'dayplan.clearDayTitle': '¿Vaciar {day}?',
+ 'dayplan.clearDayBody':
+ 'Todos los lugares salen de este día. Los lugares siguen en el viaje, y el día conserva sus notas y reservas.',
'dayplan.deleteDayEmpty': 'No hay nada planificado este día.',
'dayplan.impactPlaces': 'Lugares planificados: {count}',
'dayplan.impactPlacesHint': 'Se quedan en la lista de lugares.',
diff --git a/shared/src/i18n/es/inspector.ts b/shared/src/i18n/es/inspector.ts
index f8dfaa26d..6d14ede02 100644
--- a/shared/src/i18n/es/inspector.ts
+++ b/shared/src/i18n/es/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Reserva pendiente',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navegación',
+ 'inspector.otherMapApp': 'Otra app de mapas',
'inspector.openWith': 'Abrir con',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Abrir la web',
diff --git a/shared/src/i18n/es/journey.ts b/shared/src/i18n/es/journey.ts
index 9e33d3270..1d985c4da 100644
--- a/shared/src/i18n/es/journey.ts
+++ b/shared/src/i18n/es/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Travesía',
'journey.subtitle': 'Registra tus viajes en tiempo real',
'journey.new': 'Nueva travesía',
+ 'journey.lightbox.zoomIn': 'Acercar',
+ 'journey.lightbox.zoomOut': 'Alejar',
+ 'journey.lightbox.zoomReset': 'Volver a la foto completa',
'journey.create': 'Crear',
'journey.titlePlaceholder': '¿A dónde vas?',
'journey.empty': 'Aún no hay travesías',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Añadir entrada',
'journey.detail.jumpToTop': 'Volver arriba',
'journey.detail.jumpToLast': 'Ir a la última entrada',
+ 'journey.detail.dayJump': 'Ir a un día',
+ 'journey.detail.dayJumpCount': '{count} días',
'journey.detail.newEntry': 'Nueva entrada',
'journey.detail.editEntry': 'Editar entrada',
'journey.detail.noEntries': 'Aún no hay entradas',
@@ -432,6 +437,18 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Lista',
'journey.studio.kind.icon': 'Icono',
'journey.studio.duplicate': 'Duplicar',
+ 'journey.studio.copyToPage': 'Copiar, para pegar en cualquier página (Ctrl+C)',
+ 'journey.studio.paste': 'Pegar (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Copia algo primero y luego pégalo en cualquier página',
+ 'journey.studio.myLayouts': 'Mis disposiciones',
+ 'journey.studio.myLayoutsEmpty':
+ 'Guarda una página que hayas organizado y dispón otras páginas de la misma forma. Sus fotos y textos se mantienen.',
+ 'journey.studio.saveLayout': 'Guardar esta página como disposición',
+ 'journey.studio.saveLayoutHint': 'Guarda la disposición sin las fotos, para todos los editores de este libro',
+ 'journey.studio.saveLayoutFull': 'Este libro guarda hasta 24 disposiciones. Elimina una para guardar otra.',
+ 'journey.studio.deleteLayout': 'Eliminar disposición',
+ 'journey.studio.layoutName': 'Disposición',
+ 'journey.studio.builtInLayouts': 'Predefinidas',
'journey.studio.style': 'Estilo',
'journey.studio.shows': 'Mostrar',
'journey.studio.size': 'Tamaño',
@@ -626,6 +643,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'La parada sigue en el diario, pero no cuenta para la distancia, los países ni el mapa en Studio.',
'journey.entry.offRoute': 'Fuera de ruta',
+ 'journey.entry.draft': 'Borrador',
+ 'journey.editor.draft': 'Borrador',
+ 'journey.editor.draftHint':
+ 'Solo tú y los demás colaboradores veis esta entrada. La travesía compartida la omite hasta que desactives esto.',
+ 'journey.editor.tripSuggestionHint':
+ 'Este día cae dentro de este viaje. Vincúlalo y sus lugares se unirán a esta travesía.',
+ 'journey.editor.tripSuggestionLater': 'Ahora no',
'journey.suggestions.dismiss': 'Descartar esta sugerencia',
'journey.suggestions.dismissed': 'Sugerencia descartada',
'journey.suggestions.restore': 'Recuperar las sugerencias descartadas',
diff --git a/shared/src/i18n/es/map.ts b/shared/src/i18n/es/map.ts
index e933e9002..f428b6de2 100644
--- a/shared/src/i18n/es/map.ts
+++ b/shared/src/i18n/es/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'No se pudo determinar tu ubicación.',
'map.location.timeout': 'La localización tardó demasiado. Inténtalo de nuevo con una vista más despejada del cielo.',
'map.overview.show': 'Mostrar todo el viaje',
+ 'map.lock.lock': 'Bloquear la vista del mapa',
+ 'map.lock.unlock': 'Dejar que el mapa siga la selección',
'map.overview.hide': 'Ocultar todo el viaje',
'map.overview.total': 'Distancia total',
'map.attribution': 'Créditos del mapa',
diff --git a/shared/src/i18n/es/mobileTrip.ts b/shared/src/i18n/es/mobileTrip.ts
index 1e12d38d6..2b30f8514 100644
--- a/shared/src/i18n/es/mobileTrip.ts
+++ b/shared/src/i18n/es/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'En el mapa',
'mobileTrip.profileDriving': 'En coche',
'mobileTrip.profileWalking': 'A pie',
+ 'mobileTrip.profileCycling': 'En bici',
'mobileTrip.renameDay': 'Cambiar nombre del día',
'mobileTrip.resBadge': 'Reserva',
'mobileTrip.showOnMap': 'Mostrar en el mapa',
diff --git a/shared/src/i18n/es/packing.ts b/shared/src/i18n/es/packing.ts
index 233ecd2e6..6466dea94 100644
--- a/shared/src/i18n/es/packing.ts
+++ b/shared/src/i18n/es/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Editar objeto',
'packing.itemName': 'Nombre',
'packing.itemQuantity': 'Cantidad',
+ 'packing.packedCount': '{packed} de {total} preparados',
+ 'packing.packedMore': 'Preparar uno más',
+ 'packing.packedLess': 'Preparar uno menos',
'packing.itemWeight': 'Peso (g)',
'packing.title': 'Lista de equipaje',
'packing.empty': 'La lista de equipaje está vacía',
diff --git a/shared/src/i18n/es/places.ts b/shared/src/i18n/es/places.ts
index 2386e7fd6..7dbc15657 100644
--- a/shared/src/i18n/es/places.ts
+++ b/shared/src/i18n/es/places.ts
@@ -53,6 +53,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Mostrar todo el viaje',
'places.filterTracks': 'Rutas',
'places.filterByRating': 'Filtrar por valoración',
+ 'places.filterByLocation': 'Filtrar por país o región',
+ 'places.allLocations': 'Todos los países',
'places.filterShow': 'Mostrar',
'places.clearSearch': 'Borrar búsqueda',
'places.yourRating': 'Tu valoración',
@@ -79,6 +81,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Categoría',
'places.noCategory': 'Sin categoría',
'places.newCategory': 'Nueva categoría',
+ 'places.openInMaps': 'Abrir en mapas',
'places.categoryNamePlaceholder': 'Nombre de la categoría',
'places.formTime': 'Hora',
'places.startTime': 'Inicio',
@@ -95,6 +98,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Buscar lugares...',
'places.mapsSearchError': 'La búsqueda de lugares falló.',
'places.searchGoogleInstead': '¿No es el lugar correcto? Buscar en Google',
+ 'places.nearby': 'Lugares cerca de este marcador',
+ 'places.nearbyNone': 'No se encontró nada cerca de este marcador',
'places.loadingDetails': 'Cargando detalles del lugar…',
'places.osmHint':
'Usando búsqueda con OpenStreetMap (sin fotos, horarios ni valoraciones). Añade una clave API de Google en Ajustes para obtener todos los detalles.',
@@ -133,9 +138,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Enriquecer lugares con Google',
'places.enrichOnImportHint':
'Busca cada lugar importado para añadir fotos, dirección y datos de contacto. Usa tu clave de Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Después busca cada punto importado en Google y añade su foto, dirección, sitio web y teléfono. Los caminos y trazados se quedan como están.',
'places.uploadImage': 'Subir imagen',
'places.changeImage': 'Cambiar imagen',
'places.removeImage': 'Eliminar imagen',
+ 'places.chooseImage': 'Elegir una imagen',
+ 'places.uploadFromDevice': 'Subir desde el dispositivo',
+ 'places.fromAttachedFiles': 'Desde los archivos adjuntos',
'places.imageUploadError': 'No se pudo subir la imagen',
'places.imageRemoveError': 'No se pudo eliminar la imagen',
};
diff --git a/shared/src/i18n/es/reservations.ts b/shared/src/i18n/es/reservations.ts
index 9a383fc44..ba967986a 100644
--- a/shared/src/i18n/es/reservations.ts
+++ b/shared/src/i18n/es/reservations.ts
@@ -34,6 +34,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Otro',
'reservations.type.bus': 'Autobús',
'reservations.type.ferry': 'Ferry',
+ 'reservations.type.cable_car': 'Teleférico',
'reservations.type.bicycle': 'Bicicleta',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Transporte público',
@@ -197,6 +198,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Restablecer filtros',
'reservations.noMatches': 'Nada coincide con estos filtros',
'reservations.viewOptions': 'Opciones de vista',
+ 'reservations.exportCsv': 'Exportar como hoja de cálculo (CSV)',
+ 'reservations.export.type': 'Tipo',
+ 'reservations.export.title': 'Título',
+ 'reservations.export.start': 'Inicio',
+ 'reservations.export.end': 'Fin',
+ 'reservations.export.from': 'Desde',
+ 'reservations.export.to': 'Hasta',
+ 'reservations.export.location': 'Ubicación',
+ 'reservations.export.confirmation': 'Confirmación',
+ 'reservations.export.notes': 'Notas',
'reservations.resetView': 'Restablecer vista',
'reservations.group.label': 'Agrupar por',
'reservations.group.status': 'Estado',
diff --git a/shared/src/i18n/es/settings.ts b/shared/src/i18n/es/settings.ts
index 53a5f8a77..e28a844db 100644
--- a/shared/src/i18n/es/settings.ts
+++ b/shared/src/i18n/es/settings.ts
@@ -340,6 +340,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Los importes en Costes se muestran convertidos a esta moneda solo a efectos de visualización — los importes originales no se modifican.',
'settings.currencyTrip': 'Moneda del viaje',
+ 'settings.placeLanguage': 'Nombres de lugares',
+ 'settings.placeLanguageApp': 'Igual que la app',
+ 'settings.placeLanguageHint':
+ 'El idioma en el que responden la búsqueda de lugares, las sugerencias y las direcciones. Si un lugar no tiene nombre en ese idioma, se muestra su nombre local.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Inicia sesión más rápido y con protección frente al phishing usando una passkey: tu huella, tu cara, tu PIN o una llave de seguridad física. Tu contraseña sigue disponible como respaldo.',
@@ -484,6 +488,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Inicio',
+ 'settings.dayDateFirst': 'Fecha primero en los títulos de día',
+ 'settings.compactUnplanned': 'Marcadores compactos para lugares sin planificar',
+ 'settings.compactUnplannedHint':
+ 'Los lugares que no están en ningún día se muestran como marcadores pequeños sin foto, para que destaquen las paradas planificadas.',
+ 'settings.dayDateFirstHint':
+ 'Empieza cada día con su fecha del calendario y muestra «Día 1» o el título propio del día al lado.',
'settings.startPage': 'Página de inicio',
'settings.startPageDashboard': 'Panel',
'settings.startPageActiveTrip': 'Viaje activo',
diff --git a/shared/src/i18n/es/share.ts b/shared/src/i18n/es/share.ts
index 1e8b82620..7ae95ec64 100644
--- a/shared/src/i18n/es/share.ts
+++ b/shared/src/i18n/es/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Equipaje',
'share.permBudget': 'Costes',
'share.permCollab': 'Chat',
+ 'share.options': 'Opciones',
+ 'share.optTravelOnly': 'Solo transporte y alojamiento',
+ 'share.optTravelOnlyHint': 'Muestra solo transporte y alojamiento, sin actividades, notas del día ni días vacíos',
+ 'share.optHideImages': 'Sin fotos',
+ 'share.optHideImagesHint': 'Omite las fotos de los lugares en la página compartida',
};
export default share;
diff --git a/shared/src/i18n/es/shared.ts b/shared/src/i18n/es/shared.ts
index c4556f5c7..a610b5d19 100644
--- a/shared/src/i18n/es/shared.ts
+++ b/shared/src/i18n/es/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'días',
'shared.places': 'lugares',
+ 'shared.unplanned': 'Aún sin planificar',
'shared.other': 'Otros',
'shared.totalBudget': 'Costes totales',
'shared.messages': 'mensajes',
diff --git a/shared/src/i18n/es/todo.ts b/shared/src/i18n/es/todo.ts
index 8c0452101..45883579e 100644
--- a/shared/src/i18n/es/todo.ts
+++ b/shared/src/i18n/es/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Sin lista',
'todo.namePlaceholder': 'Nombre de la tarea',
'todo.descriptionPlaceholder': 'Descripción (opcional)',
+ 'todo.editDescription': 'Haz clic para editar, los enlaces se abren directamente',
'todo.unassigned': 'Sin asignar',
'todo.noCategory': 'Sin lista',
'todo.hasDescription': 'Con descripción',
diff --git a/shared/src/i18n/es/undo.ts b/shared/src/i18n/es/undo.ts
index 3e5252f88..e323b54de 100644
--- a/shared/src/i18n/es/undo.ts
+++ b/shared/src/i18n/es/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Deshacer: {action}',
'undo.assignPlace': 'Lugar asignado al día',
'undo.removeAssignment': 'Lugar eliminado del día',
+ 'undo.clearDay': 'Día vaciado',
'undo.reorder': 'Lugares reordenados',
'undo.optimize': 'Ruta optimizada',
'undo.deletePlace': 'Lugar eliminado',
diff --git a/shared/src/i18n/et/atlas.ts b/shared/src/i18n/et/atlas.ts
index a19ed0f68..d4d256afb 100644
--- a/shared/src/i18n/et/atlas.ts
+++ b/shared/src/i18n/et/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Riigid',
'atlas.trips': 'Reisid',
'atlas.places': 'Kohad',
+ 'atlas.placesShow': 'Näita selle riigi kohti',
+ 'atlas.placesSearch': 'Otsi kohti',
+ 'atlas.placesNone': 'Ükski koht ei sobi',
'atlas.unmark': 'Eemalda',
'atlas.confirmMark': 'Kas märkida see riik külastatuks?',
'atlas.confirmUnmark': 'Kas eemaldada see riik külastatud riikide hulgast?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Päevad',
'atlas.visitedCountries': 'Külastatud riigid',
'atlas.cities': 'Linnad',
+ 'atlas.regions': 'Piirkonnad',
'atlas.noData': 'Reisiandmeid veel pole',
'atlas.noDataHint': 'Oma maailmakaardi nägemiseks loo reis ja lisa kohti',
'atlas.nextTrip': 'Järgmine reis',
diff --git a/shared/src/i18n/et/budget.ts b/shared/src/i18n/et/budget.ts
index d710e0946..c25ca0c1f 100644
--- a/shared/src/i18n/et/budget.ts
+++ b/shared/src/i18n/et/budget.ts
@@ -111,6 +111,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'Nt õhtusöök, suveniirid, kütus…',
'costs.note': 'Märkus',
'costs.notePlaceholder': 'Mille eest maksti, kes kui palju tagasi võlgneb…',
+ 'costs.paymentNotePlaceholder': 'Makstud sularahas, pangaülekandega…',
'costs.addNote': 'Lisa märkus',
'costs.showNote': 'Näita märkust',
'costs.hideNote': 'Peida märkus',
diff --git a/shared/src/i18n/et/dayplan.ts b/shared/src/i18n/et/dayplan.ts
index 8665c443e..6dd0ea487 100644
--- a/shared/src/i18n/et/dayplan.ts
+++ b/shared/src/i18n/et/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Kaardid ja GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Ekspordi päevaplaan PDF-ina',
+ 'dayplan.pdfMine': 'Minu plaan PDF-ina',
+ 'dayplan.pdfMineSub': 'Ainult tegevused ja broneeringud, milles osaled',
'dayplan.gpxTooltip': 'Ekspordi GPX-ina võrguühenduseta kaartide ja GPS-seadmete jaoks',
'dayplan.gpxAll': 'Kogu reis',
'dayplan.gpxPlaces': 'Ainult kohad',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Kustuta päev',
'dayplan.deleteDayTitle': 'Kas kustutada {day}?',
'dayplan.deleteDayBody': 'Päev eemaldatakse reisist. Seda ei saa tagasi võtta.',
+ 'dayplan.excludeFromRoute': 'Jäta marsruudist välja',
+ 'dayplan.includeInRoute': 'Lisa tagasi marsruuti',
+ 'dayplan.offRoute': 'Marsruudist väljas',
+ 'dayplan.offRouteHint': 'Jääb päeva ja kaardile, kuid marsruut jätab selle vahele',
+ 'dayplan.clearDay': 'Tühjenda päev',
+ 'dayplan.clearDayTitle': 'Kas tühjendada {day}?',
+ 'dayplan.clearDayBody':
+ 'Kõik kohad eemaldatakse sellest päevast. Kohad jäävad reisi alles ning päev säilitab oma märkmed ja broneeringud.',
'dayplan.deleteDayEmpty': 'Sellele päevale pole midagi plaanitud.',
'dayplan.impactPlaces': 'Plaanitud kohad: {count}',
'dayplan.impactPlacesHint': 'Need jäävad kohtade nimekirja.',
diff --git a/shared/src/i18n/et/inspector.ts b/shared/src/i18n/et/inspector.ts
index b2854e459..398cb9196 100644
--- a/shared/src/i18n/et/inspector.ts
+++ b/shared/src/i18n/et/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Ootel broneering',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigeerimine',
+ 'inspector.otherMapApp': 'Muu kaardirakendus',
'inspector.openWith': 'Ava rakendusega',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Ava veebisait',
diff --git a/shared/src/i18n/et/journey.ts b/shared/src/i18n/et/journey.ts
index 0dfa6c994..aa28722f6 100644
--- a/shared/src/i18n/et/journey.ts
+++ b/shared/src/i18n/et/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Reisilugu',
'journey.subtitle': 'Jäädvusta oma reisid nende toimumise ajal',
'journey.new': 'Uus reisilugu',
+ 'journey.lightbox.zoomIn': 'Suurenda',
+ 'journey.lightbox.zoomOut': 'Vähenda',
+ 'journey.lightbox.zoomReset': 'Tagasi terve fotoni',
'journey.create': 'Loo',
'journey.titlePlaceholder': 'Kuhu lähed?',
'journey.empty': 'Reisilugusid veel pole',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Lisa sissekanne',
'journey.detail.jumpToTop': 'Tagasi üles',
'journey.detail.jumpToLast': 'Mine viimase sissekande juurde',
+ 'journey.detail.dayJump': 'Mine päeva juurde',
+ 'journey.detail.dayJumpCount': '{count} päeva',
'journey.detail.newEntry': 'Uus sissekanne',
'journey.detail.editEntry': 'Muuda sissekannet',
'journey.detail.noEntries': 'Sissekandeid veel pole',
@@ -437,6 +442,18 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Loend',
'journey.studio.kind.icon': 'Ikoon',
'journey.studio.duplicate': 'Tee koopia',
+ 'journey.studio.copyToPage': 'Kopeeri, et kleepida mis tahes lehele (Ctrl+C)',
+ 'journey.studio.paste': 'Kleebi (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Kopeeri esmalt midagi, siis kleebi see mis tahes lehele',
+ 'journey.studio.myLayouts': 'Minu paigutused',
+ 'journey.studio.myLayoutsEmpty':
+ 'Salvesta enda kujundatud leht ja paiguta teised lehed samamoodi. Nende fotod ja tekstid jäävad alles.',
+ 'journey.studio.saveLayout': 'Salvesta see leht paigutusena',
+ 'journey.studio.saveLayoutHint': 'Säilitab paigutuse ilma fotodeta, selle raamatu kõigile toimetajatele',
+ 'journey.studio.saveLayoutFull': 'Sellesse raamatusse mahub kuni 24 paigutust. Kustuta üks, et uus salvestada.',
+ 'journey.studio.deleteLayout': 'Kustuta paigutus',
+ 'journey.studio.layoutName': 'Paigutus',
+ 'journey.studio.builtInLayouts': 'Sisseehitatud',
'journey.studio.style': 'Stiil',
'journey.studio.shows': 'Kuvab',
'journey.studio.size': 'Suurus',
@@ -632,6 +649,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Peatus jääb päevikusse, kuid seda ei arvestata vahemaa, riikide ega stuudio kaardi puhul.',
'journey.entry.offRoute': 'Marsruudist väljas',
+ 'journey.entry.draft': 'Mustand',
+ 'journey.editor.draft': 'Mustand',
+ 'journey.editor.draftHint':
+ 'Seda kirjet näed ainult sina ja teised kaasautorid. Jagatud reisilugu jätab selle välja, kuni selle valiku välja lülitad.',
+ 'journey.editor.tripSuggestionHint':
+ 'See päev jääb selle reisi sisse. Seo reis ja selle kohad lisanduvad sellesse reisilukku.',
+ 'journey.editor.tripSuggestionLater': 'Mitte praegu',
'journey.suggestions.dismiss': 'Jäta see soovitus kõrvale',
'journey.suggestions.dismissed': 'Soovitus kõrvale jäetud',
'journey.suggestions.restore': 'Taasta kõrvale jäetud soovitused',
diff --git a/shared/src/i18n/et/map.ts b/shared/src/i18n/et/map.ts
index 88f75e7fc..e30dfde8f 100644
--- a/shared/src/i18n/et/map.ts
+++ b/shared/src/i18n/et/map.ts
@@ -25,6 +25,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Sinu asukohta ei õnnestunud määrata.',
'map.location.timeout': 'Asukoha määramine võttis liiga kaua aega. Proovi uuesti lagedamas kohas.',
'map.overview.show': 'Näita kogu reisi',
+ 'map.lock.lock': 'Lukusta kaardivaade',
+ 'map.lock.unlock': 'Lase kaardil valikut järgida',
'map.overview.hide': 'Peida kogu reis',
'map.overview.total': 'Kogupikkus',
'map.attribution': 'Kaardi allikad',
diff --git a/shared/src/i18n/et/mobileTrip.ts b/shared/src/i18n/et/mobileTrip.ts
index c85dadbc8..28f587193 100644
--- a/shared/src/i18n/et/mobileTrip.ts
+++ b/shared/src/i18n/et/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Kaardil',
'mobileTrip.profileDriving': 'Autoga',
'mobileTrip.profileWalking': 'Jalgsi',
+ 'mobileTrip.profileCycling': 'Jalgrattaga',
'mobileTrip.renameDay': 'Nimeta päev ümber',
'mobileTrip.resBadge': 'Broneering',
'mobileTrip.showOnMap': 'Näita kaardil',
diff --git a/shared/src/i18n/et/packing.ts b/shared/src/i18n/et/packing.ts
index 06bda1955..280d45514 100644
--- a/shared/src/i18n/et/packing.ts
+++ b/shared/src/i18n/et/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Muuda eset',
'packing.itemName': 'Nimi',
'packing.itemQuantity': 'Kogus',
+ 'packing.packedCount': '{packed} / {total} pakitud',
+ 'packing.packedMore': 'Paki üks rohkem',
+ 'packing.packedLess': 'Paki üks vähem',
'packing.itemWeight': 'Kaal (g)',
'packing.title': 'Pakkimisnimekiri',
'packing.empty': 'Pakkimisnimekiri on tühi',
diff --git a/shared/src/i18n/et/places.ts b/shared/src/i18n/et/places.ts
index 29928b1fb..bde40e07f 100644
--- a/shared/src/i18n/et/places.ts
+++ b/shared/src/i18n/et/places.ts
@@ -53,6 +53,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Näita kogu reisi',
'places.filterTracks': 'Rajad',
'places.filterByRating': 'Filtreeri hinnangu järgi',
+ 'places.filterByLocation': 'Filtreeri riigi või piirkonna järgi',
+ 'places.allLocations': 'Kõik riigid',
'places.filterShow': 'Näita',
'places.clearSearch': 'Tühjenda otsing',
'places.yourRating': 'Sinu hinnang',
@@ -79,6 +81,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategooria',
'places.noCategory': 'Kategooriata',
'places.newCategory': 'Uus kategooria',
+ 'places.openInMaps': 'Ava kaardirakenduses',
'places.categoryNamePlaceholder': 'Kategooria nimi',
'places.formTime': 'Kellaaeg',
'places.startTime': 'Algus',
@@ -95,6 +98,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Otsi kohti...',
'places.mapsSearchError': 'Kohaotsing ebaõnnestus.',
'places.searchGoogleInstead': "Pole õige koht? Otsi Google'ist",
+ 'places.nearby': 'Kohad selle nõela lähedal',
+ 'places.nearbyNone': 'Selle nõela lähedalt ei leitud midagi',
'places.loadingDetails': 'Koha üksikasjade laadimine…',
'places.osmHint':
"Kasutusel on OpenStreetMapi otsing (ilma fotode, lahtiolekuaegade ja hinnanguteta). Täielike andmete saamiseks lisa seadetes Google'i API-võti.",
@@ -133,9 +138,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': "Täienda kohtade andmeid Google'i kaudu",
'places.enrichOnImportHint':
'Otsi iga imporditud kohta, et lisada fotod, aadress ja kontaktandmed. Kasutab sinu Google Mapsi võtit.',
+ 'places.enrichOnImportFileHint':
+ 'Otsib seejärel iga imporditud punkti Google’ist üles ja lisab selle foto, aadressi, veebisaidi ja telefoni. Teekonnad ja rajad jäävad samaks.',
'places.uploadImage': 'Laadi pilt üles',
'places.changeImage': 'Muuda pilti',
'places.removeImage': 'Eemalda pilt',
+ 'places.chooseImage': 'Vali pilt',
+ 'places.uploadFromDevice': 'Laadi üles seadmest',
+ 'places.fromAttachedFiles': 'Manustatud failidest',
'places.imageUploadError': 'Pildi üleslaadimine ebaõnnestus',
'places.imageRemoveError': 'Pildi eemaldamine ebaõnnestus',
};
diff --git a/shared/src/i18n/et/reservations.ts b/shared/src/i18n/et/reservations.ts
index ade2ad7c3..980357662 100644
--- a/shared/src/i18n/et/reservations.ts
+++ b/shared/src/i18n/et/reservations.ts
@@ -63,6 +63,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Muu',
'reservations.type.bus': 'Buss',
'reservations.type.ferry': 'Praam',
+ 'reservations.type.cable_car': 'Köisraudtee',
'reservations.type.bicycle': 'Jalgratas',
'reservations.type.taxi': 'Takso',
'reservations.type.transit': 'Ühistransport',
@@ -196,6 +197,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Lähtesta filtrid',
'reservations.noMatches': 'Nende filtritega ei leitud midagi',
'reservations.viewOptions': 'Vaate valikud',
+ 'reservations.exportCsv': 'Ekspordi tabelina (CSV)',
+ 'reservations.export.type': 'Tüüp',
+ 'reservations.export.title': 'Pealkiri',
+ 'reservations.export.start': 'Algus',
+ 'reservations.export.end': 'Lõpp',
+ 'reservations.export.from': 'Kust',
+ 'reservations.export.to': 'Kuhu',
+ 'reservations.export.location': 'Asukoht',
+ 'reservations.export.confirmation': 'Kinnitus',
+ 'reservations.export.notes': 'Märkmed',
'reservations.resetView': 'Lähtesta vaade',
'reservations.group.label': 'Rühmita',
'reservations.group.status': 'Olek',
diff --git a/shared/src/i18n/et/settings.ts b/shared/src/i18n/et/settings.ts
index a4849dcb9..6c7e3db59 100644
--- a/shared/src/i18n/et/settings.ts
+++ b/shared/src/i18n/et/settings.ts
@@ -350,6 +350,10 @@ const settings: TranslationStrings = {
'settings.currency': 'Kuvamisvaluuta',
'settings.currencyHint': 'Kulude summad teisendatakse sellesse valuutasse ainult kuvamiseks — algsummad ei muutu.',
'settings.currencyTrip': 'Reisi valuuta',
+ 'settings.placeLanguage': 'Kohtade nimed',
+ 'settings.placeLanguageApp': 'Sama mis rakendusel',
+ 'settings.placeLanguageHint':
+ 'Keel, milles vastavad kohaotsing, soovitused ja aadressid. Kui kohal pole selles keeles nime, näidatakse selle kohalikku nime.',
'settings.passkey.title': 'Pääsuvõtmed',
'settings.passkey.description':
'Logi kiiremini ja andmepüügi suhtes turvalisemalt sisse pääsuvõtmega — sõrmejälje, näotuvastuse, PIN-i või riistvaravõtmega. Parool jääb varuvariandiks.',
@@ -489,6 +493,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Keel ja piirkond',
'settings.general.travelMap': 'Reisimine ja kaart',
'settings.general.startup': 'Käivitamine',
+ 'settings.dayDateFirst': 'Kuupäev päevapealkirjades eespool',
+ 'settings.compactUnplanned': 'Kompaktsed tähised planeerimata kohtadele',
+ 'settings.compactUnplannedHint':
+ 'Kohad, mis pole ühegi päeva plaanis, kuvatakse väikeste fotota tähistena, et planeeritud peatused esile tõuseksid.',
+ 'settings.dayDateFirstHint':
+ 'Alusta iga päeva kalendrikuupäevaga ja näita selle kõrval „1. päev” või päeva enda pealkirja.',
'settings.startPage': 'Avaleht',
'settings.startPageDashboard': 'Ülevaade',
'settings.startPageActiveTrip': 'Aktiivne reis',
diff --git a/shared/src/i18n/et/share.ts b/shared/src/i18n/et/share.ts
index 34747ff09..173853fba 100644
--- a/shared/src/i18n/et/share.ts
+++ b/shared/src/i18n/et/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Pakkimine',
'share.permBudget': 'Kulud',
'share.permCollab': 'Vestlus',
+ 'share.options': 'Valikud',
+ 'share.optTravelOnly': 'Ainult reisimine ja majutus',
+ 'share.optTravelOnlyHint': 'Näitab ainult transporti ja majutust, ilma tegevuste, päevamärkmete ja tühjade päevadeta',
+ 'share.optHideImages': 'Ilma fotodeta',
+ 'share.optHideImagesHint': 'Jätab kohtade fotod jagatud lehelt välja',
};
export default share;
diff --git a/shared/src/i18n/et/shared.ts b/shared/src/i18n/et/shared.ts
index 85cd7a602..0731eb0bd 100644
--- a/shared/src/i18n/et/shared.ts
+++ b/shared/src/i18n/et/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Vestlus',
'shared.days': 'päeva',
'shared.places': 'kohta',
+ 'shared.unplanned': 'Veel planeerimata',
'shared.other': 'Muu',
'shared.totalBudget': 'Kulud kokku',
'shared.messages': 'sõnumit',
diff --git a/shared/src/i18n/et/todo.ts b/shared/src/i18n/et/todo.ts
index c22b5b445..0c5ff332c 100644
--- a/shared/src/i18n/et/todo.ts
+++ b/shared/src/i18n/et/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Nimekirjata',
'todo.namePlaceholder': 'Ülesande nimi',
'todo.descriptionPlaceholder': 'Kirjeldus (valikuline)',
+ 'todo.editDescription': 'Klõpsa muutmiseks, lingid avanevad otse',
'todo.unassigned': 'Määramata',
'todo.noCategory': 'Nimekirjata',
'todo.hasDescription': 'Kirjeldusega',
diff --git a/shared/src/i18n/et/undo.ts b/shared/src/i18n/et/undo.ts
index 69a485f25..1d7aa2894 100644
--- a/shared/src/i18n/et/undo.ts
+++ b/shared/src/i18n/et/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Võta tagasi: {action}',
'undo.assignPlace': 'Koht lisatud päevale',
'undo.removeAssignment': 'Koht päevast eemaldatud',
+ 'undo.clearDay': 'Päev tühjendatud',
'undo.reorder': 'Kohtade järjekord muudetud',
'undo.optimize': 'Marsruut optimeeritud',
'undo.deletePlace': 'Koht kustutatud',
diff --git a/shared/src/i18n/fr/atlas.ts b/shared/src/i18n/fr/atlas.ts
index 06548bbf1..f19ab26c4 100644
--- a/shared/src/i18n/fr/atlas.ts
+++ b/shared/src/i18n/fr/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Pays',
'atlas.trips': 'Voyages',
'atlas.places': 'Lieux',
+ 'atlas.placesShow': 'Afficher les lieux de ce pays',
+ 'atlas.placesSearch': 'Rechercher des lieux',
+ 'atlas.placesNone': 'Aucun lieu ne correspond',
'atlas.days': 'Jours',
'atlas.visitedCountries': 'Pays visités',
'atlas.cities': 'Villes',
+ 'atlas.regions': 'Régions',
'atlas.noData': 'Aucune donnée de voyage',
'atlas.noDataHint': 'Créez un voyage et ajoutez des lieux pour voir votre carte du monde',
'atlas.nextTrip': 'Prochain voyage',
diff --git a/shared/src/i18n/fr/budget.ts b/shared/src/i18n/fr/budget.ts
index 590a0b3b9..699920229 100644
--- a/shared/src/i18n/fr/budget.ts
+++ b/shared/src/i18n/fr/budget.ts
@@ -109,6 +109,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'ex. dîner, souvenirs, essence…',
'costs.note': 'Note',
'costs.notePlaceholder': 'Ce que ça couvrait, qui doit quoi…',
+ 'costs.paymentNotePlaceholder': 'Payé en espèces, par virement…',
'costs.addNote': 'Ajouter une note',
'costs.showNote': 'Afficher la note',
'costs.hideNote': 'Masquer la note',
diff --git a/shared/src/i18n/fr/dayplan.ts b/shared/src/i18n/fr/dayplan.ts
index 8b7419bd1..b78c02290 100644
--- a/shared/src/i18n/fr/dayplan.ts
+++ b/shared/src/i18n/fr/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Cartes et GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Exporter le plan du jour en PDF',
+ 'dayplan.pdfMine': 'Mon plan en PDF',
+ 'dayplan.pdfMineSub': 'Uniquement les activités et réservations auxquelles vous participez',
'dayplan.gpxTooltip': 'Exporter en GPX pour les cartes hors ligne et les GPS',
'dayplan.gpxAll': 'Tout le voyage',
'dayplan.gpxPlaces': 'Lieux uniquement',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Supprimer le jour',
'dayplan.deleteDayTitle': 'Supprimer {day} ?',
'dayplan.deleteDayBody': 'Le jour est retiré du voyage. Cette action est irréversible.',
+ 'dayplan.excludeFromRoute': 'Retirer de l’itinéraire',
+ 'dayplan.includeInRoute': 'Remettre dans l’itinéraire',
+ 'dayplan.offRoute': 'Hors itinéraire',
+ 'dayplan.offRouteHint': 'Reste dans le jour et sur la carte, mais l’itinéraire le contourne',
+ 'dayplan.clearDay': 'Vider le jour',
+ 'dayplan.clearDayTitle': 'Vider {day} ?',
+ 'dayplan.clearDayBody':
+ 'Tous les lieux sont retirés de ce jour. Ils restent dans le voyage, et le jour conserve ses notes et réservations.',
'dayplan.deleteDayEmpty': "Rien n'est prévu ce jour-là.",
'dayplan.impactPlaces': 'Lieux prévus : {count}',
'dayplan.impactPlacesHint': 'Ils restent dans la liste des lieux.',
diff --git a/shared/src/i18n/fr/inspector.ts b/shared/src/i18n/fr/inspector.ts
index f30c148df..55240a3b5 100644
--- a/shared/src/i18n/fr/inspector.ts
+++ b/shared/src/i18n/fr/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Réservation en attente',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigation',
+ 'inspector.otherMapApp': 'Autre application de cartes',
'inspector.openWith': 'Ouvrir avec',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Ouvrir le site web',
diff --git a/shared/src/i18n/fr/journey.ts b/shared/src/i18n/fr/journey.ts
index fb19cf834..fdcae1ff5 100644
--- a/shared/src/i18n/fr/journey.ts
+++ b/shared/src/i18n/fr/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journal de voyage',
'journey.subtitle': 'Suivez vos voyages en temps réel',
'journey.new': 'Nouveau journal',
+ 'journey.lightbox.zoomIn': 'Zoom avant',
+ 'journey.lightbox.zoomOut': 'Zoom arrière',
+ 'journey.lightbox.zoomReset': 'Revenir à la photo entière',
'journey.create': 'Créer',
'journey.titlePlaceholder': 'Où allez-vous ?',
'journey.empty': 'Aucun journal pour le moment',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Ajouter une entrée',
'journey.detail.jumpToTop': 'Revenir en haut',
'journey.detail.jumpToLast': 'Aller à la dernière entrée',
+ 'journey.detail.dayJump': 'Aller à un jour',
+ 'journey.detail.dayJumpCount': '{count} jours',
'journey.detail.newEntry': 'Nouvelle entrée',
'journey.detail.editEntry': "Modifier l'entrée",
'journey.detail.noEntries': 'Aucune entrée pour le moment',
@@ -433,6 +438,19 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Liste',
'journey.studio.kind.icon': 'Icône',
'journey.studio.duplicate': 'Dupliquer',
+ 'journey.studio.copyToPage': 'Copier, pour coller sur n’importe quelle page (Ctrl+C)',
+ 'journey.studio.paste': 'Coller (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Copiez d’abord quelque chose, puis collez-le sur n’importe quelle page',
+ 'journey.studio.myLayouts': 'Mes dispositions',
+ 'journey.studio.myLayoutsEmpty':
+ 'Conservez une page que vous avez agencée et disposez d’autres pages de la même façon. Leurs photos et textes restent.',
+ 'journey.studio.saveLayout': 'Enregistrer cette page comme disposition',
+ 'journey.studio.saveLayoutHint': 'Conserve l’agencement sans les photos, pour tous les éditeurs de ce livre',
+ 'journey.studio.saveLayoutFull':
+ 'Ce livre conserve jusqu’à 24 dispositions. Supprimez-en une pour en enregistrer une autre.',
+ 'journey.studio.deleteLayout': 'Supprimer la disposition',
+ 'journey.studio.layoutName': 'Disposition',
+ 'journey.studio.builtInLayouts': 'Intégrées',
'journey.studio.style': 'Style',
'journey.studio.shows': 'Affichage',
'journey.studio.size': 'Taille',
@@ -626,6 +644,12 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
"L'étape reste dans le journal mais ne compte ni pour la distance, ni pour les pays, ni pour la carte dans Studio.",
'journey.entry.offRoute': 'Hors itinéraire',
+ 'journey.entry.draft': 'Brouillon',
+ 'journey.editor.draft': 'Brouillon',
+ 'journey.editor.draftHint':
+ 'Seuls vous et les autres contributeurs voyez cette entrée. Le journal partagé l’exclut tant que vous ne désactivez pas cette option.',
+ 'journey.editor.tripSuggestionHint': 'Ce jour tombe dans ce voyage. Liez-le, et ses lieux rejoignent ce journal.',
+ 'journey.editor.tripSuggestionLater': 'Pas maintenant',
'journey.suggestions.dismiss': 'Écarter cette suggestion',
'journey.suggestions.dismissed': 'Suggestion écartée',
'journey.suggestions.restore': 'Récupérer les suggestions écartées',
diff --git a/shared/src/i18n/fr/map.ts b/shared/src/i18n/fr/map.ts
index f8729292d..d7367c2eb 100644
--- a/shared/src/i18n/fr/map.ts
+++ b/shared/src/i18n/fr/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Votre position n’a pas pu être déterminée.',
'map.location.timeout': 'La localisation a pris trop de temps. Réessayez avec une vue plus dégagée du ciel.',
'map.overview.show': 'Afficher tout le voyage',
+ 'map.lock.lock': 'Verrouiller la vue de la carte',
+ 'map.lock.unlock': 'Laisser la carte suivre la sélection',
'map.overview.hide': 'Masquer tout le voyage',
'map.overview.total': 'Distance totale',
'map.attribution': 'Crédits de la carte',
diff --git a/shared/src/i18n/fr/mobileTrip.ts b/shared/src/i18n/fr/mobileTrip.ts
index 5b8eed2c1..9ed399414 100644
--- a/shared/src/i18n/fr/mobileTrip.ts
+++ b/shared/src/i18n/fr/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Sur la carte',
'mobileTrip.profileDriving': 'Voiture',
'mobileTrip.profileWalking': 'Marche',
+ 'mobileTrip.profileCycling': 'Vélo',
'mobileTrip.renameDay': 'Renommer le jour',
'mobileTrip.resBadge': 'Réservation',
'mobileTrip.showOnMap': 'Afficher sur la carte',
diff --git a/shared/src/i18n/fr/packing.ts b/shared/src/i18n/fr/packing.ts
index c1e6d6ddb..fb7d8df25 100644
--- a/shared/src/i18n/fr/packing.ts
+++ b/shared/src/i18n/fr/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': "Modifier l'élément",
'packing.itemName': 'Nom',
'packing.itemQuantity': 'Quantité',
+ 'packing.packedCount': '{packed} sur {total} emballés',
+ 'packing.packedMore': 'Emballer un de plus',
+ 'packing.packedLess': 'Emballer un de moins',
'packing.itemWeight': 'Poids (g)',
'packing.title': 'Liste de bagages',
'packing.empty': 'La liste de bagages est vide',
diff --git a/shared/src/i18n/fr/places.ts b/shared/src/i18n/fr/places.ts
index 0f76b61a2..ce5105028 100644
--- a/shared/src/i18n/fr/places.ts
+++ b/shared/src/i18n/fr/places.ts
@@ -53,6 +53,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Afficher tout le voyage',
'places.filterTracks': 'Traces',
'places.filterByRating': 'Filtrer par note',
+ 'places.filterByLocation': 'Filtrer par pays ou région',
+ 'places.allLocations': 'Tous les pays',
'places.filterShow': 'Afficher',
'places.clearSearch': 'Effacer la recherche',
'places.yourRating': 'Ta note',
@@ -79,6 +81,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Catégorie',
'places.noCategory': 'Sans catégorie',
'places.newCategory': 'Nouvelle catégorie',
+ 'places.openInMaps': 'Ouvrir dans une app de cartes',
'places.categoryNamePlaceholder': 'Nom de la catégorie',
'places.formTime': 'Heure',
'places.startTime': 'Début',
@@ -95,6 +98,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Rechercher des lieux…',
'places.mapsSearchError': 'La recherche de lieu a échoué.',
'places.searchGoogleInstead': "Ce n'est pas le bon lieu ? Rechercher sur Google",
+ 'places.nearby': 'Lieux près de ce repère',
+ 'places.nearbyNone': 'Rien trouvé près de ce repère',
'places.loadingDetails': 'Chargement des détails du lieu…',
'places.osmHint':
'Recherche via OpenStreetMap (pas de photos, horaires ni notes). Ajoutez une clé API Google dans les paramètres pour plus de détails.',
@@ -133,9 +138,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Enrichir les lieux via Google',
'places.enrichOnImportHint':
'Recherche chaque lieu importé pour ajouter photos, adresse et coordonnées. Utilise votre clé Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Recherche ensuite chaque point importé sur Google et ajoute sa photo, son adresse, son site web et son téléphone. Les chemins et traces restent tels quels.',
'places.uploadImage': 'Importer une image',
'places.changeImage': "Changer l'image",
'places.removeImage': "Supprimer l'image",
+ 'places.chooseImage': 'Choisir une image',
+ 'places.uploadFromDevice': 'Importer depuis l’appareil',
+ 'places.fromAttachedFiles': 'Depuis les fichiers joints',
'places.imageUploadError': "Impossible d'importer l'image",
'places.imageRemoveError': "Impossible de supprimer l'image",
};
diff --git a/shared/src/i18n/fr/reservations.ts b/shared/src/i18n/fr/reservations.ts
index 4bfc83195..bd542afc4 100644
--- a/shared/src/i18n/fr/reservations.ts
+++ b/shared/src/i18n/fr/reservations.ts
@@ -63,6 +63,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Autre',
'reservations.type.bus': 'Bus',
'reservations.type.ferry': 'Ferry',
+ 'reservations.type.cable_car': 'Téléphérique',
'reservations.type.bicycle': 'Vélo',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Transports en commun',
@@ -200,6 +201,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Réinitialiser les filtres',
'reservations.noMatches': 'Aucun résultat pour ces filtres',
'reservations.viewOptions': "Options d'affichage",
+ 'reservations.exportCsv': 'Exporter en tableur (CSV)',
+ 'reservations.export.type': 'Type',
+ 'reservations.export.title': 'Titre',
+ 'reservations.export.start': 'Début',
+ 'reservations.export.end': 'Fin',
+ 'reservations.export.from': 'De',
+ 'reservations.export.to': 'À',
+ 'reservations.export.location': 'Lieu',
+ 'reservations.export.confirmation': 'Confirmation',
+ 'reservations.export.notes': 'Notes',
'reservations.resetView': "Réinitialiser l'affichage",
'reservations.group.label': 'Grouper par',
'reservations.group.status': 'Statut',
diff --git a/shared/src/i18n/fr/settings.ts b/shared/src/i18n/fr/settings.ts
index 77c068eb1..9d1ca0399 100644
--- a/shared/src/i18n/fr/settings.ts
+++ b/shared/src/i18n/fr/settings.ts
@@ -345,6 +345,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
"Les montants dans Coûts sont convertis dans cette devise uniquement pour l'affichage — les montants d'origine restent inchangés.",
'settings.currencyTrip': 'Devise du voyage',
+ 'settings.placeLanguage': 'Noms de lieux',
+ 'settings.placeLanguageApp': 'Comme l’application',
+ 'settings.placeLanguageHint':
+ 'La langue dans laquelle répondent la recherche de lieux, les suggestions et les adresses. Si un lieu n’a pas de nom dans cette langue, son nom local est affiché.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Connectez-vous plus rapidement et de façon résistante au phishing avec une passkey — votre empreinte digitale, votre visage, votre code PIN ou une clé matérielle. Votre mot de passe reste disponible en secours.',
@@ -492,6 +496,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Démarrage',
+ 'settings.dayDateFirst': 'Date en premier dans les titres de jour',
+ 'settings.compactUnplanned': 'Repères compacts pour les lieux non planifiés',
+ 'settings.compactUnplannedHint':
+ 'Les lieux planifiés dans aucun jour s’affichent en petits repères sans photo, pour que les étapes planifiées ressortent.',
+ 'settings.dayDateFirstHint':
+ 'Commencer chaque jour par sa date et afficher « Jour 1 » ou le titre propre du jour à côté.',
'settings.startPage': 'Page de démarrage',
'settings.startPageDashboard': 'Tableau de bord',
'settings.startPageActiveTrip': 'Voyage en cours',
diff --git a/shared/src/i18n/fr/share.ts b/shared/src/i18n/fr/share.ts
index 5239caf38..6d02f1a37 100644
--- a/shared/src/i18n/fr/share.ts
+++ b/shared/src/i18n/fr/share.ts
@@ -12,5 +12,11 @@ const share: TranslationStrings = {
'share.permPacking': 'Bagages',
'share.permBudget': 'Coûts',
'share.permCollab': 'Chat',
+ 'share.options': 'Options',
+ 'share.optTravelOnly': 'Trajets et hébergements uniquement',
+ 'share.optTravelOnlyHint':
+ 'Affiche uniquement les transports et hébergements, sans activités, notes de jour ni jours vides',
+ 'share.optHideImages': 'Sans photos',
+ 'share.optHideImagesHint': 'Exclut les photos des lieux de la page partagée',
};
export default share;
diff --git a/shared/src/i18n/fr/shared.ts b/shared/src/i18n/fr/shared.ts
index 1e5b53e6e..248461429 100644
--- a/shared/src/i18n/fr/shared.ts
+++ b/shared/src/i18n/fr/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'jours',
'shared.places': 'lieux',
+ 'shared.unplanned': 'Pas encore planifié',
'shared.other': 'Autre',
'shared.totalBudget': 'Coûts totaux',
'shared.messages': 'messages',
diff --git a/shared/src/i18n/fr/todo.ts b/shared/src/i18n/fr/todo.ts
index b357bec1a..47a30d6b1 100644
--- a/shared/src/i18n/fr/todo.ts
+++ b/shared/src/i18n/fr/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Aucune liste',
'todo.namePlaceholder': 'Nom de la tâche',
'todo.descriptionPlaceholder': 'Description (facultative)',
+ 'todo.editDescription': 'Cliquez pour modifier, les liens s’ouvrent directement',
'todo.unassigned': 'Non assigné',
'todo.noCategory': 'Aucune liste',
'todo.hasDescription': 'Avec description',
diff --git a/shared/src/i18n/fr/undo.ts b/shared/src/i18n/fr/undo.ts
index 0ef4d960b..882ed718b 100644
--- a/shared/src/i18n/fr/undo.ts
+++ b/shared/src/i18n/fr/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Annuler : {action}',
'undo.assignPlace': 'Lieu ajouté au jour',
'undo.removeAssignment': 'Lieu retiré du jour',
+ 'undo.clearDay': 'Jour vidé',
'undo.reorder': 'Lieux réorganisés',
'undo.optimize': 'Itinéraire optimisé',
'undo.deletePlace': 'Lieu supprimé',
diff --git a/shared/src/i18n/gr/atlas.ts b/shared/src/i18n/gr/atlas.ts
index 2e6847315..0b4f32f55 100644
--- a/shared/src/i18n/gr/atlas.ts
+++ b/shared/src/i18n/gr/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Χώρες',
'atlas.trips': 'Ταξίδια',
'atlas.places': 'Μέρη',
+ 'atlas.placesShow': 'Εμφάνιση των μερών σε αυτή τη χώρα',
+ 'atlas.placesSearch': 'Αναζήτηση μερών',
+ 'atlas.placesNone': 'Κανένα μέρος δεν ταιριάζει',
'atlas.unmark': 'Αφαίρεση',
'atlas.confirmMark': 'Σήμανση αυτής της χώρας ως επισκεφθείσας;',
'atlas.confirmUnmark': 'Αφαίρεση αυτής της χώρας από τη λίστα επισκεφθέντων;',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Ημέρες',
'atlas.visitedCountries': 'Επισκεφθείσες Χώρες',
'atlas.cities': 'Πόλεις',
+ 'atlas.regions': 'Περιφέρειες',
'atlas.noData': 'Δεν υπάρχουν ταξιδιωτικά δεδομένα ακόμη',
'atlas.noDataHint': 'Δημιουργήστε ένα ταξίδι και προσθέστε μέρη για να δείτε τον παγκόσμιο χάρτη σας',
'atlas.nextTrip': 'Επόμενο ταξίδι',
diff --git a/shared/src/i18n/gr/budget.ts b/shared/src/i18n/gr/budget.ts
index d1ec48f7a..b1ce59847 100644
--- a/shared/src/i18n/gr/budget.ts
+++ b/shared/src/i18n/gr/budget.ts
@@ -109,6 +109,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'π.χ. Δείπνο, σουβενίρ, βενζίνη…',
'costs.note': 'Σημείωση',
'costs.notePlaceholder': 'Τι κάλυπτε, ποιος χρωστάει τι…',
+ 'costs.paymentNotePlaceholder': 'Πληρώθηκε με μετρητά, με τραπεζική μεταφορά…',
'costs.addNote': 'Προσθήκη σημείωσης',
'costs.showNote': 'Εμφάνιση σημείωσης',
'costs.hideNote': 'Απόκρυψη σημείωσης',
diff --git a/shared/src/i18n/gr/dayplan.ts b/shared/src/i18n/gr/dayplan.ts
index adc2e2c98..8b95eadc5 100644
--- a/shared/src/i18n/gr/dayplan.ts
+++ b/shared/src/i18n/gr/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Χάρτες και GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Εξαγωγή ημερήσιου πλάνου ως PDF',
+ 'dayplan.pdfMine': 'Το πλάνο μου σε PDF',
+ 'dayplan.pdfMineSub': 'Μόνο οι δραστηριότητες και οι κρατήσεις στις οποίες συμμετέχετε',
'dayplan.gpxTooltip': 'Εξαγωγή ως GPX για χάρτες εκτός σύνδεσης και συσκευές GPS',
'dayplan.gpxAll': 'Όλο το ταξίδι',
'dayplan.gpxPlaces': 'Μόνο τα μέρη',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Διαγραφή ημέρας',
'dayplan.deleteDayTitle': 'Διαγραφή {day};',
'dayplan.deleteDayBody': 'Η ημέρα αφαιρείται από το ταξίδι. Αυτό δεν μπορεί να αναιρεθεί.',
+ 'dayplan.excludeFromRoute': 'Εξαίρεση από τη διαδρομή',
+ 'dayplan.includeInRoute': 'Επαναφορά στη διαδρομή',
+ 'dayplan.offRoute': 'Εκτός διαδρομής',
+ 'dayplan.offRouteHint': 'Παραμένει στην ημέρα και στον χάρτη, αλλά η διαδρομή το παρακάμπτει',
+ 'dayplan.clearDay': 'Εκκαθάριση ημέρας',
+ 'dayplan.clearDayTitle': 'Εκκαθάριση {day};',
+ 'dayplan.clearDayBody':
+ 'Όλα τα μέρη αφαιρούνται από αυτή την ημέρα. Τα μέρη παραμένουν στο ταξίδι και η ημέρα κρατά τις σημειώσεις και τις κρατήσεις της.',
'dayplan.deleteDayEmpty': 'Δεν υπάρχει τίποτα προγραμματισμένο αυτή την ημέρα.',
'dayplan.impactPlaces': 'Προγραμματισμένα μέρη: {count}',
'dayplan.impactPlacesHint': 'Παραμένουν στη λίστα μερών.',
diff --git a/shared/src/i18n/gr/inspector.ts b/shared/src/i18n/gr/inspector.ts
index b81a6c617..034217aeb 100644
--- a/shared/src/i18n/gr/inspector.ts
+++ b/shared/src/i18n/gr/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Εκκρεμής Κράτηση',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Πλοήγηση',
+ 'inspector.otherMapApp': 'Άλλη εφαρμογή χαρτών',
'inspector.openWith': 'Άνοιγμα με',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.saveToCollection': 'Αποθήκευση στη Συλλογή',
diff --git a/shared/src/i18n/gr/journey.ts b/shared/src/i18n/gr/journey.ts
index 763740461..d5fbe3ac6 100644
--- a/shared/src/i18n/gr/journey.ts
+++ b/shared/src/i18n/gr/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Ταξίδι',
'journey.subtitle': 'Παρακολουθήστε τα ταξίδια σας καθώς συμβαίνουν',
'journey.new': 'Νέο Ταξίδι',
+ 'journey.lightbox.zoomIn': 'Μεγέθυνση',
+ 'journey.lightbox.zoomOut': 'Σμίκρυνση',
+ 'journey.lightbox.zoomReset': 'Επιστροφή σε ολόκληρη τη φωτογραφία',
'journey.create': 'Δημιουργία',
'journey.titlePlaceholder': 'Πού πηγαίνετε;',
'journey.empty': 'Δεν υπάρχουν ταξίδια ακόμα',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Προσθήκη Καταχώρησης',
'journey.detail.jumpToTop': 'Επιστροφή στην κορυφή',
'journey.detail.jumpToLast': 'Μετάβαση στην τελευταία καταχώρηση',
+ 'journey.detail.dayJump': 'Μετάβαση σε ημέρα',
+ 'journey.detail.dayJumpCount': '{count} ημέρες',
'journey.detail.newEntry': 'Νέα Καταχώρηση',
'journey.detail.editEntry': 'Επεξεργασία Καταχώρησης',
'journey.detail.noEntries': 'Δεν υπάρχουν καταχωρήσεις ακόμα',
@@ -434,6 +439,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Λίστα',
'journey.studio.kind.icon': 'Εικονίδιο',
'journey.studio.duplicate': 'Διπλασιασμός',
+ 'journey.studio.copyToPage': 'Αντιγραφή, για επικόλληση σε οποιαδήποτε σελίδα (Ctrl+C)',
+ 'journey.studio.paste': 'Επικόλληση (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Αντιγράψτε πρώτα κάτι και μετά επικολλήστε το σε οποιαδήποτε σελίδα',
+ 'journey.studio.myLayouts': 'Οι διατάξεις μου',
+ 'journey.studio.myLayoutsEmpty': 'Κρατήστε μια σελίδα που έχετε διαμορφώσει και στήστε άλλες σελίδες με τον ίδιο τρόπο. Οι φωτογραφίες και τα κείμενά τους παραμένουν.',
+ 'journey.studio.saveLayout': 'Αποθήκευση αυτής της σελίδας ως διάταξη',
+ 'journey.studio.saveLayoutHint': 'Κρατά τη διάταξη χωρίς τις φωτογραφίες, για όλους τους συντάκτες αυτού του βιβλίου',
+ 'journey.studio.saveLayoutFull': 'Αυτό το βιβλίο χωρά έως 24 διατάξεις. Διαγράψτε μία για να αποθηκεύσετε άλλη.',
+ 'journey.studio.deleteLayout': 'Διαγραφή διάταξης',
+ 'journey.studio.layoutName': 'Διάταξη',
+ 'journey.studio.builtInLayouts': 'Ενσωματωμένες',
'journey.studio.style': 'Στυλ',
'journey.studio.shows': 'Εμφάνιση',
'journey.studio.size': 'Μέγεθος',
@@ -628,6 +644,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Η στάση παραμένει στο ημερολόγιο, αλλά δεν μετράει στην απόσταση, τις χώρες ή τον χάρτη στο Studio.',
'journey.entry.offRoute': 'Εκτός διαδρομής',
+ 'journey.entry.draft': 'Πρόχειρο',
+ 'journey.editor.draft': 'Πρόχειρο',
+ 'journey.editor.draftHint': 'Αυτή την καταχώριση τη βλέπετε μόνο εσείς και οι άλλοι συντελεστές. Το κοινόχρηστο Ταξίδι την παραλείπει μέχρι να το απενεργοποιήσετε.',
+ 'journey.editor.tripSuggestionHint': 'Αυτή η ημέρα ανήκει σε αυτό το ταξίδι. Συνδέστε το και τα μέρη του θα προστεθούν σε αυτό το Ταξίδι.',
+ 'journey.editor.tripSuggestionLater': 'Όχι τώρα',
'journey.suggestions.dismiss': 'Απόρριψη αυτής της πρότασης',
'journey.suggestions.dismissed': 'Η πρόταση απορρίφθηκε',
'journey.suggestions.restore': 'Επαναφορά των απορριμμένων προτάσεων',
diff --git a/shared/src/i18n/gr/map.ts b/shared/src/i18n/gr/map.ts
index 594712798..eba3b762d 100644
--- a/shared/src/i18n/gr/map.ts
+++ b/shared/src/i18n/gr/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Δεν ήταν δυνατός ο προσδιορισμός της τοποθεσίας σας.',
'map.location.timeout': 'Ο εντοπισμός της θέσης σας άργησε πολύ. Δοκιμάστε ξανά με καθαρή θέα στον ουρανό.',
'map.overview.show': 'Εμφάνιση όλου του ταξιδιού',
+ 'map.lock.lock': 'Κλείδωμα προβολής χάρτη',
+ 'map.lock.unlock': 'Ο χάρτης να ακολουθεί την επιλογή',
'map.overview.hide': 'Απόκρυψη όλου του ταξιδιού',
'map.overview.total': 'Συνολική απόσταση',
'map.attribution': 'Πηγές χάρτη',
diff --git a/shared/src/i18n/gr/mobileTrip.ts b/shared/src/i18n/gr/mobileTrip.ts
index 922f9fe9e..b6fd69b63 100644
--- a/shared/src/i18n/gr/mobileTrip.ts
+++ b/shared/src/i18n/gr/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Στον χάρτη',
'mobileTrip.profileDriving': 'Με αυτοκίνητο',
'mobileTrip.profileWalking': 'Με τα πόδια',
+ 'mobileTrip.profileCycling': 'Με ποδήλατο',
'mobileTrip.renameDay': 'Μετονομασία ημέρας',
'mobileTrip.resBadge': 'Κράτηση',
'mobileTrip.showOnMap': 'Εμφάνιση στον χάρτη',
diff --git a/shared/src/i18n/gr/packing.ts b/shared/src/i18n/gr/packing.ts
index b489e37cd..b7fc23e6e 100644
--- a/shared/src/i18n/gr/packing.ts
+++ b/shared/src/i18n/gr/packing.ts
@@ -10,6 +10,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Επεξεργασία στοιχείου',
'packing.itemName': 'Όνομα',
'packing.itemQuantity': 'Ποσότητα',
+ 'packing.packedCount': '{packed} από {total} πακεταρισμένα',
+ 'packing.packedMore': 'Πακετάρισμα ενός ακόμη',
+ 'packing.packedLess': 'Πακετάρισμα ενός λιγότερου',
'packing.itemWeight': 'Βάρος (γρ)',
'packing.title': 'Λίστα Αποσκευών',
'packing.empty': 'Η λίστα αποσκευών είναι κενή',
diff --git a/shared/src/i18n/gr/places.ts b/shared/src/i18n/gr/places.ts
index db6ce7432..6a39af87a 100644
--- a/shared/src/i18n/gr/places.ts
+++ b/shared/src/i18n/gr/places.ts
@@ -53,6 +53,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Εμφάνιση όλου του ταξιδιού',
'places.filterTracks': 'Ίχνη',
'places.filterByRating': 'Φιλτράρισμα κατά βαθμολογία',
+ 'places.filterByLocation': 'Φιλτράρισμα ανά χώρα ή περιοχή',
+ 'places.allLocations': 'Όλες οι χώρες',
'places.filterShow': 'Εμφάνιση',
'places.clearSearch': 'Καθαρισμός αναζήτησης',
'places.yourRating': 'Η βαθμολογία σου',
@@ -79,6 +81,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Κατηγορία',
'places.noCategory': 'Χωρίς Κατηγορία',
'places.newCategory': 'Νέα κατηγορία',
+ 'places.openInMaps': 'Άνοιγμα σε χάρτες',
'places.categoryNamePlaceholder': 'Όνομα κατηγορίας',
'places.formTime': 'Ώρα',
'places.startTime': 'Έναρξη',
@@ -95,6 +98,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Αναζήτηση μερών...',
'places.mapsSearchError': 'Η αναζήτηση μέρους απέτυχε.',
'places.searchGoogleInstead': 'Δεν είναι το σωστό μέρος; Αναζήτηση στο Google',
+ 'places.nearby': 'Μέρη κοντά σε αυτή την πινέζα',
+ 'places.nearbyNone': 'Δεν βρέθηκε τίποτα κοντά σε αυτή την πινέζα',
'places.loadingDetails': 'Φόρτωση λεπτομερειών μέρους…',
'places.osmHint':
'Χρήση αναζήτησης OpenStreetMap (χωρίς φωτογραφίες, ώρες λειτουργίας ή αξιολογήσεις). Προσθέστε ένα κλειδί Google API στις ρυθμίσεις για πλήρεις λεπτομέρειες.',
@@ -133,9 +138,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Εμπλουτισμός τόπων μέσω Google',
'places.enrichOnImportHint':
'Αναζητά κάθε εισαγόμενο μέρος για να προσθέσει φωτογραφίες, διεύθυνση και στοιχεία επικοινωνίας. Απαιτεί κλειδί Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Στη συνέχεια αναζητά κάθε εισαγόμενο σημείο στο Google και προσθέτει φωτογραφία, διεύθυνση, ιστότοπο και τηλέφωνο. Οι διαδρομές και τα ίχνη μένουν ως έχουν.',
'places.uploadImage': 'Μεταφόρτωση εικόνας',
'places.changeImage': 'Αλλαγή εικόνας',
'places.removeImage': 'Αφαίρεση εικόνας',
+ 'places.chooseImage': 'Επιλογή εικόνας',
+ 'places.uploadFromDevice': 'Μεταφόρτωση από τη συσκευή',
+ 'places.fromAttachedFiles': 'Από συνημμένα αρχεία',
'places.imageUploadError': 'Δεν ήταν δυνατή η μεταφόρτωση της εικόνας',
'places.imageRemoveError': 'Δεν ήταν δυνατή η αφαίρεση της εικόνας',
};
diff --git a/shared/src/i18n/gr/reservations.ts b/shared/src/i18n/gr/reservations.ts
index 1a8ebca99..d84d60545 100644
--- a/shared/src/i18n/gr/reservations.ts
+++ b/shared/src/i18n/gr/reservations.ts
@@ -63,6 +63,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Άλλο',
'reservations.type.bus': 'Λεωφορείο',
'reservations.type.ferry': 'Φέρι',
+ 'reservations.type.cable_car': 'Τελεφερίκ',
'reservations.type.bicycle': 'Ποδήλατο',
'reservations.type.taxi': 'Ταξί',
'reservations.type.transit': 'Μέσα μαζικής μεταφοράς',
@@ -198,6 +199,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Επαναφορά φίλτρων',
'reservations.noMatches': 'Τίποτα δεν ταιριάζει με αυτά τα φίλτρα',
'reservations.viewOptions': 'Επιλογές προβολής',
+ 'reservations.exportCsv': 'Εξαγωγή ως υπολογιστικό φύλλο (CSV)',
+ 'reservations.export.type': 'Τύπος',
+ 'reservations.export.title': 'Τίτλος',
+ 'reservations.export.start': 'Έναρξη',
+ 'reservations.export.end': 'Λήξη',
+ 'reservations.export.from': 'Από',
+ 'reservations.export.to': 'Προς',
+ 'reservations.export.location': 'Τοποθεσία',
+ 'reservations.export.confirmation': 'Επιβεβαίωση',
+ 'reservations.export.notes': 'Σημειώσεις',
'reservations.resetView': 'Επαναφορά προβολής',
'reservations.group.label': 'Ομαδοποίηση κατά',
'reservations.group.status': 'Κατάσταση',
diff --git a/shared/src/i18n/gr/settings.ts b/shared/src/i18n/gr/settings.ts
index 464a6a34a..d5aca3d36 100644
--- a/shared/src/i18n/gr/settings.ts
+++ b/shared/src/i18n/gr/settings.ts
@@ -349,6 +349,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Τα ποσά στα Κόστη εμφανίζονται σε αυτό το νόμισμα μόνο για λόγους προβολής — τα αρχικά ποσά δεν αλλάζουν.',
'settings.currencyTrip': 'Νόμισμα ταξιδιού',
+ 'settings.placeLanguage': 'Ονόματα μερών',
+ 'settings.placeLanguageApp': 'Ίδια με την εφαρμογή',
+ 'settings.placeLanguageHint': 'Η γλώσσα στην οποία απαντούν η αναζήτηση μερών, οι προτάσεις και οι διευθύνσεις. Όταν ένα μέρος δεν έχει όνομα σε αυτή τη γλώσσα, εμφανίζεται το τοπικό του όνομα.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Συνδεθείτε πιο γρήγορα και με προστασία από phishing χρησιμοποιώντας ένα passkey — το δαχτυλικό σας αποτύπωμα, το πρόσωπό σας, ένα PIN ή ένα κλειδί υλικού. Ο κωδικός σας παραμένει ως εφεδρεία.',
@@ -495,6 +498,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Εκκίνηση',
+ 'settings.dayDateFirst': 'Πρώτα η ημερομηνία στους τίτλους ημερών',
+ 'settings.compactUnplanned': 'Συμπαγείς δείκτες για μη προγραμματισμένα μέρη',
+ 'settings.compactUnplannedHint': 'Τα μέρη που δεν έχουν προγραμματιστεί σε καμία ημέρα εμφανίζονται ως μικροί δείκτες χωρίς φωτογραφία, ώστε να ξεχωρίζουν οι προγραμματισμένες στάσεις.',
+ 'settings.dayDateFirstHint': 'Κάθε ημέρα ξεκινά με την ημερομηνία της και δίπλα εμφανίζεται «Ημέρα 1» ή ο δικός της τίτλος.',
'settings.startPage': 'Αρχική σελίδα',
'settings.startPageDashboard': 'Πίνακας ελέγχου',
'settings.startPageActiveTrip': 'Ενεργό ταξίδι',
diff --git a/shared/src/i18n/gr/share.ts b/shared/src/i18n/gr/share.ts
index f3956303b..4af0b6dba 100644
--- a/shared/src/i18n/gr/share.ts
+++ b/shared/src/i18n/gr/share.ts
@@ -12,5 +12,11 @@ const share: TranslationStrings = {
'share.permPacking': 'Πακετάρισμα',
'share.permBudget': 'Κόστη',
'share.permCollab': 'Συνομιλία',
+ 'share.options': 'Επιλογές',
+ 'share.optTravelOnly': 'Μόνο μετακινήσεις και διαμονές',
+ 'share.optTravelOnlyHint':
+ 'Εμφανίζει μόνο μεταφορές και καταλύματα, χωρίς δραστηριότητες, σημειώσεις ημερών και κενές ημέρες',
+ 'share.optHideImages': 'Χωρίς φωτογραφίες',
+ 'share.optHideImagesHint': 'Παραλείπει τις φωτογραφίες των μερών από την κοινόχρηστη σελίδα',
};
export default share;
diff --git a/shared/src/i18n/gr/shared.ts b/shared/src/i18n/gr/shared.ts
index 8c2be61a2..97a0a2890 100644
--- a/shared/src/i18n/gr/shared.ts
+++ b/shared/src/i18n/gr/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Συνομιλία',
'shared.days': 'ημέρες',
'shared.places': 'τόποι',
+ 'shared.unplanned': 'Δεν έχει προγραμματιστεί ακόμη',
'shared.other': 'Άλλα',
'shared.totalBudget': 'Συνολικά Κόστη',
'shared.messages': 'μηνύματα',
diff --git a/shared/src/i18n/gr/todo.ts b/shared/src/i18n/gr/todo.ts
index 7ba22e864..4cc252943 100644
--- a/shared/src/i18n/gr/todo.ts
+++ b/shared/src/i18n/gr/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Χωρίς λίστα',
'todo.namePlaceholder': 'Όνομα εργασίας',
'todo.descriptionPlaceholder': 'Περιγραφή (προαιρετικό)',
+ 'todo.editDescription': 'Κάντε κλικ για επεξεργασία, οι σύνδεσμοι ανοίγουν απευθείας',
'todo.unassigned': 'Χωρίς ανάθεση',
'todo.noCategory': 'Χωρίς λίστα',
'todo.hasDescription': 'Έχει περιγραφή',
diff --git a/shared/src/i18n/gr/undo.ts b/shared/src/i18n/gr/undo.ts
index 560403a2c..2896189fd 100644
--- a/shared/src/i18n/gr/undo.ts
+++ b/shared/src/i18n/gr/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Αναίρεση: {action}',
'undo.assignPlace': 'Η τοποθεσία ανατέθηκε στην ημέρα',
'undo.removeAssignment': 'Η τοποθεσία αφαιρέθηκε από την ημέρα',
+ 'undo.clearDay': 'Η ημέρα εκκαθαρίστηκε',
'undo.reorder': 'Οι τοποθεσίες αναδιατάχθηκαν',
'undo.optimize': 'Η διαδρομή βελτιστοποιήθηκε',
'undo.deletePlace': 'Η τοποθεσία διαγράφηκε',
diff --git a/shared/src/i18n/hu/atlas.ts b/shared/src/i18n/hu/atlas.ts
index 6f8a9ed75..a8803420d 100644
--- a/shared/src/i18n/hu/atlas.ts
+++ b/shared/src/i18n/hu/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Országok',
'atlas.trips': 'Utazások',
'atlas.places': 'Helyek',
+ 'atlas.placesShow': 'Az ország helyeinek megjelenítése',
+ 'atlas.placesSearch': 'Helyek keresése',
+ 'atlas.placesNone': 'Nincs egyező hely',
'atlas.unmark': 'Eltávolítás',
'atlas.confirmMark': 'Megjelölöd ezt az országot meglátogatottként?',
'atlas.confirmUnmark': 'Eltávolítod ezt az országot a meglátogatottak listájáról?',
@@ -32,6 +35,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Napok',
'atlas.visitedCountries': 'Meglátogatott országok',
'atlas.cities': 'Városok',
+ 'atlas.regions': 'Régiók',
'atlas.noData': 'Még nincsenek utazási adatok',
'atlas.noDataHint': 'Hozz létre egy utazást és adj hozzá helyeket a világtérképhez',
'atlas.nextTrip': 'Következő utazás',
diff --git a/shared/src/i18n/hu/budget.ts b/shared/src/i18n/hu/budget.ts
index 8159a145b..182a3b44d 100644
--- a/shared/src/i18n/hu/budget.ts
+++ b/shared/src/i18n/hu/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'pl. vacsora, ajándékok, benzin…',
'costs.note': 'Megjegyzés',
'costs.notePlaceholder': 'Mit fedezett, ki tartozik mivel…',
+ 'costs.paymentNotePlaceholder': 'Készpénzzel, banki átutalással fizetve…',
'costs.addNote': 'Megjegyzés hozzáadása',
'costs.showNote': 'Megjegyzés megjelenítése',
'costs.hideNote': 'Megjegyzés elrejtése',
diff --git a/shared/src/i18n/hu/dayplan.ts b/shared/src/i18n/hu/dayplan.ts
index c4b0752db..d34d93c5c 100644
--- a/shared/src/i18n/hu/dayplan.ts
+++ b/shared/src/i18n/hu/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Térképek és GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Napi terv exportálása PDF-be',
+ 'dayplan.pdfMine': 'Saját tervem PDF-ként',
+ 'dayplan.pdfMineSub': 'Csak azok a programok és foglalások, amelyekben részt vesz',
'dayplan.gpxTooltip': 'Exportálás GPX-ként offline térképekhez és GPS-eszközökhöz',
'dayplan.gpxAll': 'A teljes utazás',
'dayplan.gpxPlaces': 'Csak a helyek',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Nap törlése',
'dayplan.deleteDayTitle': '{day} törlése?',
'dayplan.deleteDayBody': 'A nap kikerül az utazásból. Ez nem vonható vissza.',
+ 'dayplan.excludeFromRoute': 'Kihagyás az útvonalból',
+ 'dayplan.includeInRoute': 'Visszavétel az útvonalba',
+ 'dayplan.offRoute': 'Útvonalon kívül',
+ 'dayplan.offRouteHint': 'A napon és a térképen marad, de az útvonal kihagyja',
+ 'dayplan.clearDay': 'Nap kiürítése',
+ 'dayplan.clearDayTitle': '{day} kiürítése?',
+ 'dayplan.clearDayBody':
+ 'Minden hely lekerül erről a napról. A helyek az utazásban maradnak, a nap pedig megtartja a jegyzeteit és foglalásait.',
'dayplan.deleteDayEmpty': 'Erre a napra nincs semmi tervezve.',
'dayplan.impactPlaces': 'Tervezett helyek: {count}',
'dayplan.impactPlacesHint': 'A helyek listájában maradnak.',
diff --git a/shared/src/i18n/hu/inspector.ts b/shared/src/i18n/hu/inspector.ts
index 6c4004134..f04ac2c01 100644
--- a/shared/src/i18n/hu/inspector.ts
+++ b/shared/src/i18n/hu/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Függőben lévő foglalás',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigáció',
+ 'inspector.otherMapApp': 'Másik térképalkalmazás',
'inspector.openWith': 'Megnyitás ezzel',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Weboldal megnyitása',
diff --git a/shared/src/i18n/hu/journey.ts b/shared/src/i18n/hu/journey.ts
index d22c74d3b..1657b4911 100644
--- a/shared/src/i18n/hu/journey.ts
+++ b/shared/src/i18n/hu/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Útinaplók',
'journey.subtitle': 'Kövesse nyomon utazásait valós időben',
'journey.new': 'Új útinapló',
+ 'journey.lightbox.zoomIn': 'Nagyítás',
+ 'journey.lightbox.zoomOut': 'Kicsinyítés',
+ 'journey.lightbox.zoomReset': 'Vissza a teljes fotóhoz',
'journey.create': 'Létrehozás',
'journey.titlePlaceholder': 'Hová utazol?',
'journey.empty': 'Még nincsenek útinaplók',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Bejegyzés hozzáadása',
'journey.detail.jumpToTop': 'Vissza a tetejére',
'journey.detail.jumpToLast': 'Ugrás az utolsó bejegyzéshez',
+ 'journey.detail.dayJump': 'Ugrás egy napra',
+ 'journey.detail.dayJumpCount': '{count} nap',
'journey.detail.newEntry': 'Új bejegyzés',
'journey.detail.editEntry': 'Bejegyzés szerkesztése',
'journey.detail.noEntries': 'Még nincsenek bejegyzések',
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Lista',
'journey.studio.kind.icon': 'Ikon',
'journey.studio.duplicate': 'Duplikálás',
+ 'journey.studio.copyToPage': 'Másolás, bármelyik oldalra beilleszthető (Ctrl+C)',
+ 'journey.studio.paste': 'Beillesztés (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Előbb másoljon ki valamit, aztán illessze be bármelyik oldalra',
+ 'journey.studio.myLayouts': 'Saját elrendezéseim',
+ 'journey.studio.myLayoutsEmpty': 'Mentsen el egy elrendezett oldalt, és rendezzen el más oldalakat is ugyanígy. Azok fotói és szövegei megmaradnak.',
+ 'journey.studio.saveLayout': 'Oldal mentése elrendezésként',
+ 'journey.studio.saveLayoutHint': 'Megtartja az elrendezést fotók nélkül, a könyv minden szerkesztője számára',
+ 'journey.studio.saveLayoutFull': 'Ez a könyv legfeljebb 24 elrendezést tárol. Töröljön egyet, hogy újat menthessen.',
+ 'journey.studio.deleteLayout': 'Elrendezés törlése',
+ 'journey.studio.layoutName': 'Elrendezés',
+ 'journey.studio.builtInLayouts': 'Beépített',
'journey.studio.style': 'Stílus',
'journey.studio.shows': 'Megjelenítés',
'journey.studio.size': 'Méret',
@@ -625,6 +641,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'A megálló a naplóban marad, de nem számít bele a távolságba, az országokba és a Studio térképébe.',
'journey.entry.offRoute': 'Útvonalon kívül',
+ 'journey.entry.draft': 'Piszkozat',
+ 'journey.editor.draft': 'Piszkozat',
+ 'journey.editor.draftHint': 'Ezt a bejegyzést csak Ön és a többi közreműködő látja. A megosztott útinapló kihagyja, amíg ki nem kapcsolja ezt.',
+ 'journey.editor.tripSuggestionHint': 'Ez a nap ebbe az utazásba esik. Kapcsolja össze, és a helyei bekerülnek ebbe az útinaplóba.',
+ 'journey.editor.tripSuggestionLater': 'Most nem',
'journey.suggestions.dismiss': 'Javaslat elvetése',
'journey.suggestions.dismissed': 'Javaslat elvetve',
'journey.suggestions.restore': 'Elvetett javaslatok visszahozása',
diff --git a/shared/src/i18n/hu/map.ts b/shared/src/i18n/hu/map.ts
index 72d265fb7..0a652197a 100644
--- a/shared/src/i18n/hu/map.ts
+++ b/shared/src/i18n/hu/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'A tartózkodási helyed nem határozható meg.',
'map.location.timeout': 'A helymeghatározás túl sokáig tartott. Próbáld újra szabad ég alatt.',
'map.overview.show': 'Teljes utazás megjelenítése',
+ 'map.lock.lock': 'Térképnézet zárolása',
+ 'map.lock.unlock': 'A térkép kövesse a kijelölést',
'map.overview.hide': 'Teljes utazás elrejtése',
'map.overview.total': 'Teljes távolság',
'map.attribution': 'Térkép forrásai',
diff --git a/shared/src/i18n/hu/mobileTrip.ts b/shared/src/i18n/hu/mobileTrip.ts
index a2850371e..3cd35256e 100644
--- a/shared/src/i18n/hu/mobileTrip.ts
+++ b/shared/src/i18n/hu/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Térképen',
'mobileTrip.profileDriving': 'Autózás',
'mobileTrip.profileWalking': 'Gyaloglás',
+ 'mobileTrip.profileCycling': 'Kerékpározás',
'mobileTrip.renameDay': 'Nap átnevezése',
'mobileTrip.resBadge': 'Foglalás',
'mobileTrip.showOnMap': 'Megjelenítés térképen',
diff --git a/shared/src/i18n/hu/packing.ts b/shared/src/i18n/hu/packing.ts
index 19f539c6c..b23be60a5 100644
--- a/shared/src/i18n/hu/packing.ts
+++ b/shared/src/i18n/hu/packing.ts
@@ -10,6 +10,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Elem szerkesztése',
'packing.itemName': 'Név',
'packing.itemQuantity': 'Mennyiség',
+ 'packing.packedCount': '{packed} / {total} becsomagolva',
+ 'packing.packedMore': 'Eggyel több becsomagolása',
+ 'packing.packedLess': 'Eggyel kevesebb becsomagolása',
'packing.itemWeight': 'Súly (g)',
'packing.title': 'Csomagolási lista',
'packing.empty': 'A csomagolási lista üres',
diff --git a/shared/src/i18n/hu/places.ts b/shared/src/i18n/hu/places.ts
index 5f0bc98ba..4a9baf7e9 100644
--- a/shared/src/i18n/hu/places.ts
+++ b/shared/src/i18n/hu/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Teljes utazás megjelenítése',
'places.filterTracks': 'Nyomvonalak',
'places.filterByRating': 'Szűrés értékelés szerint',
+ 'places.filterByLocation': 'Szűrés ország vagy régió szerint',
+ 'places.allLocations': 'Minden ország',
'places.filterShow': 'Megjelenítés',
'places.clearSearch': 'Keresés törlése',
'places.yourRating': 'Az értékelésed',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategória',
'places.noCategory': 'Nincs kategória',
'places.newCategory': 'Új kategória',
+ 'places.openInMaps': 'Megnyitás térképen',
'places.categoryNamePlaceholder': 'Kategória neve',
'places.formTime': 'Időpont',
'places.startTime': 'Kezdés',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Helyek keresése...',
'places.mapsSearchError': 'Helykeresés sikertelen.',
'places.searchGoogleInstead': 'Nem a megfelelő hely? Keresés inkább a Google-ben',
+ 'places.nearby': 'Helyek a gombostű közelében',
+ 'places.nearbyNone': 'Semmi sem található a gombostű közelében',
'places.loadingDetails': 'Hely adatainak betöltése…',
'places.osmHint':
'OpenStreetMap keresés aktív (képek, nyitvatartás és értékelések nélkül). Bővített adatokhoz add meg a Google API kulcsot a beállításokban.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Helyek gazdagítása a Google-lel',
'places.enrichOnImportHint':
'Minden importált helyet megkeres, hogy fotókat, címet és elérhetőséget adjon hozzá. Google Maps-kulcs szükséges.',
+ 'places.enrichOnImportFileHint':
+ 'Utána minden importált pontot megkeres a Google-ön, és hozzáadja a fotóját, címét, weboldalát és telefonszámát. Az útvonalak és nyomvonalak változatlanok maradnak.',
'places.uploadImage': 'Kép feltöltése',
'places.changeImage': 'Kép módosítása',
'places.removeImage': 'Kép eltávolítása',
+ 'places.chooseImage': 'Kép kiválasztása',
+ 'places.uploadFromDevice': 'Feltöltés eszközről',
+ 'places.fromAttachedFiles': 'Csatolt fájlokból',
'places.imageUploadError': 'Nem sikerült feltölteni a képet',
'places.imageRemoveError': 'Nem sikerült eltávolítani a képet',
};
diff --git a/shared/src/i18n/hu/reservations.ts b/shared/src/i18n/hu/reservations.ts
index 833a1c873..87ef66be9 100644
--- a/shared/src/i18n/hu/reservations.ts
+++ b/shared/src/i18n/hu/reservations.ts
@@ -63,6 +63,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Egyéb',
'reservations.type.bus': 'Busz',
'reservations.type.ferry': 'Komp',
+ 'reservations.type.cable_car': 'Kötélpálya',
'reservations.type.bicycle': 'Kerékpár',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Tömegközlekedés',
@@ -198,6 +199,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Szűrők visszaállítása',
'reservations.noMatches': 'Nincs a szűrőknek megfelelő találat',
'reservations.viewOptions': 'Nézet beállításai',
+ 'reservations.exportCsv': 'Exportálás táblázatként (CSV)',
+ 'reservations.export.type': 'Típus',
+ 'reservations.export.title': 'Cím',
+ 'reservations.export.start': 'Kezdés',
+ 'reservations.export.end': 'Vége',
+ 'reservations.export.from': 'Honnan',
+ 'reservations.export.to': 'Hová',
+ 'reservations.export.location': 'Helyszín',
+ 'reservations.export.confirmation': 'Visszaigazolás',
+ 'reservations.export.notes': 'Jegyzetek',
'reservations.resetView': 'Nézet visszaállítása',
'reservations.group.label': 'Csoportosítás',
'reservations.group.status': 'Állapot',
diff --git a/shared/src/i18n/hu/settings.ts b/shared/src/i18n/hu/settings.ts
index b5867f5e2..a57a1276b 100644
--- a/shared/src/i18n/hu/settings.ts
+++ b/shared/src/i18n/hu/settings.ts
@@ -340,6 +340,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'A Költségek részben az összegek csak a megjelenítéshez lesznek erre a pénznemre átszámítva – az eredeti összegek nem változnak.',
'settings.currencyTrip': 'Az utazás pénzneme',
+ 'settings.placeLanguage': 'Helynevek',
+ 'settings.placeLanguageApp': 'Ugyanaz, mint az alkalmazás',
+ 'settings.placeLanguageHint': 'Ezen a nyelven válaszol a helykeresés, a javaslatok és a címek. Ha egy helynek nincs neve ezen a nyelven, a helyi neve jelenik meg.',
'settings.passkey.title': 'Passkey-k',
'settings.passkey.description':
'Jelentkezz be gyorsabban és adathalászat-állóan egy passkey-jel — ujjlenyomattal, arccal, PIN-kóddal vagy hardveres kulccsal. A jelszavad tartalékként megmarad.',
@@ -484,6 +487,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Indítás',
+ 'settings.dayDateFirst': 'Dátum elöl a napok fejlécében',
+ 'settings.compactUnplanned': 'Kompakt jelölők a nem tervezett helyekhez',
+ 'settings.compactUnplannedHint': 'Az egyik napra sem beosztott helyek kis, fotó nélküli jelölőként jelennek meg, így a tervezett megállók kiemelkednek.',
+ 'settings.dayDateFirstHint': 'Minden nap a naptári dátumával kezdődik, mellette pedig az „1. nap” felirat vagy a nap saját címe látható.',
'settings.startPage': 'Kezdőoldal',
'settings.startPageDashboard': 'Irányítópult',
'settings.startPageActiveTrip': 'Aktív utazás',
diff --git a/shared/src/i18n/hu/share.ts b/shared/src/i18n/hu/share.ts
index e847170a6..4309f1942 100644
--- a/shared/src/i18n/hu/share.ts
+++ b/shared/src/i18n/hu/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Csomagolás',
'share.permBudget': 'Költségek',
'share.permCollab': 'Csevegés',
+ 'share.options': 'Beállítások',
+ 'share.optTravelOnly': 'Csak utazás és szállás',
+ 'share.optTravelOnlyHint': 'Csak a közlekedést és a szállást mutatja, programok, napi jegyzetek és üres napok nélkül',
+ 'share.optHideImages': 'Fotók nélkül',
+ 'share.optHideImagesHint': 'Kihagyja a helyek fotóit a megosztott oldalról',
};
export default share;
diff --git a/shared/src/i18n/hu/shared.ts b/shared/src/i18n/hu/shared.ts
index 246779509..f2b5f7e6c 100644
--- a/shared/src/i18n/hu/shared.ts
+++ b/shared/src/i18n/hu/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Csevegés',
'shared.days': 'nap',
'shared.places': 'hely',
+ 'shared.unplanned': 'Még nincs megtervezve',
'shared.other': 'Egyéb',
'shared.totalBudget': 'Összes költség',
'shared.messages': 'üzenet',
diff --git a/shared/src/i18n/hu/todo.ts b/shared/src/i18n/hu/todo.ts
index 391baad7f..ad94b4825 100644
--- a/shared/src/i18n/hu/todo.ts
+++ b/shared/src/i18n/hu/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Nincs lista',
'todo.namePlaceholder': 'Feladat neve',
'todo.descriptionPlaceholder': 'Leírás (opcionális)',
+ 'todo.editDescription': 'Kattintson a szerkesztéshez, a linkek közvetlenül megnyílnak',
'todo.unassigned': 'Nem hozzárendelt',
'todo.noCategory': 'Nincs lista',
'todo.hasDescription': 'Van leírás',
diff --git a/shared/src/i18n/hu/undo.ts b/shared/src/i18n/hu/undo.ts
index 06ac4d88b..8eae3b411 100644
--- a/shared/src/i18n/hu/undo.ts
+++ b/shared/src/i18n/hu/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Visszavonás: {action}',
'undo.assignPlace': 'Hely naphoz rendelve',
'undo.removeAssignment': 'Hely eltávolítva a napról',
+ 'undo.clearDay': 'Nap kiürítve',
'undo.reorder': 'Helyek átrendezve',
'undo.optimize': 'Útvonal optimalizálva',
'undo.deletePlace': 'Hely törölve',
diff --git a/shared/src/i18n/id/atlas.ts b/shared/src/i18n/id/atlas.ts
index b85dfb14f..aafd3fad8 100644
--- a/shared/src/i18n/id/atlas.ts
+++ b/shared/src/i18n/id/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Negara',
'atlas.trips': 'Perjalanan',
'atlas.places': 'Tempat',
+ 'atlas.placesShow': 'Tampilkan tempat di negara ini',
+ 'atlas.placesSearch': 'Cari tempat',
+ 'atlas.placesNone': 'Tidak ada tempat yang cocok',
'atlas.unmark': 'Hapus',
'atlas.confirmMark': 'Tandai negara ini sebagai sudah dikunjungi?',
'atlas.confirmUnmark': 'Hapus negara ini dari daftar kunjunganmu?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Hari',
'atlas.visitedCountries': 'Negara yang Dikunjungi',
'atlas.cities': 'Kota',
+ 'atlas.regions': 'Wilayah',
'atlas.noData': 'Belum ada data perjalanan',
'atlas.noDataHint': 'Buat perjalanan dan tambahkan tempat untuk melihat peta duniamu',
'atlas.nextTrip': 'Perjalanan berikutnya',
diff --git a/shared/src/i18n/id/budget.ts b/shared/src/i18n/id/budget.ts
index 69a5cbc8c..2881de1f6 100644
--- a/shared/src/i18n/id/budget.ts
+++ b/shared/src/i18n/id/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'mis. Makan malam, oleh-oleh, bensin…',
'costs.note': 'Catatan',
'costs.notePlaceholder': 'Apa saja yang termasuk, siapa berutang apa…',
+ 'costs.paymentNotePlaceholder': 'Dibayar tunai, lewat transfer bank…',
'costs.addNote': 'Tambah catatan',
'costs.showNote': 'Tampilkan catatan',
'costs.hideNote': 'Sembunyikan catatan',
diff --git a/shared/src/i18n/id/dayplan.ts b/shared/src/i18n/id/dayplan.ts
index f301795b7..138f3a293 100644
--- a/shared/src/i18n/id/dayplan.ts
+++ b/shared/src/i18n/id/dayplan.ts
@@ -66,6 +66,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Peta & GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Ekspor rencana hari sebagai PDF',
+ 'dayplan.pdfMine': 'Rencanaku sebagai PDF',
+ 'dayplan.pdfMineSub': 'Hanya aktivitas dan pemesanan yang kamu ikuti',
'dayplan.gpxTooltip': 'Ekspor sebagai GPX untuk peta offline dan perangkat GPS',
'dayplan.gpxAll': 'Seluruh perjalanan',
'dayplan.gpxPlaces': 'Hanya tempat',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Hapus hari',
'dayplan.deleteDayTitle': 'Hapus {day}?',
'dayplan.deleteDayBody': 'Hari tersebut dihapus dari perjalanan. Tindakan ini tidak dapat dibatalkan.',
+ 'dayplan.excludeFromRoute': 'Keluarkan dari rute',
+ 'dayplan.includeInRoute': 'Masukkan kembali ke rute',
+ 'dayplan.offRoute': 'Di luar rute',
+ 'dayplan.offRouteHint': 'Tetap ada di hari dan di peta, tetapi rute melewatinya',
+ 'dayplan.clearDay': 'Kosongkan hari',
+ 'dayplan.clearDayTitle': 'Kosongkan {day}?',
+ 'dayplan.clearDayBody':
+ 'Semua tempat dikeluarkan dari hari ini. Tempat tetap ada di perjalanan, dan hari ini tetap menyimpan catatan serta pemesanannya.',
'dayplan.deleteDayEmpty': 'Tidak ada rencana pada hari tersebut.',
'dayplan.impactPlaces': 'Tempat yang direncanakan: {count}',
'dayplan.impactPlacesHint': 'Tempat tetap ada di daftar tempat.',
diff --git a/shared/src/i18n/id/inspector.ts b/shared/src/i18n/id/inspector.ts
index 0a88e0146..7b5fff4b9 100644
--- a/shared/src/i18n/id/inspector.ts
+++ b/shared/src/i18n/id/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Reservasi Menunggu',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigasi',
+ 'inspector.otherMapApp': 'Aplikasi peta lain',
'inspector.openWith': 'Buka dengan',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.saveToCollection': 'Simpan ke Koleksi',
diff --git a/shared/src/i18n/id/journey.ts b/shared/src/i18n/id/journey.ts
index a67a9d60b..315a2ece4 100644
--- a/shared/src/i18n/id/journey.ts
+++ b/shared/src/i18n/id/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journey',
'journey.subtitle': 'Lacak perjalananmu saat terjadi',
'journey.new': 'Journey Baru',
+ 'journey.lightbox.zoomIn': 'Perbesar',
+ 'journey.lightbox.zoomOut': 'Perkecil',
+ 'journey.lightbox.zoomReset': 'Kembali ke foto utuh',
'journey.create': 'Buat',
'journey.titlePlaceholder': 'Ke mana kamu pergi?',
'journey.empty': 'Belum ada journey',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Tambah Entri',
'journey.detail.jumpToTop': 'Kembali ke atas',
'journey.detail.jumpToLast': 'Ke entri terakhir',
+ 'journey.detail.dayJump': 'Lompat ke hari',
+ 'journey.detail.dayJumpCount': '{count} hari',
'journey.detail.newEntry': 'Entri Baru',
'journey.detail.editEntry': 'Edit Entri',
'journey.detail.noEntries': 'Belum ada entri',
@@ -431,6 +436,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Daftar',
'journey.studio.kind.icon': 'Ikon',
'journey.studio.duplicate': 'Duplikat',
+ 'journey.studio.copyToPage': 'Salin, untuk ditempel di halaman mana pun (Ctrl+C)',
+ 'journey.studio.paste': 'Tempel (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Salin sesuatu dulu, lalu tempel di halaman mana pun',
+ 'journey.studio.myLayouts': 'Tata letakku',
+ 'journey.studio.myLayoutsEmpty': 'Simpan halaman yang sudah kamu susun dan tata halaman lain dengan cara yang sama. Foto dan teksnya tetap.',
+ 'journey.studio.saveLayout': 'Simpan halaman ini sebagai tata letak',
+ 'journey.studio.saveLayoutHint': 'Menyimpan susunannya tanpa foto, untuk semua editor buku ini',
+ 'journey.studio.saveLayoutFull': 'Buku ini menyimpan hingga 24 tata letak. Hapus satu untuk menyimpan yang lain.',
+ 'journey.studio.deleteLayout': 'Hapus tata letak',
+ 'journey.studio.layoutName': 'Tata letak',
+ 'journey.studio.builtInLayouts': 'Bawaan',
'journey.studio.style': 'Gaya',
'journey.studio.shows': 'Tampilkan',
'journey.studio.size': 'Ukuran',
@@ -625,6 +641,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Perhentian tetap ada di jurnal tetapi tidak dihitung untuk jarak, negara, atau peta di Studio.',
'journey.entry.offRoute': 'Di luar rute',
+ 'journey.entry.draft': 'Draf',
+ 'journey.editor.draft': 'Draf',
+ 'journey.editor.draftHint': 'Hanya kamu dan kontributor lain yang melihat entri ini. Journey yang dibagikan tidak menampilkannya sampai kamu mematikan opsi ini.',
+ 'journey.editor.tripSuggestionHint': 'Hari ini termasuk dalam perjalanan ini. Tautkan, dan tempat-tempatnya akan masuk ke journey ini.',
+ 'journey.editor.tripSuggestionLater': 'Nanti saja',
'journey.suggestions.dismiss': 'Abaikan saran ini',
'journey.suggestions.dismissed': 'Saran diabaikan',
'journey.suggestions.restore': 'Kembalikan saran yang diabaikan',
diff --git a/shared/src/i18n/id/map.ts b/shared/src/i18n/id/map.ts
index 81df858ee..922dda5a2 100644
--- a/shared/src/i18n/id/map.ts
+++ b/shared/src/i18n/id/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Lokasi Anda tidak dapat ditentukan.',
'map.location.timeout': 'Penentuan lokasi terlalu lama. Coba lagi di tempat dengan pandangan langit yang lebih terbuka.',
'map.overview.show': 'Tampilkan seluruh perjalanan',
+ 'map.lock.lock': 'Kunci tampilan peta',
+ 'map.lock.unlock': 'Biarkan peta mengikuti pilihan',
'map.overview.hide': 'Sembunyikan seluruh perjalanan',
'map.overview.total': 'Jarak total',
'map.attribution': 'Kredit peta',
diff --git a/shared/src/i18n/id/mobileTrip.ts b/shared/src/i18n/id/mobileTrip.ts
index e0ea095da..b4eac3acc 100644
--- a/shared/src/i18n/id/mobileTrip.ts
+++ b/shared/src/i18n/id/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Di peta',
'mobileTrip.profileDriving': 'Berkendara',
'mobileTrip.profileWalking': 'Jalan kaki',
+ 'mobileTrip.profileCycling': 'Bersepeda',
'mobileTrip.renameDay': 'Ubah nama hari',
'mobileTrip.resBadge': 'Reservasi',
'mobileTrip.showOnMap': 'Tampilkan di peta',
diff --git a/shared/src/i18n/id/packing.ts b/shared/src/i18n/id/packing.ts
index ee2398772..e6670c87a 100644
--- a/shared/src/i18n/id/packing.ts
+++ b/shared/src/i18n/id/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Edit item',
'packing.itemName': 'Nama',
'packing.itemQuantity': 'Jumlah',
+ 'packing.packedCount': '{packed} dari {total} sudah dikemas',
+ 'packing.packedMore': 'Kemas satu lagi',
+ 'packing.packedLess': 'Kurangi satu yang dikemas',
'packing.itemWeight': 'Berat (g)',
'packing.title': 'Daftar Bawaan',
'packing.empty': 'Daftar bawaan kosong',
diff --git a/shared/src/i18n/id/places.ts b/shared/src/i18n/id/places.ts
index 00329be4e..51fd45dc0 100644
--- a/shared/src/i18n/id/places.ts
+++ b/shared/src/i18n/id/places.ts
@@ -51,6 +51,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Tampilkan seluruh perjalanan',
'places.filterTracks': 'Trek',
'places.filterByRating': 'Saring menurut penilaian',
+ 'places.filterByLocation': 'Saring menurut negara atau wilayah',
+ 'places.allLocations': 'Semua negara',
'places.filterShow': 'Tampilkan',
'places.clearSearch': 'Hapus pencarian',
'places.yourRating': 'Rating kamu',
@@ -77,6 +79,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategori',
'places.noCategory': 'Tanpa Kategori',
'places.newCategory': 'Kategori baru',
+ 'places.openInMaps': 'Buka di peta',
'places.categoryNamePlaceholder': 'Nama kategori',
'places.formTime': 'Waktu',
'places.startTime': 'Mulai',
@@ -93,6 +96,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Cari tempat...',
'places.mapsSearchError': 'Pencarian tempat gagal.',
'places.searchGoogleInstead': 'Bukan tempat yang tepat? Cari di Google saja',
+ 'places.nearby': 'Tempat di dekat pin ini',
+ 'places.nearbyNone': 'Tidak ada yang ditemukan di dekat pin ini',
'places.loadingDetails': 'Memuat detail tempat…',
'places.osmHint':
'Menggunakan pencarian OpenStreetMap (tanpa foto, jam buka, atau penilaian). Tambahkan Google API key di pengaturan untuk detail lengkap.',
@@ -131,9 +136,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Perkaya tempat via Google',
'places.enrichOnImportHint':
'Mencari setiap tempat yang diimpor untuk menambahkan foto, alamat, dan kontak. Memerlukan kunci Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Setelah impor, setiap titik dicari di Google lalu ditambahkan foto, alamat, situs web, dan nomor teleponnya. Jalur dan lintasan tetap seperti semula.',
'places.uploadImage': 'Unggah gambar',
'places.changeImage': 'Ganti gambar',
'places.removeImage': 'Hapus gambar',
+ 'places.chooseImage': 'Pilih gambar',
+ 'places.uploadFromDevice': 'Unggah dari perangkat',
+ 'places.fromAttachedFiles': 'Dari berkas terlampir',
'places.imageUploadError': 'Tidak dapat mengunggah gambar',
'places.imageRemoveError': 'Tidak dapat menghapus gambar',
};
diff --git a/shared/src/i18n/id/reservations.ts b/shared/src/i18n/id/reservations.ts
index 8e71aad40..5f0b677e9 100644
--- a/shared/src/i18n/id/reservations.ts
+++ b/shared/src/i18n/id/reservations.ts
@@ -62,6 +62,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Lainnya',
'reservations.type.bus': 'Bus',
'reservations.type.ferry': 'Feri',
+ 'reservations.type.cable_car': 'Kereta gantung',
'reservations.type.bicycle': 'Sepeda',
'reservations.type.taxi': 'Taksi',
'reservations.type.transit': 'Transportasi umum',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Atur ulang filter',
'reservations.noMatches': 'Tidak ada yang cocok dengan filter ini',
'reservations.viewOptions': 'Opsi tampilan',
+ 'reservations.exportCsv': 'Ekspor sebagai spreadsheet (CSV)',
+ 'reservations.export.type': 'Jenis',
+ 'reservations.export.title': 'Judul',
+ 'reservations.export.start': 'Mulai',
+ 'reservations.export.end': 'Selesai',
+ 'reservations.export.from': 'Dari',
+ 'reservations.export.to': 'Ke',
+ 'reservations.export.location': 'Lokasi',
+ 'reservations.export.confirmation': 'Konfirmasi',
+ 'reservations.export.notes': 'Catatan',
'reservations.resetView': 'Atur ulang tampilan',
'reservations.group.label': 'Kelompokkan menurut',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/id/settings.ts b/shared/src/i18n/id/settings.ts
index 4751290fd..704e4bb1a 100644
--- a/shared/src/i18n/id/settings.ts
+++ b/shared/src/i18n/id/settings.ts
@@ -337,6 +337,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Jumlah di Biaya ditampilkan dalam mata uang ini hanya untuk tampilan — jumlah aslinya tidak berubah.',
'settings.currencyTrip': 'Mata uang perjalanan',
+ 'settings.placeLanguage': 'Nama tempat',
+ 'settings.placeLanguageApp': 'Sama dengan aplikasi',
+ 'settings.placeLanguageHint': 'Bahasa yang dipakai untuk pencarian tempat, saran, dan alamat. Jika suatu tempat tidak punya nama dalam bahasa itu, nama lokalnya yang ditampilkan.',
'settings.passkey.title': 'Passkey',
'settings.passkey.description':
'Masuk lebih cepat dan tahan terhadap phishing dengan passkey — sidik jari, wajah, PIN, atau kunci keamanan fisik kamu. Kata sandimu tetap tersedia sebagai cadangan.',
@@ -482,6 +485,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Mulai',
+ 'settings.dayDateFirst': 'Tanggal di depan pada judul hari',
+ 'settings.compactUnplanned': 'Penanda ringkas untuk tempat yang belum direncanakan',
+ 'settings.compactUnplannedHint': 'Tempat yang belum dimasukkan ke hari mana pun tampil sebagai penanda kecil tanpa foto, sehingga perhentian yang direncanakan lebih menonjol.',
+ 'settings.dayDateFirstHint': 'Awali setiap hari dengan tanggal kalendernya dan tampilkan "Hari 1" atau judul hari itu di sebelahnya.',
'settings.startPage': 'Halaman awal',
'settings.startPageDashboard': 'Dasbor',
'settings.startPageActiveTrip': 'Perjalanan aktif',
diff --git a/shared/src/i18n/id/share.ts b/shared/src/i18n/id/share.ts
index 8a2280b29..7a7660871 100644
--- a/shared/src/i18n/id/share.ts
+++ b/shared/src/i18n/id/share.ts
@@ -12,5 +12,11 @@ const share: TranslationStrings = {
'share.permPacking': 'Bawaan',
'share.permBudget': 'Biaya',
'share.permCollab': 'Chat',
+ 'share.options': 'Opsi',
+ 'share.optTravelOnly': 'Hanya perjalanan & penginapan',
+ 'share.optTravelOnlyHint':
+ 'Hanya menampilkan transportasi dan akomodasi, tanpa aktivitas, catatan hari, dan hari kosong',
+ 'share.optHideImages': 'Tanpa foto',
+ 'share.optHideImagesHint': 'Foto tempat tidak ditampilkan di halaman yang dibagikan',
};
export default share;
diff --git a/shared/src/i18n/id/shared.ts b/shared/src/i18n/id/shared.ts
index b2511da6a..970ee5a40 100644
--- a/shared/src/i18n/id/shared.ts
+++ b/shared/src/i18n/id/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'hari',
'shared.places': 'tempat',
+ 'shared.unplanned': 'Belum direncanakan',
'shared.other': 'Lainnya',
'shared.totalBudget': 'Total Biaya',
'shared.messages': 'pesan',
diff --git a/shared/src/i18n/id/todo.ts b/shared/src/i18n/id/todo.ts
index 11ef29a27..c501a1b54 100644
--- a/shared/src/i18n/id/todo.ts
+++ b/shared/src/i18n/id/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Tanpa daftar',
'todo.namePlaceholder': 'Nama tugas',
'todo.descriptionPlaceholder': 'Deskripsi (opsional)',
+ 'todo.editDescription': 'Klik untuk mengedit, tautan langsung terbuka',
'todo.unassigned': 'Belum ditugaskan',
'todo.noCategory': 'Tanpa daftar',
'todo.hasDescription': 'Ada deskripsi',
diff --git a/shared/src/i18n/id/undo.ts b/shared/src/i18n/id/undo.ts
index bf4a23910..2645177af 100644
--- a/shared/src/i18n/id/undo.ts
+++ b/shared/src/i18n/id/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Batalkan: {action}',
'undo.assignPlace': 'Tempat ditambahkan ke hari',
'undo.removeAssignment': 'Tempat dihapus dari hari',
+ 'undo.clearDay': 'Hari dikosongkan',
'undo.reorder': 'Tempat diurutkan ulang',
'undo.optimize': 'Rute dioptimalkan',
'undo.deletePlace': 'Tempat dihapus',
diff --git a/shared/src/i18n/it/atlas.ts b/shared/src/i18n/it/atlas.ts
index e2a265fca..443fbe512 100644
--- a/shared/src/i18n/it/atlas.ts
+++ b/shared/src/i18n/it/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Paesi',
'atlas.trips': 'Viaggi',
'atlas.places': 'Luoghi',
+ 'atlas.placesShow': 'Mostra i luoghi di questo paese',
+ 'atlas.placesSearch': 'Cerca luoghi',
+ 'atlas.placesNone': 'Nessun luogo corrisponde',
'atlas.unmark': 'Rimuovi',
'atlas.confirmMark': 'Segnare questo paese come visitato?',
'atlas.confirmUnmark': 'Rimuovere questo paese dalla tua lista dei visitati?',
@@ -30,6 +33,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Giorni',
'atlas.visitedCountries': 'Paesi visitati',
'atlas.cities': 'Città',
+ 'atlas.regions': 'Regioni',
'atlas.noData': 'Ancora nessun dato di viaggio',
'atlas.noDataHint': 'Crea un viaggio e aggiungi luoghi per vedere la tua mappa del mondo',
'atlas.nextTrip': 'Prossimo viaggio',
diff --git a/shared/src/i18n/it/budget.ts b/shared/src/i18n/it/budget.ts
index de9213317..bd83689b2 100644
--- a/shared/src/i18n/it/budget.ts
+++ b/shared/src/i18n/it/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'es. Cena, souvenir, benzina…',
'costs.note': 'Nota',
'costs.notePlaceholder': 'Cosa comprendeva, chi deve cosa…',
+ 'costs.paymentNotePlaceholder': 'Pagato in contanti, con bonifico…',
'costs.addNote': 'Aggiungi nota',
'costs.showNote': 'Mostra nota',
'costs.hideNote': 'Nascondi nota',
diff --git a/shared/src/i18n/it/dayplan.ts b/shared/src/i18n/it/dayplan.ts
index f6e998139..a5cbead34 100644
--- a/shared/src/i18n/it/dayplan.ts
+++ b/shared/src/i18n/it/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Mappe e GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Esporta il programma del giorno come PDF',
+ 'dayplan.pdfMine': 'Il mio programma in PDF',
+ 'dayplan.pdfMineSub': 'Solo le attività e le prenotazioni a cui partecipi',
'dayplan.gpxTooltip': 'Esporta in GPX per mappe offline e dispositivi GPS',
'dayplan.gpxAll': 'Tutto il viaggio',
'dayplan.gpxPlaces': 'Solo i luoghi',
@@ -93,6 +95,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Elimina giorno',
'dayplan.deleteDayTitle': 'Eliminare {day}?',
'dayplan.deleteDayBody': 'Il giorno viene rimosso dal viaggio. Non si può annullare.',
+ 'dayplan.excludeFromRoute': 'Escludi dal percorso',
+ 'dayplan.includeInRoute': 'Riaggiungi al percorso',
+ 'dayplan.offRoute': 'Fuori percorso',
+ 'dayplan.offRouteHint': 'Resta nel giorno e sulla mappa, ma il percorso lo salta',
+ 'dayplan.clearDay': 'Svuota giorno',
+ 'dayplan.clearDayTitle': 'Svuotare {day}?',
+ 'dayplan.clearDayBody':
+ 'Tutti i luoghi vengono tolti da questo giorno. I luoghi restano nel viaggio e il giorno conserva note e prenotazioni.',
'dayplan.deleteDayEmpty': "Non c'è nulla di pianificato in questo giorno.",
'dayplan.impactPlaces': 'Luoghi pianificati: {count}',
'dayplan.impactPlacesHint': "Restano nell'elenco dei luoghi.",
diff --git a/shared/src/i18n/it/inspector.ts b/shared/src/i18n/it/inspector.ts
index d8f914b6b..856b56563 100644
--- a/shared/src/i18n/it/inspector.ts
+++ b/shared/src/i18n/it/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Prenotazione in attesa',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigazione',
+ 'inspector.otherMapApp': 'Altra app di mappe',
'inspector.openWith': 'Apri con',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Apri sito web',
diff --git a/shared/src/i18n/it/journey.ts b/shared/src/i18n/it/journey.ts
index c20e6432b..43e86b91e 100644
--- a/shared/src/i18n/it/journey.ts
+++ b/shared/src/i18n/it/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Diario di viaggio',
'journey.subtitle': 'Segui i tuoi viaggi in tempo reale',
'journey.new': 'Nuovo diario',
+ 'journey.lightbox.zoomIn': 'Ingrandisci',
+ 'journey.lightbox.zoomOut': 'Riduci',
+ 'journey.lightbox.zoomReset': 'Torna alla foto intera',
'journey.create': 'Crea',
'journey.titlePlaceholder': 'Dove stai andando?',
'journey.empty': 'Nessun diario ancora',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Aggiungi voce',
'journey.detail.jumpToTop': 'Torna in alto',
'journey.detail.jumpToLast': 'Vai all’ultima voce',
+ 'journey.detail.dayJump': 'Vai a un giorno',
+ 'journey.detail.dayJumpCount': '{count} giorni',
'journey.detail.newEntry': 'Nuova voce',
'journey.detail.editEntry': 'Modifica voce',
'journey.detail.noEntries': 'Nessuna voce ancora',
@@ -432,6 +437,18 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Elenco',
'journey.studio.kind.icon': 'Icona',
'journey.studio.duplicate': 'Duplica',
+ 'journey.studio.copyToPage': 'Copia, per incollare su qualsiasi pagina (Ctrl+C)',
+ 'journey.studio.paste': 'Incolla (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Copia prima qualcosa, poi incollalo su qualsiasi pagina',
+ 'journey.studio.myLayouts': 'Le mie disposizioni',
+ 'journey.studio.myLayoutsEmpty':
+ 'Conserva una pagina che hai sistemato e disponi le altre pagine allo stesso modo. Le loro foto e i testi restano.',
+ 'journey.studio.saveLayout': 'Salva questa pagina come disposizione',
+ 'journey.studio.saveLayoutHint': 'Conserva la disposizione senza le foto, per chiunque modifichi questo libro',
+ 'journey.studio.saveLayoutFull': 'Questo libro conserva fino a 24 disposizioni. Eliminane una per salvarne un’altra.',
+ 'journey.studio.deleteLayout': 'Elimina disposizione',
+ 'journey.studio.layoutName': 'Disposizione',
+ 'journey.studio.builtInLayouts': 'Predefinite',
'journey.studio.style': 'Stile',
'journey.studio.shows': 'Mostra',
'journey.studio.size': 'Dimensione',
@@ -626,6 +643,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'La tappa resta nel diario ma non conta per la distanza, i paesi o la mappa in Studio.',
'journey.entry.offRoute': 'Fuori percorso',
+ 'journey.entry.draft': 'Bozza',
+ 'journey.editor.draft': 'Bozza',
+ 'journey.editor.draftHint':
+ 'Solo tu e gli altri contributori vedete questa voce. Il diario condiviso la esclude finché non disattivi questa opzione.',
+ 'journey.editor.tripSuggestionHint':
+ 'Questo giorno rientra in questo viaggio. Collegalo e i suoi luoghi entreranno in questo diario.',
+ 'journey.editor.tripSuggestionLater': 'Non ora',
'journey.suggestions.dismiss': 'Scarta questo suggerimento',
'journey.suggestions.dismissed': 'Suggerimento scartato',
'journey.suggestions.restore': 'Recupera i suggerimenti scartati',
diff --git a/shared/src/i18n/it/map.ts b/shared/src/i18n/it/map.ts
index 26e02c19e..77137c466 100644
--- a/shared/src/i18n/it/map.ts
+++ b/shared/src/i18n/it/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Impossibile determinare la tua posizione.',
'map.location.timeout': 'La localizzazione ha richiesto troppo tempo. Riprova con una visuale più libera del cielo.',
'map.overview.show': 'Mostra tutto il viaggio',
+ 'map.lock.lock': 'Blocca la vista della mappa',
+ 'map.lock.unlock': 'Lascia che la mappa segua la selezione',
'map.overview.hide': 'Nascondi tutto il viaggio',
'map.overview.total': 'Distanza totale',
'map.attribution': 'Crediti della mappa',
diff --git a/shared/src/i18n/it/mobileTrip.ts b/shared/src/i18n/it/mobileTrip.ts
index 296e6fad1..8a88f6b25 100644
--- a/shared/src/i18n/it/mobileTrip.ts
+++ b/shared/src/i18n/it/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Sulla mappa',
'mobileTrip.profileDriving': 'In auto',
'mobileTrip.profileWalking': 'A piedi',
+ 'mobileTrip.profileCycling': 'In bici',
'mobileTrip.renameDay': 'Rinomina giorno',
'mobileTrip.resBadge': 'Prenotazione',
'mobileTrip.showOnMap': 'Mostra sulla mappa',
diff --git a/shared/src/i18n/it/packing.ts b/shared/src/i18n/it/packing.ts
index c519df77c..8172f4312 100644
--- a/shared/src/i18n/it/packing.ts
+++ b/shared/src/i18n/it/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Modifica elemento',
'packing.itemName': 'Nome',
'packing.itemQuantity': 'Quantità',
+ 'packing.packedCount': '{packed} di {total} in valigia',
+ 'packing.packedMore': 'Uno in più in valigia',
+ 'packing.packedLess': 'Uno in meno in valigia',
'packing.itemWeight': 'Peso (g)',
'packing.title': 'Lista valigia',
'packing.empty': 'La lista valigia è vuota',
diff --git a/shared/src/i18n/it/places.ts b/shared/src/i18n/it/places.ts
index 2201f57ab..b8e7793b8 100644
--- a/shared/src/i18n/it/places.ts
+++ b/shared/src/i18n/it/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Mostra tutto il viaggio',
'places.filterTracks': 'Tracce',
'places.filterByRating': 'Filtra per valutazione',
+ 'places.filterByLocation': 'Filtra per paese o regione',
+ 'places.allLocations': 'Tutti i paesi',
'places.filterShow': 'Mostra',
'places.clearSearch': 'Cancella ricerca',
'places.yourRating': 'La tua valutazione',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Categoria',
'places.noCategory': 'Nessuna categoria',
'places.newCategory': 'Nuova categoria',
+ 'places.openInMaps': 'Apri nelle mappe',
'places.categoryNamePlaceholder': 'Nome categoria',
'places.formTime': 'Ora',
'places.startTime': 'Inizio',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Cerca luoghi...',
'places.mapsSearchError': 'Impossibile cercare i luoghi.',
'places.searchGoogleInstead': 'Non è il posto giusto? Cerca su Google',
+ 'places.nearby': 'Luoghi vicino a questo segnaposto',
+ 'places.nearbyNone': 'Nessun risultato vicino a questo segnaposto',
'places.loadingDetails': 'Caricamento dettagli del luogo…',
'places.osmHint':
'Uso della ricerca OpenStreetMap (senza foto, orari di apertura o valutazioni). Aggiungi una chiave API Google nelle impostazioni per i dettagli completi.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Arricchisci i luoghi con Google',
'places.enrichOnImportHint':
'Cerca ogni luogo importato per aggiungere foto, indirizzo e contatti. Usa la tua chiave Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Cerca poi ogni punto importato su Google e aggiunge foto, indirizzo, sito web e telefono. Percorsi e tracce restano come sono.',
'places.uploadImage': 'Carica immagine',
'places.changeImage': 'Cambia immagine',
'places.removeImage': 'Rimuovi immagine',
+ 'places.chooseImage': 'Scegli un’immagine',
+ 'places.uploadFromDevice': 'Carica dal dispositivo',
+ 'places.fromAttachedFiles': 'Dai file allegati',
'places.imageUploadError': "Impossibile caricare l'immagine",
'places.imageRemoveError': "Impossibile rimuovere l'immagine",
};
diff --git a/shared/src/i18n/it/reservations.ts b/shared/src/i18n/it/reservations.ts
index d778c7437..053033615 100644
--- a/shared/src/i18n/it/reservations.ts
+++ b/shared/src/i18n/it/reservations.ts
@@ -62,6 +62,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Altro',
'reservations.type.bus': 'Autobus',
'reservations.type.ferry': 'Traghetto',
+ 'reservations.type.cable_car': 'Funivia',
'reservations.type.bicycle': 'Bicicletta',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Trasporto pubblico',
@@ -195,6 +196,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Reimposta filtri',
'reservations.noMatches': 'Nessun risultato con questi filtri',
'reservations.viewOptions': 'Opzioni di visualizzazione',
+ 'reservations.exportCsv': 'Esporta come foglio di calcolo (CSV)',
+ 'reservations.export.type': 'Tipo',
+ 'reservations.export.title': 'Titolo',
+ 'reservations.export.start': 'Inizio',
+ 'reservations.export.end': 'Fine',
+ 'reservations.export.from': 'Da',
+ 'reservations.export.to': 'A',
+ 'reservations.export.location': 'Luogo',
+ 'reservations.export.confirmation': 'Conferma',
+ 'reservations.export.notes': 'Note',
'reservations.resetView': 'Reimposta vista',
'reservations.group.label': 'Raggruppa per',
'reservations.group.status': 'Stato',
diff --git a/shared/src/i18n/it/settings.ts b/shared/src/i18n/it/settings.ts
index d35889724..930fb6068 100644
--- a/shared/src/i18n/it/settings.ts
+++ b/shared/src/i18n/it/settings.ts
@@ -339,6 +339,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Gli importi in Costi vengono mostrati convertiti in questa valuta solo per la visualizzazione — gli importi originali restano invariati.',
'settings.currencyTrip': 'Valuta del viaggio',
+ 'settings.placeLanguage': 'Nomi dei luoghi',
+ 'settings.placeLanguageApp': 'Come l’app',
+ 'settings.placeLanguageHint':
+ 'La lingua in cui rispondono la ricerca dei luoghi, i suggerimenti e gli indirizzi. Se un luogo non ha un nome in quella lingua, viene mostrato il nome locale.',
'settings.passkey.title': 'Passkey',
'settings.passkey.description':
'Accedi più velocemente e in modo resistente al phishing con una passkey — la tua impronta digitale, il volto, il PIN o una chiave hardware. La tua password resta come riserva.',
@@ -484,6 +488,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Avvio',
+ 'settings.dayDateFirst': 'Data prima nei titoli dei giorni',
+ 'settings.compactUnplanned': 'Segnaposti compatti per i luoghi non pianificati',
+ 'settings.compactUnplannedHint':
+ 'I luoghi non pianificati in nessun giorno appaiono come piccoli segnaposti senza foto, così le tappe pianificate risaltano.',
+ 'settings.dayDateFirstHint':
+ 'Inizia ogni giorno con la data del calendario e mostra accanto «Giorno 1» o il titolo del giorno.',
'settings.startPage': 'Pagina iniziale',
'settings.startPageDashboard': 'Dashboard',
'settings.startPageActiveTrip': 'Viaggio attivo',
diff --git a/shared/src/i18n/it/share.ts b/shared/src/i18n/it/share.ts
index 0fd53b2d3..4f6217f80 100644
--- a/shared/src/i18n/it/share.ts
+++ b/shared/src/i18n/it/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Valigia',
'share.permBudget': 'Costi',
'share.permCollab': 'Chat',
+ 'share.options': 'Opzioni',
+ 'share.optTravelOnly': 'Solo trasporti e alloggi',
+ 'share.optTravelOnlyHint': 'Mostra solo trasporti e alloggi, senza attività, note del giorno e giorni vuoti',
+ 'share.optHideImages': 'Senza foto',
+ 'share.optHideImagesHint': 'Esclude le foto dei luoghi dalla pagina condivisa',
};
export default share;
diff --git a/shared/src/i18n/it/shared.ts b/shared/src/i18n/it/shared.ts
index cf1218daf..8ad701406 100644
--- a/shared/src/i18n/it/shared.ts
+++ b/shared/src/i18n/it/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'giorni',
'shared.places': 'luoghi',
+ 'shared.unplanned': 'Non ancora pianificato',
'shared.other': 'Altro',
'shared.totalBudget': 'Costi totali',
'shared.messages': 'messaggi',
diff --git a/shared/src/i18n/it/todo.ts b/shared/src/i18n/it/todo.ts
index 5fd56e11a..ced8a7486 100644
--- a/shared/src/i18n/it/todo.ts
+++ b/shared/src/i18n/it/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Nessuna lista',
'todo.namePlaceholder': 'Nome attività',
'todo.descriptionPlaceholder': 'Descrizione (facoltativa)',
+ 'todo.editDescription': 'Clicca per modificare, i link si aprono direttamente',
'todo.unassigned': 'Non assegnato',
'todo.noCategory': 'Nessuna lista',
'todo.hasDescription': 'Ha descrizione',
diff --git a/shared/src/i18n/it/undo.ts b/shared/src/i18n/it/undo.ts
index 07bd7df8e..79a24519e 100644
--- a/shared/src/i18n/it/undo.ts
+++ b/shared/src/i18n/it/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Annulla: {action}',
'undo.assignPlace': 'Luogo assegnato al giorno',
'undo.removeAssignment': 'Luogo rimosso dal giorno',
+ 'undo.clearDay': 'Giorno svuotato',
'undo.reorder': 'Luoghi riordinati',
'undo.optimize': 'Percorso ottimizzato',
'undo.deletePlace': 'Luogo eliminato',
diff --git a/shared/src/i18n/ja/atlas.ts b/shared/src/i18n/ja/atlas.ts
index 7fcdd554a..74683e643 100644
--- a/shared/src/i18n/ja/atlas.ts
+++ b/shared/src/i18n/ja/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': '国',
'atlas.trips': '旅行',
'atlas.places': '場所',
+ 'atlas.placesShow': 'この国の場所を表示',
+ 'atlas.placesSearch': '場所を検索',
+ 'atlas.placesNone': '一致する場所がありません',
'atlas.unmark': '削除',
'atlas.confirmMark': 'この国を訪問済みにしますか?',
'atlas.confirmUnmark': 'この国を訪問済みリストから削除しますか?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': '日',
'atlas.visitedCountries': '訪問国',
'atlas.cities': '都市',
+ 'atlas.regions': '地域',
'atlas.noData': '旅行データがありません',
'atlas.noDataHint': '旅行を作成して場所を追加すると、マップに表示されます',
'atlas.nextTrip': '次の旅行',
diff --git a/shared/src/i18n/ja/budget.ts b/shared/src/i18n/ja/budget.ts
index e002b1085..97e2955fb 100644
--- a/shared/src/i18n/ja/budget.ts
+++ b/shared/src/i18n/ja/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': '例:夕食、お土産、ガソリン…',
'costs.note': 'メモ',
'costs.notePlaceholder': '内訳や立て替えのメモなど…',
+ 'costs.paymentNotePlaceholder': '現金払い、銀行振込など…',
'costs.addNote': 'メモを追加',
'costs.showNote': 'メモを表示',
'costs.hideNote': 'メモを非表示',
diff --git a/shared/src/i18n/ja/dayplan.ts b/shared/src/i18n/ja/dayplan.ts
index 5e7a1f925..116881895 100644
--- a/shared/src/i18n/ja/dayplan.ts
+++ b/shared/src/i18n/ja/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': '地図と GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': '日別計画をPDFで書き出し',
+ 'dayplan.pdfMine': '自分の計画をPDFで',
+ 'dayplan.pdfMineSub': '自分が参加するアクティビティと予約のみ',
'dayplan.gpxTooltip': 'オフライン地図やGPS機器向けにGPXで書き出す',
'dayplan.gpxAll': '旅行全体',
'dayplan.gpxPlaces': '場所のみ',
@@ -92,6 +94,13 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': '日を削除',
'dayplan.deleteDayTitle': '{day}を削除しますか?',
'dayplan.deleteDayBody': 'この日は旅行から削除されます。元に戻すことはできません。',
+ 'dayplan.excludeFromRoute': 'ルートから外す',
+ 'dayplan.includeInRoute': 'ルートに戻す',
+ 'dayplan.offRoute': 'ルート外',
+ 'dayplan.offRouteHint': 'この日と地図には残りますが、ルートでは通過しません',
+ 'dayplan.clearDay': '日をクリア',
+ 'dayplan.clearDayTitle': '{day}をクリアしますか?',
+ 'dayplan.clearDayBody': 'この日からすべての場所が外れます。場所は旅行に残り、この日のメモと予約もそのまま残ります。',
'dayplan.deleteDayEmpty': 'この日には何も予定されていません。',
'dayplan.impactPlaces': '予定しているスポット: {count}',
'dayplan.impactPlacesHint': 'スポット一覧には残ります。',
diff --git a/shared/src/i18n/ja/inspector.ts b/shared/src/i18n/ja/inspector.ts
index 13380f861..010348db0 100644
--- a/shared/src/i18n/ja/inspector.ts
+++ b/shared/src/i18n/ja/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': '保留中の予約',
'inspector.google': 'Google Maps',
'inspector.navigation': 'ナビゲーション',
+ 'inspector.otherMapApp': '他の地図アプリ',
'inspector.openWith': 'アプリで開く',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Webサイトを開く',
diff --git a/shared/src/i18n/ja/journey.ts b/shared/src/i18n/ja/journey.ts
index 27a323a10..9bd85c5c9 100644
--- a/shared/src/i18n/ja/journey.ts
+++ b/shared/src/i18n/ja/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': '日記',
'journey.subtitle': '旅の記録をリアルタイムで残そう',
'journey.new': '新しい日記',
+ 'journey.lightbox.zoomIn': '拡大',
+ 'journey.lightbox.zoomOut': '縮小',
+ 'journey.lightbox.zoomReset': '写真全体に戻す',
'journey.create': '作成',
'journey.titlePlaceholder': 'どこへ行きますか?',
'journey.empty': '日記はまだありません',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'エントリーを追加',
'journey.detail.jumpToTop': '先頭へ戻る',
'journey.detail.jumpToLast': '最後の記録へ',
+ 'journey.detail.dayJump': '日にジャンプ',
+ 'journey.detail.dayJumpCount': '{count}日',
'journey.detail.newEntry': '新しいエントリー',
'journey.detail.editEntry': 'エントリーを編集',
'journey.detail.noEntries': 'エントリーはまだありません',
@@ -433,6 +438,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'リスト',
'journey.studio.kind.icon': 'アイコン',
'journey.studio.duplicate': '複製',
+ 'journey.studio.copyToPage': 'コピーして任意のページに貼り付け (Ctrl+C)',
+ 'journey.studio.paste': '貼り付け (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'まず何かをコピーしてから、任意のページに貼り付けてください',
+ 'journey.studio.myLayouts': 'マイレイアウト',
+ 'journey.studio.myLayoutsEmpty': '配置したページを保存して、他のページも同じ配置にできます。写真と文章はそのまま残ります。',
+ 'journey.studio.saveLayout': 'このページをレイアウトとして保存',
+ 'journey.studio.saveLayoutHint': '写真を除いた配置を、このブックのすべての編集者向けに保存します',
+ 'journey.studio.saveLayoutFull': 'このブックに保存できるレイアウトは24件までです。新しく保存するには1件削除してください。',
+ 'journey.studio.deleteLayout': 'レイアウトを削除',
+ 'journey.studio.layoutName': 'レイアウト',
+ 'journey.studio.builtInLayouts': '標準',
'journey.studio.style': 'スタイル',
'journey.studio.shows': '表示',
'journey.studio.size': 'サイズ',
@@ -625,6 +641,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcluded': 'ルートから除外',
'journey.editor.statsExcludedHint': '立ち寄り地は日記に残りますが、Studio の距離、国、地図には含まれません。',
'journey.entry.offRoute': 'ルート外',
+ 'journey.entry.draft': '下書き',
+ 'journey.editor.draft': '下書き',
+ 'journey.editor.draftHint': 'この記録はあなたと他の参加者にのみ表示されます。オフにするまで、共有された日記には含まれません。',
+ 'journey.editor.tripSuggestionHint': 'この日はこの旅行の期間内です。リンクすると、旅行の場所がこの日記に加わります。',
+ 'journey.editor.tripSuggestionLater': '今はしない',
'journey.suggestions.dismiss': 'この提案を見送る',
'journey.suggestions.dismissed': '提案を見送りました',
'journey.suggestions.restore': '見送った提案を戻す',
diff --git a/shared/src/i18n/ja/map.ts b/shared/src/i18n/ja/map.ts
index 357689713..129ff24d1 100644
--- a/shared/src/i18n/ja/map.ts
+++ b/shared/src/i18n/ja/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': '現在地を特定できませんでした。',
'map.location.timeout': '位置情報の取得に時間がかかりすぎました。空がよく見える場所でもう一度お試しください。',
'map.overview.show': '旅程全体を表示',
+ 'map.lock.lock': '地図の表示を固定',
+ 'map.lock.unlock': '選択に合わせて地図を移動',
'map.overview.hide': '旅程全体を非表示',
'map.overview.total': '合計距離',
'map.attribution': '地図のクレジット',
diff --git a/shared/src/i18n/ja/mobileTrip.ts b/shared/src/i18n/ja/mobileTrip.ts
index c31b01562..487775a99 100644
--- a/shared/src/i18n/ja/mobileTrip.ts
+++ b/shared/src/i18n/ja/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': '地図上',
'mobileTrip.profileDriving': '車',
'mobileTrip.profileWalking': '徒歩',
+ 'mobileTrip.profileCycling': '自転車',
'mobileTrip.renameDay': '日の名前を変更',
'mobileTrip.resBadge': '予約',
'mobileTrip.showOnMap': '地図で表示',
diff --git a/shared/src/i18n/ja/packing.ts b/shared/src/i18n/ja/packing.ts
index a83df28de..197c30a6c 100644
--- a/shared/src/i18n/ja/packing.ts
+++ b/shared/src/i18n/ja/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'アイテムを編集',
'packing.itemName': '名前',
'packing.itemQuantity': '数量',
+ 'packing.packedCount': '{total}個中{packed}個を荷造り済み',
+ 'packing.packedMore': '1個多く荷造り',
+ 'packing.packedLess': '1個少なく荷造り',
'packing.itemWeight': '重さ(g)',
'packing.title': '持ち物リスト',
'packing.empty': '持ち物リストは空です',
diff --git a/shared/src/i18n/ja/places.ts b/shared/src/i18n/ja/places.ts
index 9c8f2bce3..d35febc6b 100644
--- a/shared/src/i18n/ja/places.ts
+++ b/shared/src/i18n/ja/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': '旅行全体を表示',
'places.filterTracks': 'トラック',
'places.filterByRating': '評価で絞り込む',
+ 'places.filterByLocation': '国または地域で絞り込む',
+ 'places.allLocations': 'すべての国',
'places.filterShow': '表示',
'places.clearSearch': '検索をクリア',
'places.yourRating': 'あなたの評価',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'カテゴリ',
'places.noCategory': 'カテゴリなし',
'places.newCategory': '新しいカテゴリ',
+ 'places.openInMaps': '地図アプリで開く',
'places.categoryNamePlaceholder': 'カテゴリ名',
'places.formTime': '時間',
'places.startTime': '開始',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': '場所を検索…',
'places.mapsSearchError': '場所の検索に失敗しました。',
'places.searchGoogleInstead': '目的の場所ではない? Google で検索',
+ 'places.nearby': 'このピンの近くの場所',
+ 'places.nearbyNone': 'このピンの近くには何も見つかりませんでした',
'places.loadingDetails': '詳細を読み込み中…',
'places.osmHint':
'OpenStreetMapで検索しています(写真・営業時間・評価なし)。設定でGoogle APIキーを追加すると詳細が表示されます。',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Googleで場所を補完',
'places.enrichOnImportHint':
'インポートした各場所を検索して、写真・住所・連絡先を追加します。Google Maps キーが必要です。',
+ 'places.enrichOnImportFileHint':
+ 'インポート後に各地点を Google で検索し、写真、住所、ウェブサイト、電話番号を追加します。経路やトラックはそのまま残ります。',
'places.uploadImage': '画像をアップロード',
'places.changeImage': '画像を変更',
'places.removeImage': '画像を削除',
+ 'places.chooseImage': '画像を選択',
+ 'places.uploadFromDevice': 'デバイスからアップロード',
+ 'places.fromAttachedFiles': '添付ファイルから',
'places.imageUploadError': '画像をアップロードできませんでした',
'places.imageRemoveError': '画像を削除できませんでした',
};
diff --git a/shared/src/i18n/ja/reservations.ts b/shared/src/i18n/ja/reservations.ts
index f2fdcd2ae..3126bbea3 100644
--- a/shared/src/i18n/ja/reservations.ts
+++ b/shared/src/i18n/ja/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'その他',
'reservations.type.bus': 'バス',
'reservations.type.ferry': 'フェリー',
+ 'reservations.type.cable_car': 'ロープウェイ',
'reservations.type.bicycle': '自転車',
'reservations.type.taxi': 'タクシー',
'reservations.type.transit': '公共交通機関',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'フィルターをリセット',
'reservations.noMatches': 'このフィルターに一致するものはありません',
'reservations.viewOptions': '表示オプション',
+ 'reservations.exportCsv': '表計算ファイルとして書き出し (CSV)',
+ 'reservations.export.type': '種類',
+ 'reservations.export.title': 'タイトル',
+ 'reservations.export.start': '開始',
+ 'reservations.export.end': '終了',
+ 'reservations.export.from': '出発地',
+ 'reservations.export.to': '到着地',
+ 'reservations.export.location': '場所',
+ 'reservations.export.confirmation': '予約番号',
+ 'reservations.export.notes': 'メモ',
'reservations.resetView': '表示をリセット',
'reservations.group.label': 'グループ化',
'reservations.group.status': 'ステータス',
diff --git a/shared/src/i18n/ja/settings.ts b/shared/src/i18n/ja/settings.ts
index 5e49bd554..837b6e381 100644
--- a/shared/src/i18n/ja/settings.ts
+++ b/shared/src/i18n/ja/settings.ts
@@ -313,6 +313,9 @@ const settings: TranslationStrings = {
'settings.currency': '表示通貨',
'settings.currencyHint': '費用の金額は表示のためだけにこの通貨に換算されます。元の金額は変更されません。',
'settings.currencyTrip': '旅行の通貨',
+ 'settings.placeLanguage': '場所の名前',
+ 'settings.placeLanguageApp': 'アプリと同じ',
+ 'settings.placeLanguageHint': '場所の検索、候補、住所に使う言語です。その言語の名前がない場所では、現地の名前が表示されます。',
'settings.passkey.title': 'パスキー',
'settings.passkey.description':
'指紋、顔認証、PIN、またはハードウェアキーを使うパスキーで、より速く、フィッシングに強いサインインができます。パスワードはバックアップとして残ります。',
@@ -457,6 +460,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': '起動',
+ 'settings.dayDateFirst': '日の見出しで日付を先に表示',
+ 'settings.compactUnplanned': '未計画の場所を小さなマーカーで表示',
+ 'settings.compactUnplannedHint': 'どの日にも計画されていない場所は写真なしの小さなマーカーで表示され、計画済みの立ち寄り先が目立ちます。',
+ 'settings.dayDateFirstHint': '各日の先頭にカレンダーの日付を表示し、その横に「1日目」またはその日のタイトルを表示します。',
'settings.startPage': '起動時の画面',
'settings.startPageDashboard': 'ダッシュボード',
'settings.startPageActiveTrip': '進行中の旅行',
diff --git a/shared/src/i18n/ja/share.ts b/shared/src/i18n/ja/share.ts
index 4ac654a79..aa4715305 100644
--- a/shared/src/i18n/ja/share.ts
+++ b/shared/src/i18n/ja/share.ts
@@ -11,5 +11,10 @@ const share: TranslationStrings = {
'share.permPacking': '持ち物',
'share.permBudget': '費用',
'share.permCollab': 'チャット',
+ 'share.options': 'オプション',
+ 'share.optTravelOnly': '移動と宿泊のみ',
+ 'share.optTravelOnlyHint': '交通手段と宿泊のみを表示し、アクティビティ、日ごとのメモ、空の日は含めません',
+ 'share.optHideImages': '写真なし',
+ 'share.optHideImagesHint': '共有ページに場所の写真を含めません',
};
export default share;
diff --git a/shared/src/i18n/ja/shared.ts b/shared/src/i18n/ja/shared.ts
index 9bcae022a..72a5db384 100644
--- a/shared/src/i18n/ja/shared.ts
+++ b/shared/src/i18n/ja/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'チャット',
'shared.days': '日',
'shared.places': '場所',
+ 'shared.unplanned': '未計画',
'shared.other': 'その他',
'shared.totalBudget': '合計費用',
'shared.messages': 'メッセージ',
diff --git a/shared/src/i18n/ja/todo.ts b/shared/src/i18n/ja/todo.ts
index a073a1111..81a02357f 100644
--- a/shared/src/i18n/ja/todo.ts
+++ b/shared/src/i18n/ja/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'リストなし',
'todo.namePlaceholder': 'タスク名',
'todo.descriptionPlaceholder': '説明(任意)',
+ 'todo.editDescription': 'クリックして編集、リンクは直接開きます',
'todo.unassigned': '未割り当て',
'todo.noCategory': 'リストなし',
'todo.hasDescription': '説明あり',
diff --git a/shared/src/i18n/ja/undo.ts b/shared/src/i18n/ja/undo.ts
index eab000c87..f15697f8f 100644
--- a/shared/src/i18n/ja/undo.ts
+++ b/shared/src/i18n/ja/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': '元に戻す: {action}',
'undo.assignPlace': '場所を日に割り当て',
'undo.removeAssignment': '日の割り当てを解除',
+ 'undo.clearDay': '日をクリアしました',
'undo.reorder': '場所を並び替え',
'undo.optimize': 'ルートを最適化',
'undo.deletePlace': '場所を削除',
diff --git a/shared/src/i18n/ko/atlas.ts b/shared/src/i18n/ko/atlas.ts
index 5b922cd90..2cde9b6c4 100644
--- a/shared/src/i18n/ko/atlas.ts
+++ b/shared/src/i18n/ko/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': '국가',
'atlas.trips': '여행',
'atlas.places': '장소',
+ 'atlas.placesShow': '이 나라의 장소 보기',
+ 'atlas.placesSearch': '장소 검색',
+ 'atlas.placesNone': '일치하는 장소가 없습니다',
'atlas.unmark': '제거',
'atlas.confirmMark': '이 나라를 방문한 곳으로 표시할까요?',
'atlas.confirmUnmark': '방문 목록에서 이 나라를 제거할까요?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': '일',
'atlas.visitedCountries': '방문한 나라',
'atlas.cities': '도시',
+ 'atlas.regions': '지역',
'atlas.noData': '아직 여행 데이터가 없습니다',
'atlas.noDataHint': '여행을 만들고 장소를 추가하여 세계 지도를 확인하세요',
'atlas.nextTrip': '다음 여행',
diff --git a/shared/src/i18n/ko/budget.ts b/shared/src/i18n/ko/budget.ts
index 3fc3e5a0b..ec525d5c4 100644
--- a/shared/src/i18n/ko/budget.ts
+++ b/shared/src/i18n/ko/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': '예: 저녁 식사, 기념품, 주유…',
'costs.note': '메모',
'costs.notePlaceholder': '무엇을 샀는지, 누가 갚아야 하는지…',
+ 'costs.paymentNotePlaceholder': '현금 결제, 계좌 이체…',
'costs.addNote': '메모 추가',
'costs.showNote': '메모 보기',
'costs.hideNote': '메모 숨기기',
diff --git a/shared/src/i18n/ko/dayplan.ts b/shared/src/i18n/ko/dayplan.ts
index e38d67aab..fdeb20112 100644
--- a/shared/src/i18n/ko/dayplan.ts
+++ b/shared/src/i18n/ko/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': '지도 및 GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': '일별 계획을 PDF로 내보내기',
+ 'dayplan.pdfMine': '내 계획을 PDF로',
+ 'dayplan.pdfMineSub': '내가 참여하는 활동과 예약만',
'dayplan.gpxTooltip': '오프라인 지도와 GPS 기기용 GPX로 내보내기',
'dayplan.gpxAll': '여행 전체',
'dayplan.gpxPlaces': '장소만',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': '날짜 삭제',
'dayplan.deleteDayTitle': '{day}을(를) 삭제할까요?',
'dayplan.deleteDayBody': '이 날짜가 여행에서 제거됩니다. 되돌릴 수 없습니다.',
+ 'dayplan.excludeFromRoute': '경로에서 제외',
+ 'dayplan.includeInRoute': '경로에 다시 추가',
+ 'dayplan.offRoute': '경로 외',
+ 'dayplan.offRouteHint': '이 날과 지도에는 남아 있지만 경로에서는 건너뜁니다',
+ 'dayplan.clearDay': '날 비우기',
+ 'dayplan.clearDayTitle': '{day}을(를) 비울까요?',
+ 'dayplan.clearDayBody':
+ '이 날에서 모든 장소가 빠집니다. 장소는 여행에 남아 있고, 이 날의 메모와 예약도 그대로 유지됩니다.',
'dayplan.deleteDayEmpty': '이 날짜에는 계획된 항목이 없습니다.',
'dayplan.impactPlaces': '계획된 장소: {count}',
'dayplan.impactPlacesHint': '장소 목록에는 그대로 남습니다.',
diff --git a/shared/src/i18n/ko/inspector.ts b/shared/src/i18n/ko/inspector.ts
index 0a2f3a706..4cf37048d 100644
--- a/shared/src/i18n/ko/inspector.ts
+++ b/shared/src/i18n/ko/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': '대기 중인 예약',
'inspector.google': 'Google Maps',
'inspector.navigation': '내비게이션',
+ 'inspector.otherMapApp': '다른 지도 앱',
'inspector.openWith': '다음으로 열기',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': '웹사이트 열기',
diff --git a/shared/src/i18n/ko/journey.ts b/shared/src/i18n/ko/journey.ts
index c914cceda..f1c76ff41 100644
--- a/shared/src/i18n/ko/journey.ts
+++ b/shared/src/i18n/ko/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journey',
'journey.subtitle': '여행을 실시간으로 기록하세요',
'journey.new': '새 Journey',
+ 'journey.lightbox.zoomIn': '확대',
+ 'journey.lightbox.zoomOut': '축소',
+ 'journey.lightbox.zoomReset': '전체 사진으로 돌아가기',
'journey.create': '만들기',
'journey.titlePlaceholder': '어디로 가시나요?',
'journey.empty': '아직 Journey가 없습니다',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': '항목 추가',
'journey.detail.jumpToTop': '맨 위로',
'journey.detail.jumpToLast': '마지막 기록으로',
+ 'journey.detail.dayJump': '날짜로 이동',
+ 'journey.detail.dayJumpCount': '{count}일',
'journey.detail.newEntry': '새 항목',
'journey.detail.editEntry': '항목 편집',
'journey.detail.noEntries': '아직 항목이 없습니다',
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': '목록',
'journey.studio.kind.icon': '아이콘',
'journey.studio.duplicate': '복제',
+ 'journey.studio.copyToPage': '복사해서 아무 페이지에나 붙여넣기 (Ctrl+C)',
+ 'journey.studio.paste': '붙여넣기 (Ctrl+V)',
+ 'journey.studio.pasteEmpty': '먼저 무언가를 복사한 뒤 아무 페이지에나 붙여넣으세요',
+ 'journey.studio.myLayouts': '내 레이아웃',
+ 'journey.studio.myLayoutsEmpty': '배치한 페이지를 저장해 두고 다른 페이지도 같은 방식으로 배치하세요. 사진과 글은 그대로 유지됩니다.',
+ 'journey.studio.saveLayout': '이 페이지를 레이아웃으로 저장',
+ 'journey.studio.saveLayoutHint': '사진을 제외한 배치를 이 책의 모든 편집자를 위해 저장합니다',
+ 'journey.studio.saveLayoutFull': '이 책에는 레이아웃을 최대 24개까지 저장할 수 있습니다. 새로 저장하려면 하나를 삭제하세요.',
+ 'journey.studio.deleteLayout': '레이아웃 삭제',
+ 'journey.studio.layoutName': '레이아웃',
+ 'journey.studio.builtInLayouts': '기본 제공',
'journey.studio.style': '스타일',
'journey.studio.shows': '표시 내용',
'journey.studio.size': '크기',
@@ -624,6 +640,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcluded': '경로에서 제외',
'journey.editor.statsExcludedHint': '경유지는 일기에 남지만 Studio의 거리, 국가, 지도에는 포함되지 않습니다.',
'journey.entry.offRoute': '경로 외',
+ 'journey.entry.draft': '초안',
+ 'journey.editor.draft': '초안',
+ 'journey.editor.draftHint': '이 기록은 나와 다른 기여자만 볼 수 있습니다. 이 옵션을 끌 때까지 공유된 Journey에는 포함되지 않습니다.',
+ 'journey.editor.tripSuggestionHint': '이 날은 이 여행 기간에 속합니다. 연결하면 여행의 장소가 이 Journey에 추가됩니다.',
+ 'journey.editor.tripSuggestionLater': '나중에',
'journey.suggestions.dismiss': '이 제안 넘기기',
'journey.suggestions.dismissed': '제안을 넘겼습니다',
'journey.suggestions.restore': '넘긴 제안 되돌리기',
diff --git a/shared/src/i18n/ko/map.ts b/shared/src/i18n/ko/map.ts
index 7212bd751..7b50afe2c 100644
--- a/shared/src/i18n/ko/map.ts
+++ b/shared/src/i18n/ko/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': '현재 위치를 확인할 수 없습니다.',
'map.location.timeout': '위치를 확인하는 데 시간이 너무 오래 걸렸습니다. 하늘이 잘 보이는 곳에서 다시 시도하세요.',
'map.overview.show': '전체 여행 보기',
+ 'map.lock.lock': '지도 보기 고정',
+ 'map.lock.unlock': '선택 항목에 따라 지도 이동',
'map.overview.hide': '전체 여행 숨기기',
'map.overview.total': '총 거리',
'map.attribution': '지도 출처',
diff --git a/shared/src/i18n/ko/mobileTrip.ts b/shared/src/i18n/ko/mobileTrip.ts
index b45f6724e..3f2ce66d5 100644
--- a/shared/src/i18n/ko/mobileTrip.ts
+++ b/shared/src/i18n/ko/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': '지도에서',
'mobileTrip.profileDriving': '자동차',
'mobileTrip.profileWalking': '도보',
+ 'mobileTrip.profileCycling': '자전거',
'mobileTrip.renameDay': '일차 이름 바꾸기',
'mobileTrip.resBadge': '예약',
'mobileTrip.showOnMap': '지도에서 보기',
diff --git a/shared/src/i18n/ko/packing.ts b/shared/src/i18n/ko/packing.ts
index ef7097e9d..8bbd2ed76 100644
--- a/shared/src/i18n/ko/packing.ts
+++ b/shared/src/i18n/ko/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': '항목 편집',
'packing.itemName': '이름',
'packing.itemQuantity': '수량',
+ 'packing.packedCount': '{total}개 중 {packed}개 챙김',
+ 'packing.packedMore': '하나 더 챙기기',
+ 'packing.packedLess': '하나 덜 챙기기',
'packing.itemWeight': '무게(g)',
'packing.title': '짐 목록',
'packing.empty': '짐 목록이 비어 있습니다',
diff --git a/shared/src/i18n/ko/places.ts b/shared/src/i18n/ko/places.ts
index 10ffcab3b..d06eea73c 100644
--- a/shared/src/i18n/ko/places.ts
+++ b/shared/src/i18n/ko/places.ts
@@ -51,6 +51,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': '전체 여행 보기',
'places.filterTracks': '트랙',
'places.filterByRating': '평점으로 필터링',
+ 'places.filterByLocation': '국가 또는 지역으로 필터링',
+ 'places.allLocations': '모든 국가',
'places.filterShow': '표시',
'places.clearSearch': '검색 지우기',
'places.yourRating': '내 평점',
@@ -77,6 +79,7 @@ const places: TranslationStrings = {
'places.formCategory': '카테고리',
'places.noCategory': '카테고리 없음',
'places.newCategory': '새 카테고리',
+ 'places.openInMaps': '지도 앱에서 열기',
'places.categoryNamePlaceholder': '카테고리 이름',
'places.formTime': '시간',
'places.startTime': '시작',
@@ -93,6 +96,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': '장소 검색...',
'places.mapsSearchError': '장소 검색 실패.',
'places.searchGoogleInstead': '찾는 장소가 아닌가요? Google에서 검색',
+ 'places.nearby': '이 핀 근처의 장소',
+ 'places.nearbyNone': '이 핀 근처에서 찾은 결과가 없습니다',
'places.loadingDetails': '장소 상세 정보 불러오는 중…',
'places.osmHint':
'OpenStreetMap 검색 사용 중 (사진, 영업 시간, 평점 없음). 전체 정보를 위해 설정에서 Google API 키를 추가하세요.',
@@ -130,9 +135,14 @@ const places: TranslationStrings = {
'places.addAnyway': '그래도 추가',
'places.enrichOnImport': 'Google로 장소 정보 보강',
'places.enrichOnImportHint': '가져온 각 장소를 검색해 사진, 주소, 연락처를 추가합니다. Google Maps 키가 필요합니다.',
+ 'places.enrichOnImportFileHint':
+ '가져온 뒤 각 지점을 Google에서 찾아 사진, 주소, 웹사이트, 전화번호를 추가합니다. 경로와 트랙은 그대로 유지됩니다.',
'places.uploadImage': '이미지 업로드',
'places.changeImage': '이미지 변경',
'places.removeImage': '이미지 제거',
+ 'places.chooseImage': '이미지 선택',
+ 'places.uploadFromDevice': '기기에서 업로드',
+ 'places.fromAttachedFiles': '첨부 파일에서',
'places.imageUploadError': '이미지를 업로드할 수 없습니다',
'places.imageRemoveError': '이미지를 제거할 수 없습니다',
};
diff --git a/shared/src/i18n/ko/reservations.ts b/shared/src/i18n/ko/reservations.ts
index b4fcc9da6..fc746f5f5 100644
--- a/shared/src/i18n/ko/reservations.ts
+++ b/shared/src/i18n/ko/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': '기타',
'reservations.type.bus': '버스',
'reservations.type.ferry': '페리',
+ 'reservations.type.cable_car': '케이블카',
'reservations.type.bicycle': '자전거',
'reservations.type.taxi': '택시',
'reservations.type.transit': '대중교통',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': '필터 초기화',
'reservations.noMatches': '이 필터에 맞는 항목이 없습니다',
'reservations.viewOptions': '보기 옵션',
+ 'reservations.exportCsv': '스프레드시트로 내보내기 (CSV)',
+ 'reservations.export.type': '유형',
+ 'reservations.export.title': '제목',
+ 'reservations.export.start': '시작',
+ 'reservations.export.end': '종료',
+ 'reservations.export.from': '출발지',
+ 'reservations.export.to': '도착지',
+ 'reservations.export.location': '위치',
+ 'reservations.export.confirmation': '예약 번호',
+ 'reservations.export.notes': '메모',
'reservations.resetView': '보기 초기화',
'reservations.group.label': '그룹 기준',
'reservations.group.status': '상태',
diff --git a/shared/src/i18n/ko/settings.ts b/shared/src/i18n/ko/settings.ts
index 7beffd94d..df8f6b221 100644
--- a/shared/src/i18n/ko/settings.ts
+++ b/shared/src/i18n/ko/settings.ts
@@ -330,6 +330,9 @@ const settings: TranslationStrings = {
'settings.currency': '표시 통화',
'settings.currencyHint': '비용의 금액은 표시 목적으로만 이 통화로 환산되어 표시되며, 원래 금액은 변경되지 않습니다.',
'settings.currencyTrip': '여행 통화',
+ 'settings.placeLanguage': '장소 이름',
+ 'settings.placeLanguageApp': '앱과 동일',
+ 'settings.placeLanguageHint': '장소 검색, 추천, 주소에 사용되는 언어입니다. 해당 언어로 된 이름이 없는 장소는 현지 이름으로 표시됩니다.',
'settings.passkey.title': '패스키',
'settings.passkey.description':
'지문, 얼굴, PIN 또는 하드웨어 키 같은 패스키로 더 빠르고 피싱에 강하게 로그인하세요. 비밀번호는 백업으로 그대로 유지됩니다.',
@@ -472,6 +475,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': '시작',
+ 'settings.dayDateFirst': '날 제목에 날짜를 먼저 표시',
+ 'settings.compactUnplanned': '계획되지 않은 장소를 작은 마커로 표시',
+ 'settings.compactUnplannedHint': '어느 날에도 계획되지 않은 장소는 사진 없이 작은 마커로 표시되어 계획된 방문지가 눈에 띕니다.',
+ 'settings.dayDateFirstHint': '각 날을 달력 날짜로 시작하고 그 옆에 "1일차" 또는 그날의 제목을 표시합니다.',
'settings.startPage': '시작 화면',
'settings.startPageDashboard': '대시보드',
'settings.startPageActiveTrip': '진행 중인 여행',
diff --git a/shared/src/i18n/ko/share.ts b/shared/src/i18n/ko/share.ts
index b1abfff4b..5765a9cd7 100644
--- a/shared/src/i18n/ko/share.ts
+++ b/shared/src/i18n/ko/share.ts
@@ -11,5 +11,10 @@ const share: TranslationStrings = {
'share.permPacking': '짐 목록',
'share.permBudget': '비용',
'share.permCollab': '채팅',
+ 'share.options': '옵션',
+ 'share.optTravelOnly': '이동 및 숙박만',
+ 'share.optTravelOnlyHint': '활동, 날별 메모, 빈 날 없이 교통과 숙박만 표시합니다',
+ 'share.optHideImages': '사진 없이',
+ 'share.optHideImagesHint': '공유 페이지에서 장소 사진을 제외합니다',
};
export default share;
diff --git a/shared/src/i18n/ko/shared.ts b/shared/src/i18n/ko/shared.ts
index 92d82e976..0601c3faf 100644
--- a/shared/src/i18n/ko/shared.ts
+++ b/shared/src/i18n/ko/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': '채팅',
'shared.days': '일',
'shared.places': '장소',
+ 'shared.unplanned': '아직 계획되지 않음',
'shared.other': '기타',
'shared.totalBudget': '총 비용',
'shared.messages': '메시지',
diff --git a/shared/src/i18n/ko/todo.ts b/shared/src/i18n/ko/todo.ts
index 0af8c381b..a946901c1 100644
--- a/shared/src/i18n/ko/todo.ts
+++ b/shared/src/i18n/ko/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': '목록 없음',
'todo.namePlaceholder': '작업 이름',
'todo.descriptionPlaceholder': '설명 (선택)',
+ 'todo.editDescription': '클릭하여 편집, 링크는 바로 열립니다',
'todo.unassigned': '미배정',
'todo.noCategory': '목록 없음',
'todo.hasDescription': '설명 있음',
diff --git a/shared/src/i18n/ko/undo.ts b/shared/src/i18n/ko/undo.ts
index 069703b26..3bc9c2639 100644
--- a/shared/src/i18n/ko/undo.ts
+++ b/shared/src/i18n/ko/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': '실행 취소: {action}',
'undo.assignPlace': '장소가 날에 배정되었습니다',
'undo.removeAssignment': '장소가 날에서 제거되었습니다',
+ 'undo.clearDay': '날을 비웠습니다',
'undo.reorder': '장소 순서가 변경되었습니다',
'undo.optimize': '경로가 최적화되었습니다',
'undo.deletePlace': '장소가 삭제되었습니다',
diff --git a/shared/src/i18n/nl/atlas.ts b/shared/src/i18n/nl/atlas.ts
index e10a1d419..011e6b058 100644
--- a/shared/src/i18n/nl/atlas.ts
+++ b/shared/src/i18n/nl/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Landen',
'atlas.trips': 'Reizen',
'atlas.places': 'Plaatsen',
+ 'atlas.placesShow': 'Plaatsen in dit land tonen',
+ 'atlas.placesSearch': 'Plaatsen zoeken',
+ 'atlas.placesNone': 'Geen plaats komt overeen',
'atlas.days': 'Dagen',
'atlas.visitedCountries': 'Bezochte landen',
'atlas.cities': 'Steden',
+ 'atlas.regions': "Regio's",
'atlas.noData': 'Nog geen reisgegevens',
'atlas.noDataHint': 'Maak een reis aan en voeg plaatsen toe om je wereldkaart te zien',
'atlas.nextTrip': 'Volgende reis',
diff --git a/shared/src/i18n/nl/budget.ts b/shared/src/i18n/nl/budget.ts
index 7ad6bef61..a18962385 100644
--- a/shared/src/i18n/nl/budget.ts
+++ b/shared/src/i18n/nl/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'bijv. Diner, souvenirs, benzine…',
'costs.note': 'Notitie',
'costs.notePlaceholder': 'Wat het omvatte, wie wat terugbetaalt…',
+ 'costs.paymentNotePlaceholder': 'Contant betaald, via overschrijving…',
'costs.addNote': 'Notitie toevoegen',
'costs.showNote': 'Notitie tonen',
'costs.hideNote': 'Notitie verbergen',
diff --git a/shared/src/i18n/nl/dayplan.ts b/shared/src/i18n/nl/dayplan.ts
index 4b4e1fdfe..563a330d7 100644
--- a/shared/src/i18n/nl/dayplan.ts
+++ b/shared/src/i18n/nl/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Kaarten en gps',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Dagplan exporteren als PDF',
+ 'dayplan.pdfMine': 'Mijn plan als PDF',
+ 'dayplan.pdfMineSub': 'Alleen de activiteiten en boekingen waaraan je deelneemt',
'dayplan.gpxTooltip': 'Exporteren als GPX voor offline kaarten en gps-apparaten',
'dayplan.gpxAll': 'Hele reis',
'dayplan.gpxPlaces': 'Alleen plekken',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Dag verwijderen',
'dayplan.deleteDayTitle': '{day} verwijderen?',
'dayplan.deleteDayBody': 'De dag wordt uit de reis verwijderd. Dit kan niet ongedaan worden gemaakt.',
+ 'dayplan.excludeFromRoute': 'Uit de route halen',
+ 'dayplan.includeInRoute': 'Weer aan de route toevoegen',
+ 'dayplan.offRoute': 'Buiten de route',
+ 'dayplan.offRouteHint': 'Blijft op de dag en op de kaart, maar de route slaat het over',
+ 'dayplan.clearDay': 'Dag leegmaken',
+ 'dayplan.clearDayTitle': '{day} leegmaken?',
+ 'dayplan.clearDayBody':
+ 'Alle plaatsen gaan van deze dag af. De plaatsen blijven in de reis, en de dag houdt zijn notities en boekingen.',
'dayplan.deleteDayEmpty': 'Er staat niets gepland op deze dag.',
'dayplan.impactPlaces': 'Geplande plekken: {count}',
'dayplan.impactPlacesHint': 'Ze blijven in de lijst met plekken.',
diff --git a/shared/src/i18n/nl/inspector.ts b/shared/src/i18n/nl/inspector.ts
index 4a081f618..35c3a9147 100644
--- a/shared/src/i18n/nl/inspector.ts
+++ b/shared/src/i18n/nl/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Reservering in behandeling',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigatie',
+ 'inspector.otherMapApp': 'Andere kaart-app',
'inspector.openWith': 'Openen met',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Website openen',
diff --git a/shared/src/i18n/nl/journey.ts b/shared/src/i18n/nl/journey.ts
index 38e4f99fa..8a9ef57c5 100644
--- a/shared/src/i18n/nl/journey.ts
+++ b/shared/src/i18n/nl/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Reisverslag',
'journey.subtitle': 'Leg je reizen vast terwijl je onderweg bent',
'journey.new': 'Nieuw reisverslag',
+ 'journey.lightbox.zoomIn': 'Inzoomen',
+ 'journey.lightbox.zoomOut': 'Uitzoomen',
+ 'journey.lightbox.zoomReset': 'Terug naar de hele foto',
'journey.create': 'Aanmaken',
'journey.titlePlaceholder': 'Waar ga je naartoe?',
'journey.empty': 'Nog geen reisverslagen',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Vermelding toevoegen',
'journey.detail.jumpToTop': 'Terug naar boven',
'journey.detail.jumpToLast': 'Naar de laatste notitie',
+ 'journey.detail.dayJump': 'Naar een dag springen',
+ 'journey.detail.dayJumpCount': '{count} dagen',
'journey.detail.newEntry': 'Nieuwe vermelding',
'journey.detail.editEntry': 'Vermelding bewerken',
'journey.detail.noEntries': 'Nog geen vermeldingen',
@@ -433,6 +438,18 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Lijst',
'journey.studio.kind.icon': 'Icoon',
'journey.studio.duplicate': 'Dupliceren',
+ 'journey.studio.copyToPage': 'Kopiëren, om op elke pagina te plakken (Ctrl+C)',
+ 'journey.studio.paste': 'Plakken (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Kopieer eerst iets en plak het dan op een willekeurige pagina',
+ 'journey.studio.myLayouts': 'Mijn indelingen',
+ 'journey.studio.myLayoutsEmpty':
+ 'Bewaar een pagina die je hebt ingedeeld en deel andere pagina’s op dezelfde manier in. Hun foto’s en teksten blijven staan.',
+ 'journey.studio.saveLayout': 'Deze pagina als indeling opslaan',
+ 'journey.studio.saveLayoutHint': 'Bewaart de indeling zonder de foto’s, voor iedereen die dit boek bewerkt',
+ 'journey.studio.saveLayoutFull': 'Dit boek bewaart tot 24 indelingen. Verwijder er een om een nieuwe op te slaan.',
+ 'journey.studio.deleteLayout': 'Indeling verwijderen',
+ 'journey.studio.layoutName': 'Indeling',
+ 'journey.studio.builtInLayouts': 'Standaard',
'journey.studio.style': 'Stijl',
'journey.studio.shows': 'Weergave',
'journey.studio.size': 'Grootte',
@@ -627,6 +644,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'De stop blijft in het dagboek maar telt niet mee voor de afstand, de landen of de kaart in Studio.',
'journey.entry.offRoute': 'Buiten de route',
+ 'journey.entry.draft': 'Concept',
+ 'journey.editor.draft': 'Concept',
+ 'journey.editor.draftHint':
+ 'Alleen jij en de andere bijdragers zien deze notitie. Het gedeelde reisverslag laat hem weg totdat je dit uitzet.',
+ 'journey.editor.tripSuggestionHint':
+ 'Deze dag valt in deze reis. Koppel hem, dan komen de plaatsen erbij in dit reisverslag.',
+ 'journey.editor.tripSuggestionLater': 'Niet nu',
'journey.suggestions.dismiss': 'Deze suggestie verwerpen',
'journey.suggestions.dismissed': 'Suggestie verworpen',
'journey.suggestions.restore': 'Verworpen suggesties terughalen',
diff --git a/shared/src/i18n/nl/map.ts b/shared/src/i18n/nl/map.ts
index 97fa583bb..8b7bf05bc 100644
--- a/shared/src/i18n/nl/map.ts
+++ b/shared/src/i18n/nl/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Je locatie kon niet worden bepaald.',
'map.location.timeout': 'Het bepalen van je locatie duurde te lang. Probeer het opnieuw met vrij zicht op de lucht.',
'map.overview.show': 'Hele reis tonen',
+ 'map.lock.lock': 'Kaartweergave vergrendelen',
+ 'map.lock.unlock': 'Kaart de selectie laten volgen',
'map.overview.hide': 'Hele reis verbergen',
'map.overview.total': 'Totale afstand',
'map.attribution': 'Kaartvermeldingen',
diff --git a/shared/src/i18n/nl/mobileTrip.ts b/shared/src/i18n/nl/mobileTrip.ts
index 0b07c179b..1410cdf78 100644
--- a/shared/src/i18n/nl/mobileTrip.ts
+++ b/shared/src/i18n/nl/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Op kaart',
'mobileTrip.profileDriving': 'Auto',
'mobileTrip.profileWalking': 'Lopen',
+ 'mobileTrip.profileCycling': 'Fietsen',
'mobileTrip.renameDay': 'Dag hernoemen',
'mobileTrip.resBadge': 'Boeking',
'mobileTrip.showOnMap': 'Op kaart tonen',
diff --git a/shared/src/i18n/nl/packing.ts b/shared/src/i18n/nl/packing.ts
index b4bfd6366..6193dde90 100644
--- a/shared/src/i18n/nl/packing.ts
+++ b/shared/src/i18n/nl/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Item bewerken',
'packing.itemName': 'Naam',
'packing.itemQuantity': 'Aantal',
+ 'packing.packedCount': '{packed} van {total} ingepakt',
+ 'packing.packedMore': 'Eén meer inpakken',
+ 'packing.packedLess': 'Eén minder inpakken',
'packing.itemWeight': 'Gewicht (g)',
'packing.title': 'Inpaklijst',
'packing.empty': 'Inpaklijst is leeg',
diff --git a/shared/src/i18n/nl/places.ts b/shared/src/i18n/nl/places.ts
index e3381c6c9..cc6914863 100644
--- a/shared/src/i18n/nl/places.ts
+++ b/shared/src/i18n/nl/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Hele reis tonen',
'places.filterTracks': 'Tracks',
'places.filterByRating': 'Filteren op beoordeling',
+ 'places.filterByLocation': 'Filteren op land of regio',
+ 'places.allLocations': 'Alle landen',
'places.filterShow': 'Tonen',
'places.clearSearch': 'Zoekopdracht wissen',
'places.yourRating': 'Jouw beoordeling',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Categorie',
'places.noCategory': 'Geen categorie',
'places.newCategory': 'Nieuwe categorie',
+ 'places.openInMaps': 'Openen in kaarten',
'places.categoryNamePlaceholder': 'Categorienaam',
'places.formTime': 'Tijd',
'places.startTime': 'Starttijd',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Plaatsen zoeken...',
'places.mapsSearchError': 'Zoeken naar plaatsen mislukt.',
'places.searchGoogleInstead': 'Niet de juiste plek? Zoek in plaats daarvan op Google',
+ 'places.nearby': 'Plaatsen in de buurt van deze pin',
+ 'places.nearbyNone': 'Niets gevonden in de buurt van deze pin',
'places.loadingDetails': 'Plaatsgegevens laden…',
'places.osmHint':
"Zoeken via OpenStreetMap (geen foto's, openingstijden of beoordelingen). Voeg een Google API-sleutel toe in instellingen voor volledige details.",
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Plaatsen verrijken via Google',
'places.enrichOnImportHint':
'Zoekt elke geïmporteerde plaats op om fotos, adres en contactgegevens toe te voegen. Gebruikt je Google Maps-sleutel.',
+ 'places.enrichOnImportFileHint':
+ 'Zoekt daarna elk geïmporteerd punt op in Google en voegt foto, adres, website en telefoonnummer toe. Paden en tracks blijven zoals ze zijn.',
'places.uploadImage': 'Afbeelding uploaden',
'places.changeImage': 'Afbeelding wijzigen',
'places.removeImage': 'Afbeelding verwijderen',
+ 'places.chooseImage': 'Een afbeelding kiezen',
+ 'places.uploadFromDevice': 'Uploaden vanaf apparaat',
+ 'places.fromAttachedFiles': 'Uit bijgevoegde bestanden',
'places.imageUploadError': 'Afbeelding uploaden mislukt',
'places.imageRemoveError': 'Afbeelding verwijderen mislukt',
};
diff --git a/shared/src/i18n/nl/reservations.ts b/shared/src/i18n/nl/reservations.ts
index f817ff315..c415349d6 100644
--- a/shared/src/i18n/nl/reservations.ts
+++ b/shared/src/i18n/nl/reservations.ts
@@ -62,6 +62,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Overig',
'reservations.type.bus': 'Bus',
'reservations.type.ferry': 'Veerboot',
+ 'reservations.type.cable_car': 'Kabelbaan',
'reservations.type.bicycle': 'Fiets',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Openbaar vervoer',
@@ -196,6 +197,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Filters resetten',
'reservations.noMatches': 'Niets voldoet aan deze filters',
'reservations.viewOptions': 'Weergaveopties',
+ 'reservations.exportCsv': 'Exporteren als spreadsheet (CSV)',
+ 'reservations.export.type': 'Type',
+ 'reservations.export.title': 'Titel',
+ 'reservations.export.start': 'Begin',
+ 'reservations.export.end': 'Einde',
+ 'reservations.export.from': 'Van',
+ 'reservations.export.to': 'Naar',
+ 'reservations.export.location': 'Locatie',
+ 'reservations.export.confirmation': 'Bevestiging',
+ 'reservations.export.notes': 'Notities',
'reservations.resetView': 'Weergave resetten',
'reservations.group.label': 'Groeperen op',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/nl/settings.ts b/shared/src/i18n/nl/settings.ts
index b8d901785..d8070a026 100644
--- a/shared/src/i18n/nl/settings.ts
+++ b/shared/src/i18n/nl/settings.ts
@@ -339,6 +339,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Bedragen onder Onkosten worden alleen ter weergave naar deze valuta omgerekend — de oorspronkelijke bedragen blijven ongewijzigd.',
'settings.currencyTrip': 'Valuta van de reis',
+ 'settings.placeLanguage': 'Plaatsnamen',
+ 'settings.placeLanguageApp': 'Zelfde als de app',
+ 'settings.placeLanguageHint':
+ 'De taal waarin zoeken naar plaatsen, suggesties en adressen antwoorden. Heeft een plaats geen naam in die taal, dan wordt de lokale naam getoond.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Log sneller en phishingbestendig in met een passkey — je vingerafdruk, gezicht, pincode of een hardwaresleutel. Je wachtwoord blijft als back-up bestaan.',
@@ -484,6 +488,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Opstarten',
+ 'settings.dayDateFirst': 'Datum eerst in dagkoppen',
+ 'settings.compactUnplanned': 'Compacte markeringen voor ongeplande plaatsen',
+ 'settings.compactUnplannedHint':
+ 'Plaatsen die in geen enkele dag gepland zijn, verschijnen als kleine markeringen zonder foto, zodat de geplande stops opvallen.',
+ 'settings.dayDateFirstHint':
+ 'Begin elke dag met de kalenderdatum en toon "Dag 1" of de eigen titel van de dag ernaast.',
'settings.startPage': 'Startpagina',
'settings.startPageDashboard': 'Dashboard',
'settings.startPageActiveTrip': 'Actieve reis',
diff --git a/shared/src/i18n/nl/share.ts b/shared/src/i18n/nl/share.ts
index 3c624282d..143bcb8fc 100644
--- a/shared/src/i18n/nl/share.ts
+++ b/shared/src/i18n/nl/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Inpaklijst',
'share.permBudget': 'Onkosten',
'share.permCollab': 'Chat',
+ 'share.options': 'Opties',
+ 'share.optTravelOnly': 'Alleen vervoer en verblijf',
+ 'share.optTravelOnlyHint': 'Toont alleen vervoer en accommodatie, zonder activiteiten, dagnotities en lege dagen',
+ 'share.optHideImages': 'Zonder foto’s',
+ 'share.optHideImagesHint': 'Laat de foto’s van plaatsen weg op de gedeelde pagina',
};
export default share;
diff --git a/shared/src/i18n/nl/shared.ts b/shared/src/i18n/nl/shared.ts
index b442ba2a5..3f6b60388 100644
--- a/shared/src/i18n/nl/shared.ts
+++ b/shared/src/i18n/nl/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'dagen',
'shared.places': 'plaatsen',
+ 'shared.unplanned': 'Nog niet gepland',
'shared.other': 'Overig',
'shared.totalBudget': 'Totale onkosten',
'shared.messages': 'berichten',
diff --git a/shared/src/i18n/nl/todo.ts b/shared/src/i18n/nl/todo.ts
index cac485125..15a50a24f 100644
--- a/shared/src/i18n/nl/todo.ts
+++ b/shared/src/i18n/nl/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Geen lijst',
'todo.namePlaceholder': 'Taaknaam',
'todo.descriptionPlaceholder': 'Beschrijving (optioneel)',
+ 'todo.editDescription': 'Klik om te bewerken, links openen direct',
'todo.unassigned': 'Niet toegewezen',
'todo.noCategory': 'Geen lijst',
'todo.hasDescription': 'Heeft beschrijving',
diff --git a/shared/src/i18n/nl/undo.ts b/shared/src/i18n/nl/undo.ts
index 83fff3520..2068552c2 100644
--- a/shared/src/i18n/nl/undo.ts
+++ b/shared/src/i18n/nl/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Ongedaan maken: {action}',
'undo.assignPlace': 'Locatie aan dag toegewezen',
'undo.removeAssignment': 'Locatie uit dag verwijderd',
+ 'undo.clearDay': 'Dag leeggemaakt',
'undo.reorder': 'Locaties hergeordend',
'undo.optimize': 'Route geoptimaliseerd',
'undo.deletePlace': 'Locatie verwijderd',
diff --git a/shared/src/i18n/pl/atlas.ts b/shared/src/i18n/pl/atlas.ts
index b13187083..2f2aaebd6 100644
--- a/shared/src/i18n/pl/atlas.ts
+++ b/shared/src/i18n/pl/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Kraje',
'atlas.trips': 'Podróże',
'atlas.places': 'Miejsca',
+ 'atlas.placesShow': 'Pokaż miejsca w tym kraju',
+ 'atlas.placesSearch': 'Szukaj miejsc',
+ 'atlas.placesNone': 'Brak pasujących miejsc',
'atlas.unmark': 'Usuń',
'atlas.confirmMark': 'Oznaczyć ten kraj jako odwiedzony?',
'atlas.confirmUnmark': 'Usunąć ten kraj z listy odwiedzonych?',
@@ -31,6 +34,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Dni',
'atlas.visitedCountries': 'Odwiedzone kraje',
'atlas.cities': 'Miasta',
+ 'atlas.regions': 'Regiony',
'atlas.noData': 'Brak danych o podróżach',
'atlas.noDataHint': 'Utwórz podróż i dodaj miejsca, aby zobaczyć swoją mapę świata',
'atlas.nextTrip': 'Następna podróż',
diff --git a/shared/src/i18n/pl/budget.ts b/shared/src/i18n/pl/budget.ts
index 83759c88c..06ed62e32 100644
--- a/shared/src/i18n/pl/budget.ts
+++ b/shared/src/i18n/pl/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'np. kolacja, pamiątki, paliwo…',
'costs.note': 'Notatka',
'costs.notePlaceholder': 'Co obejmowało, kto ile oddaje…',
+ 'costs.paymentNotePlaceholder': 'Zapłacono gotówką, przelewem…',
'costs.addNote': 'Dodaj notatkę',
'costs.showNote': 'Pokaż notatkę',
'costs.hideNote': 'Ukryj notatkę',
diff --git a/shared/src/i18n/pl/dayplan.ts b/shared/src/i18n/pl/dayplan.ts
index cf5c1443a..a3b85c427 100644
--- a/shared/src/i18n/pl/dayplan.ts
+++ b/shared/src/i18n/pl/dayplan.ts
@@ -67,6 +67,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Mapy i GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Eksportuj plan dnia jako PDF',
+ 'dayplan.pdfMine': 'Mój plan jako PDF',
+ 'dayplan.pdfMineSub': 'Tylko aktywności i rezerwacje, w których bierzesz udział',
'dayplan.gpxTooltip': 'Eksportuj jako GPX do map offline i urządzeń GPS',
'dayplan.gpxAll': 'Cała podróż',
'dayplan.gpxPlaces': 'Tylko miejsca',
@@ -93,6 +95,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Usuń dzień',
'dayplan.deleteDayTitle': 'Usunąć {day}?',
'dayplan.deleteDayBody': 'Dzień zostanie usunięty z podróży. Tej operacji nie można cofnąć.',
+ 'dayplan.excludeFromRoute': 'Pomiń w trasie',
+ 'dayplan.includeInRoute': 'Przywróć do trasy',
+ 'dayplan.offRoute': 'Poza trasą',
+ 'dayplan.offRouteHint': 'Zostaje w dniu i na mapie, ale trasa je pomija',
+ 'dayplan.clearDay': 'Wyczyść dzień',
+ 'dayplan.clearDayTitle': 'Wyczyścić {day}?',
+ 'dayplan.clearDayBody':
+ 'Wszystkie miejsca zostaną usunięte z tego dnia. Miejsca pozostaną w podróży, a dzień zachowa swoje notatki i rezerwacje.',
'dayplan.deleteDayEmpty': 'Na ten dzień nic nie zaplanowano.',
'dayplan.impactPlaces': 'Zaplanowane miejsca: {count}',
'dayplan.impactPlacesHint': 'Pozostają na liście miejsc.',
diff --git a/shared/src/i18n/pl/inspector.ts b/shared/src/i18n/pl/inspector.ts
index b5dafafe2..58fc88d46 100644
--- a/shared/src/i18n/pl/inspector.ts
+++ b/shared/src/i18n/pl/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Oczekująca rezerwacja',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Nawigacja',
+ 'inspector.otherMapApp': 'Inna aplikacja z mapami',
'inspector.openWith': 'Otwórz w',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Otwórz stronę internetową',
diff --git a/shared/src/i18n/pl/journey.ts b/shared/src/i18n/pl/journey.ts
index 5f5a680a9..2d0ed426b 100644
--- a/shared/src/i18n/pl/journey.ts
+++ b/shared/src/i18n/pl/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Dziennik podróży',
'journey.subtitle': 'Dokumentuj swoje podróże na bieżąco',
'journey.new': 'Nowy dziennik podróży',
+ 'journey.lightbox.zoomIn': 'Powiększ',
+ 'journey.lightbox.zoomOut': 'Pomniejsz',
+ 'journey.lightbox.zoomReset': 'Wróć do całego zdjęcia',
'journey.create': 'Utwórz',
'journey.titlePlaceholder': 'Dokąd jedziesz?',
'journey.empty': 'Brak dzienników podróży',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Dodaj wpis',
'journey.detail.jumpToTop': 'Powrót na górę',
'journey.detail.jumpToLast': 'Przejdź do ostatniego wpisu',
+ 'journey.detail.dayJump': 'Przejdź do dnia',
+ 'journey.detail.dayJumpCount': '{count} dni',
'journey.detail.newEntry': 'Nowy wpis',
'journey.detail.editEntry': 'Edytuj wpis',
'journey.detail.noEntries': 'Brak wpisów',
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Lista',
'journey.studio.kind.icon': 'Ikona',
'journey.studio.duplicate': 'Duplikuj',
+ 'journey.studio.copyToPage': 'Kopiuj, aby wkleić na dowolnej stronie (Ctrl+C)',
+ 'journey.studio.paste': 'Wklej (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Najpierw coś skopiuj, a potem wklej to na dowolnej stronie',
+ 'journey.studio.myLayouts': 'Moje układy',
+ 'journey.studio.myLayoutsEmpty': 'Zachowaj ułożoną stronę i rozmieść inne strony w ten sam sposób. Ich zdjęcia i teksty pozostaną.',
+ 'journey.studio.saveLayout': 'Zapisz tę stronę jako układ',
+ 'journey.studio.saveLayoutHint': 'Zachowuje rozmieszczenie bez zdjęć, dla wszystkich edytorów tej książki',
+ 'journey.studio.saveLayoutFull': 'Ta książka mieści do 24 układów. Usuń jeden, aby zapisać kolejny.',
+ 'journey.studio.deleteLayout': 'Usuń układ',
+ 'journey.studio.layoutName': 'Układ',
+ 'journey.studio.builtInLayouts': 'Wbudowane',
'journey.studio.style': 'Styl',
'journey.studio.shows': 'Pokaż',
'journey.studio.size': 'Rozmiar',
@@ -625,6 +641,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Przystanek zostaje w dzienniku, ale nie liczy się do dystansu, krajów ani mapy w Studio.',
'journey.entry.offRoute': 'Poza trasą',
+ 'journey.entry.draft': 'Szkic',
+ 'journey.editor.draft': 'Szkic',
+ 'journey.editor.draftHint': 'Ten wpis widzisz tylko ty i pozostali współautorzy. Udostępniony dziennik go pomija, dopóki tego nie wyłączysz.',
+ 'journey.editor.tripSuggestionHint': 'Ten dzień przypada na tę podróż. Połącz ją, a jej miejsca trafią do tego dziennika.',
+ 'journey.editor.tripSuggestionLater': 'Nie teraz',
'journey.suggestions.dismiss': 'Odrzuć tę propozycję',
'journey.suggestions.dismissed': 'Propozycja odrzucona',
'journey.suggestions.restore': 'Przywróć odrzucone propozycje',
diff --git a/shared/src/i18n/pl/map.ts b/shared/src/i18n/pl/map.ts
index 134b54f9c..52da7147b 100644
--- a/shared/src/i18n/pl/map.ts
+++ b/shared/src/i18n/pl/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Nie udało się ustalić Twojej lokalizacji.',
'map.location.timeout': 'Ustalanie lokalizacji trwało zbyt długo. Spróbuj ponownie przy lepszej widoczności nieba.',
'map.overview.show': 'Pokaż całą podróż',
+ 'map.lock.lock': 'Zablokuj widok mapy',
+ 'map.lock.unlock': 'Pozwól mapie podążać za zaznaczeniem',
'map.overview.hide': 'Ukryj całą podróż',
'map.overview.total': 'Łączny dystans',
'map.attribution': 'Źródła mapy',
diff --git a/shared/src/i18n/pl/mobileTrip.ts b/shared/src/i18n/pl/mobileTrip.ts
index 875ae4651..b121f77f3 100644
--- a/shared/src/i18n/pl/mobileTrip.ts
+++ b/shared/src/i18n/pl/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Na mapie',
'mobileTrip.profileDriving': 'Samochodem',
'mobileTrip.profileWalking': 'Pieszo',
+ 'mobileTrip.profileCycling': 'Rowerem',
'mobileTrip.renameDay': 'Zmień nazwę dnia',
'mobileTrip.resBadge': 'Rezerwacja',
'mobileTrip.showOnMap': 'Pokaż na mapie',
diff --git a/shared/src/i18n/pl/packing.ts b/shared/src/i18n/pl/packing.ts
index 89246f657..c79c40608 100644
--- a/shared/src/i18n/pl/packing.ts
+++ b/shared/src/i18n/pl/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Edytuj przedmiot',
'packing.itemName': 'Nazwa',
'packing.itemQuantity': 'Ilość',
+ 'packing.packedCount': '{packed} z {total} spakowane',
+ 'packing.packedMore': 'Spakuj o jeden więcej',
+ 'packing.packedLess': 'Spakuj o jeden mniej',
'packing.itemWeight': 'Waga (g)',
'packing.title': 'Lista pakowania',
'packing.empty': 'Lista pakowania jest pusta',
diff --git a/shared/src/i18n/pl/places.ts b/shared/src/i18n/pl/places.ts
index 087082e8d..e8431c18f 100644
--- a/shared/src/i18n/pl/places.ts
+++ b/shared/src/i18n/pl/places.ts
@@ -42,6 +42,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Pokaż całą podróż',
'places.filterTracks': 'Trasy',
'places.filterByRating': 'Filtruj według oceny',
+ 'places.filterByLocation': 'Filtruj według kraju lub regionu',
+ 'places.allLocations': 'Wszystkie kraje',
'places.filterShow': 'Pokaż',
'places.clearSearch': 'Wyczyść wyszukiwanie',
'places.yourRating': 'Twoja ocena',
@@ -68,6 +70,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategoria',
'places.noCategory': 'Brak kategorii',
'places.newCategory': 'Nowa kategoria',
+ 'places.openInMaps': 'Otwórz w mapach',
'places.categoryNamePlaceholder': 'Nazwa kategorii',
'places.formTime': 'Godzina',
'places.startTime': 'Początek',
@@ -84,6 +87,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Szukaj miejsc...',
'places.mapsSearchError': 'Nie udało się wyszukać miejsca.',
'places.searchGoogleInstead': 'To nie to miejsce? Poszukaj w Google',
+ 'places.nearby': 'Miejsca w pobliżu tej pinezki',
+ 'places.nearbyNone': 'Nic nie znaleziono w pobliżu tej pinezki',
'places.loadingDetails': 'Ładowanie szczegółów miejsca…',
'places.osmHint':
'Korzystając z OpenStreetMap (brak zdjęć, godzin otwarcia czy ocen). Dodaj klucz API Google w ustawieniach aby uzyskać pełne dane.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Wzbogać miejsca przez Google',
'places.enrichOnImportHint':
'Wyszukuje każde zaimportowane miejsce, aby dodać zdjęcia, adres i dane kontaktowe. Wymaga klucza Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Następnie wyszukuje każdy zaimportowany punkt w Google i dodaje jego zdjęcie, adres, stronę internetową i telefon. Ścieżki i ślady pozostają bez zmian.',
'places.uploadImage': 'Prześlij zdjęcie',
'places.changeImage': 'Zmień zdjęcie',
'places.removeImage': 'Usuń zdjęcie',
+ 'places.chooseImage': 'Wybierz obraz',
+ 'places.uploadFromDevice': 'Prześlij z urządzenia',
+ 'places.fromAttachedFiles': 'Z załączonych plików',
'places.imageUploadError': 'Nie udało się przesłać zdjęcia',
'places.imageRemoveError': 'Nie udało się usunąć zdjęcia',
};
diff --git a/shared/src/i18n/pl/reservations.ts b/shared/src/i18n/pl/reservations.ts
index 9030760ff..a7c4c1cac 100644
--- a/shared/src/i18n/pl/reservations.ts
+++ b/shared/src/i18n/pl/reservations.ts
@@ -62,6 +62,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Inne',
'reservations.type.bus': 'Autobus',
'reservations.type.ferry': 'Prom',
+ 'reservations.type.cable_car': 'Kolejka linowa',
'reservations.type.bicycle': 'Rower',
'reservations.type.taxi': 'Taksówka',
'reservations.type.transit': 'Transport publiczny',
@@ -195,6 +196,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Wyczyść filtry',
'reservations.noMatches': 'Nic nie pasuje do tych filtrów',
'reservations.viewOptions': 'Opcje widoku',
+ 'reservations.exportCsv': 'Eksportuj jako arkusz kalkulacyjny (CSV)',
+ 'reservations.export.type': 'Typ',
+ 'reservations.export.title': 'Tytuł',
+ 'reservations.export.start': 'Początek',
+ 'reservations.export.end': 'Koniec',
+ 'reservations.export.from': 'Skąd',
+ 'reservations.export.to': 'Dokąd',
+ 'reservations.export.location': 'Miejsce',
+ 'reservations.export.confirmation': 'Potwierdzenie',
+ 'reservations.export.notes': 'Notatki',
'reservations.resetView': 'Resetuj widok',
'reservations.group.label': 'Grupuj według',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/pl/settings.ts b/shared/src/i18n/pl/settings.ts
index 98f80d339..19a7c861e 100644
--- a/shared/src/i18n/pl/settings.ts
+++ b/shared/src/i18n/pl/settings.ts
@@ -336,6 +336,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Kwoty w Kosztach są przeliczane na tę walutę wyłącznie na potrzeby wyświetlania — oryginalne kwoty pozostają bez zmian.',
'settings.currencyTrip': 'Waluta wyjazdu',
+ 'settings.placeLanguage': 'Nazwy miejsc',
+ 'settings.placeLanguageApp': 'Tak jak aplikacja',
+ 'settings.placeLanguageHint': 'Język, w którym odpowiadają wyszukiwanie miejsc, podpowiedzi i adresy. Jeśli miejsce nie ma nazwy w tym języku, wyświetlana jest jego nazwa lokalna.',
'settings.passkey.title': 'Klucze dostępu',
'settings.passkey.description':
'Loguj się szybciej i z odpornością na phishing za pomocą klucza dostępu — odcisku palca, twarzy, kodu PIN lub klucza sprzętowego. Twoje hasło pozostaje jako zapasowa opcja.',
@@ -483,6 +486,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Uruchamianie',
+ 'settings.dayDateFirst': 'Data na początku nagłówków dni',
+ 'settings.compactUnplanned': 'Kompaktowe znaczniki dla niezaplanowanych miejsc',
+ 'settings.compactUnplannedHint': 'Miejsca niezaplanowane w żadnym dniu są wyświetlane jako małe znaczniki bez zdjęcia, aby zaplanowane przystanki się wyróżniały.',
+ 'settings.dayDateFirstHint': 'Każdy dzień zaczyna się od daty w kalendarzu, a obok widać „Dzień 1” lub własny tytuł dnia.',
'settings.startPage': 'Strona startowa',
'settings.startPageDashboard': 'Panel',
'settings.startPageActiveTrip': 'Aktywna podróż',
diff --git a/shared/src/i18n/pl/share.ts b/shared/src/i18n/pl/share.ts
index e8c7f3cb6..9582ea269 100644
--- a/shared/src/i18n/pl/share.ts
+++ b/shared/src/i18n/pl/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Lista pakowania',
'share.permBudget': 'Koszty',
'share.permCollab': 'Czat',
+ 'share.options': 'Opcje',
+ 'share.optTravelOnly': 'Tylko podróż i noclegi',
+ 'share.optTravelOnlyHint': 'Pokazuje tylko transport i zakwaterowanie, bez aktywności, notatek do dni i pustych dni',
+ 'share.optHideImages': 'Bez zdjęć',
+ 'share.optHideImagesHint': 'Pomija zdjęcia miejsc na udostępnionej stronie',
};
export default share;
diff --git a/shared/src/i18n/pl/shared.ts b/shared/src/i18n/pl/shared.ts
index f99e676dd..4677e5f4f 100644
--- a/shared/src/i18n/pl/shared.ts
+++ b/shared/src/i18n/pl/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Czat',
'shared.days': 'dni',
'shared.places': 'miejsca',
+ 'shared.unplanned': 'Jeszcze niezaplanowane',
'shared.other': 'Inne',
'shared.totalBudget': 'Koszty całkowite',
'shared.messages': 'wiadomości',
diff --git a/shared/src/i18n/pl/todo.ts b/shared/src/i18n/pl/todo.ts
index 539a21ec7..91eed4052 100644
--- a/shared/src/i18n/pl/todo.ts
+++ b/shared/src/i18n/pl/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Brak listy',
'todo.namePlaceholder': 'Nazwa zadania',
'todo.descriptionPlaceholder': 'Opis (opcjonalnie)',
+ 'todo.editDescription': 'Kliknij, aby edytować, linki otwierają się bezpośrednio',
'todo.unassigned': 'Nieprzypisane',
'todo.noCategory': 'Brak listy',
'todo.hasDescription': 'Ma opis',
diff --git a/shared/src/i18n/pl/undo.ts b/shared/src/i18n/pl/undo.ts
index 44dc63c26..1ae778d61 100644
--- a/shared/src/i18n/pl/undo.ts
+++ b/shared/src/i18n/pl/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Cofnij: {action}',
'undo.assignPlace': 'Miejsce przypisane do dnia',
'undo.removeAssignment': 'Miejsce usunięte z dnia',
+ 'undo.clearDay': 'Dzień wyczyszczony',
'undo.reorder': 'Kolejność zmieniona',
'undo.optimize': 'Trasa zoptymalizowana',
'undo.deletePlace': 'Miejsce usunięte',
diff --git a/shared/src/i18n/ru/atlas.ts b/shared/src/i18n/ru/atlas.ts
index 35c43b52a..76530ee9a 100644
--- a/shared/src/i18n/ru/atlas.ts
+++ b/shared/src/i18n/ru/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Стран',
'atlas.trips': 'Поездок',
'atlas.places': 'Мест',
+ 'atlas.placesShow': 'Показать места в этой стране',
+ 'atlas.placesSearch': 'Поиск мест',
+ 'atlas.placesNone': 'Подходящих мест нет',
'atlas.days': 'Дней',
'atlas.visitedCountries': 'Посещённые страны',
'atlas.cities': 'Города',
+ 'atlas.regions': 'Регионы',
'atlas.noData': 'Данных о поездках пока нет',
'atlas.noDataHint': 'Создайте поездку и добавьте места, чтобы увидеть карту мира',
'atlas.nextTrip': 'Следующая поездка',
diff --git a/shared/src/i18n/ru/budget.ts b/shared/src/i18n/ru/budget.ts
index 0384fa290..643ac802a 100644
--- a/shared/src/i18n/ru/budget.ts
+++ b/shared/src/i18n/ru/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'напр. ужин, сувениры, бензин…',
'costs.note': 'Заметка',
'costs.notePlaceholder': 'Что входило, кто сколько должен…',
+ 'costs.paymentNotePlaceholder': 'Оплачено наличными, банковским переводом…',
'costs.addNote': 'Добавить заметку',
'costs.showNote': 'Показать заметку',
'costs.hideNote': 'Скрыть заметку',
diff --git a/shared/src/i18n/ru/dayplan.ts b/shared/src/i18n/ru/dayplan.ts
index 3ed80560b..e4f07a25a 100644
--- a/shared/src/i18n/ru/dayplan.ts
+++ b/shared/src/i18n/ru/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Карты и GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Экспортировать план дня в PDF',
+ 'dayplan.pdfMine': 'Мой план в PDF',
+ 'dayplan.pdfMineSub': 'Только занятия и бронирования, в которых вы участвуете',
'dayplan.gpxTooltip': 'Экспорт в GPX для офлайн-карт и GPS-устройств',
'dayplan.gpxAll': 'Вся поездка',
'dayplan.gpxPlaces': 'Только места',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Удалить день',
'dayplan.deleteDayTitle': 'Удалить {day}?',
'dayplan.deleteDayBody': 'День будет удалён из поездки. Это действие нельзя отменить.',
+ 'dayplan.excludeFromRoute': 'Исключить из маршрута',
+ 'dayplan.includeInRoute': 'Вернуть в маршрут',
+ 'dayplan.offRoute': 'Вне маршрута',
+ 'dayplan.offRouteHint': 'Остаётся в дне и на карте, но маршрут его пропускает',
+ 'dayplan.clearDay': 'Очистить день',
+ 'dayplan.clearDayTitle': 'Очистить {day}?',
+ 'dayplan.clearDayBody':
+ 'Все места будут убраны из этого дня. Сами места останутся в поездке, а заметки и бронирования дня сохранятся.',
'dayplan.deleteDayEmpty': 'На этот день ничего не запланировано.',
'dayplan.impactPlaces': 'Запланированные места: {count}',
'dayplan.impactPlacesHint': 'Они останутся в списке мест.',
diff --git a/shared/src/i18n/ru/inspector.ts b/shared/src/i18n/ru/inspector.ts
index 1f5a28940..136ddac8e 100644
--- a/shared/src/i18n/ru/inspector.ts
+++ b/shared/src/i18n/ru/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Ожидающее бронирование',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Навигация',
+ 'inspector.otherMapApp': 'Другое картографическое приложение',
'inspector.openWith': 'Открыть в',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Открыть сайт',
diff --git a/shared/src/i18n/ru/journey.ts b/shared/src/i18n/ru/journey.ts
index fce49cdb6..1b4d761bc 100644
--- a/shared/src/i18n/ru/journey.ts
+++ b/shared/src/i18n/ru/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Путешествие',
'journey.subtitle': 'Отслеживайте свои путешествия в реальном времени',
'journey.new': 'Новое путешествие',
+ 'journey.lightbox.zoomIn': 'Увеличить',
+ 'journey.lightbox.zoomOut': 'Уменьшить',
+ 'journey.lightbox.zoomReset': 'Вернуться к полному фото',
'journey.create': 'Создать',
'journey.titlePlaceholder': 'Куда вы едете?',
'journey.empty': 'Пока нет путешествий',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Добавить запись',
'journey.detail.jumpToTop': 'Наверх',
'journey.detail.jumpToLast': 'К последней записи',
+ 'journey.detail.dayJump': 'Перейти к дню',
+ 'journey.detail.dayJumpCount': 'Дней: {count}',
'journey.detail.newEntry': 'Новая запись',
'journey.detail.editEntry': 'Редактировать запись',
'journey.detail.noEntries': 'Пока нет записей',
@@ -432,6 +437,18 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Список',
'journey.studio.kind.icon': 'Иконка',
'journey.studio.duplicate': 'Дублировать',
+ 'journey.studio.copyToPage': 'Копировать, чтобы вставить на любую страницу (Ctrl+C)',
+ 'journey.studio.paste': 'Вставить (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Сначала скопируйте что-нибудь, затем вставьте на любую страницу',
+ 'journey.studio.myLayouts': 'Мои макеты',
+ 'journey.studio.myLayoutsEmpty':
+ 'Сохраните оформленную страницу и расположите другие страницы так же. Их фото и тексты останутся.',
+ 'journey.studio.saveLayout': 'Сохранить эту страницу как макет',
+ 'journey.studio.saveLayoutHint': 'Сохраняет расположение без фото, для всех редакторов этой книги',
+ 'journey.studio.saveLayoutFull': 'В этой книге можно хранить до 24 макетов. Удалите один, чтобы сохранить новый.',
+ 'journey.studio.deleteLayout': 'Удалить макет',
+ 'journey.studio.layoutName': 'Макет',
+ 'journey.studio.builtInLayouts': 'Встроенные',
'journey.studio.style': 'Стиль',
'journey.studio.shows': 'Показывать',
'journey.studio.size': 'Размер',
@@ -626,6 +643,12 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Остановка остаётся в дневнике, но не учитывается в расстоянии, странах и на карте в Studio.',
'journey.entry.offRoute': 'Вне маршрута',
+ 'journey.entry.draft': 'Черновик',
+ 'journey.editor.draft': 'Черновик',
+ 'journey.editor.draftHint':
+ 'Эту запись видите только вы и другие участники. В общем путешествии она не показывается, пока вы не выключите этот параметр.',
+ 'journey.editor.tripSuggestionHint': 'Этот день входит в эту поездку. Свяжите их, и её места добавятся в это путешествие.',
+ 'journey.editor.tripSuggestionLater': 'Не сейчас',
'journey.suggestions.dismiss': 'Отклонить это предложение',
'journey.suggestions.dismissed': 'Предложение отклонено',
'journey.suggestions.restore': 'Вернуть отклонённые предложения',
diff --git a/shared/src/i18n/ru/map.ts b/shared/src/i18n/ru/map.ts
index ec612c61f..8825290c2 100644
--- a/shared/src/i18n/ru/map.ts
+++ b/shared/src/i18n/ru/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Не удалось определить ваше местоположение.',
'map.location.timeout': 'Определение местоположения заняло слишком много времени. Попробуйте ещё раз под открытым небом.',
'map.overview.show': 'Показать всю поездку',
+ 'map.lock.lock': 'Зафиксировать вид карты',
+ 'map.lock.unlock': 'Карта следует за выбором',
'map.overview.hide': 'Скрыть всю поездку',
'map.overview.total': 'Общее расстояние',
'map.attribution': 'Источники карты',
diff --git a/shared/src/i18n/ru/mobileTrip.ts b/shared/src/i18n/ru/mobileTrip.ts
index 39366aab3..21d85dff9 100644
--- a/shared/src/i18n/ru/mobileTrip.ts
+++ b/shared/src/i18n/ru/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'На карте',
'mobileTrip.profileDriving': 'На машине',
'mobileTrip.profileWalking': 'Пешком',
+ 'mobileTrip.profileCycling': 'На велосипеде',
'mobileTrip.renameDay': 'Переименовать день',
'mobileTrip.resBadge': 'Бронирование',
'mobileTrip.showOnMap': 'Показать на карте',
diff --git a/shared/src/i18n/ru/packing.ts b/shared/src/i18n/ru/packing.ts
index 8992a402c..65178679b 100644
--- a/shared/src/i18n/ru/packing.ts
+++ b/shared/src/i18n/ru/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Изменить предмет',
'packing.itemName': 'Название',
'packing.itemQuantity': 'Количество',
+ 'packing.packedCount': 'Упаковано {packed} из {total}',
+ 'packing.packedMore': 'Упаковать ещё одну',
+ 'packing.packedLess': 'Упаковать на одну меньше',
'packing.itemWeight': 'Вес (г)',
'packing.title': 'Список вещей',
'packing.empty': 'Список вещей пуст',
diff --git a/shared/src/i18n/ru/places.ts b/shared/src/i18n/ru/places.ts
index 35f996cbb..df366fc82 100644
--- a/shared/src/i18n/ru/places.ts
+++ b/shared/src/i18n/ru/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Показать всю поездку',
'places.filterTracks': 'Треки',
'places.filterByRating': 'Фильтр по оценке',
+ 'places.filterByLocation': 'Фильтр по стране или региону',
+ 'places.allLocations': 'Все страны',
'places.filterShow': 'Показать',
'places.clearSearch': 'Очистить поиск',
'places.yourRating': 'Твоя оценка',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Категория',
'places.noCategory': 'Без категории',
'places.newCategory': 'Новая категория',
+ 'places.openInMaps': 'Открыть в картах',
'places.categoryNamePlaceholder': 'Название категории',
'places.formTime': 'Время',
'places.startTime': 'Начало',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Поиск мест...',
'places.mapsSearchError': 'Ошибка поиска мест.',
'places.searchGoogleInstead': 'Не то место? Поискать в Google',
+ 'places.nearby': 'Места рядом с этой меткой',
+ 'places.nearbyNone': 'Рядом с этой меткой ничего не найдено',
'places.loadingDetails': 'Загрузка данных о месте…',
'places.osmHint':
'Поиск через OpenStreetMap (без фото, часов работы и рейтингов). Добавьте API-ключ Google в настройках для полной информации.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Обогатить места через Google',
'places.enrichOnImportHint':
'Находит каждое импортированное место и добавляет фото, адрес и контакты. Требуется ключ Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'После импорта ищет каждую точку в Google и добавляет её фото, адрес, сайт и телефон. Пути и треки остаются без изменений.',
'places.uploadImage': 'Загрузить изображение',
'places.changeImage': 'Изменить изображение',
'places.removeImage': 'Удалить изображение',
+ 'places.chooseImage': 'Выбрать изображение',
+ 'places.uploadFromDevice': 'Загрузить с устройства',
+ 'places.fromAttachedFiles': 'Из прикреплённых файлов',
'places.imageUploadError': 'Не удалось загрузить изображение',
'places.imageRemoveError': 'Не удалось удалить изображение',
};
diff --git a/shared/src/i18n/ru/reservations.ts b/shared/src/i18n/ru/reservations.ts
index d3e67a965..86a1a5926 100644
--- a/shared/src/i18n/ru/reservations.ts
+++ b/shared/src/i18n/ru/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Другое',
'reservations.type.bus': 'Автобус',
'reservations.type.ferry': 'Паром',
+ 'reservations.type.cable_car': 'Канатная дорога',
'reservations.type.bicycle': 'Велосипед',
'reservations.type.taxi': 'Такси',
'reservations.type.transit': 'Общественный транспорт',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Сбросить фильтры',
'reservations.noMatches': 'Под эти фильтры ничего не подходит',
'reservations.viewOptions': 'Настройки вида',
+ 'reservations.exportCsv': 'Экспорт в таблицу (CSV)',
+ 'reservations.export.type': 'Тип',
+ 'reservations.export.title': 'Название',
+ 'reservations.export.start': 'Начало',
+ 'reservations.export.end': 'Конец',
+ 'reservations.export.from': 'Откуда',
+ 'reservations.export.to': 'Куда',
+ 'reservations.export.location': 'Место',
+ 'reservations.export.confirmation': 'Подтверждение',
+ 'reservations.export.notes': 'Заметки',
'reservations.resetView': 'Сбросить вид',
'reservations.group.label': 'Группировать по',
'reservations.group.status': 'Статус',
diff --git a/shared/src/i18n/ru/settings.ts b/shared/src/i18n/ru/settings.ts
index 6de2fb1d7..356cccb4f 100644
--- a/shared/src/i18n/ru/settings.ts
+++ b/shared/src/i18n/ru/settings.ts
@@ -338,6 +338,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Суммы в разделе «Расходы» отображаются в этой валюте только для просмотра — исходные суммы не изменяются.',
'settings.currencyTrip': 'Валюта поездки',
+ 'settings.placeLanguage': 'Названия мест',
+ 'settings.placeLanguageApp': 'Как в приложении',
+ 'settings.placeLanguageHint':
+ 'Язык, на котором отвечают поиск мест, подсказки и адреса. Если у места нет названия на этом языке, показывается местное название.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Входите быстрее и с защитой от фишинга с помощью passkey — отпечатка пальца, лица, PIN-кода или аппаратного ключа. Ваш пароль остаётся как резервный способ.',
@@ -485,6 +489,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Язык и регион',
'settings.general.travelMap': 'Карта и путешествия',
'settings.general.startup': 'Запуск',
+ 'settings.dayDateFirst': 'Дата первой в заголовках дней',
+ 'settings.compactUnplanned': 'Компактные метки для незапланированных мест',
+ 'settings.compactUnplannedHint':
+ 'Места, не включённые ни в один день, отображаются маленькими метками без фото, чтобы запланированные остановки выделялись.',
+ 'settings.dayDateFirstHint':
+ 'Начинать каждый день с календарной даты и показывать рядом «День 1» или собственное название дня.',
'settings.startPage': 'Стартовая страница',
'settings.startPageDashboard': 'Панель управления',
'settings.startPageActiveTrip': 'Активная поездка',
diff --git a/shared/src/i18n/ru/share.ts b/shared/src/i18n/ru/share.ts
index c1f0aecae..4bc909fde 100644
--- a/shared/src/i18n/ru/share.ts
+++ b/shared/src/i18n/ru/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Вещи',
'share.permBudget': 'Расходы',
'share.permCollab': 'Чат',
+ 'share.options': 'Параметры',
+ 'share.optTravelOnly': 'Только транспорт и жильё',
+ 'share.optTravelOnlyHint': 'Показывает только транспорт и проживание, без занятий, заметок к дням и пустых дней',
+ 'share.optHideImages': 'Без фото',
+ 'share.optHideImagesHint': 'Фото мест не попадают на общую страницу',
};
export default share;
diff --git a/shared/src/i18n/ru/shared.ts b/shared/src/i18n/ru/shared.ts
index 69db2c8bd..d75b99697 100644
--- a/shared/src/i18n/ru/shared.ts
+++ b/shared/src/i18n/ru/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Чат',
'shared.days': 'дней',
'shared.places': 'мест',
+ 'shared.unplanned': 'Ещё не запланировано',
'shared.other': 'Прочее',
'shared.totalBudget': 'Общие расходы',
'shared.messages': 'сообщений',
diff --git a/shared/src/i18n/ru/todo.ts b/shared/src/i18n/ru/todo.ts
index b3d88b553..2b3c47b3d 100644
--- a/shared/src/i18n/ru/todo.ts
+++ b/shared/src/i18n/ru/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Без списка',
'todo.namePlaceholder': 'Название задачи',
'todo.descriptionPlaceholder': 'Описание (необязательно)',
+ 'todo.editDescription': 'Нажмите, чтобы изменить, ссылки открываются сразу',
'todo.unassigned': 'Не назначено',
'todo.noCategory': 'Без списка',
'todo.hasDescription': 'Есть описание',
diff --git a/shared/src/i18n/ru/undo.ts b/shared/src/i18n/ru/undo.ts
index ce95922e4..51de029c4 100644
--- a/shared/src/i18n/ru/undo.ts
+++ b/shared/src/i18n/ru/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Отменить: {action}',
'undo.assignPlace': 'Место добавлено в день',
'undo.removeAssignment': 'Место удалено из дня',
+ 'undo.clearDay': 'День очищен',
'undo.reorder': 'Места переупорядочены',
'undo.optimize': 'Маршрут оптимизирован',
'undo.deletePlace': 'Место удалено',
diff --git a/shared/src/i18n/sk/atlas.ts b/shared/src/i18n/sk/atlas.ts
index 195537e93..cc8329dde 100644
--- a/shared/src/i18n/sk/atlas.ts
+++ b/shared/src/i18n/sk/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Krajiny',
'atlas.trips': 'Cesty',
'atlas.places': 'Miesta',
+ 'atlas.placesShow': 'Zobraziť miesta v tejto krajine',
+ 'atlas.placesSearch': 'Hľadať miesta',
+ 'atlas.placesNone': 'Žiadne zodpovedajúce miesto',
'atlas.unmark': 'Odobrať',
'atlas.confirmMark': 'Označiť túto krajinu ako navštívenú?',
'atlas.confirmUnmark': 'Odobrať túto krajinu zo zoznamu navštívených?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Dni',
'atlas.visitedCountries': 'Navštívené krajiny',
'atlas.cities': 'Mestá',
+ 'atlas.regions': 'Regióny',
'atlas.noData': 'Zatiaľ žiadne cestovateľské dáta',
'atlas.noDataHint': 'Vytvorte cestu a pridajte miesta, aby ste videli svoju mapu sveta',
'atlas.nextTrip': 'Ďalšia cesta',
diff --git a/shared/src/i18n/sk/budget.ts b/shared/src/i18n/sk/budget.ts
index f54c34876..606d2d849 100644
--- a/shared/src/i18n/sk/budget.ts
+++ b/shared/src/i18n/sk/budget.ts
@@ -111,6 +111,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'napr. večera, suveníry, benzín…',
'costs.note': 'Poznámka',
'costs.notePlaceholder': 'Čo zahŕňalo, kto čo dlhuje…',
+ 'costs.paymentNotePlaceholder': 'Zaplatené v hotovosti, bankovým prevodom…',
'costs.addNote': 'Pridať poznámku',
'costs.showNote': 'Zobraziť poznámku',
'costs.hideNote': 'Skryť poznámku',
diff --git a/shared/src/i18n/sk/dayplan.ts b/shared/src/i18n/sk/dayplan.ts
index f53a66164..f1bd4ad60 100644
--- a/shared/src/i18n/sk/dayplan.ts
+++ b/shared/src/i18n/sk/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Mapy a GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Exportovať denný plán do PDF',
+ 'dayplan.pdfMine': 'Môj plán ako PDF',
+ 'dayplan.pdfMineSub': 'Len aktivity a rezervácie, na ktorých sa zúčastňujete',
'dayplan.gpxTooltip': 'Exportovať ako GPX pre offline mapy a GPS zariadenia',
'dayplan.gpxAll': 'Celá cesta',
'dayplan.gpxPlaces': 'Len miesta',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Vymazať deň',
'dayplan.deleteDayTitle': 'Vymazať {day}?',
'dayplan.deleteDayBody': 'Deň sa odoberie z cesty. Túto akciu nemožno vrátiť späť.',
+ 'dayplan.excludeFromRoute': 'Vynechať z trasy',
+ 'dayplan.includeInRoute': 'Vrátiť do trasy',
+ 'dayplan.offRoute': 'Mimo trasy',
+ 'dayplan.offRouteHint': 'Zostáva v dni aj na mape, ale trasa ho vynechá',
+ 'dayplan.clearDay': 'Vyprázdniť deň',
+ 'dayplan.clearDayTitle': 'Vyprázdniť {day}?',
+ 'dayplan.clearDayBody':
+ 'Všetky miesta sa z tohto dňa odoberú. Miesta zostanú v ceste a deň si ponechá svoje poznámky aj rezervácie.',
'dayplan.deleteDayEmpty': 'Na tento deň nie je nič naplánované.',
'dayplan.impactPlaces': 'Naplánované miesta: {count}',
'dayplan.impactPlacesHint': 'Zostanú v zozname miest.',
diff --git a/shared/src/i18n/sk/inspector.ts b/shared/src/i18n/sk/inspector.ts
index 5b374aba4..546751faf 100644
--- a/shared/src/i18n/sk/inspector.ts
+++ b/shared/src/i18n/sk/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Čakajúca rezervácia',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigácia',
+ 'inspector.otherMapApp': 'Iná mapová aplikácia',
'inspector.openWith': 'Otvoriť v',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Otvoriť webovú stránku',
diff --git a/shared/src/i18n/sk/journey.ts b/shared/src/i18n/sk/journey.ts
index 38a5312c1..5523e209e 100644
--- a/shared/src/i18n/sk/journey.ts
+++ b/shared/src/i18n/sk/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Cestovný denník',
'journey.subtitle': 'Zaznamenávajte svoje cesty priebežne',
'journey.new': 'Nový cestovný denník',
+ 'journey.lightbox.zoomIn': 'Priblížiť',
+ 'journey.lightbox.zoomOut': 'Oddialiť',
+ 'journey.lightbox.zoomReset': 'Späť na celú fotku',
'journey.create': 'Vytvoriť',
'journey.titlePlaceholder': 'Kam sa chystáte?',
'journey.empty': 'Zatiaľ žiadne cestovné denníky',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Pridať záznam',
'journey.detail.jumpToTop': 'Späť nahor',
'journey.detail.jumpToLast': 'Prejsť na posledný záznam',
+ 'journey.detail.dayJump': 'Prejsť na deň',
+ 'journey.detail.dayJumpCount': '{count} dní',
'journey.detail.newEntry': 'Nový záznam',
'journey.detail.editEntry': 'Upraviť záznam',
'journey.detail.noEntries': 'Zatiaľ žiadne záznamy',
@@ -435,6 +440,19 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Zoznam',
'journey.studio.kind.icon': 'Ikona',
'journey.studio.duplicate': 'Duplikovať',
+ 'journey.studio.copyToPage': 'Kopírovať na vloženie na ľubovoľnú stranu (Ctrl+C)',
+ 'journey.studio.paste': 'Vložiť (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Najprv niečo skopírujte a potom to vložte na ľubovoľnú stranu',
+ 'journey.studio.myLayouts': 'Moje rozloženia',
+ 'journey.studio.myLayoutsEmpty':
+ 'Uložte si stranu, ktorú ste usporiadali, a rozložte rovnako aj ďalšie strany. Ich fotky a texty zostanú.',
+ 'journey.studio.saveLayout': 'Uložiť túto stranu ako rozloženie',
+ 'journey.studio.saveLayoutHint': 'Uloží usporiadanie bez fotiek, pre všetkých editorov tejto knihy',
+ 'journey.studio.saveLayoutFull':
+ 'Táto kniha pojme najviac 24 rozložení. Jedno odstráňte, aby ste mohli uložiť ďalšie.',
+ 'journey.studio.deleteLayout': 'Odstrániť rozloženie',
+ 'journey.studio.layoutName': 'Rozloženie',
+ 'journey.studio.builtInLayouts': 'Vstavané',
'journey.studio.style': 'Štýl',
'journey.studio.shows': 'Zobrazenie',
'journey.studio.size': 'Veľkosť',
@@ -630,6 +648,13 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Zastávka zostane v denníku, ale nepočíta sa do vzdialenosti, krajín ani do mapy v Studio.',
'journey.entry.offRoute': 'Mimo trasy',
+ 'journey.entry.draft': 'Koncept',
+ 'journey.editor.draft': 'Koncept',
+ 'journey.editor.draftHint':
+ 'Tento záznam vidíte len vy a ostatní prispievatelia. Zdieľaný denník ho vynechá, kým túto voľbu nevypnete.',
+ 'journey.editor.tripSuggestionHint':
+ 'Tento deň patrí do tejto cesty. Prepojte ju a jej miesta sa pridajú do tohto denníka.',
+ 'journey.editor.tripSuggestionLater': 'Teraz nie',
'journey.suggestions.dismiss': 'Zahodiť tento návrh',
'journey.suggestions.dismissed': 'Návrh zahodený',
'journey.suggestions.restore': 'Vrátiť zahodené návrhy',
diff --git a/shared/src/i18n/sk/map.ts b/shared/src/i18n/sk/map.ts
index 134c4b2de..be2f8fc13 100644
--- a/shared/src/i18n/sk/map.ts
+++ b/shared/src/i18n/sk/map.ts
@@ -25,6 +25,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Vašu polohu sa nepodarilo zistiť.',
'map.location.timeout': 'Zisťovanie polohy trvalo príliš dlho. Skúste to znova s voľným výhľadom na oblohu.',
'map.overview.show': 'Zobraziť celú cestu',
+ 'map.lock.lock': 'Uzamknúť zobrazenie mapy',
+ 'map.lock.unlock': 'Nechať mapu sledovať výber',
'map.overview.hide': 'Skryť celú cestu',
'map.overview.total': 'Celková vzdialenosť',
'map.attribution': 'Zdroje mapy',
diff --git a/shared/src/i18n/sk/mobileTrip.ts b/shared/src/i18n/sk/mobileTrip.ts
index 25b9be2a4..50fffb749 100644
--- a/shared/src/i18n/sk/mobileTrip.ts
+++ b/shared/src/i18n/sk/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Na mape',
'mobileTrip.profileDriving': 'Autom',
'mobileTrip.profileWalking': 'Pešo',
+ 'mobileTrip.profileCycling': 'Na bicykli',
'mobileTrip.renameDay': 'Premenovať deň',
'mobileTrip.resBadge': 'Rezervácia',
'mobileTrip.showOnMap': 'Zobraziť na mape',
diff --git a/shared/src/i18n/sk/packing.ts b/shared/src/i18n/sk/packing.ts
index a6ed83819..2196565ad 100644
--- a/shared/src/i18n/sk/packing.ts
+++ b/shared/src/i18n/sk/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Upraviť položku',
'packing.itemName': 'Názov',
'packing.itemQuantity': 'Množstvo',
+ 'packing.packedCount': '{packed} z {total} zbalené',
+ 'packing.packedMore': 'Zbaliť o jeden viac',
+ 'packing.packedLess': 'Zbaliť o jeden menej',
'packing.itemWeight': 'Hmotnosť (g)',
'packing.title': 'Zoznam vecí',
'packing.empty': 'Zoznam vecí je prázdny',
diff --git a/shared/src/i18n/sk/places.ts b/shared/src/i18n/sk/places.ts
index 76095e88f..c5d391552 100644
--- a/shared/src/i18n/sk/places.ts
+++ b/shared/src/i18n/sk/places.ts
@@ -53,6 +53,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Zobraziť celú cestu',
'places.filterTracks': 'Trasy',
'places.filterByRating': 'Filtrovať podľa hodnotenia',
+ 'places.filterByLocation': 'Filtrovať podľa krajiny alebo regiónu',
+ 'places.allLocations': 'Všetky krajiny',
'places.filterShow': 'Zobraziť',
'places.clearSearch': 'Vymazať hľadanie',
'places.yourRating': 'Vaše hodnotenie',
@@ -79,6 +81,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategória',
'places.noCategory': 'Bez kategórie',
'places.newCategory': 'Nová kategória',
+ 'places.openInMaps': 'Otvoriť v mapách',
'places.categoryNamePlaceholder': 'Názov kategórie',
'places.formTime': 'Čas',
'places.startTime': 'Od',
@@ -95,6 +98,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Hľadať miesta...',
'places.mapsSearchError': 'Hľadanie miesta zlyhalo.',
'places.searchGoogleInstead': 'Nie je to správne miesto? Hľadať radšej v Google',
+ 'places.nearby': 'Miesta v blízkosti tohto špendlíka',
+ 'places.nearbyNone': 'V blízkosti tohto špendlíka sa nič nenašlo',
'places.loadingDetails': 'Načítavanie podrobností miesta…',
'places.osmHint':
'Používate hľadanie cez OpenStreetMap (bez fotiek, otváracích hodín a hodnotení). Pre plné detaily pridajte v nastaveniach kľúč Google API.',
@@ -133,9 +138,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Obohatiť miesta cez Google',
'places.enrichOnImportHint':
'Vyhľadá každé importované miesto a doplní fotky, adresu a kontaktné údaje. Používa váš kľúč Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Potom vyhľadá každý importovaný bod na Google a doplní jeho fotku, adresu, web a telefón. Cesty a trasy zostanú bez zmeny.',
'places.uploadImage': 'Nahrať obrázok',
'places.changeImage': 'Zmeniť obrázok',
'places.removeImage': 'Odobrať obrázok',
+ 'places.chooseImage': 'Vybrať obrázok',
+ 'places.uploadFromDevice': 'Nahrať zo zariadenia',
+ 'places.fromAttachedFiles': 'Z priložených súborov',
'places.imageUploadError': 'Obrázok sa nepodarilo nahrať',
'places.imageRemoveError': 'Obrázok sa nepodarilo odobrať',
};
diff --git a/shared/src/i18n/sk/reservations.ts b/shared/src/i18n/sk/reservations.ts
index 75219da76..f5539815a 100644
--- a/shared/src/i18n/sk/reservations.ts
+++ b/shared/src/i18n/sk/reservations.ts
@@ -64,6 +64,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Iné',
'reservations.type.bus': 'Autobus',
'reservations.type.ferry': 'Trajekt',
+ 'reservations.type.cable_car': 'Lanovka',
'reservations.type.bicycle': 'Bicykel',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Verejná doprava',
@@ -197,6 +198,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Zrušiť filtre',
'reservations.noMatches': 'Týmto filtrom nič nezodpovedá',
'reservations.viewOptions': 'Možnosti zobrazenia',
+ 'reservations.exportCsv': 'Exportovať ako tabuľku (CSV)',
+ 'reservations.export.type': 'Typ',
+ 'reservations.export.title': 'Názov',
+ 'reservations.export.start': 'Začiatok',
+ 'reservations.export.end': 'Koniec',
+ 'reservations.export.from': 'Odkiaľ',
+ 'reservations.export.to': 'Kam',
+ 'reservations.export.location': 'Miesto',
+ 'reservations.export.confirmation': 'Potvrdenie',
+ 'reservations.export.notes': 'Poznámky',
'reservations.resetView': 'Obnoviť zobrazenie',
'reservations.group.label': 'Zoskupiť podľa',
'reservations.group.status': 'Stav',
diff --git a/shared/src/i18n/sk/settings.ts b/shared/src/i18n/sk/settings.ts
index 1e1a4a2f9..a1d9bc873 100644
--- a/shared/src/i18n/sk/settings.ts
+++ b/shared/src/i18n/sk/settings.ts
@@ -349,6 +349,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Sumy v Nákladoch sa do tejto meny prepočítavajú iba pre zobrazenie — pôvodné sumy zostávajú nezmenené.',
'settings.currencyTrip': 'Mena cesty',
+ 'settings.placeLanguage': 'Názvy miest',
+ 'settings.placeLanguageApp': 'Rovnako ako aplikácia',
+ 'settings.placeLanguageHint':
+ 'Jazyk, v ktorom odpovedá vyhľadávanie miest, návrhy a adresy. Ak miesto v tomto jazyku názov nemá, zobrazí sa jeho miestny názov.',
'settings.passkey.title': 'Prístupové kľúče',
'settings.passkey.description':
'Prihlasujte sa rýchlejšie a s ochranou proti phishingu pomocou prístupového kľúča — odtlačkom prsta, tvárou, PIN kódom alebo hardvérovým kľúčom. Vaše heslo zostáva ako záloha.',
@@ -489,6 +493,12 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Jazyk a región',
'settings.general.travelMap': 'Cestovanie a mapa',
'settings.general.startup': 'Spustenie',
+ 'settings.dayDateFirst': 'Dátum na začiatku nadpisov dní',
+ 'settings.compactUnplanned': 'Kompaktné značky pre nenaplánované miesta',
+ 'settings.compactUnplannedHint':
+ 'Miesta, ktoré nie sú naplánované v žiadnom dni, sa zobrazia ako malé značky bez fotky, aby naplánované zastávky vynikli.',
+ 'settings.dayDateFirstHint':
+ 'Každý deň začne kalendárnym dátumom a vedľa neho sa zobrazí „Deň 1“ alebo vlastný názov dňa.',
'settings.startPage': 'Úvodná stránka',
'settings.startPageDashboard': 'Prehľad',
'settings.startPageActiveTrip': 'Aktívna cesta',
diff --git a/shared/src/i18n/sk/share.ts b/shared/src/i18n/sk/share.ts
index d7b685846..ea8e41f18 100644
--- a/shared/src/i18n/sk/share.ts
+++ b/shared/src/i18n/sk/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Balenie',
'share.permBudget': 'Náklady',
'share.permCollab': 'Chat',
+ 'share.options': 'Možnosti',
+ 'share.optTravelOnly': 'Len doprava a ubytovanie',
+ 'share.optTravelOnlyHint': 'Zobrazí len dopravu a ubytovanie, bez aktivít, poznámok k dňom a prázdnych dní',
+ 'share.optHideImages': 'Bez fotiek',
+ 'share.optHideImagesHint': 'Vynechá fotky miest zo zdieľanej stránky',
};
export default share;
diff --git a/shared/src/i18n/sk/shared.ts b/shared/src/i18n/sk/shared.ts
index 999ac67fa..9ee4e817a 100644
--- a/shared/src/i18n/sk/shared.ts
+++ b/shared/src/i18n/sk/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chat',
'shared.days': 'dní',
'shared.places': 'miest',
+ 'shared.unplanned': 'Zatiaľ nenaplánované',
'shared.other': 'Ostatné',
'shared.totalBudget': 'Celkové náklady',
'shared.messages': 'správ',
diff --git a/shared/src/i18n/sk/todo.ts b/shared/src/i18n/sk/todo.ts
index 654c81708..8e0593db4 100644
--- a/shared/src/i18n/sk/todo.ts
+++ b/shared/src/i18n/sk/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Bez zoznamu',
'todo.namePlaceholder': 'Názov úlohy',
'todo.descriptionPlaceholder': 'Popis (voliteľné)',
+ 'todo.editDescription': 'Kliknutím upravíte, odkazy sa otvoria priamo',
'todo.unassigned': 'Nepriradené',
'todo.noCategory': 'Bez zoznamu',
'todo.hasDescription': 'Má popis',
diff --git a/shared/src/i18n/sk/undo.ts b/shared/src/i18n/sk/undo.ts
index 46cd17962..2819fce3d 100644
--- a/shared/src/i18n/sk/undo.ts
+++ b/shared/src/i18n/sk/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Späť: {action}',
'undo.assignPlace': 'Miesto priradené ku dňu',
'undo.removeAssignment': 'Miesto odobrané z dňa',
+ 'undo.clearDay': 'Deň vyprázdnený',
'undo.reorder': 'Miesta preusporiadané',
'undo.optimize': 'Trasa optimalizovaná',
'undo.deletePlace': 'Miesto zmazané',
diff --git a/shared/src/i18n/sv/atlas.ts b/shared/src/i18n/sv/atlas.ts
index 57a8bf221..ff89feeb8 100644
--- a/shared/src/i18n/sv/atlas.ts
+++ b/shared/src/i18n/sv/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Länder',
'atlas.trips': 'Resor',
'atlas.places': 'Platser',
+ 'atlas.placesShow': 'Visa platserna i det här landet',
+ 'atlas.placesSearch': 'Sök platser',
+ 'atlas.placesNone': 'Ingen plats matchar',
'atlas.unmark': 'Ta bort',
'atlas.confirmMark': 'Ska jag markera det här landet som besökt?',
'atlas.confirmUnmark': 'Vill du ta bort det här landet från listan över besökta länder?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Dagar',
'atlas.visitedCountries': 'Besökta länder',
'atlas.cities': 'Städer',
+ 'atlas.regions': 'Regioner',
'atlas.noData': 'Inga resedata ännu',
'atlas.noDataHint': 'Skapa en resa och lägg till platser på din världskarta',
'atlas.nextTrip': 'Nästa resa',
diff --git a/shared/src/i18n/sv/budget.ts b/shared/src/i18n/sv/budget.ts
index b07951ff6..0bb6ab37b 100644
--- a/shared/src/i18n/sv/budget.ts
+++ b/shared/src/i18n/sv/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 't.ex. middag, souvenirer, bensin…',
'costs.note': 'Anteckning',
'costs.notePlaceholder': 'Vad det omfattade, vem som ska betala tillbaka…',
+ 'costs.paymentNotePlaceholder': 'Betalt kontant, via banköverföring…',
'costs.addNote': 'Lägg till anteckning',
'costs.showNote': 'Visa anteckning',
'costs.hideNote': 'Dölj anteckning',
diff --git a/shared/src/i18n/sv/dayplan.ts b/shared/src/i18n/sv/dayplan.ts
index d65081f0b..140f5eabd 100644
--- a/shared/src/i18n/sv/dayplan.ts
+++ b/shared/src/i18n/sv/dayplan.ts
@@ -69,6 +69,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Kartor och GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Exportera dagsplanen som PDF',
+ 'dayplan.pdfMine': 'Min plan som PDF',
+ 'dayplan.pdfMineSub': 'Bara aktiviteter och bokningar du deltar i',
'dayplan.gpxTooltip': 'Exportera som GPX för offlinekartor och GPS-enheter',
'dayplan.gpxAll': 'Hela resan',
'dayplan.gpxPlaces': 'Bara platser',
@@ -93,6 +95,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Ta bort dag',
'dayplan.deleteDayTitle': 'Ta bort {day}?',
'dayplan.deleteDayBody': 'Dagen tas bort från resan. Det går inte att ångra.',
+ 'dayplan.excludeFromRoute': 'Uteslut från rutten',
+ 'dayplan.includeInRoute': 'Lägg tillbaka i rutten',
+ 'dayplan.offRoute': 'Utanför rutten',
+ 'dayplan.offRouteHint': 'Stannar kvar på dagen och kartan, men rutten hoppar över den',
+ 'dayplan.clearDay': 'Töm dagen',
+ 'dayplan.clearDayTitle': 'Töm {day}?',
+ 'dayplan.clearDayBody':
+ 'Alla platser tas bort från den här dagen. Platserna finns kvar i resan och dagen behåller sina noteringar och bokningar.',
'dayplan.deleteDayEmpty': 'Inget är planerat den här dagen.',
'dayplan.impactPlaces': 'Planerade platser: {count}',
'dayplan.impactPlacesHint': 'De ligger kvar i platslistan.',
diff --git a/shared/src/i18n/sv/inspector.ts b/shared/src/i18n/sv/inspector.ts
index e043d6052..7b7f72102 100644
--- a/shared/src/i18n/sv/inspector.ts
+++ b/shared/src/i18n/sv/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Väntande bokning',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Navigation',
+ 'inspector.otherMapApp': 'Annan kartapp',
'inspector.openWith': 'Öppna med',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Öppna hemsida',
diff --git a/shared/src/i18n/sv/journey.ts b/shared/src/i18n/sv/journey.ts
index aad4274e3..93c6ae7a1 100644
--- a/shared/src/i18n/sv/journey.ts
+++ b/shared/src/i18n/sv/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journey',
'journey.subtitle': 'Följ dina resor i realtid',
'journey.new': 'Ny Journey',
+ 'journey.lightbox.zoomIn': 'Zooma in',
+ 'journey.lightbox.zoomOut': 'Zooma ut',
+ 'journey.lightbox.zoomReset': 'Tillbaka till hela fotot',
'journey.create': 'Skapa',
'journey.titlePlaceholder': 'Vart ska du?',
'journey.empty': 'Inga journeys än',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Lägg till inlägg',
'journey.detail.jumpToTop': 'Till toppen',
'journey.detail.jumpToLast': 'Till senaste inlägget',
+ 'journey.detail.dayJump': 'Hoppa till en dag',
+ 'journey.detail.dayJumpCount': '{count} dagar',
'journey.detail.newEntry': 'Ny inlägg',
'journey.detail.editEntry': 'Redigera inlägg',
'journey.detail.noEntries': 'Inga inlägg än så länge',
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Lista',
'journey.studio.kind.icon': 'Ikon',
'journey.studio.duplicate': 'Duplicera',
+ 'journey.studio.copyToPage': 'Kopiera för att klistra in på valfri sida (Ctrl+C)',
+ 'journey.studio.paste': 'Klistra in (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Kopiera något först och klistra sedan in det på valfri sida',
+ 'journey.studio.myLayouts': 'Mina layouter',
+ 'journey.studio.myLayoutsEmpty': 'Spara en sida du har ordnat och lägg upp andra sidor på samma sätt. Deras foton och texter finns kvar.',
+ 'journey.studio.saveLayout': 'Spara den här sidan som layout',
+ 'journey.studio.saveLayoutHint': 'Behåller arrangemanget utan foton, för alla redaktörer av den här boken',
+ 'journey.studio.saveLayoutFull': 'Den här boken rymmer upp till 24 layouter. Ta bort en för att spara en till.',
+ 'journey.studio.deleteLayout': 'Ta bort layout',
+ 'journey.studio.layoutName': 'Layout',
+ 'journey.studio.builtInLayouts': 'Inbyggda',
'journey.studio.style': 'Stil',
'journey.studio.shows': 'Visning',
'journey.studio.size': 'Storlek',
@@ -625,6 +641,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Stoppet finns kvar i dagboken men räknas inte med i sträckan, länderna eller kartan i Studio.',
'journey.entry.offRoute': 'Utanför rutten',
+ 'journey.entry.draft': 'Utkast',
+ 'journey.editor.draft': 'Utkast',
+ 'journey.editor.draftHint': 'Bara du och de andra bidragsgivarna ser det här inlägget. Den delade journeyn utelämnar det tills du stänger av detta.',
+ 'journey.editor.tripSuggestionHint': 'Den här dagen ingår i den här resan. Länka den så läggs dess platser till i den här journeyn.',
+ 'journey.editor.tripSuggestionLater': 'Inte nu',
'journey.suggestions.dismiss': 'Avfärda det här förslaget',
'journey.suggestions.dismissed': 'Förslaget avfärdat',
'journey.suggestions.restore': 'Hämta tillbaka avfärdade förslag',
diff --git a/shared/src/i18n/sv/map.ts b/shared/src/i18n/sv/map.ts
index 5eca67426..7d0f1b7b9 100644
--- a/shared/src/i18n/sv/map.ts
+++ b/shared/src/i18n/sv/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Din plats kunde inte fastställas.',
'map.location.timeout': 'Platsbestämningen tog för lång tid. Försök igen med friare sikt mot himlen.',
'map.overview.show': 'Visa hela resan',
+ 'map.lock.lock': 'Lås kartvyn',
+ 'map.lock.unlock': 'Låt kartan följa markeringen',
'map.overview.hide': 'Dölj hela resan',
'map.overview.total': 'Total sträcka',
'map.attribution': 'Kartkällor',
diff --git a/shared/src/i18n/sv/mobileTrip.ts b/shared/src/i18n/sv/mobileTrip.ts
index 57528e21b..a4cf7376d 100644
--- a/shared/src/i18n/sv/mobileTrip.ts
+++ b/shared/src/i18n/sv/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'På kartan',
'mobileTrip.profileDriving': 'Bil',
'mobileTrip.profileWalking': 'Gång',
+ 'mobileTrip.profileCycling': 'Cykel',
'mobileTrip.renameDay': 'Byt namn på dag',
'mobileTrip.resBadge': 'Bokning',
'mobileTrip.showOnMap': 'Visa på karta',
diff --git a/shared/src/i18n/sv/packing.ts b/shared/src/i18n/sv/packing.ts
index f414ccbab..a495cebdb 100644
--- a/shared/src/i18n/sv/packing.ts
+++ b/shared/src/i18n/sv/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Redigera objekt',
'packing.itemName': 'Namn',
'packing.itemQuantity': 'Antal',
+ 'packing.packedCount': '{packed} av {total} packade',
+ 'packing.packedMore': 'Packa en till',
+ 'packing.packedLess': 'Packa en mindre',
'packing.itemWeight': 'Vikt (g)',
'packing.title': 'Packlista',
'packing.empty': 'Packlistan är tom',
diff --git a/shared/src/i18n/sv/places.ts b/shared/src/i18n/sv/places.ts
index 8266b510e..7b49a52f4 100644
--- a/shared/src/i18n/sv/places.ts
+++ b/shared/src/i18n/sv/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Visa hela resan',
'places.filterTracks': 'Spår',
'places.filterByRating': 'Filtrera efter betyg',
+ 'places.filterByLocation': 'Filtrera efter land eller region',
+ 'places.allLocations': 'Alla länder',
'places.filterShow': 'Visa',
'places.clearSearch': 'Rensa sökning',
'places.yourRating': 'Ditt betyg',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategori',
'places.noCategory': 'Ingen kategori',
'places.newCategory': 'Ny kategori',
+ 'places.openInMaps': 'Öppna i kartor',
'places.categoryNamePlaceholder': 'Kategorinamn',
'places.formTime': 'Tid',
'places.startTime': 'Börjar',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Sök efter platser...',
'places.mapsSearchError': 'Sökningen efter plats misslyckades.',
'places.searchGoogleInstead': 'Inte rätt plats? Sök på Google i stället',
+ 'places.nearby': 'Platser nära den här nålen',
+ 'places.nearbyNone': 'Inget hittades nära den här nålen',
'places.loadingDetails': 'Hämtar information om platsen…',
'places.osmHint':
'Använder OpenStreetMap-sökningen (inga bilder, öppettider eller betyg). Lägg till en Google API-nyckel i inställningarna för fullständig information.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Berika platser via Google',
'places.enrichOnImportHint':
'Sök upp varje importerad plats för att fylla i bilder, adress och kontaktuppgifter. Använder din Google Maps-nyckel.',
+ 'places.enrichOnImportFileHint':
+ 'Slår sedan upp varje importerad punkt på Google och lägger till dess foto, adress, webbplats och telefon. Stigar och spår förblir som de är.',
'places.uploadImage': 'Ladda upp bild',
'places.changeImage': 'Byt bild',
'places.removeImage': 'Ta bort bild',
+ 'places.chooseImage': 'Välj en bild',
+ 'places.uploadFromDevice': 'Ladda upp från enheten',
+ 'places.fromAttachedFiles': 'Från bifogade filer',
'places.imageUploadError': 'Det gick inte att ladda upp bilden',
'places.imageRemoveError': 'Det gick inte att ta bort bilden',
};
diff --git a/shared/src/i18n/sv/reservations.ts b/shared/src/i18n/sv/reservations.ts
index c716dc31c..927286019 100644
--- a/shared/src/i18n/sv/reservations.ts
+++ b/shared/src/i18n/sv/reservations.ts
@@ -62,6 +62,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Övrigt',
'reservations.type.bus': 'Buss',
'reservations.type.ferry': 'Färja',
+ 'reservations.type.cable_car': 'Linbana',
'reservations.type.bicycle': 'Cyckel',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Kollektivtrafik',
@@ -195,6 +196,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Återställ filter',
'reservations.noMatches': 'Inget matchar de här filtren',
'reservations.viewOptions': 'Visningsalternativ',
+ 'reservations.exportCsv': 'Exportera som kalkylblad (CSV)',
+ 'reservations.export.type': 'Typ',
+ 'reservations.export.title': 'Titel',
+ 'reservations.export.start': 'Start',
+ 'reservations.export.end': 'Slut',
+ 'reservations.export.from': 'Från',
+ 'reservations.export.to': 'Till',
+ 'reservations.export.location': 'Plats',
+ 'reservations.export.confirmation': 'Bekräftelse',
+ 'reservations.export.notes': 'Anteckningar',
'reservations.resetView': 'Återställ vy',
'reservations.group.label': 'Gruppera efter',
'reservations.group.status': 'Status',
diff --git a/shared/src/i18n/sv/settings.ts b/shared/src/i18n/sv/settings.ts
index 26c297551..6f4c6aea4 100644
--- a/shared/src/i18n/sv/settings.ts
+++ b/shared/src/i18n/sv/settings.ts
@@ -341,6 +341,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Belopp under Kostnader visas omräknade till denna valuta endast för visning – de ursprungliga beloppen ändras inte.',
'settings.currencyTrip': 'Resans valuta',
+ 'settings.placeLanguage': 'Platsnamn',
+ 'settings.placeLanguageApp': 'Samma som appen',
+ 'settings.placeLanguageHint': 'Språket som platssökning, förslag och adresser svarar på. Om en plats saknar namn på det språket visas dess lokala namn.',
'settings.passkey.title': 'Inloggningsnycklar',
'settings.passkey.description':
'Logga in snabbare och med bättre skydd mot nätfiske med en inloggningsnyckel – ditt fingeravtryck, ditt ansikte, din PIN-kod eller en hårdvarunyckel. Ditt lösenord finns kvar som reserv.',
@@ -482,6 +485,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Start',
+ 'settings.dayDateFirst': 'Datum först i dagsrubriker',
+ 'settings.compactUnplanned': 'Kompakta markörer för oplanerade platser',
+ 'settings.compactUnplannedHint': 'Platser som inte är planerade på någon dag visas som små markörer utan foto, så att de planerade stoppen sticker ut.',
+ 'settings.dayDateFirstHint': 'Inled varje dag med dess kalenderdatum och visa ”Dag 1” eller dagens egen titel bredvid.',
'settings.startPage': 'Startsida',
'settings.startPageDashboard': 'Översikt',
'settings.startPageActiveTrip': 'Aktiv resa',
diff --git a/shared/src/i18n/sv/share.ts b/shared/src/i18n/sv/share.ts
index 371a002c5..d8abceb07 100644
--- a/shared/src/i18n/sv/share.ts
+++ b/shared/src/i18n/sv/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Packning',
'share.permBudget': 'Kostnader',
'share.permCollab': 'Chatt',
+ 'share.options': 'Alternativ',
+ 'share.optTravelOnly': 'Endast resor och boenden',
+ 'share.optTravelOnlyHint': 'Visar bara transport och boende, utan aktiviteter, dagsnoteringar och tomma dagar',
+ 'share.optHideImages': 'Utan foton',
+ 'share.optHideImagesHint': 'Utelämnar platsernas foton från den delade sidan',
};
export default share;
diff --git a/shared/src/i18n/sv/shared.ts b/shared/src/i18n/sv/shared.ts
index 0bdfcae3c..bd1bf10f0 100644
--- a/shared/src/i18n/sv/shared.ts
+++ b/shared/src/i18n/sv/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Chatt',
'shared.days': 'dagar',
'shared.places': 'platser',
+ 'shared.unplanned': 'Inte planerad än',
'shared.other': 'Andra',
'shared.totalBudget': 'Totala kostnader',
'shared.messages': 'meddelanden',
diff --git a/shared/src/i18n/sv/todo.ts b/shared/src/i18n/sv/todo.ts
index aaf129dac..0f25f26e5 100644
--- a/shared/src/i18n/sv/todo.ts
+++ b/shared/src/i18n/sv/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Ingen lista',
'todo.namePlaceholder': 'Uppgiftsnamn',
'todo.descriptionPlaceholder': 'Beskrivning (valfritt)',
+ 'todo.editDescription': 'Klicka för att redigera, länkar öppnas direkt',
'todo.unassigned': 'Ej tilldelad',
'todo.noCategory': 'Ingen lista',
'todo.hasDescription': 'Har beskrivning',
diff --git a/shared/src/i18n/sv/undo.ts b/shared/src/i18n/sv/undo.ts
index 31394253e..afee5b5e3 100644
--- a/shared/src/i18n/sv/undo.ts
+++ b/shared/src/i18n/sv/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Ångra: {action}',
'undo.assignPlace': 'Plats tilldelad dagen',
'undo.removeAssignment': 'Plats har tagits bort från dagen',
+ 'undo.clearDay': 'Dagen tömd',
'undo.reorder': 'Platserna har ordnats om',
'undo.optimize': 'Rutt optimerad',
'undo.deletePlace': 'Plats borttagen',
diff --git a/shared/src/i18n/th/atlas.ts b/shared/src/i18n/th/atlas.ts
index c99a40345..b545c29ba 100644
--- a/shared/src/i18n/th/atlas.ts
+++ b/shared/src/i18n/th/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': "ประเทศต่างๆ",
'atlas.trips': "ทริป",
'atlas.places': "สถานที่",
+ 'atlas.placesShow': 'แสดงสถานที่ในประเทศนี้',
+ 'atlas.placesSearch': 'ค้นหาสถานที่',
+ 'atlas.placesNone': 'ไม่มีสถานที่ที่ตรงกัน',
'atlas.unmark': "ลบ",
'atlas.confirmMark': "ทำเครื่องหมายประเทศนี้ว่าไปเยือนแล้วใช่ไหม",
'atlas.confirmUnmark': "ลบประเทศนี้ออกจากรายการที่คุณเยี่ยมชมใช่ไหม",
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': "วัน",
'atlas.visitedCountries': "ประเทศที่มาเยือน",
'atlas.cities': "เมือง",
+ 'atlas.regions': 'ภูมิภาค',
'atlas.noData': "ยังไม่มีข้อมูลการเดินทาง",
'atlas.noDataHint': "สร้างการเดินทางและเพิ่มสถานที่เพื่อดูแผนที่โลกของคุณ",
'atlas.nextTrip': "ทริปต่อไป",
diff --git a/shared/src/i18n/th/budget.ts b/shared/src/i18n/th/budget.ts
index c31f0c19f..c460efa40 100644
--- a/shared/src/i18n/th/budget.ts
+++ b/shared/src/i18n/th/budget.ts
@@ -107,6 +107,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'เช่น อาหารเย็น ของที่ระลึก น้ำมัน…',
'costs.note': 'หมายเหตุ',
'costs.notePlaceholder': 'คุ้มครองอะไร ใครเป็นหนี้อะไรคืน...',
+ 'costs.paymentNotePlaceholder': 'จ่ายเงินสด, โอนผ่านธนาคาร...',
'costs.addNote': 'เพิ่มบันทึก',
'costs.showNote': 'แสดงบันทึก',
'costs.hideNote': 'ซ่อนบันทึก',
diff --git a/shared/src/i18n/th/dayplan.ts b/shared/src/i18n/th/dayplan.ts
index 4f035738a..053f4f5c9 100644
--- a/shared/src/i18n/th/dayplan.ts
+++ b/shared/src/i18n/th/dayplan.ts
@@ -67,6 +67,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': "แผนที่และจีพีเอส",
'dayplan.pdf': "PDF",
'dayplan.pdfTooltip': "ส่งออกแผนวันเป็น PDF",
+ 'dayplan.pdfMine': 'แผนของฉันเป็น PDF',
+ 'dayplan.pdfMineSub': 'เฉพาะกิจกรรมและการจองที่คุณเข้าร่วม',
'dayplan.gpxTooltip': "ส่งออกเป็น GPX สำหรับแผนที่ออฟไลน์และอุปกรณ์ GPS",
'dayplan.gpxAll': "ทั้งทริป",
'dayplan.gpxPlaces': "สถานที่เท่านั้น",
@@ -91,6 +93,13 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'ลบวัน',
'dayplan.deleteDayTitle': 'ลบ {day} ใช่ไหม',
'dayplan.deleteDayBody': 'วันนี้จะถูกลบออกจากการเดินทาง ไม่สามารถย้อนกลับได้',
+ 'dayplan.excludeFromRoute': 'ไม่รวมในเส้นทาง',
+ 'dayplan.includeInRoute': 'เพิ่มกลับเข้าเส้นทาง',
+ 'dayplan.offRoute': 'นอกเส้นทาง',
+ 'dayplan.offRouteHint': 'ยังอยู่ในวันนี้และบนแผนที่ แต่เส้นทางจะข้ามไป',
+ 'dayplan.clearDay': 'ล้างวัน',
+ 'dayplan.clearDayTitle': 'ล้าง {day} ใช่ไหม',
+ 'dayplan.clearDayBody': 'สถานที่ทั้งหมดจะถูกนำออกจากวันนี้ สถานที่ยังคงอยู่ในการเดินทาง และบันทึกกับการจองของวันนี้ยังคงอยู่',
'dayplan.deleteDayEmpty': 'ไม่มีอะไรวางแผนไว้ในวันนี้',
'dayplan.impactPlaces': 'สถานที่ที่วางแผนไว้: {count}',
'dayplan.impactPlacesHint': 'ยังคงอยู่ในรายการสถานที่',
diff --git a/shared/src/i18n/th/inspector.ts b/shared/src/i18n/th/inspector.ts
index f9c79b36b..7d322e695 100644
--- a/shared/src/i18n/th/inspector.ts
+++ b/shared/src/i18n/th/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': "อยู่ระหว่างดำเนินการจอง",
'inspector.google': "Google แผนที่",
'inspector.navigation': "การนำทาง",
+ 'inspector.otherMapApp': 'แอปแผนที่อื่น',
'inspector.openWith': "เปิดด้วย",
'inspector.openStreetMap': "OpenStreetMap",
'inspector.website': "เปิดเว็บไซต์",
diff --git a/shared/src/i18n/th/journey.ts b/shared/src/i18n/th/journey.ts
index 9f65860d9..983d4ae90 100644
--- a/shared/src/i18n/th/journey.ts
+++ b/shared/src/i18n/th/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': "การเดินทาง",
'journey.subtitle': "ติดตามการเดินทางของคุณที่เกิดขึ้น",
'journey.new': "การเดินทางครั้งใหม่",
+ 'journey.lightbox.zoomIn': 'ซูมเข้า',
+ 'journey.lightbox.zoomOut': 'ซูมออก',
+ 'journey.lightbox.zoomReset': 'กลับไปดูรูปเต็ม',
'journey.create': "สร้าง",
'journey.titlePlaceholder': "คุณจะไปไหน?",
'journey.empty': "ยังไม่มีการเดินทาง",
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': "เพิ่มรายการ",
'journey.detail.jumpToTop': "กลับไปด้านบน",
'journey.detail.jumpToLast': "ข้ามไปยังรายการสุดท้าย",
+ 'journey.detail.dayJump': 'ข้ามไปยังวัน',
+ 'journey.detail.dayJumpCount': '{count} วัน',
'journey.detail.newEntry': "รายการใหม่",
'journey.detail.editEntry': "แก้ไขรายการ",
'journey.detail.noEntries': "ยังไม่มีรายการ",
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': "รายการ",
'journey.studio.kind.icon': "ไอคอน",
'journey.studio.duplicate': "ทำซ้ำ",
+ 'journey.studio.copyToPage': 'คัดลอกเพื่อวางในหน้าใดก็ได้ (Ctrl+C)',
+ 'journey.studio.paste': 'วาง (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'คัดลอกบางอย่างก่อน แล้ววางในหน้าใดก็ได้',
+ 'journey.studio.myLayouts': 'เค้าโครงของฉัน',
+ 'journey.studio.myLayoutsEmpty': 'เก็บหน้าที่คุณจัดไว้ แล้วจัดหน้าอื่นในแบบเดียวกัน รูปภาพและข้อความของหน้าเหล่านั้นยังคงอยู่',
+ 'journey.studio.saveLayout': 'บันทึกหน้านี้เป็นเค้าโครง',
+ 'journey.studio.saveLayoutHint': 'เก็บการจัดวางโดยไม่รวมรูปภาพ สำหรับผู้แก้ไขทุกคนของหนังสือเล่มนี้',
+ 'journey.studio.saveLayoutFull': 'หนังสือเล่มนี้เก็บเค้าโครงได้สูงสุด 24 แบบ ลบหนึ่งแบบเพื่อบันทึกแบบใหม่',
+ 'journey.studio.deleteLayout': 'ลบเค้าโครง',
+ 'journey.studio.layoutName': 'เค้าโครง',
+ 'journey.studio.builtInLayouts': 'ในตัว',
'journey.studio.style': "สไตล์",
'journey.studio.shows': "การแสดง",
'journey.studio.size': "ขนาด",
@@ -626,6 +642,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
"จุดแวะพักจะอยู่ในบันทึกแต่ไม่นับรวมระยะทาง ประเทศ หรือแผนที่ใน Studio",
'journey.entry.offRoute': "นอกเส้นทาง",
+ 'journey.entry.draft': 'ฉบับร่าง',
+ 'journey.editor.draft': 'ฉบับร่าง',
+ 'journey.editor.draftHint': 'มีเพียงคุณและผู้ร่วมให้ข้อมูลคนอื่นที่เห็นรายการนี้ การเดินทางที่แชร์จะไม่แสดงรายการนี้จนกว่าคุณจะปิดตัวเลือกนี้',
+ 'journey.editor.tripSuggestionHint': 'วันนี้อยู่ในช่วงทริปนี้ เชื่อมโยงแล้วสถานที่ของทริปจะเข้าร่วมการเดินทางนี้',
+ 'journey.editor.tripSuggestionLater': 'ไว้ทีหลัง',
'journey.suggestions.dismiss': "ซ่อนคำแนะนำนี้",
'journey.suggestions.dismissed': "ซ่อนคำแนะนำแล้ว",
'journey.suggestions.restore': "เรียกคืนคำแนะนำที่ซ่อน",
diff --git a/shared/src/i18n/th/map.ts b/shared/src/i18n/th/map.ts
index 4f335fb8a..707ea67bb 100644
--- a/shared/src/i18n/th/map.ts
+++ b/shared/src/i18n/th/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': "ไม่สามารถระบุตำแหน่งของคุณได้",
'map.location.timeout': "การค้นหาของคุณใช้เวลานานเกินไป ลองอีกครั้งด้วยมุมมองท้องฟ้าที่ชัดเจนยิ่งขึ้น",
'map.overview.show': "แสดงทั้งทริป",
+ 'map.lock.lock': 'ล็อกมุมมองแผนที่',
+ 'map.lock.unlock': 'ให้แผนที่ติดตามรายการที่เลือก',
'map.overview.hide': "ซ่อนทั้งทริป",
'map.overview.total': "ระยะทางรวม",
'map.attribution': "เครดิตแผนที่",
diff --git a/shared/src/i18n/th/mobileTrip.ts b/shared/src/i18n/th/mobileTrip.ts
index 61c92166f..6e5a22f88 100644
--- a/shared/src/i18n/th/mobileTrip.ts
+++ b/shared/src/i18n/th/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': "บนแผนที่",
'mobileTrip.profileDriving': "ขับรถ",
'mobileTrip.profileWalking': "เดิน",
+ 'mobileTrip.profileCycling': 'ปั่นจักรยาน',
'mobileTrip.renameDay': "เปลี่ยนชื่อวัน",
'mobileTrip.resBadge': "การจอง",
'mobileTrip.showOnMap': "แสดงบนแผนที่",
diff --git a/shared/src/i18n/th/packing.ts b/shared/src/i18n/th/packing.ts
index 559616b50..a1215687f 100644
--- a/shared/src/i18n/th/packing.ts
+++ b/shared/src/i18n/th/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': "แก้ไขรายการ",
'packing.itemName': "ชื่อ",
'packing.itemQuantity': "ปริมาณ",
+ 'packing.packedCount': 'แพ็กแล้ว {packed} จาก {total}',
+ 'packing.packedMore': 'แพ็กเพิ่มอีกหนึ่งชิ้น',
+ 'packing.packedLess': 'แพ็กลดลงหนึ่งชิ้น',
'packing.itemWeight': "น้ำหนัก (กรัม)",
'packing.title': "รายการจัดกระเป๋า",
'packing.empty': "รายการจัดกระเป๋าว่างเปล่า",
diff --git a/shared/src/i18n/th/places.ts b/shared/src/i18n/th/places.ts
index b4d71cc88..9a7ee2040 100644
--- a/shared/src/i18n/th/places.ts
+++ b/shared/src/i18n/th/places.ts
@@ -46,6 +46,8 @@ const places: TranslationStrings = {
'places.planned': 'วางแผนแล้ว',
'places.filterTracks': 'แทร็ก',
'places.filterByRating': 'กรองตามคะแนน',
+ 'places.filterByLocation': 'กรองตามประเทศหรือภูมิภาค',
+ 'places.allLocations': 'ทุกประเทศ',
'places.filterShow': 'แสดง',
'places.clearSearch': 'ล้างการค้นหา',
'places.yourRating': 'คะแนนของคุณ',
@@ -72,6 +74,7 @@ const places: TranslationStrings = {
'places.formCategory': 'หมวดหมู่',
'places.noCategory': 'ไม่มีหมวดหมู่',
'places.newCategory': 'หมวดหมู่ใหม่',
+ 'places.openInMaps': 'เปิดในแอปแผนที่',
'places.categoryNamePlaceholder': 'ชื่อหมวดหมู่',
'places.formTime': 'เวลา',
'places.startTime': 'เริ่ม',
@@ -88,6 +91,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'ค้นหาสถานที่...',
'places.mapsSearchError': 'การค้นหาสถานที่ล้มเหลว',
'places.searchGoogleInstead': 'ไม่ใช่สถานที่ที่ต้องการใช่ไหม ค้นหาด้วย Google แทน',
+ 'places.nearby': 'สถานที่ใกล้หมุดนี้',
+ 'places.nearbyNone': 'ไม่พบสิ่งใดใกล้หมุดนี้',
'places.loadingDetails': 'กำลังโหลดรายละเอียดสถานที่...',
'places.osmHint':
'ใช้การค้นหา OpenStreetMap (ไม่มีรูปภาพ เวลาทำการ หรือการให้คะแนน) เพิ่มคีย์ Google API ในการตั้งค่าเพื่อดูรายละเอียดทั้งหมด',
@@ -125,9 +130,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'เติมเต็มสถานที่ผ่าน Google',
'places.enrichOnImportHint':
'ค้นหาสถานที่ที่นำเข้าแต่ละแห่งเพื่อกรอกรูปภาพ ที่อยู่ และรายละเอียดการติดต่อ ใช้คีย์ Google Maps ของคุณ',
+ 'places.enrichOnImportFileHint':
+ 'หลังนำเข้า จะค้นหาแต่ละจุดบน Google แล้วเพิ่มรูปภาพ ที่อยู่ เว็บไซต์ และเบอร์โทรศัพท์ เส้นทางและแทร็กจะคงเดิม',
'places.uploadImage': 'อัปโหลดรูปภาพ',
'places.changeImage': 'เปลี่ยนภาพ',
'places.removeImage': 'ลบรูปภาพ',
+ 'places.chooseImage': 'เลือกรูปภาพ',
+ 'places.uploadFromDevice': 'อัปโหลดจากอุปกรณ์',
+ 'places.fromAttachedFiles': 'จากไฟล์แนบ',
'places.imageUploadError': 'ไม่สามารถอัปโหลดภาพได้',
'places.imageRemoveError': 'ไม่สามารถลบรูปภาพได้',
'places.addToSelectedDay': 'เพิ่มในวันที่เปิดอยู่',
diff --git a/shared/src/i18n/th/reservations.ts b/shared/src/i18n/th/reservations.ts
index 56f0aed8e..3c6a50c1d 100644
--- a/shared/src/i18n/th/reservations.ts
+++ b/shared/src/i18n/th/reservations.ts
@@ -63,6 +63,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'อื่นๆ',
'reservations.type.bus': 'รถบัส',
'reservations.type.ferry': 'เรือเฟอร์รี่',
+ 'reservations.type.cable_car': 'กระเช้าลอยฟ้า',
'reservations.type.bicycle': 'จักรยาน',
'reservations.type.taxi': 'แท็กซี่',
'reservations.type.transit': 'การขนส่งสาธารณะ',
@@ -196,6 +197,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'รีเซ็ตตัวกรอง',
'reservations.noMatches': 'ไม่มีรายการที่ตรงกับตัวกรองเหล่านี้',
'reservations.viewOptions': 'ตัวเลือกมุมมอง',
+ 'reservations.exportCsv': 'ส่งออกเป็นสเปรดชีต (CSV)',
+ 'reservations.export.type': 'ประเภท',
+ 'reservations.export.title': 'ชื่อ',
+ 'reservations.export.start': 'เริ่ม',
+ 'reservations.export.end': 'สิ้นสุด',
+ 'reservations.export.from': 'จาก',
+ 'reservations.export.to': 'ถึง',
+ 'reservations.export.location': 'สถานที่',
+ 'reservations.export.confirmation': 'หมายเลขยืนยัน',
+ 'reservations.export.notes': 'บันทึก',
'reservations.resetView': 'รีเซ็ตมุมมอง',
'reservations.group.label': 'จัดกลุ่มตาม',
'reservations.group.status': 'สถานะ',
diff --git a/shared/src/i18n/th/settings.ts b/shared/src/i18n/th/settings.ts
index 3cf0e112d..cbcf6b32c 100644
--- a/shared/src/i18n/th/settings.ts
+++ b/shared/src/i18n/th/settings.ts
@@ -336,6 +336,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
"จำนวนเงินในต้นทุนจะแสดงแปลงเป็นสกุลเงินนี้เพื่อแสดงเท่านั้น — จำนวนเงินเดิมไม่มีการเปลี่ยนแปลง",
'settings.currencyTrip': "สกุลเงินการเดินทาง",
+ 'settings.placeLanguage': 'ชื่อสถานที่',
+ 'settings.placeLanguageApp': 'เหมือนกับแอป',
+ 'settings.placeLanguageHint': 'ภาษาที่ใช้ในการค้นหาสถานที่ คำแนะนำ และที่อยู่ หากสถานที่ไม่มีชื่อในภาษานั้น จะแสดงชื่อท้องถิ่นแทน',
'settings.passkey.title': "พาสคีย์",
'settings.passkey.description':
"ลงชื่อเข้าใช้เร็วขึ้นและป้องกันฟิชชิ่งด้วยรหัสผ่าน ไม่ว่าจะเป็นลายนิ้วมือ ใบหน้า PIN หรือคีย์ฮาร์ดแวร์ รหัสผ่านของคุณยังคงเป็นข้อมูลสำรอง",
@@ -476,6 +479,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': "ภาษาและภูมิภาค",
'settings.general.travelMap': "การเดินทางและแผนที่",
'settings.general.startup': "การเริ่มต้น",
+ 'settings.dayDateFirst': 'แสดงวันที่ก่อนในหัวข้อวัน',
+ 'settings.compactUnplanned': 'หมุดขนาดเล็กสำหรับสถานที่ที่ยังไม่ได้วางแผน',
+ 'settings.compactUnplannedHint': 'สถานที่ที่ยังไม่ได้วางแผนไว้ในวันใดจะแสดงเป็นหมุดเล็กโดยไม่มีรูปภาพ เพื่อให้จุดแวะที่วางแผนไว้โดดเด่นขึ้น',
+ 'settings.dayDateFirstHint': 'เริ่มแต่ละวันด้วยวันที่ในปฏิทิน และแสดง "วันที่ 1" หรือชื่อของวันนั้นไว้ข้างๆ',
'settings.startPage': "หน้าเริ่มต้น",
'settings.startPageDashboard': "แดชบอร์ด",
'settings.startPageActiveTrip': "การเดินทางที่ใช้งานอยู่",
diff --git a/shared/src/i18n/th/share.ts b/shared/src/i18n/th/share.ts
index b62b6437e..4c709751a 100644
--- a/shared/src/i18n/th/share.ts
+++ b/shared/src/i18n/th/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': "การบรรจุ",
'share.permBudget': "ค่าใช้จ่าย",
'share.permCollab': "แชท",
+ 'share.options': 'ตัวเลือก',
+ 'share.optTravelOnly': 'เฉพาะการเดินทางและที่พัก',
+ 'share.optTravelOnlyHint': 'แสดงเฉพาะการเดินทางและที่พัก โดยไม่มีกิจกรรม บันทึกประจำวัน และวันที่ว่าง',
+ 'share.optHideImages': 'ไม่มีรูปภาพ',
+ 'share.optHideImagesHint': 'ไม่แสดงรูปภาพสถานที่ในหน้าที่แชร์',
};
export default share;
diff --git a/shared/src/i18n/th/shared.ts b/shared/src/i18n/th/shared.ts
index 972ef1d59..e7d099d1e 100644
--- a/shared/src/i18n/th/shared.ts
+++ b/shared/src/i18n/th/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': "แชท",
'shared.days': "วัน",
'shared.places': "สถานที่",
+ 'shared.unplanned': 'ยังไม่ได้วางแผน',
'shared.other': "อื่นๆ",
'shared.totalBudget': "ต้นทุนทั้งหมด",
'shared.messages': "ข้อความ",
diff --git a/shared/src/i18n/th/todo.ts b/shared/src/i18n/th/todo.ts
index 01a18e523..5116d1de7 100644
--- a/shared/src/i18n/th/todo.ts
+++ b/shared/src/i18n/th/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': "ไม่มีรายการ",
'todo.namePlaceholder': "ชื่องาน",
'todo.descriptionPlaceholder': "คำอธิบาย (ไม่บังคับ)",
+ 'todo.editDescription': 'คลิกเพื่อแก้ไข ลิงก์จะเปิดได้โดยตรง',
'todo.unassigned': "ยังไม่ได้มอบหมาย",
'todo.noCategory': "ไม่มีรายการ",
'todo.hasDescription': "มีคำอธิบาย",
diff --git a/shared/src/i18n/th/undo.ts b/shared/src/i18n/th/undo.ts
index e0b044a54..477ddab61 100644
--- a/shared/src/i18n/th/undo.ts
+++ b/shared/src/i18n/th/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': "เลิกทำ: {action}",
'undo.assignPlace': "สถานที่ที่ได้รับมอบหมายในแต่ละวัน",
'undo.removeAssignment': "สถานที่ที่ถูกลบออกจากวัน",
+ 'undo.clearDay': 'ล้างวันแล้ว',
'undo.reorder': "สถานที่ที่จัดลำดับใหม่",
'undo.optimize': "ปรับเส้นทางให้เหมาะสม",
'undo.deletePlace': "ลบสถานที่แล้ว",
diff --git a/shared/src/i18n/tr/atlas.ts b/shared/src/i18n/tr/atlas.ts
index 11bab2d13..6198f1b92 100644
--- a/shared/src/i18n/tr/atlas.ts
+++ b/shared/src/i18n/tr/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Ülkeler',
'atlas.trips': 'Geziler',
'atlas.places': 'Yer',
+ 'atlas.placesShow': 'Bu ülkedeki yerleri göster',
+ 'atlas.placesSearch': 'Yer ara',
+ 'atlas.placesNone': 'Eşleşen yer yok',
'atlas.unmark': 'Kaldırmak',
'atlas.confirmMark': 'Bu ülke ziyaret edildi olarak işaretlensin mi?',
'atlas.confirmUnmark': 'Bu ülke ziyaret ettiğiniz listeden kaldırılsın mı?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Günler',
'atlas.visitedCountries': 'Ziyaret Edilen Ülkeler',
'atlas.cities': 'Şehirler',
+ 'atlas.regions': 'Bölgeler',
'atlas.noData': 'Henüz seyahat verisi yok',
'atlas.noDataHint': 'Bir gezi oluşturun ve dünya haritanızı göreceğiniz yerleri ekleyin',
'atlas.nextTrip': 'Sonraki gezi',
diff --git a/shared/src/i18n/tr/budget.ts b/shared/src/i18n/tr/budget.ts
index 8a32516ae..f33ad395a 100644
--- a/shared/src/i18n/tr/budget.ts
+++ b/shared/src/i18n/tr/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'örn. Akşam yemeği, hediyelik, benzin…',
'costs.note': 'Not',
'costs.notePlaceholder': 'Neyi kapsadığı, kimin ne borcu olduğu…',
+ 'costs.paymentNotePlaceholder': 'Nakit ödendi, banka havalesiyle…',
'costs.addNote': 'Not ekle',
'costs.showNote': 'Notu göster',
'costs.hideNote': 'Notu gizle',
diff --git a/shared/src/i18n/tr/dayplan.ts b/shared/src/i18n/tr/dayplan.ts
index 14f8a9a30..15d76d99d 100644
--- a/shared/src/i18n/tr/dayplan.ts
+++ b/shared/src/i18n/tr/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Haritalar ve GPS',
'dayplan.pdf': "PDF'ler",
'dayplan.pdfTooltip': 'Gün planını PDF olarak dışa aktar',
+ 'dayplan.pdfMine': 'Planım PDF olarak',
+ 'dayplan.pdfMineSub': 'Yalnızca katıldığın etkinlikler ve rezervasyonlar',
'dayplan.gpxTooltip': 'Çevrimdışı haritalar ve GPS cihazları için GPX olarak dışa aktar',
'dayplan.gpxAll': 'Tüm gezi',
'dayplan.gpxPlaces': 'Yalnızca yerler',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Günü sil',
'dayplan.deleteDayTitle': '{day} silinsin mi?',
'dayplan.deleteDayBody': 'Gün seyahatten kaldırılır. Bu işlem geri alınamaz.',
+ 'dayplan.excludeFromRoute': 'Rotanın dışında bırak',
+ 'dayplan.includeInRoute': 'Rotaya geri ekle',
+ 'dayplan.offRoute': 'Rota dışı',
+ 'dayplan.offRouteHint': 'Günde ve haritada kalır, ancak rota onu atlar',
+ 'dayplan.clearDay': 'Günü temizle',
+ 'dayplan.clearDayTitle': '{day} temizlensin mi?',
+ 'dayplan.clearDayBody':
+ 'Tüm yerler bu günden kaldırılır. Yerler gezide kalır, gün de notlarını ve rezervasyonlarını korur.',
'dayplan.deleteDayEmpty': 'Bu gün için planlanmış bir şey yok.',
'dayplan.impactPlaces': 'Planlanan yerler: {count}',
'dayplan.impactPlacesHint': 'Yer listesinde kalırlar.',
diff --git a/shared/src/i18n/tr/inspector.ts b/shared/src/i18n/tr/inspector.ts
index d3067940c..05ccbaa8f 100644
--- a/shared/src/i18n/tr/inspector.ts
+++ b/shared/src/i18n/tr/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Bekleyen Rezervasyon',
'inspector.google': "Google Haritalar'da aç",
'inspector.navigation': 'Navigasyon',
+ 'inspector.otherMapApp': 'Başka bir harita uygulaması',
'inspector.openWith': 'Şununla aç',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.saveToCollection': 'Koleksiyona kaydet',
diff --git a/shared/src/i18n/tr/journey.ts b/shared/src/i18n/tr/journey.ts
index eeb2349a2..7eaa827e7 100644
--- a/shared/src/i18n/tr/journey.ts
+++ b/shared/src/i18n/tr/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Seyahat',
'journey.subtitle': 'Seyahatlerinizi anında kaydedin',
'journey.new': 'Yeni Journey',
+ 'journey.lightbox.zoomIn': 'Yakınlaştır',
+ 'journey.lightbox.zoomOut': 'Uzaklaştır',
+ 'journey.lightbox.zoomReset': 'Fotoğrafın tamamına dön',
'journey.create': 'Oluştur',
'journey.titlePlaceholder': 'Nereye gidiyorsunuz?',
'journey.empty': 'Henüz journey yok',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Kayıt Ekle',
'journey.detail.jumpToTop': 'Başa dön',
'journey.detail.jumpToLast': 'Son girdiye git',
+ 'journey.detail.dayJump': 'Bir güne git',
+ 'journey.detail.dayJumpCount': '{count} gün',
'journey.detail.newEntry': 'Yeni Kayıt',
'journey.detail.editEntry': 'Kaydı Düzenle',
'journey.detail.noEntries': 'Henüz kayıt yok',
@@ -432,6 +437,18 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Liste',
'journey.studio.kind.icon': 'Simge',
'journey.studio.duplicate': 'Çoğalt',
+ 'journey.studio.copyToPage': 'Kopyala, herhangi bir sayfaya yapıştırmak için (Ctrl+C)',
+ 'journey.studio.paste': 'Yapıştır (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Önce bir şey kopyala, sonra herhangi bir sayfaya yapıştır',
+ 'journey.studio.myLayouts': 'Yerleşimlerim',
+ 'journey.studio.myLayoutsEmpty':
+ 'Düzenlediğin bir sayfayı sakla ve diğer sayfaları da aynı şekilde yerleştir. Fotoğrafları ve metinleri olduğu gibi kalır.',
+ 'journey.studio.saveLayout': 'Bu sayfayı yerleşim olarak kaydet',
+ 'journey.studio.saveLayoutHint': 'Düzeni fotoğraflar olmadan saklar, bu kitabın tüm düzenleyicileri için',
+ 'journey.studio.saveLayoutFull': 'Bu kitap en fazla 24 yerleşim saklar. Yenisini kaydetmek için birini sil.',
+ 'journey.studio.deleteLayout': 'Yerleşimi sil',
+ 'journey.studio.layoutName': 'Yerleşim',
+ 'journey.studio.builtInLayouts': 'Hazır',
'journey.studio.style': 'Stil',
'journey.studio.shows': 'Gösterim',
'journey.studio.size': 'Boyut',
@@ -625,6 +642,12 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Durak günlükte kalır ama mesafeye, ülkelere veya Studio içindeki haritaya dahil edilmez.',
'journey.entry.offRoute': 'Rota dışı',
+ 'journey.entry.draft': 'Taslak',
+ 'journey.editor.draft': 'Taslak',
+ 'journey.editor.draftHint':
+ 'Bu kaydı yalnızca sen ve diğer katkıda bulunanlar görür. Sen bunu kapatana kadar paylaşılan journey onu göstermez.',
+ 'journey.editor.tripSuggestionHint': 'Bu gün bu geziye denk geliyor. Bağlarsan gezinin yerleri bu journey’e eklenir.',
+ 'journey.editor.tripSuggestionLater': 'Şimdi değil',
'journey.suggestions.dismiss': 'Bu öneriyi yok say',
'journey.suggestions.dismissed': 'Öneri yok sayıldı',
'journey.suggestions.restore': 'Yok sayılan önerileri geri getir',
diff --git a/shared/src/i18n/tr/map.ts b/shared/src/i18n/tr/map.ts
index 7712ee3b3..2642febab 100644
--- a/shared/src/i18n/tr/map.ts
+++ b/shared/src/i18n/tr/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Konumunuz belirlenemedi.',
'map.location.timeout': 'Konum belirleme çok uzun sürdü. Gökyüzünü daha iyi gören bir yerde tekrar deneyin.',
'map.overview.show': 'Tüm geziyi göster',
+ 'map.lock.lock': 'Harita görünümünü kilitle',
+ 'map.lock.unlock': 'Harita seçimi takip etsin',
'map.overview.hide': 'Tüm geziyi gizle',
'map.overview.total': 'Toplam mesafe',
'map.attribution': 'Harita kaynakları',
diff --git a/shared/src/i18n/tr/mobileTrip.ts b/shared/src/i18n/tr/mobileTrip.ts
index 1fdc64efb..523da7eac 100644
--- a/shared/src/i18n/tr/mobileTrip.ts
+++ b/shared/src/i18n/tr/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Haritada',
'mobileTrip.profileDriving': 'Araba',
'mobileTrip.profileWalking': 'Yürüyüş',
+ 'mobileTrip.profileCycling': 'Bisiklet',
'mobileTrip.renameDay': 'Günü yeniden adlandır',
'mobileTrip.resBadge': 'Rezervasyon',
'mobileTrip.showOnMap': 'Haritada göster',
diff --git a/shared/src/i18n/tr/packing.ts b/shared/src/i18n/tr/packing.ts
index baafc52d2..a54fa42ab 100644
--- a/shared/src/i18n/tr/packing.ts
+++ b/shared/src/i18n/tr/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Öğeyi düzenle',
'packing.itemName': 'Ad',
'packing.itemQuantity': 'Miktar',
+ 'packing.packedCount': '{total} öğeden {packed} tanesi paketlendi',
+ 'packing.packedMore': 'Bir tane daha paketle',
+ 'packing.packedLess': 'Bir tane daha az paketle',
'packing.itemWeight': 'Ağırlık (g)',
'packing.title': 'Paket Listesi',
'packing.empty': 'Paket listesi boş',
diff --git a/shared/src/i18n/tr/places.ts b/shared/src/i18n/tr/places.ts
index 00cdf845c..1ba88a6ee 100644
--- a/shared/src/i18n/tr/places.ts
+++ b/shared/src/i18n/tr/places.ts
@@ -54,6 +54,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Tüm yolculuğu göster',
'places.filterTracks': 'Parçalar',
'places.filterByRating': 'Puana göre filtrele',
+ 'places.filterByLocation': 'Ülke veya bölgeye göre filtrele',
+ 'places.allLocations': 'Tüm ülkeler',
'places.filterShow': 'Göster',
'places.clearSearch': 'Aramayı temizle',
'places.yourRating': 'Senin puanın',
@@ -80,6 +82,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Kategori',
'places.noCategory': 'Kategori Yok',
'places.newCategory': 'Yeni kategori',
+ 'places.openInMaps': 'Haritalarda aç',
'places.categoryNamePlaceholder': 'Kategori adı',
'places.formTime': 'Zaman',
'places.startTime': 'Başlangıç',
@@ -96,6 +99,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Yerleri ara...',
'places.mapsSearchError': 'Yer arama başarısız oldu.',
'places.searchGoogleInstead': "Doğru yer değil mi? Bunun yerine Google'da ara",
+ 'places.nearby': 'Bu işaretin yakınındaki yerler',
+ 'places.nearbyNone': 'Bu işaretin yakınında bir şey bulunamadı',
'places.loadingDetails': 'Yer ayrıntıları yükleniyor…',
'places.osmHint':
'OpenStreetMap aramasını kullanma (fotoğraf, açılış saatleri veya derecelendirme yok). Tüm ayrıntılar için ayarlara bir Google API anahtarı ekleyin.',
@@ -134,9 +139,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Yerleri Google ile zenginleştir',
'places.enrichOnImportHint':
'İçe aktarılan her yeri arayarak fotoğraf, adres ve iletişim bilgilerini ekler. Google Maps anahtarı gerekir.',
+ 'places.enrichOnImportFileHint':
+ "İçe aktarılan her noktayı ardından Google'da arar ve fotoğrafını, adresini, web sitesini ve telefonunu ekler. Yollar ve parkurlar olduğu gibi kalır.",
'places.uploadImage': 'Görsel yükle',
'places.changeImage': 'Görseli değiştir',
'places.removeImage': 'Görseli kaldır',
+ 'places.chooseImage': 'Bir görsel seç',
+ 'places.uploadFromDevice': 'Cihazdan yükle',
+ 'places.fromAttachedFiles': 'Ekli dosyalardan',
'places.imageUploadError': 'Görsel yüklenemedi',
'places.imageRemoveError': 'Görsel kaldırılamadı',
};
diff --git a/shared/src/i18n/tr/reservations.ts b/shared/src/i18n/tr/reservations.ts
index 0b8d1dd0f..c8e7e4376 100644
--- a/shared/src/i18n/tr/reservations.ts
+++ b/shared/src/i18n/tr/reservations.ts
@@ -62,6 +62,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Diğer',
'reservations.type.bus': 'Otobüs',
'reservations.type.ferry': 'Feribot',
+ 'reservations.type.cable_car': 'Teleferik',
'reservations.type.bicycle': 'Bisiklet',
'reservations.type.taxi': 'Taksi',
'reservations.type.transit': 'Toplu taşıma',
@@ -196,6 +197,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Filtreleri sıfırla',
'reservations.noMatches': 'Bu filtrelere uyan bir şey yok',
'reservations.viewOptions': 'Görünüm seçenekleri',
+ 'reservations.exportCsv': 'Tablo olarak dışa aktar (CSV)',
+ 'reservations.export.type': 'Tür',
+ 'reservations.export.title': 'Başlık',
+ 'reservations.export.start': 'Başlangıç',
+ 'reservations.export.end': 'Bitiş',
+ 'reservations.export.from': 'Nereden',
+ 'reservations.export.to': 'Nereye',
+ 'reservations.export.location': 'Konum',
+ 'reservations.export.confirmation': 'Rezervasyon kodu',
+ 'reservations.export.notes': 'Notlar',
'reservations.resetView': 'Görünümü sıfırla',
'reservations.group.label': 'Gruplandır',
'reservations.group.status': 'Durum',
diff --git a/shared/src/i18n/tr/settings.ts b/shared/src/i18n/tr/settings.ts
index efea109d4..7fc18498b 100644
--- a/shared/src/i18n/tr/settings.ts
+++ b/shared/src/i18n/tr/settings.ts
@@ -336,6 +336,10 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Maliyetler bölümündeki tutarlar yalnızca görüntüleme amacıyla bu para birimine çevrilerek gösterilir — orijinal tutarlar değişmez.',
'settings.currencyTrip': 'Gezi para birimi',
+ 'settings.placeLanguage': 'Yer adları',
+ 'settings.placeLanguageApp': 'Uygulamayla aynı',
+ 'settings.placeLanguageHint':
+ 'Yer aramasının, önerilerin ve adreslerin yanıt verdiği dil. Bir yerin bu dilde adı yoksa yerel adı gösterilir.',
'settings.passkey.title': 'Passkey’ler',
'settings.passkey.description':
'Passkey ile daha hızlı ve kimlik avına dayanıklı şekilde oturum açın — parmak iziniz, yüzünüz, PIN’iniz veya bir donanım anahtarı. Şifreniz yedek olarak kalır.',
@@ -481,6 +485,11 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Başlangıç',
+ 'settings.dayDateFirst': 'Gün başlıklarında önce tarih',
+ 'settings.compactUnplanned': 'Planlanmamış yerler için küçük işaretler',
+ 'settings.compactUnplannedHint':
+ 'Hiçbir güne planlanmamış yerler fotoğrafsız küçük işaretler olarak gösterilir, böylece planlanan duraklar öne çıkar.',
+ 'settings.dayDateFirstHint': 'Her güne takvim tarihiyle başla ve yanında "1. Gün" ya da günün kendi başlığını göster.',
'settings.startPage': 'Başlangıç sayfası',
'settings.startPageDashboard': 'Pano',
'settings.startPageActiveTrip': 'Aktif seyahat',
diff --git a/shared/src/i18n/tr/share.ts b/shared/src/i18n/tr/share.ts
index c9b4f2d1f..e8411c82a 100644
--- a/shared/src/i18n/tr/share.ts
+++ b/shared/src/i18n/tr/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Ambalaj',
'share.permBudget': 'Maliyetler',
'share.permCollab': 'Sohbet',
+ 'share.options': 'Seçenekler',
+ 'share.optTravelOnly': 'Yalnızca ulaşım ve konaklama',
+ 'share.optTravelOnlyHint': 'Etkinlikler, gün notları ve boş günler olmadan yalnızca ulaşım ve konaklamayı gösterir',
+ 'share.optHideImages': 'Fotoğrafsız',
+ 'share.optHideImagesHint': 'Yer fotoğraflarını paylaşılan sayfaya eklemez',
};
export default share;
diff --git a/shared/src/i18n/tr/shared.ts b/shared/src/i18n/tr/shared.ts
index 57532d35b..1ebefa340 100644
--- a/shared/src/i18n/tr/shared.ts
+++ b/shared/src/i18n/tr/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Sohbet',
'shared.days': 'günler',
'shared.places': 'yer',
+ 'shared.unplanned': 'Henüz planlanmadı',
'shared.other': 'Diğer',
'shared.totalBudget': 'Toplam Maliyet',
'shared.messages': 'mesajlar',
diff --git a/shared/src/i18n/tr/todo.ts b/shared/src/i18n/tr/todo.ts
index 880d96c9b..103683138 100644
--- a/shared/src/i18n/tr/todo.ts
+++ b/shared/src/i18n/tr/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Liste yok',
'todo.namePlaceholder': 'Görev adı',
'todo.descriptionPlaceholder': 'Açıklama (isteğe bağlı)',
+ 'todo.editDescription': 'Düzenlemek için tıkla, bağlantılar doğrudan açılır',
'todo.unassigned': 'Atanmamış',
'todo.noCategory': 'Liste yok',
'todo.hasDescription': 'Açıklama var',
diff --git a/shared/src/i18n/tr/undo.ts b/shared/src/i18n/tr/undo.ts
index bb87acc36..c96baf83e 100644
--- a/shared/src/i18n/tr/undo.ts
+++ b/shared/src/i18n/tr/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Geri al: {action}',
'undo.assignPlace': 'Yer güne atandı',
'undo.removeAssignment': 'Yer günden kaldırıldı',
+ 'undo.clearDay': 'Gün temizlendi',
'undo.reorder': 'Yerler yeniden sıralandı',
'undo.optimize': 'Rota optimize edildi',
'undo.deletePlace': 'Yer silindi',
diff --git a/shared/src/i18n/uk/atlas.ts b/shared/src/i18n/uk/atlas.ts
index 5611b0400..f1787f2aa 100644
--- a/shared/src/i18n/uk/atlas.ts
+++ b/shared/src/i18n/uk/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Країни',
'atlas.trips': 'Подорожі',
'atlas.places': 'Місця',
+ 'atlas.placesShow': 'Показати місця в цій країні',
+ 'atlas.placesSearch': 'Пошук місць',
+ 'atlas.placesNone': 'Жодне місце не відповідає',
'atlas.days': 'Дні',
'atlas.visitedCountries': 'Відвідані країни',
'atlas.cities': 'Міста',
+ 'atlas.regions': 'Регіони',
'atlas.noData': 'Даних про подорожі поки немає',
'atlas.noDataHint': 'Створіть подорож і додайте місця, щоб побачити карту світу',
'atlas.nextTrip': 'Наступна подорож',
diff --git a/shared/src/i18n/uk/budget.ts b/shared/src/i18n/uk/budget.ts
index c38b5450f..69657f7de 100644
--- a/shared/src/i18n/uk/budget.ts
+++ b/shared/src/i18n/uk/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'напр. вечеря, сувеніри, пальне…',
'costs.note': 'Нотатка',
'costs.notePlaceholder': 'Що входило, хто скільки винен…',
+ 'costs.paymentNotePlaceholder': 'Сплачено готівкою, банківським переказом…',
'costs.addNote': 'Додати нотатку',
'costs.showNote': 'Показати нотатку',
'costs.hideNote': 'Сховати нотатку',
diff --git a/shared/src/i18n/uk/dayplan.ts b/shared/src/i18n/uk/dayplan.ts
index 7709b2e0e..98562ce7e 100644
--- a/shared/src/i18n/uk/dayplan.ts
+++ b/shared/src/i18n/uk/dayplan.ts
@@ -59,6 +59,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Карти та GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Експортувати план дня в PDF',
+ 'dayplan.pdfMine': 'Мій план у PDF',
+ 'dayplan.pdfMineSub': 'Лише активності та бронювання, у яких ви берете участь',
'dayplan.gpxTooltip': 'Експорт у GPX для офлайн-карт і GPS-пристроїв',
'dayplan.gpxAll': 'Уся подорож',
'dayplan.gpxPlaces': 'Лише місця',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Видалити день',
'dayplan.deleteDayTitle': 'Видалити {day}?',
'dayplan.deleteDayBody': 'День буде видалено з подорожі. Цю дію не можна скасувати.',
+ 'dayplan.excludeFromRoute': 'Не включати в маршрут',
+ 'dayplan.includeInRoute': 'Повернути в маршрут',
+ 'dayplan.offRoute': 'Поза маршрутом',
+ 'dayplan.offRouteHint': 'Залишається в дні та на карті, але маршрут його оминає',
+ 'dayplan.clearDay': 'Очистити день',
+ 'dayplan.clearDayTitle': 'Очистити {day}?',
+ 'dayplan.clearDayBody':
+ 'Усі місця буде прибрано з цього дня. Місця залишаться в подорожі, а нотатки та бронювання дня збережуться.',
'dayplan.deleteDayEmpty': 'На цей день нічого не заплановано.',
'dayplan.impactPlaces': 'Заплановані місця: {count}',
'dayplan.impactPlacesHint': 'Вони залишаться у списку місць.',
diff --git a/shared/src/i18n/uk/inspector.ts b/shared/src/i18n/uk/inspector.ts
index d59e79bf9..8fe5384da 100644
--- a/shared/src/i18n/uk/inspector.ts
+++ b/shared/src/i18n/uk/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Очікуване бронювання',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Навігація',
+ 'inspector.otherMapApp': 'Інший застосунок карт',
'inspector.openWith': 'Відкрити в',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': 'Відкрити сайт',
diff --git a/shared/src/i18n/uk/journey.ts b/shared/src/i18n/uk/journey.ts
index 2fa3824e6..21cf2a71b 100644
--- a/shared/src/i18n/uk/journey.ts
+++ b/shared/src/i18n/uk/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Journey',
'journey.subtitle': 'Відстежуйте свої подорожі в реальному часі',
'journey.new': 'Нова подорож',
+ 'journey.lightbox.zoomIn': 'Збільшити',
+ 'journey.lightbox.zoomOut': 'Зменшити',
+ 'journey.lightbox.zoomReset': 'Повернутися до всього фото',
'journey.create': 'Створити',
'journey.titlePlaceholder': 'Куди ви їдете?',
'journey.empty': 'Поки що немає подорожей',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Додати запис',
'journey.detail.jumpToTop': 'Нагору',
'journey.detail.jumpToLast': 'До останнього запису',
+ 'journey.detail.dayJump': 'Перейти до дня',
+ 'journey.detail.dayJumpCount': 'Днів: {count}',
'journey.detail.newEntry': 'Новий запис',
'journey.detail.editEntry': 'Редагувати запис',
'journey.detail.noEntries': 'Поки що немає записів',
@@ -433,6 +438,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Список',
'journey.studio.kind.icon': 'Іконка',
'journey.studio.duplicate': 'Дублювати',
+ 'journey.studio.copyToPage': 'Копіювати, щоб вставити на будь-яку сторінку (Ctrl+C)',
+ 'journey.studio.paste': 'Вставити (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Спершу щось скопіюйте, потім вставте на будь-яку сторінку',
+ 'journey.studio.myLayouts': 'Мої макети',
+ 'journey.studio.myLayoutsEmpty': 'Збережіть сторінку, яку ви впорядкували, і розкладайте інші сторінки так само. Їхні фото й тексти залишаться.',
+ 'journey.studio.saveLayout': 'Зберегти цю сторінку як макет',
+ 'journey.studio.saveLayoutHint': 'Зберігає розташування без фото, для всіх редакторів цієї книги',
+ 'journey.studio.saveLayoutFull': 'Ця книга зберігає до 24 макетів. Видаліть один, щоб зберегти інший.',
+ 'journey.studio.deleteLayout': 'Видалити макет',
+ 'journey.studio.layoutName': 'Макет',
+ 'journey.studio.builtInLayouts': 'Вбудовані',
'journey.studio.style': 'Стиль',
'journey.studio.shows': 'Показувати',
'journey.studio.size': 'Розмір',
@@ -627,6 +643,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Зупинка залишається в щоденнику, але не враховується у відстані, країнах і на карті в Studio.',
'journey.entry.offRoute': 'Поза маршрутом',
+ 'journey.entry.draft': 'Чернетка',
+ 'journey.editor.draft': 'Чернетка',
+ 'journey.editor.draftHint': 'Цей запис бачите лише ви та інші учасники. Спільна подорож не показує його, доки ви це не вимкнете.',
+ 'journey.editor.tripSuggestionHint': 'Цей день припадає на цю подорож. Пов’яжіть її, і її місця додадуться до цього щоденника.',
+ 'journey.editor.tripSuggestionLater': 'Не зараз',
'journey.suggestions.dismiss': 'Відхилити цю пропозицію',
'journey.suggestions.dismissed': 'Пропозицію відхилено',
'journey.suggestions.restore': 'Повернути відхилені пропозиції',
diff --git a/shared/src/i18n/uk/map.ts b/shared/src/i18n/uk/map.ts
index 3b0bbfabe..077ddb66a 100644
--- a/shared/src/i18n/uk/map.ts
+++ b/shared/src/i18n/uk/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Не вдалося визначити ваше місцезнаходження.',
'map.location.timeout': 'Визначення місцезнаходження тривало надто довго. Спробуйте ще раз просто неба.',
'map.overview.show': 'Показати всю подорож',
+ 'map.lock.lock': 'Зафіксувати вигляд карти',
+ 'map.lock.unlock': 'Дозволити карті стежити за вибором',
'map.overview.hide': 'Сховати всю подорож',
'map.overview.total': 'Загальна відстань',
'map.attribution': 'Джерела карти',
diff --git a/shared/src/i18n/uk/mobileTrip.ts b/shared/src/i18n/uk/mobileTrip.ts
index 289db9676..43d6a12c8 100644
--- a/shared/src/i18n/uk/mobileTrip.ts
+++ b/shared/src/i18n/uk/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'На карті',
'mobileTrip.profileDriving': 'На авто',
'mobileTrip.profileWalking': 'Пішки',
+ 'mobileTrip.profileCycling': 'Велосипедом',
'mobileTrip.renameDay': 'Перейменувати день',
'mobileTrip.resBadge': 'Бронювання',
'mobileTrip.showOnMap': 'Показати на карті',
diff --git a/shared/src/i18n/uk/packing.ts b/shared/src/i18n/uk/packing.ts
index a81e208aa..c04cb15e0 100644
--- a/shared/src/i18n/uk/packing.ts
+++ b/shared/src/i18n/uk/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Редагувати елемент',
'packing.itemName': 'Назва',
'packing.itemQuantity': 'Кількість',
+ 'packing.packedCount': 'Спаковано {packed} з {total}',
+ 'packing.packedMore': 'Спакувати ще одну',
+ 'packing.packedLess': 'Спакувати на одну менше',
'packing.itemWeight': 'Вага (г)',
'packing.title': 'Список речей',
'packing.empty': 'Список речей порожній',
diff --git a/shared/src/i18n/uk/places.ts b/shared/src/i18n/uk/places.ts
index ac65866fc..29e3a3c99 100644
--- a/shared/src/i18n/uk/places.ts
+++ b/shared/src/i18n/uk/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Показати всю подорож',
'places.filterTracks': 'Треки',
'places.filterByRating': 'Фільтр за оцінкою',
+ 'places.filterByLocation': 'Фільтр за країною або регіоном',
+ 'places.allLocations': 'Усі країни',
'places.filterShow': 'Показати',
'places.clearSearch': 'Очистити пошук',
'places.yourRating': 'Твоя оцінка',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Категорія',
'places.noCategory': 'Без категорії',
'places.newCategory': 'Нова категорія',
+ 'places.openInMaps': 'Відкрити в картах',
'places.categoryNamePlaceholder': 'Назва категорії',
'places.formTime': 'Час',
'places.startTime': 'Початок',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Пошук місць...',
'places.mapsSearchError': 'Помилка пошуку місць.',
'places.searchGoogleInstead': 'Не те місце? Пошукати в Google',
+ 'places.nearby': 'Місця поблизу цієї позначки',
+ 'places.nearbyNone': 'Поблизу цієї позначки нічого не знайдено',
'places.loadingDetails': 'Завантаження даних про місце…',
'places.osmHint':
'Пошук через OpenStreetMap (без фото, годин роботи та рейтингів). Додайте API-ключ Google у налаштуваннях для повної інформації.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Збагатити місця через Google',
'places.enrichOnImportHint':
'Знаходить кожне імпортоване місце й додає фото, адресу та контакти. Потрібен ключ Google Maps.',
+ 'places.enrichOnImportFileHint':
+ 'Після імпорту шукає кожну точку в Google і додає її фото, адресу, вебсайт і телефон. Шляхи та треки залишаються без змін.',
'places.uploadImage': 'Завантажити зображення',
'places.changeImage': 'Змінити зображення',
'places.removeImage': 'Видалити зображення',
+ 'places.chooseImage': 'Вибрати зображення',
+ 'places.uploadFromDevice': 'Завантажити з пристрою',
+ 'places.fromAttachedFiles': 'З прикріплених файлів',
'places.imageUploadError': 'Не вдалося завантажити зображення',
'places.imageRemoveError': 'Не вдалося видалити зображення',
};
diff --git a/shared/src/i18n/uk/reservations.ts b/shared/src/i18n/uk/reservations.ts
index 43f5192a4..32ca1060b 100644
--- a/shared/src/i18n/uk/reservations.ts
+++ b/shared/src/i18n/uk/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Інше',
'reservations.type.bus': 'Автобус',
'reservations.type.ferry': 'Пором',
+ 'reservations.type.cable_car': 'Канатна дорога',
'reservations.type.bicycle': 'Велосипед',
'reservations.type.taxi': 'Таксі',
'reservations.type.transit': 'Громадський транспорт',
@@ -194,6 +195,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Скинути фільтри',
'reservations.noMatches': 'Нічого не відповідає цим фільтрам',
'reservations.viewOptions': 'Параметри вигляду',
+ 'reservations.exportCsv': 'Експортувати як таблицю (CSV)',
+ 'reservations.export.type': 'Тип',
+ 'reservations.export.title': 'Назва',
+ 'reservations.export.start': 'Початок',
+ 'reservations.export.end': 'Кінець',
+ 'reservations.export.from': 'Звідки',
+ 'reservations.export.to': 'Куди',
+ 'reservations.export.location': 'Місце',
+ 'reservations.export.confirmation': 'Підтвердження',
+ 'reservations.export.notes': 'Нотатки',
'reservations.resetView': 'Скинути вигляд',
'reservations.group.label': 'Групувати за',
'reservations.group.status': 'Статус',
diff --git a/shared/src/i18n/uk/settings.ts b/shared/src/i18n/uk/settings.ts
index 9a98c99c0..68a021be2 100644
--- a/shared/src/i18n/uk/settings.ts
+++ b/shared/src/i18n/uk/settings.ts
@@ -338,6 +338,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Суми в розділі «Витрати» відображаються в цій валюті лише для перегляду — початкові суми не змінюються.',
'settings.currencyTrip': 'Валюта подорожі',
+ 'settings.placeLanguage': 'Назви місць',
+ 'settings.placeLanguageApp': 'Як у застосунку',
+ 'settings.placeLanguageHint': 'Мова, якою відповідають пошук місць, підказки та адреси. Якщо місце не має назви цією мовою, показується його місцева назва.',
'settings.passkey.title': 'Passkeys',
'settings.passkey.description':
'Входьте швидше та з захистом від фішингу за допомогою passkey — відбитка пальця, обличчя, PIN-коду або апаратного ключа. Ваш пароль залишається як резервний варіант.',
@@ -484,6 +487,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': 'Запуск',
+ 'settings.dayDateFirst': 'Дата першою в заголовках днів',
+ 'settings.compactUnplanned': 'Компактні позначки для незапланованих місць',
+ 'settings.compactUnplannedHint': 'Місця, не заплановані на жоден день, показуються маленькими позначками без фото, щоб заплановані зупинки вирізнялися.',
+ 'settings.dayDateFirstHint': 'Починати кожен день з його календарної дати, а поруч показувати «День 1» або власну назву дня.',
'settings.startPage': 'Стартова сторінка',
'settings.startPageDashboard': 'Панель',
'settings.startPageActiveTrip': 'Активна поїздка',
diff --git a/shared/src/i18n/uk/share.ts b/shared/src/i18n/uk/share.ts
index 1416296ef..7a2c32000 100644
--- a/shared/src/i18n/uk/share.ts
+++ b/shared/src/i18n/uk/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Речі',
'share.permBudget': 'Витрати',
'share.permCollab': 'Чат',
+ 'share.options': 'Параметри',
+ 'share.optTravelOnly': 'Лише переїзди та проживання',
+ 'share.optTravelOnlyHint': 'Показує лише транспорт і житло, без активностей, нотаток до днів і порожніх днів',
+ 'share.optHideImages': 'Без фото',
+ 'share.optHideImagesHint': 'Не показує фото місць на спільній сторінці',
};
export default share;
diff --git a/shared/src/i18n/uk/shared.ts b/shared/src/i18n/uk/shared.ts
index c7fde4d31..e35253915 100644
--- a/shared/src/i18n/uk/shared.ts
+++ b/shared/src/i18n/uk/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Чат',
'shared.days': 'днів',
'shared.places': 'місць',
+ 'shared.unplanned': 'Ще не заплановано',
'shared.other': 'Інше',
'shared.totalBudget': 'Загальні витрати',
'shared.messages': 'повідомлень',
diff --git a/shared/src/i18n/uk/todo.ts b/shared/src/i18n/uk/todo.ts
index 2802f1877..63bcc4c34 100644
--- a/shared/src/i18n/uk/todo.ts
+++ b/shared/src/i18n/uk/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Без списку',
'todo.namePlaceholder': 'Назва завдання',
'todo.descriptionPlaceholder': 'Опис (необов’язково)',
+ 'todo.editDescription': 'Натисніть, щоб редагувати, посилання відкриваються одразу',
'todo.unassigned': 'Не призначено',
'todo.noCategory': 'Без списку',
'todo.hasDescription': 'Є опис',
diff --git a/shared/src/i18n/uk/undo.ts b/shared/src/i18n/uk/undo.ts
index 57de9dbb2..28df3b6cd 100644
--- a/shared/src/i18n/uk/undo.ts
+++ b/shared/src/i18n/uk/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Відмінити: {action}',
'undo.assignPlace': 'Місце додано до дня',
'undo.removeAssignment': 'Місце вилучено з дня',
+ 'undo.clearDay': 'День очищено',
'undo.reorder': 'Місця переставлено',
'undo.optimize': 'Маршрут оптимізовано',
'undo.deletePlace': 'Місце видалено',
diff --git a/shared/src/i18n/vi/atlas.ts b/shared/src/i18n/vi/atlas.ts
index eeff5e427..fb1f2e46c 100644
--- a/shared/src/i18n/vi/atlas.ts
+++ b/shared/src/i18n/vi/atlas.ts
@@ -5,6 +5,9 @@ const atlas: TranslationStrings = {
'atlas.countries': 'Quốc gia',
'atlas.trips': 'Chuyến đi',
'atlas.places': 'Địa điểm',
+ 'atlas.placesShow': 'Hiện các địa điểm ở quốc gia này',
+ 'atlas.placesSearch': 'Tìm địa điểm',
+ 'atlas.placesNone': 'Không có địa điểm nào phù hợp',
'atlas.unmark': 'Di dời',
'atlas.confirmMark': 'Đánh dấu quốc gia này là đã ghé thăm?',
'atlas.confirmUnmark': 'Xóa quốc gia này khỏi danh sách bạn đã ghé thăm?',
@@ -33,6 +36,7 @@ const atlas: TranslationStrings = {
'atlas.days': 'Ngày',
'atlas.visitedCountries': 'Các nước đã ghé thăm',
'atlas.cities': 'Thành phố',
+ 'atlas.regions': 'Vùng',
'atlas.noData': 'Chưa có dữ liệu du lịch',
'atlas.noDataHint': 'Tạo chuyến đi và thêm địa điểm để xem bản đồ thế giới của bạn',
'atlas.nextTrip': 'Chuyến đi tiếp theo',
diff --git a/shared/src/i18n/vi/budget.ts b/shared/src/i18n/vi/budget.ts
index 63bc7c55b..60a63c2b8 100644
--- a/shared/src/i18n/vi/budget.ts
+++ b/shared/src/i18n/vi/budget.ts
@@ -108,6 +108,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': 'ví dụ. Ăn tối, quà lưu niệm, xăng…',
'costs.note': 'Ghi chú',
'costs.notePlaceholder': 'Khoản này gồm những gì, ai nợ bao nhiêu…',
+ 'costs.paymentNotePlaceholder': 'Trả tiền mặt, chuyển khoản ngân hàng…',
'costs.addNote': 'Thêm ghi chú',
'costs.showNote': 'Hiện ghi chú',
'costs.hideNote': 'Ẩn ghi chú',
diff --git a/shared/src/i18n/vi/dayplan.ts b/shared/src/i18n/vi/dayplan.ts
index 0c163bc75..12234aec5 100644
--- a/shared/src/i18n/vi/dayplan.ts
+++ b/shared/src/i18n/vi/dayplan.ts
@@ -68,6 +68,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': 'Bản đồ và GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': 'Kế hoạch ngày xuất dưới dạng PDF',
+ 'dayplan.pdfMine': 'Kế hoạch của tôi dạng PDF',
+ 'dayplan.pdfMineSub': 'Chỉ các hoạt động và đặt chỗ bạn tham gia',
'dayplan.gpxTooltip': 'Xuất ra GPX cho bản đồ ngoại tuyến và thiết bị GPS',
'dayplan.gpxAll': 'Toàn bộ chuyến đi',
'dayplan.gpxPlaces': 'Chỉ địa điểm',
@@ -92,6 +94,14 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': 'Xóa ngày',
'dayplan.deleteDayTitle': 'Xóa {day}?',
'dayplan.deleteDayBody': 'Ngày này sẽ bị xóa khỏi chuyến đi. Không thể hoàn tác.',
+ 'dayplan.excludeFromRoute': 'Bỏ khỏi lộ trình',
+ 'dayplan.includeInRoute': 'Thêm lại vào lộ trình',
+ 'dayplan.offRoute': 'Ngoài lộ trình',
+ 'dayplan.offRouteHint': 'Vẫn nằm trong ngày và trên bản đồ, nhưng lộ trình sẽ bỏ qua',
+ 'dayplan.clearDay': 'Xóa trống ngày',
+ 'dayplan.clearDayTitle': 'Xóa trống {day}?',
+ 'dayplan.clearDayBody':
+ 'Mọi địa điểm sẽ được gỡ khỏi ngày này. Các địa điểm vẫn ở trong chuyến đi, và ngày này vẫn giữ ghi chú cùng đặt chỗ.',
'dayplan.deleteDayEmpty': 'Không có gì được lên kế hoạch cho ngày này.',
'dayplan.impactPlaces': 'Địa điểm đã lên kế hoạch: {count}',
'dayplan.impactPlacesHint': 'Chúng vẫn nằm trong danh sách địa điểm.',
diff --git a/shared/src/i18n/vi/inspector.ts b/shared/src/i18n/vi/inspector.ts
index e63cb2b75..2ebba3478 100644
--- a/shared/src/i18n/vi/inspector.ts
+++ b/shared/src/i18n/vi/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': 'Đang chờ đặt chỗ',
'inspector.google': 'Google Maps',
'inspector.navigation': 'Điều hướng',
+ 'inspector.otherMapApp': 'Ứng dụng bản đồ khác',
'inspector.openWith': 'Mở bằng',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.saveToCollection': 'Lưu vào Bộ sưu tập',
diff --git a/shared/src/i18n/vi/journey.ts b/shared/src/i18n/vi/journey.ts
index e2cb9492b..79197e3b5 100644
--- a/shared/src/i18n/vi/journey.ts
+++ b/shared/src/i18n/vi/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': 'Hành trình',
'journey.subtitle': 'Theo dõi chuyến đi của bạn khi chúng diễn ra',
'journey.new': 'Hành trình mới',
+ 'journey.lightbox.zoomIn': 'Phóng to',
+ 'journey.lightbox.zoomOut': 'Thu nhỏ',
+ 'journey.lightbox.zoomReset': 'Quay lại ảnh đầy đủ',
'journey.create': 'Tạo nên',
'journey.titlePlaceholder': 'Bạn đang đi đâu?',
'journey.empty': 'Chưa có chuyến đi nào',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': 'Thêm mục nhập',
'journey.detail.jumpToTop': 'Lên đầu trang',
'journey.detail.jumpToLast': 'Đến mục cuối cùng',
+ 'journey.detail.dayJump': 'Chuyển đến một ngày',
+ 'journey.detail.dayJumpCount': '{count} ngày',
'journey.detail.newEntry': 'Mục mới',
'journey.detail.editEntry': 'Chỉnh sửa mục nhập',
'journey.detail.noEntries': 'Chưa có mục nào',
@@ -432,6 +437,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': 'Danh sách',
'journey.studio.kind.icon': 'Icon',
'journey.studio.duplicate': 'Nhân bản',
+ 'journey.studio.copyToPage': 'Sao chép để dán vào trang bất kỳ (Ctrl+C)',
+ 'journey.studio.paste': 'Dán (Ctrl+V)',
+ 'journey.studio.pasteEmpty': 'Hãy sao chép thứ gì đó trước, rồi dán vào trang bất kỳ',
+ 'journey.studio.myLayouts': 'Bố cục của tôi',
+ 'journey.studio.myLayoutsEmpty': 'Lưu một trang bạn đã sắp xếp và dàn các trang khác theo cùng cách. Ảnh và chữ của chúng được giữ nguyên.',
+ 'journey.studio.saveLayout': 'Lưu trang này làm bố cục',
+ 'journey.studio.saveLayoutHint': 'Giữ cách sắp xếp nhưng không kèm ảnh, cho mọi người chỉnh sửa cuốn sách này',
+ 'journey.studio.saveLayoutFull': 'Cuốn sách này lưu được tối đa 24 bố cục. Hãy xóa một bố cục để lưu bố cục khác.',
+ 'journey.studio.deleteLayout': 'Xóa bố cục',
+ 'journey.studio.layoutName': 'Bố cục',
+ 'journey.studio.builtInLayouts': 'Có sẵn',
'journey.studio.style': 'Kiểu',
'journey.studio.shows': 'Hiển thị',
'journey.studio.size': 'Cỡ chữ',
@@ -625,6 +641,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcludedHint':
'Điểm dừng vẫn nằm trong nhật ký nhưng không được tính vào quãng đường, các quốc gia hay bản đồ trong Studio.',
'journey.entry.offRoute': 'Ngoài lộ trình',
+ 'journey.entry.draft': 'Bản nháp',
+ 'journey.editor.draft': 'Bản nháp',
+ 'journey.editor.draftHint': 'Chỉ bạn và những người đóng góp khác thấy mục này. Hành trình được chia sẻ sẽ không hiển thị mục này cho đến khi bạn tắt tùy chọn này.',
+ 'journey.editor.tripSuggestionHint': 'Ngày này nằm trong chuyến đi này. Liên kết để các địa điểm của chuyến đi được thêm vào hành trình này.',
+ 'journey.editor.tripSuggestionLater': 'Để sau',
'journey.suggestions.dismiss': 'Bỏ qua gợi ý này',
'journey.suggestions.dismissed': 'Đã bỏ qua gợi ý',
'journey.suggestions.restore': 'Lấy lại các gợi ý đã bỏ qua',
diff --git a/shared/src/i18n/vi/map.ts b/shared/src/i18n/vi/map.ts
index e40f4e3d2..9d0c867bb 100644
--- a/shared/src/i18n/vi/map.ts
+++ b/shared/src/i18n/vi/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': 'Không thể xác định vị trí của bạn.',
'map.location.timeout': 'Việc xác định vị trí mất quá nhiều thời gian. Hãy thử lại ở nơi nhìn thấy bầu trời thoáng hơn.',
'map.overview.show': 'Hiện toàn bộ chuyến đi',
+ 'map.lock.lock': 'Khóa góc nhìn bản đồ',
+ 'map.lock.unlock': 'Để bản đồ đi theo mục đang chọn',
'map.overview.hide': 'Ẩn toàn bộ chuyến đi',
'map.overview.total': 'Tổng quãng đường',
'map.attribution': 'Nguồn bản đồ',
diff --git a/shared/src/i18n/vi/mobileTrip.ts b/shared/src/i18n/vi/mobileTrip.ts
index 5d1bf0bc4..11c4abe30 100644
--- a/shared/src/i18n/vi/mobileTrip.ts
+++ b/shared/src/i18n/vi/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': 'Trên bản đồ',
'mobileTrip.profileDriving': 'Lái xe',
'mobileTrip.profileWalking': 'Đi bộ',
+ 'mobileTrip.profileCycling': 'Đạp xe',
'mobileTrip.renameDay': 'Đổi tên ngày',
'mobileTrip.resBadge': 'Đặt chỗ',
'mobileTrip.showOnMap': 'Hiển thị trên bản đồ',
diff --git a/shared/src/i18n/vi/packing.ts b/shared/src/i18n/vi/packing.ts
index d3062960f..092ed23e1 100644
--- a/shared/src/i18n/vi/packing.ts
+++ b/shared/src/i18n/vi/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': 'Chỉnh sửa mục',
'packing.itemName': 'Tên',
'packing.itemQuantity': 'Số lượng',
+ 'packing.packedCount': 'Đã xếp {packed}/{total}',
+ 'packing.packedMore': 'Xếp thêm một',
+ 'packing.packedLess': 'Bớt một món đã xếp',
'packing.itemWeight': 'Trọng lượng (g)',
'packing.title': 'Danh sách đóng gói',
'packing.empty': 'Danh sách đóng gói trống',
diff --git a/shared/src/i18n/vi/places.ts b/shared/src/i18n/vi/places.ts
index 9cba6a10d..993ef304d 100644
--- a/shared/src/i18n/vi/places.ts
+++ b/shared/src/i18n/vi/places.ts
@@ -52,6 +52,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': 'Hiện toàn bộ chuyến đi',
'places.filterTracks': 'Đường đi',
'places.filterByRating': 'Lọc theo đánh giá',
+ 'places.filterByLocation': 'Lọc theo quốc gia hoặc vùng',
+ 'places.allLocations': 'Tất cả quốc gia',
'places.filterShow': 'Hiển thị',
'places.clearSearch': 'Xóa tìm kiếm',
'places.yourRating': 'Đánh giá của bạn',
@@ -78,6 +80,7 @@ const places: TranslationStrings = {
'places.formCategory': 'Loại',
'places.noCategory': 'Không có danh mục',
'places.newCategory': 'Danh mục mới',
+ 'places.openInMaps': 'Mở trong ứng dụng bản đồ',
'places.categoryNamePlaceholder': 'Tên danh mục',
'places.formTime': 'Thời gian',
'places.startTime': 'Bắt đầu',
@@ -94,6 +97,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': 'Tìm kiếm địa điểm...',
'places.mapsSearchError': 'Tìm kiếm địa điểm không thành công.',
'places.searchGoogleInstead': 'Không đúng địa điểm? Tìm trên Google',
+ 'places.nearby': 'Địa điểm gần ghim này',
+ 'places.nearbyNone': 'Không tìm thấy gì gần ghim này',
'places.loadingDetails': 'Đang tải chi tiết địa điểm…',
'places.osmHint':
'Sử dụng tìm kiếm OpenStreetMap (không có ảnh, giờ mở cửa hoặc xếp hạng). Thêm khóa Google API trong cài đặt để biết đầy đủ chi tiết.',
@@ -132,9 +137,14 @@ const places: TranslationStrings = {
'places.enrichOnImport': 'Làm phong phú các địa điểm thông qua Google',
'places.enrichOnImportHint':
'Tra cứu từng địa điểm đã nhập để điền ảnh, địa chỉ và thông tin liên hệ. Sử dụng khóa Google Maps của bạn.',
+ 'places.enrichOnImportFileHint':
+ 'Sau khi nhập, tra cứu từng điểm trên Google và thêm ảnh, địa chỉ, trang web và số điện thoại. Đường đi và tuyến ghi được giữ nguyên.',
'places.uploadImage': 'Tải ảnh lên',
'places.changeImage': 'Đổi ảnh',
'places.removeImage': 'Xóa ảnh',
+ 'places.chooseImage': 'Chọn ảnh',
+ 'places.uploadFromDevice': 'Tải lên từ thiết bị',
+ 'places.fromAttachedFiles': 'Từ tệp đính kèm',
'places.imageUploadError': 'Không thể tải ảnh lên',
'places.imageRemoveError': 'Không thể xóa ảnh',
};
diff --git a/shared/src/i18n/vi/reservations.ts b/shared/src/i18n/vi/reservations.ts
index 3c9e88e7c..4abf389b0 100644
--- a/shared/src/i18n/vi/reservations.ts
+++ b/shared/src/i18n/vi/reservations.ts
@@ -62,6 +62,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': 'Khác',
'reservations.type.bus': 'xe buýt',
'reservations.type.ferry': 'Phà',
+ 'reservations.type.cable_car': 'Cáp treo',
'reservations.type.bicycle': 'Xe đạp',
'reservations.type.taxi': 'Taxi',
'reservations.type.transit': 'Giao thông công cộng',
@@ -197,6 +198,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': 'Đặt lại bộ lọc',
'reservations.noMatches': 'Không có mục nào khớp với các bộ lọc này',
'reservations.viewOptions': 'Tùy chọn hiển thị',
+ 'reservations.exportCsv': 'Xuất dưới dạng bảng tính (CSV)',
+ 'reservations.export.type': 'Loại',
+ 'reservations.export.title': 'Tiêu đề',
+ 'reservations.export.start': 'Bắt đầu',
+ 'reservations.export.end': 'Kết thúc',
+ 'reservations.export.from': 'Từ',
+ 'reservations.export.to': 'Đến',
+ 'reservations.export.location': 'Địa điểm',
+ 'reservations.export.confirmation': 'Mã xác nhận',
+ 'reservations.export.notes': 'Ghi chú',
'reservations.resetView': 'Đặt lại chế độ xem',
'reservations.group.label': 'Nhóm theo',
'reservations.group.status': 'Trạng thái',
diff --git a/shared/src/i18n/vi/settings.ts b/shared/src/i18n/vi/settings.ts
index f40a8a91d..21f02274a 100644
--- a/shared/src/i18n/vi/settings.ts
+++ b/shared/src/i18n/vi/settings.ts
@@ -343,6 +343,9 @@ const settings: TranslationStrings = {
'settings.currencyHint':
'Số tiền trong Chi phí chỉ được quy đổi sang loại tiền tệ này để hiển thị — số tiền gốc không thay đổi.',
'settings.currencyTrip': 'Tiền tệ của chuyến đi',
+ 'settings.placeLanguage': 'Tên địa điểm',
+ 'settings.placeLanguageApp': 'Giống ứng dụng',
+ 'settings.placeLanguageHint': 'Ngôn ngữ dùng cho tìm kiếm địa điểm, gợi ý và địa chỉ. Nếu địa điểm không có tên bằng ngôn ngữ đó, tên địa phương sẽ được hiển thị.',
'settings.passkey.title': 'Mật mã',
'settings.passkey.description':
'Đăng nhập nhanh hơn và chống lừa đảo bằng mật mã — vân tay, khuôn mặt, PIN hoặc khóa phần cứng của bạn. Mật khẩu của bạn vẫn là bản sao lưu.',
@@ -485,6 +488,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Ngôn ngữ & khu vực',
'settings.general.travelMap': 'Du lịch & bản đồ',
'settings.general.startup': 'Khởi động',
+ 'settings.dayDateFirst': 'Hiện ngày tháng trước trong tiêu đề ngày',
+ 'settings.compactUnplanned': 'Điểm đánh dấu gọn cho địa điểm chưa lên kế hoạch',
+ 'settings.compactUnplannedHint': 'Các địa điểm chưa được xếp vào ngày nào sẽ hiện thành điểm đánh dấu nhỏ không có ảnh, để các điểm dừng đã lên kế hoạch nổi bật hơn.',
+ 'settings.dayDateFirstHint': 'Mở đầu mỗi ngày bằng ngày trên lịch và hiện "Ngày 1" hoặc tiêu đề riêng của ngày bên cạnh.',
'settings.startPage': 'Trang khởi động',
'settings.startPageDashboard': 'Bảng điều khiển',
'settings.startPageActiveTrip': 'Chuyến đi đang diễn ra',
diff --git a/shared/src/i18n/vi/share.ts b/shared/src/i18n/vi/share.ts
index 1df6d5f22..6fd7f1d09 100644
--- a/shared/src/i18n/vi/share.ts
+++ b/shared/src/i18n/vi/share.ts
@@ -12,5 +12,10 @@ const share: TranslationStrings = {
'share.permPacking': 'Đóng gói',
'share.permBudget': 'Chi phí',
'share.permCollab': 'Trò chuyện',
+ 'share.options': 'Tùy chọn',
+ 'share.optTravelOnly': 'Chỉ di chuyển và lưu trú',
+ 'share.optTravelOnlyHint': 'Chỉ hiện phương tiện di chuyển và chỗ ở, không có hoạt động, ghi chú ngày và ngày trống',
+ 'share.optHideImages': 'Không có ảnh',
+ 'share.optHideImagesHint': 'Bỏ ảnh địa điểm khỏi trang chia sẻ',
};
export default share;
diff --git a/shared/src/i18n/vi/shared.ts b/shared/src/i18n/vi/shared.ts
index b78935f33..f13580435 100644
--- a/shared/src/i18n/vi/shared.ts
+++ b/shared/src/i18n/vi/shared.ts
@@ -15,6 +15,7 @@ const shared: TranslationStrings = {
'shared.tabChat': 'Trò chuyện',
'shared.days': 'ngày',
'shared.places': 'địa điểm',
+ 'shared.unplanned': 'Chưa lên kế hoạch',
'shared.other': 'Khác',
'shared.totalBudget': 'Tổng chi phí',
'shared.messages': 'tin nhắn',
diff --git a/shared/src/i18n/vi/todo.ts b/shared/src/i18n/vi/todo.ts
index ddc466f3e..b6775e79a 100644
--- a/shared/src/i18n/vi/todo.ts
+++ b/shared/src/i18n/vi/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': 'Không có danh sách',
'todo.namePlaceholder': 'Tên nhiệm vụ',
'todo.descriptionPlaceholder': 'Mô tả (tùy chọn)',
+ 'todo.editDescription': 'Nhấn để chỉnh sửa, liên kết mở trực tiếp',
'todo.unassigned': 'Chưa được chỉ định',
'todo.noCategory': 'Không có danh sách',
'todo.hasDescription': 'Có mô tả',
diff --git a/shared/src/i18n/vi/undo.ts b/shared/src/i18n/vi/undo.ts
index f7212f071..4202af508 100644
--- a/shared/src/i18n/vi/undo.ts
+++ b/shared/src/i18n/vi/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': 'Hoàn tác: {action}',
'undo.assignPlace': 'Địa điểm đã được gán vào ngày',
'undo.removeAssignment': 'Địa điểm đã bị xóa khỏi ngày',
+ 'undo.clearDay': 'Đã xóa trống ngày',
'undo.reorder': 'Địa điểm được sắp xếp lại',
'undo.optimize': 'Tuyến đường được tối ưu hóa',
'undo.deletePlace': 'Địa điểm đã bị xóa',
diff --git a/shared/src/i18n/zh-TW/atlas.ts b/shared/src/i18n/zh-TW/atlas.ts
index 9259a2304..ee6c6b8b7 100644
--- a/shared/src/i18n/zh-TW/atlas.ts
+++ b/shared/src/i18n/zh-TW/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': '國家',
'atlas.trips': '旅行',
'atlas.places': '地點',
+ 'atlas.placesShow': '顯示這個國家的地點',
+ 'atlas.placesSearch': '搜尋地點',
+ 'atlas.placesNone': '沒有符合的地點',
'atlas.days': '天',
'atlas.visitedCountries': '已訪問國家',
'atlas.cities': '城市',
+ 'atlas.regions': '地區',
'atlas.noData': '暫無旅行資料',
'atlas.noDataHint': '建立旅行並新增地點以檢視世界地圖',
'atlas.nextTrip': '下次旅行',
diff --git a/shared/src/i18n/zh-TW/budget.ts b/shared/src/i18n/zh-TW/budget.ts
index 6497d7704..03399853f 100644
--- a/shared/src/i18n/zh-TW/budget.ts
+++ b/shared/src/i18n/zh-TW/budget.ts
@@ -107,6 +107,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': '例如:晚餐、紀念品、油費…',
'costs.note': '備註',
'costs.notePlaceholder': '包含哪些內容、誰需要還款…',
+ 'costs.paymentNotePlaceholder': '現金付款、銀行轉帳…',
'costs.addNote': '新增備註',
'costs.showNote': '顯示備註',
'costs.hideNote': '隱藏備註',
diff --git a/shared/src/i18n/zh-TW/dayplan.ts b/shared/src/i18n/zh-TW/dayplan.ts
index 4d327acd9..56389a317 100644
--- a/shared/src/i18n/zh-TW/dayplan.ts
+++ b/shared/src/i18n/zh-TW/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': '地圖與 GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': '匯出當天計劃為 PDF',
+ 'dayplan.pdfMine': '我的計劃 PDF',
+ 'dayplan.pdfMineSub': '只包含你參與的活動與預訂',
'dayplan.gpxTooltip': '匯出為 GPX,用於離線地圖和 GPS 裝置',
'dayplan.gpxAll': '整趟行程',
'dayplan.gpxPlaces': '僅地點',
@@ -91,6 +93,13 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': '刪除這一天',
'dayplan.deleteDayTitle': '刪除 {day}?',
'dayplan.deleteDayBody': '這一天會從行程中移除。此操作無法復原。',
+ 'dayplan.excludeFromRoute': '從路線中排除',
+ 'dayplan.includeInRoute': '重新加入路線',
+ 'dayplan.offRoute': '不在路線內',
+ 'dayplan.offRouteHint': '仍保留在當天和地圖上,但路線會略過它',
+ 'dayplan.clearDay': '清空當天',
+ 'dayplan.clearDayTitle': '清空{day}?',
+ 'dayplan.clearDayBody': '這一天的所有地點都會被移出。地點仍保留在行程中,當天的筆記與預訂也會保留。',
'dayplan.deleteDayEmpty': '這一天沒有任何安排。',
'dayplan.impactPlaces': '已安排的地點:{count}',
'dayplan.impactPlacesHint': '它們會保留在地點清單中。',
diff --git a/shared/src/i18n/zh-TW/inspector.ts b/shared/src/i18n/zh-TW/inspector.ts
index ad4a2444c..216f78273 100644
--- a/shared/src/i18n/zh-TW/inspector.ts
+++ b/shared/src/i18n/zh-TW/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': '待確認預訂',
'inspector.google': 'Google Maps',
'inspector.navigation': '導航',
+ 'inspector.otherMapApp': '其他地圖 App',
'inspector.openWith': '開啟方式',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': '開啟網站',
diff --git a/shared/src/i18n/zh-TW/journey.ts b/shared/src/i18n/zh-TW/journey.ts
index b620e95bf..954329461 100644
--- a/shared/src/i18n/zh-TW/journey.ts
+++ b/shared/src/i18n/zh-TW/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': '旅程',
'journey.subtitle': '即時記錄你的旅行',
'journey.new': '新建旅程',
+ 'journey.lightbox.zoomIn': '放大',
+ 'journey.lightbox.zoomOut': '縮小',
+ 'journey.lightbox.zoomReset': '回到完整照片',
'journey.create': '建立',
'journey.titlePlaceholder': '你要去哪裡?',
'journey.empty': '還沒有旅程',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': '新增條目',
'journey.detail.jumpToTop': '回到頂部',
'journey.detail.jumpToLast': '跳到最後一則',
+ 'journey.detail.dayJump': '跳到某一天',
+ 'journey.detail.dayJumpCount': '{count} 天',
'journey.detail.newEntry': '新建條目',
'journey.detail.editEntry': '編輯條目',
'journey.detail.noEntries': '還沒有條目',
@@ -430,6 +435,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': '清單',
'journey.studio.kind.icon': '圖示',
'journey.studio.duplicate': '複製',
+ 'journey.studio.copyToPage': '複製,可貼到任何頁面 (Ctrl+C)',
+ 'journey.studio.paste': '貼上 (Ctrl+V)',
+ 'journey.studio.pasteEmpty': '請先複製內容,再貼到任何頁面',
+ 'journey.studio.myLayouts': '我的版面',
+ 'journey.studio.myLayoutsEmpty': '保存你排好的頁面,讓其他頁面套用相同的版面。它們的照片與文字會保留。',
+ 'journey.studio.saveLayout': '將此頁面儲存為版面',
+ 'journey.studio.saveLayoutHint': '保存不含照片的排列方式,供這本手冊的所有編輯者使用',
+ 'journey.studio.saveLayoutFull': '這本手冊最多可保存 24 個版面。刪除一個後才能儲存新的。',
+ 'journey.studio.deleteLayout': '刪除版面',
+ 'journey.studio.layoutName': '版面',
+ 'journey.studio.builtInLayouts': '內建',
'journey.studio.style': '樣式',
'journey.studio.shows': '顯示',
'journey.studio.size': '字級',
@@ -621,6 +637,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcluded': '不計入路線',
'journey.editor.statsExcludedHint': '該停留點仍保留在日誌中,但不計入 Studio 中的距離、國家和地圖。',
'journey.entry.offRoute': '不在路線內',
+ 'journey.entry.draft': '草稿',
+ 'journey.editor.draft': '草稿',
+ 'journey.editor.draftHint': '只有你和其他貢獻者看得到這則記錄。在你關閉此選項之前,分享的旅程不會包含它。',
+ 'journey.editor.tripSuggestionHint': '這一天落在此行程期間內。連結後,行程中的地點會加入此旅程。',
+ 'journey.editor.tripSuggestionLater': '暫時不要',
'journey.suggestions.dismiss': '忽略這則建議',
'journey.suggestions.dismissed': '已忽略該建議',
'journey.suggestions.restore': '找回已忽略的建議',
diff --git a/shared/src/i18n/zh-TW/map.ts b/shared/src/i18n/zh-TW/map.ts
index e6e1abced..986c4452f 100644
--- a/shared/src/i18n/zh-TW/map.ts
+++ b/shared/src/i18n/zh-TW/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': '無法判斷你的位置。',
'map.location.timeout': '定位花費的時間過長。請在能看到天空的開闊位置重試。',
'map.overview.show': '顯示整趟行程',
+ 'map.lock.lock': '鎖定地圖視角',
+ 'map.lock.unlock': '讓地圖跟隨所選項目',
'map.overview.hide': '隱藏整趟行程',
'map.overview.total': '總距離',
'map.attribution': '地圖來源',
diff --git a/shared/src/i18n/zh-TW/mobileTrip.ts b/shared/src/i18n/zh-TW/mobileTrip.ts
index c82e83484..e1d486d36 100644
--- a/shared/src/i18n/zh-TW/mobileTrip.ts
+++ b/shared/src/i18n/zh-TW/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': '在地圖上',
'mobileTrip.profileDriving': '開車',
'mobileTrip.profileWalking': '步行',
+ 'mobileTrip.profileCycling': '騎自行車',
'mobileTrip.renameDay': '重新命名天數',
'mobileTrip.resBadge': '預訂',
'mobileTrip.showOnMap': '在地圖上顯示',
diff --git a/shared/src/i18n/zh-TW/packing.ts b/shared/src/i18n/zh-TW/packing.ts
index 0ac291f74..11bf6a1e9 100644
--- a/shared/src/i18n/zh-TW/packing.ts
+++ b/shared/src/i18n/zh-TW/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': '編輯物品',
'packing.itemName': '名稱',
'packing.itemQuantity': '數量',
+ 'packing.packedCount': '已打包 {packed}/{total}',
+ 'packing.packedMore': '多打包一件',
+ 'packing.packedLess': '少打包一件',
'packing.itemWeight': '重量(克)',
'packing.title': '行李清單',
'packing.empty': '行李清單為空',
diff --git a/shared/src/i18n/zh-TW/places.ts b/shared/src/i18n/zh-TW/places.ts
index 6d2714095..8ed810e6b 100644
--- a/shared/src/i18n/zh-TW/places.ts
+++ b/shared/src/i18n/zh-TW/places.ts
@@ -51,6 +51,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': '顯示整趟行程',
'places.filterTracks': '路線',
'places.filterByRating': '依評分篩選',
+ 'places.filterByLocation': '依國家或地區篩選',
+ 'places.allLocations': '所有國家',
'places.filterShow': '顯示',
'places.clearSearch': '清除搜尋',
'places.yourRating': '你的評分',
@@ -77,6 +79,7 @@ const places: TranslationStrings = {
'places.formCategory': '分類',
'places.noCategory': '無分類',
'places.newCategory': '新增分類',
+ 'places.openInMaps': '在地圖 App 中開啟',
'places.categoryNamePlaceholder': '分類名稱',
'places.formTime': '時間',
'places.startTime': '開始',
@@ -93,6 +96,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': '搜尋地點...',
'places.mapsSearchError': '地點搜尋失敗。',
'places.searchGoogleInstead': '不是想找的地點?改用 Google 搜尋',
+ 'places.nearby': '這個圖釘附近的地點',
+ 'places.nearbyNone': '這個圖釘附近找不到任何結果',
'places.loadingDetails': '正在載入地點詳情…',
'places.osmHint': '使用 OpenStreetMap 搜尋(無照片、營業時間或評分)。在設定中新增 Google API 金鑰以獲取完整資訊。',
'places.source.amap': '高德地圖',
@@ -129,9 +134,13 @@ const places: TranslationStrings = {
'places.addAnyway': '仍要新增',
'places.enrichOnImport': '透過 Google 豐富地點資訊',
'places.enrichOnImportHint': '查詢每個匯入的地點以補上照片、地址與聯絡資訊。需要 Google Maps 金鑰。',
+ 'places.enrichOnImportFileHint': '匯入後在 Google 上查詢每個點,並補上照片、地址、網站與電話。路徑與軌跡保持不變。',
'places.uploadImage': '上傳圖片',
'places.changeImage': '變更圖片',
'places.removeImage': '移除圖片',
+ 'places.chooseImage': '選擇圖片',
+ 'places.uploadFromDevice': '從裝置上傳',
+ 'places.fromAttachedFiles': '從附加檔案選擇',
'places.imageUploadError': '無法上傳圖片',
'places.imageRemoveError': '無法刪除圖片',
};
diff --git a/shared/src/i18n/zh-TW/reservations.ts b/shared/src/i18n/zh-TW/reservations.ts
index b37e15b34..ba167ef8d 100644
--- a/shared/src/i18n/zh-TW/reservations.ts
+++ b/shared/src/i18n/zh-TW/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': '其他',
'reservations.type.bus': '公車',
'reservations.type.ferry': '渡輪',
+ 'reservations.type.cable_car': '纜車',
'reservations.type.bicycle': '自行車',
'reservations.type.taxi': '計程車',
'reservations.type.transit': '大眾運輸',
@@ -193,6 +194,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': '重設篩選',
'reservations.noMatches': '沒有符合這些篩選條件的項目',
'reservations.viewOptions': '檢視選項',
+ 'reservations.exportCsv': '匯出為試算表 (CSV)',
+ 'reservations.export.type': '類型',
+ 'reservations.export.title': '標題',
+ 'reservations.export.start': '開始',
+ 'reservations.export.end': '結束',
+ 'reservations.export.from': '出發地',
+ 'reservations.export.to': '目的地',
+ 'reservations.export.location': '地點',
+ 'reservations.export.confirmation': '確認編號',
+ 'reservations.export.notes': '備註',
'reservations.resetView': '重設檢視',
'reservations.group.label': '分組依據',
'reservations.group.status': '狀態',
diff --git a/shared/src/i18n/zh-TW/settings.ts b/shared/src/i18n/zh-TW/settings.ts
index a9a21bbc1..49d19843b 100644
--- a/shared/src/i18n/zh-TW/settings.ts
+++ b/shared/src/i18n/zh-TW/settings.ts
@@ -317,6 +317,9 @@ const settings: TranslationStrings = {
'settings.currency': '顯示貨幣',
'settings.currencyHint': '「費用」中的金額僅在顯示時換算為該貨幣,原始金額保持不變。',
'settings.currencyTrip': '行程貨幣',
+ 'settings.placeLanguage': '地點名稱',
+ 'settings.placeLanguageApp': '與 App 相同',
+ 'settings.placeLanguageHint': '地點搜尋、建議與地址所使用的語言。若某個地點沒有該語言的名稱,則顯示其當地名稱。',
'settings.passkey.title': 'Passkey',
'settings.passkey.description':
'使用 Passkey 更快登入,並可抵禦網路釣魚——透過你的指紋、臉部、PIN 碼或硬體金鑰。你的密碼仍會保留作為備援。',
@@ -455,6 +458,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': 'Language & region',
'settings.general.travelMap': 'Travel & map',
'settings.general.startup': '啟動',
+ 'settings.dayDateFirst': '每日標題中日期在前',
+ 'settings.compactUnplanned': '未規劃地點使用精簡標記',
+ 'settings.compactUnplannedHint': '未排入任何一天的地點會顯示為不含照片的小標記,讓已規劃的停留點更醒目。',
+ 'settings.dayDateFirstHint': '每天以日曆日期開頭,並在旁邊顯示「第 1 天」或當天的標題。',
'settings.startPage': '啟動頁面',
'settings.startPageDashboard': '儀表板',
'settings.startPageActiveTrip': '進行中的旅行',
diff --git a/shared/src/i18n/zh-TW/share.ts b/shared/src/i18n/zh-TW/share.ts
index a7bd6c4b1..ebcf90f1d 100644
--- a/shared/src/i18n/zh-TW/share.ts
+++ b/shared/src/i18n/zh-TW/share.ts
@@ -11,5 +11,10 @@ const share: TranslationStrings = {
'share.permPacking': '行李',
'share.permBudget': '費用',
'share.permCollab': '聊天',
+ 'share.options': '選項',
+ 'share.optTravelOnly': '僅交通與住宿',
+ 'share.optTravelOnlyHint': '只顯示交通與住宿,不包含活動、每日筆記與空白日',
+ 'share.optHideImages': '不含照片',
+ 'share.optHideImagesHint': '分享頁面中不顯示地點照片',
};
export default share;
diff --git a/shared/src/i18n/zh-TW/shared.ts b/shared/src/i18n/zh-TW/shared.ts
index 946edf5b9..4e26e99b0 100644
--- a/shared/src/i18n/zh-TW/shared.ts
+++ b/shared/src/i18n/zh-TW/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': '聊天',
'shared.days': '天',
'shared.places': '個地點',
+ 'shared.unplanned': '尚未規劃',
'shared.other': '其他',
'shared.totalBudget': '總費用',
'shared.messages': '條訊息',
diff --git a/shared/src/i18n/zh-TW/todo.ts b/shared/src/i18n/zh-TW/todo.ts
index 2f67a4149..2145e29e5 100644
--- a/shared/src/i18n/zh-TW/todo.ts
+++ b/shared/src/i18n/zh-TW/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': '無清單',
'todo.namePlaceholder': '任務名稱',
'todo.descriptionPlaceholder': '說明(可選)',
+ 'todo.editDescription': '點擊即可編輯,連結可直接開啟',
'todo.unassigned': '未指派',
'todo.noCategory': '無清單',
'todo.hasDescription': '有說明',
diff --git a/shared/src/i18n/zh-TW/undo.ts b/shared/src/i18n/zh-TW/undo.ts
index 577de1642..4a569b4c1 100644
--- a/shared/src/i18n/zh-TW/undo.ts
+++ b/shared/src/i18n/zh-TW/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': '撤銷:{action}',
'undo.assignPlace': '地點已分配至某天',
'undo.removeAssignment': '地點已從某天移除',
+ 'undo.clearDay': '已清空當天',
'undo.reorder': '地點已重新排序',
'undo.optimize': '路線已最佳化',
'undo.deletePlace': '地點已刪除',
diff --git a/shared/src/i18n/zh/atlas.ts b/shared/src/i18n/zh/atlas.ts
index f52f559dd..42216a481 100644
--- a/shared/src/i18n/zh/atlas.ts
+++ b/shared/src/i18n/zh/atlas.ts
@@ -5,9 +5,13 @@ const atlas: TranslationStrings = {
'atlas.countries': '国家',
'atlas.trips': '旅行',
'atlas.places': '地点',
+ 'atlas.placesShow': '显示该国家的地点',
+ 'atlas.placesSearch': '搜索地点',
+ 'atlas.placesNone': '没有匹配的地点',
'atlas.days': '天',
'atlas.visitedCountries': '已访问国家',
'atlas.cities': '城市',
+ 'atlas.regions': '地区',
'atlas.noData': '暂无旅行数据',
'atlas.noDataHint': '创建旅行并添加地点以查看世界地图',
'atlas.nextTrip': '下次旅行',
diff --git a/shared/src/i18n/zh/budget.ts b/shared/src/i18n/zh/budget.ts
index 22ac1f2f6..084db3155 100644
--- a/shared/src/i18n/zh/budget.ts
+++ b/shared/src/i18n/zh/budget.ts
@@ -107,6 +107,7 @@ const budget: TranslationStrings = {
'costs.namePlaceholder': '例如:晚餐、纪念品、油费…',
'costs.note': '备注',
'costs.notePlaceholder': '包含哪些内容、谁需要还款…',
+ 'costs.paymentNotePlaceholder': '现金支付、银行转账…',
'costs.addNote': '添加备注',
'costs.showNote': '显示备注',
'costs.hideNote': '隐藏备注',
diff --git a/shared/src/i18n/zh/dayplan.ts b/shared/src/i18n/zh/dayplan.ts
index a602f988f..d84f3bc50 100644
--- a/shared/src/i18n/zh/dayplan.ts
+++ b/shared/src/i18n/zh/dayplan.ts
@@ -57,6 +57,8 @@ const dayplan: TranslationStrings = {
'dayplan.exportMaps': '地图与 GPS',
'dayplan.pdf': 'PDF',
'dayplan.pdfTooltip': '导出当天计划为 PDF',
+ 'dayplan.pdfMine': '我的计划 PDF',
+ 'dayplan.pdfMineSub': '仅包含你参与的活动和预订',
'dayplan.gpxTooltip': '导出为 GPX,用于离线地图和 GPS 设备',
'dayplan.gpxAll': '整趟行程',
'dayplan.gpxPlaces': '仅地点',
@@ -91,6 +93,13 @@ const dayplan: TranslationStrings = {
'dayplan.deleteDay': '删除这一天',
'dayplan.deleteDayTitle': '删除 {day}?',
'dayplan.deleteDayBody': '这一天会从行程中移除。此操作无法撤销。',
+ 'dayplan.excludeFromRoute': '从路线中排除',
+ 'dayplan.includeInRoute': '重新加入路线',
+ 'dayplan.offRoute': '不在路线内',
+ 'dayplan.offRouteHint': '仍保留在当天和地图上,但路线会跳过它',
+ 'dayplan.clearDay': '清空当天',
+ 'dayplan.clearDayTitle': '清空{day}?',
+ 'dayplan.clearDayBody': '这一天的所有地点都会被移出。地点仍保留在行程中,当天的备注和预订也会保留。',
'dayplan.deleteDayEmpty': '这一天没有任何安排。',
'dayplan.impactPlaces': '已安排的地点:{count}',
'dayplan.impactPlacesHint': '它们会保留在地点列表中。',
diff --git a/shared/src/i18n/zh/inspector.ts b/shared/src/i18n/zh/inspector.ts
index 052298667..ae151ddfa 100644
--- a/shared/src/i18n/zh/inspector.ts
+++ b/shared/src/i18n/zh/inspector.ts
@@ -14,6 +14,7 @@ const inspector: TranslationStrings = {
'inspector.pendingRes': '待确认预订',
'inspector.google': 'Google 地图',
'inspector.navigation': '导航',
+ 'inspector.otherMapApp': '其他地图应用',
'inspector.openWith': '打开方式',
'inspector.openStreetMap': 'OpenStreetMap',
'inspector.website': '打开网站',
diff --git a/shared/src/i18n/zh/journey.ts b/shared/src/i18n/zh/journey.ts
index dce403a4a..c18c8893b 100644
--- a/shared/src/i18n/zh/journey.ts
+++ b/shared/src/i18n/zh/journey.ts
@@ -6,6 +6,9 @@ const journey: TranslationStrings = {
'journey.title': '旅程',
'journey.subtitle': '实时记录你的旅行',
'journey.new': '新建旅程',
+ 'journey.lightbox.zoomIn': '放大',
+ 'journey.lightbox.zoomOut': '缩小',
+ 'journey.lightbox.zoomReset': '恢复完整照片',
'journey.create': '创建',
'journey.titlePlaceholder': '你要去哪里?',
'journey.empty': '还没有旅程',
@@ -78,6 +81,8 @@ const journey: TranslationStrings = {
'journey.detail.addEntry': '添加条目',
'journey.detail.jumpToTop': '回到顶部',
'journey.detail.jumpToLast': '跳到最后一条',
+ 'journey.detail.dayJump': '跳转到某一天',
+ 'journey.detail.dayJumpCount': '{count} 天',
'journey.detail.newEntry': '新建条目',
'journey.detail.editEntry': '编辑条目',
'journey.detail.noEntries': '还没有条目',
@@ -430,6 +435,17 @@ const journey: TranslationStrings = {
'journey.studio.kind.list': '列表',
'journey.studio.kind.icon': '图标',
'journey.studio.duplicate': '复制',
+ 'journey.studio.copyToPage': '复制,可粘贴到任意页面 (Ctrl+C)',
+ 'journey.studio.paste': '粘贴 (Ctrl+V)',
+ 'journey.studio.pasteEmpty': '请先复制内容,然后粘贴到任意页面',
+ 'journey.studio.myLayouts': '我的版式',
+ 'journey.studio.myLayoutsEmpty': '保存你排好的页面,让其他页面采用相同的排版。它们的照片和文字保持不变。',
+ 'journey.studio.saveLayout': '将此页面保存为版式',
+ 'journey.studio.saveLayoutHint': '保存不含照片的排版,供这本手册的所有编辑者使用',
+ 'journey.studio.saveLayoutFull': '这本手册最多可保存 24 个版式。删除一个后才能保存新的。',
+ 'journey.studio.deleteLayout': '删除版式',
+ 'journey.studio.layoutName': '版式',
+ 'journey.studio.builtInLayouts': '内置',
'journey.studio.style': '样式',
'journey.studio.shows': '显示',
'journey.studio.size': '字号',
@@ -621,6 +637,11 @@ const journey: TranslationStrings = {
'journey.editor.statsExcluded': '不计入路线',
'journey.editor.statsExcludedHint': '该停留点仍保留在日志中,但不计入 Studio 中的距离、国家和地图。',
'journey.entry.offRoute': '不在路线内',
+ 'journey.entry.draft': '草稿',
+ 'journey.editor.draft': '草稿',
+ 'journey.editor.draftHint': '只有你和其他贡献者能看到这条记录。在你关闭此选项之前,共享的旅程不会包含它。',
+ 'journey.editor.tripSuggestionHint': '这一天在此行程期间内。关联后,行程中的地点会加入此旅程。',
+ 'journey.editor.tripSuggestionLater': '暂不',
'journey.suggestions.dismiss': '忽略这条建议',
'journey.suggestions.dismissed': '已忽略该建议',
'journey.suggestions.restore': '找回已忽略的建议',
diff --git a/shared/src/i18n/zh/map.ts b/shared/src/i18n/zh/map.ts
index 3eeb7369b..ce4e16d9e 100644
--- a/shared/src/i18n/zh/map.ts
+++ b/shared/src/i18n/zh/map.ts
@@ -24,6 +24,8 @@ const map: TranslationStrings = {
'map.location.unavailable': '无法确定你的位置。',
'map.location.timeout': '定位耗时过长。请在能看到天空的开阔位置重试。',
'map.overview.show': '显示整个行程',
+ 'map.lock.lock': '锁定地图视图',
+ 'map.lock.unlock': '让地图跟随所选内容',
'map.overview.hide': '隐藏整个行程',
'map.overview.total': '总距离',
'map.attribution': '地图来源',
diff --git a/shared/src/i18n/zh/mobileTrip.ts b/shared/src/i18n/zh/mobileTrip.ts
index f6e9c4fcc..649849efd 100644
--- a/shared/src/i18n/zh/mobileTrip.ts
+++ b/shared/src/i18n/zh/mobileTrip.ts
@@ -35,6 +35,7 @@ const mobileTrip: TranslationStrings = {
'mobileTrip.onMap': '在地图上',
'mobileTrip.profileDriving': '驾车',
'mobileTrip.profileWalking': '步行',
+ 'mobileTrip.profileCycling': '骑行',
'mobileTrip.renameDay': '重命名天数',
'mobileTrip.resBadge': '预订',
'mobileTrip.showOnMap': '在地图上显示',
diff --git a/shared/src/i18n/zh/packing.ts b/shared/src/i18n/zh/packing.ts
index 6df5327ba..91050037a 100644
--- a/shared/src/i18n/zh/packing.ts
+++ b/shared/src/i18n/zh/packing.ts
@@ -9,6 +9,9 @@ const packing: TranslationStrings = {
'packing.editItem': '编辑物品',
'packing.itemName': '名称',
'packing.itemQuantity': '数量',
+ 'packing.packedCount': '已打包 {packed}/{total}',
+ 'packing.packedMore': '多打包一件',
+ 'packing.packedLess': '少打包一件',
'packing.itemWeight': '重量(克)',
'packing.title': '行李清单',
'packing.empty': '行李清单为空',
diff --git a/shared/src/i18n/zh/places.ts b/shared/src/i18n/zh/places.ts
index 990e1338a..69ef570bd 100644
--- a/shared/src/i18n/zh/places.ts
+++ b/shared/src/i18n/zh/places.ts
@@ -51,6 +51,8 @@ const places: TranslationStrings = {
'places.dayScopedClear': '显示整个行程',
'places.filterTracks': '路线',
'places.filterByRating': '按评分筛选',
+ 'places.filterByLocation': '按国家或地区筛选',
+ 'places.allLocations': '所有国家',
'places.filterShow': '显示',
'places.clearSearch': '清除搜索',
'places.yourRating': '你的评分',
@@ -77,6 +79,7 @@ const places: TranslationStrings = {
'places.formCategory': '分类',
'places.noCategory': '无分类',
'places.newCategory': '新建分类',
+ 'places.openInMaps': '在地图应用中打开',
'places.categoryNamePlaceholder': '分类名称',
'places.formTime': '时间',
'places.startTime': '开始',
@@ -93,6 +96,8 @@ const places: TranslationStrings = {
'places.mapsSearchPlaceholder': '搜索地点...',
'places.mapsSearchError': '地点搜索失败。',
'places.searchGoogleInstead': '不是想找的地点?改用 Google 搜索',
+ 'places.nearby': '此标记附近的地点',
+ 'places.nearbyNone': '此标记附近未找到任何内容',
'places.loadingDetails': '正在加载地点详情…',
'places.osmHint': '使用 OpenStreetMap 搜索(无照片、营业时间或评分)。在设置中添加 Google API 密钥以获取完整信息。',
'places.source.amap': '高德地图',
@@ -129,9 +134,13 @@ const places: TranslationStrings = {
'places.addAnyway': '仍然添加',
'places.enrichOnImport': '通过 Google 丰富地点信息',
'places.enrichOnImportHint': '查找每个导入的地点以补充照片、地址和联系方式。需要 Google Maps 密钥。',
+ 'places.enrichOnImportFileHint': '导入后在 Google 上查找每个点,并补充照片、地址、网站和电话。路径和轨迹保持不变。',
'places.uploadImage': '上传图片',
'places.changeImage': '更换图片',
'places.removeImage': '移除图片',
+ 'places.chooseImage': '选择图片',
+ 'places.uploadFromDevice': '从设备上传',
+ 'places.fromAttachedFiles': '从附件中选择',
'places.imageUploadError': '无法上传图片',
'places.imageRemoveError': '无法删除图片',
};
diff --git a/shared/src/i18n/zh/reservations.ts b/shared/src/i18n/zh/reservations.ts
index 4595d2862..0e1ff500b 100644
--- a/shared/src/i18n/zh/reservations.ts
+++ b/shared/src/i18n/zh/reservations.ts
@@ -61,6 +61,7 @@ const reservations: TranslationStrings = {
'reservations.type.other': '其他',
'reservations.type.bus': '公交车',
'reservations.type.ferry': '渡轮',
+ 'reservations.type.cable_car': '缆车',
'reservations.type.bicycle': '自行车',
'reservations.type.taxi': '出租车',
'reservations.type.transit': '公共交通',
@@ -193,6 +194,16 @@ const reservations: TranslationStrings = {
'reservations.resetFilters': '重置筛选',
'reservations.noMatches': '没有符合这些筛选条件的内容',
'reservations.viewOptions': '视图选项',
+ 'reservations.exportCsv': '导出为电子表格 (CSV)',
+ 'reservations.export.type': '类型',
+ 'reservations.export.title': '标题',
+ 'reservations.export.start': '开始',
+ 'reservations.export.end': '结束',
+ 'reservations.export.from': '出发地',
+ 'reservations.export.to': '目的地',
+ 'reservations.export.location': '地点',
+ 'reservations.export.confirmation': '确认号',
+ 'reservations.export.notes': '备注',
'reservations.resetView': '重置视图',
'reservations.group.label': '分组依据',
'reservations.group.status': '状态',
diff --git a/shared/src/i18n/zh/settings.ts b/shared/src/i18n/zh/settings.ts
index 5c63c44a2..ced850587 100644
--- a/shared/src/i18n/zh/settings.ts
+++ b/shared/src/i18n/zh/settings.ts
@@ -315,6 +315,9 @@ const settings: TranslationStrings = {
'settings.currency': '显示货币',
'settings.currencyHint': '“费用”中的金额仅在显示时换算为该货币,原始金额保持不变。',
'settings.currencyTrip': '行程货币',
+ 'settings.placeLanguage': '地点名称',
+ 'settings.placeLanguageApp': '与应用相同',
+ 'settings.placeLanguageHint': '地点搜索、建议和地址所使用的语言。如果某个地点没有该语言的名称,则显示其当地名称。',
'settings.passkey.title': '通行密钥',
'settings.passkey.description':
'使用通行密钥更快登录,并能抵御钓鱼攻击——通过指纹、面容、PIN 或硬件密钥验证。你的密码仍可作为备用方式。',
@@ -450,6 +453,10 @@ const settings: TranslationStrings = {
'settings.general.languageRegion': '语言与地区',
'settings.general.travelMap': '旅行与地图',
'settings.general.startup': '启动',
+ 'settings.dayDateFirst': '每日标题中日期在前',
+ 'settings.compactUnplanned': '未规划地点使用紧凑标记',
+ 'settings.compactUnplannedHint': '未安排到任何一天的地点会显示为不带照片的小标记,让已规划的站点更加突出。',
+ 'settings.dayDateFirstHint': '每天以日历日期开头,并在旁边显示“第 1 天”或当天的标题。',
'settings.startPage': '启动页面',
'settings.startPageDashboard': '仪表盘',
'settings.startPageActiveTrip': '进行中的旅行',
diff --git a/shared/src/i18n/zh/share.ts b/shared/src/i18n/zh/share.ts
index 210923935..afcd695aa 100644
--- a/shared/src/i18n/zh/share.ts
+++ b/shared/src/i18n/zh/share.ts
@@ -11,5 +11,10 @@ const share: TranslationStrings = {
'share.permPacking': '行李',
'share.permBudget': '费用',
'share.permCollab': '聊天',
+ 'share.options': '选项',
+ 'share.optTravelOnly': '仅交通和住宿',
+ 'share.optTravelOnlyHint': '只显示交通和住宿,不包括活动、每日备注和空白日',
+ 'share.optHideImages': '不含照片',
+ 'share.optHideImagesHint': '共享页面中不显示地点照片',
};
export default share;
diff --git a/shared/src/i18n/zh/shared.ts b/shared/src/i18n/zh/shared.ts
index 483d6f435..2d7c5185f 100644
--- a/shared/src/i18n/zh/shared.ts
+++ b/shared/src/i18n/zh/shared.ts
@@ -14,6 +14,7 @@ const shared: TranslationStrings = {
'shared.tabChat': '聊天',
'shared.days': '天',
'shared.places': '个地点',
+ 'shared.unplanned': '尚未规划',
'shared.other': '其他',
'shared.totalBudget': '总费用',
'shared.messages': '条消息',
diff --git a/shared/src/i18n/zh/todo.ts b/shared/src/i18n/zh/todo.ts
index 1952faa44..46bf94524 100644
--- a/shared/src/i18n/zh/todo.ts
+++ b/shared/src/i18n/zh/todo.ts
@@ -11,6 +11,7 @@ const todo: TranslationStrings = {
'todo.uncategorized': '无清单',
'todo.namePlaceholder': '任务名称',
'todo.descriptionPlaceholder': '描述(可选)',
+ 'todo.editDescription': '点击编辑,链接可直接打开',
'todo.unassigned': '未分配',
'todo.noCategory': '无清单',
'todo.hasDescription': '有描述',
diff --git a/shared/src/i18n/zh/undo.ts b/shared/src/i18n/zh/undo.ts
index dc672573e..25706b2c6 100644
--- a/shared/src/i18n/zh/undo.ts
+++ b/shared/src/i18n/zh/undo.ts
@@ -5,6 +5,7 @@ const undo: TranslationStrings = {
'undo.tooltip': '撤销:{action}',
'undo.assignPlace': '地点已分配至某天',
'undo.removeAssignment': '地点已从某天移除',
+ 'undo.clearDay': '已清空当天',
'undo.reorder': '地点已重新排序',
'undo.optimize': '路线已优化',
'undo.deletePlace': '地点已删除',
diff --git a/shared/src/index.ts b/shared/src/index.ts
index b25a319da..b169f20be 100644
--- a/shared/src/index.ts
+++ b/shared/src/index.ts
@@ -27,6 +27,7 @@ export * from './memories/memories.schema';
export * from './atlas/atlas.schema';
export * from './vacay/vacay.schema';
export * from './packing/packing.schema';
+export * from './packing/packed-count';
export * from './todo/todo.schema';
export * from './budget/budget.schema';
export * from './budget/receipt-scan.schema';
diff --git a/shared/src/journey/journey.schema.ts b/shared/src/journey/journey.schema.ts
index 1387e0046..ecc90d260 100644
--- a/shared/src/journey/journey.schema.ts
+++ b/shared/src/journey/journey.schema.ts
@@ -54,6 +54,16 @@ export const journeyReorderEntriesRequestSchema = z.looseObject({
});
export type JourneyReorderEntriesRequest = z.infer<typeof journeyReorderEntriesRequestSchema>;
+/**
+ * The photos of one entry in their new order (#824): every journey photo id the
+ * entry holds, each once. Strict, unlike the legacy reorder above: nothing older
+ * relies on a looser shape here.
+ */
+export const journeyReorderEntryPhotosRequestSchema = z.object({
+ orderedIds: z.array(z.number().int().positive()).min(1).max(500),
+});
+export type JourneyReorderEntryPhotosRequest = z.infer<typeof journeyReorderEntryPhotosRequestSchema>;
+
export const journeyContributorRequestSchema = z.looseObject({
// Handler answers 'user_id required'; role is cast, never validated.
user_id: z.unknown().optional(),
diff --git a/shared/src/maps/maps.schema.spec.ts b/shared/src/maps/maps.schema.spec.ts
index ea5d916f0..4ec0c9215 100644
--- a/shared/src/maps/maps.schema.spec.ts
+++ b/shared/src/maps/maps.schema.spec.ts
@@ -1,5 +1,6 @@
import {
mapsSearchRequestSchema,
+ mapsNearbyRequestSchema,
mapsAutocompleteRequestSchema,
mapsReverseQuerySchema,
mapsResolveUrlRequestSchema,
@@ -11,6 +12,17 @@ import {
import { describe, it, expect } from 'vitest';
+describe('mapsNearbyRequestSchema', () => {
+ it('takes a point and caps the circle and the count', () => {
+ expect(mapsNearbyRequestSchema.safeParse({ lat: 52.5, lng: 13.4 }).success).toBe(true);
+ expect(mapsNearbyRequestSchema.safeParse({ lat: 52.5, lng: 13.4, radius: 5000, limit: 20 }).success).toBe(true);
+ expect(mapsNearbyRequestSchema.safeParse({ lat: 52.5, lng: 13.4, radius: 5001 }).success).toBe(false);
+ expect(mapsNearbyRequestSchema.safeParse({ lat: 52.5, lng: 13.4, limit: 21 }).success).toBe(false);
+ expect(mapsNearbyRequestSchema.safeParse({ lat: 91, lng: 13.4 }).success).toBe(false);
+ expect(mapsNearbyRequestSchema.safeParse({ lng: 13.4 }).success).toBe(false);
+ });
+});
+
describe('mapsSearchRequestSchema', () => {
it('requires a non-empty query', () => {
expect(mapsSearchRequestSchema.safeParse({ query: 'berlin' }).success).toBe(true);
diff --git a/shared/src/maps/maps.schema.ts b/shared/src/maps/maps.schema.ts
index 15cb626c4..5f89acdf9 100644
--- a/shared/src/maps/maps.schema.ts
+++ b/shared/src/maps/maps.schema.ts
@@ -38,6 +38,21 @@ export const mapsSearchRequestSchema = z.object({
});
export type MapsSearchRequest = z.infer<typeof mapsSearchRequestSchema>;
+/**
+ * Places of any kind around a point, nearest first (#976). No category and no
+ * box: the circle is the question. Both are capped, because the Google path
+ * bills per call and a city centre has more named places than anyone reads.
+ */
+export const mapsNearbyRequestSchema = z.object({
+ lat: z.number().min(-90).max(90),
+ lng: z.number().min(-180).max(180),
+ /** Metres, 500 when left out. */
+ radius: z.number().int().min(50).max(5000).optional(),
+ /** How many places, 20 when left out. */
+ limit: z.number().int().min(1).max(20).optional(),
+});
+export type MapsNearbyRequest = z.infer<typeof mapsNearbyRequestSchema>;
+
export const mapsAutocompleteRequestSchema = z.object({
input: z.string().min(1).max(200),
lang: z.string().optional(),
diff --git a/shared/src/packing/packed-count.spec.ts b/shared/src/packing/packed-count.spec.ts
new file mode 100644
index 000000000..9bed1dcfa
--- /dev/null
+++ b/shared/src/packing/packed-count.spec.ts
@@ -0,0 +1,59 @@
+import { resolvePackedState } from './packed-count';
+
+import { describe, it, expect } from 'vitest';
+
+const open = { checked: 0, packed_quantity: null };
+
+describe('resolvePackedState (#2296)', () => {
+ it('PACKED-001: keeps a partial count and leaves the box unticked', () => {
+ expect(resolvePackedState(open, { bodyKeys: ['packed_quantity'], packed_quantity: 4, quantity: 10 })).toEqual({
+ checked: 0,
+ packed_quantity: 4,
+ });
+ });
+
+ it('PACKED-002: a full or overfull count ticks the item and drops the count', () => {
+ expect(resolvePackedState(open, { bodyKeys: ['packed_quantity'], packed_quantity: 10, quantity: 10 })).toEqual({
+ checked: 1,
+ packed_quantity: null,
+ });
+ expect(resolvePackedState(open, { bodyKeys: ['packed_quantity'], packed_quantity: 99, quantity: 10 })).toEqual({
+ checked: 1,
+ packed_quantity: null,
+ });
+ });
+
+ it('PACKED-003: zero or null clears the count and unticks a finished item', () => {
+ const done = { checked: 1, packed_quantity: null };
+ expect(resolvePackedState(done, { bodyKeys: ['packed_quantity'], packed_quantity: 0, quantity: 3 })).toEqual({
+ checked: 0,
+ packed_quantity: null,
+ });
+ expect(resolvePackedState(done, { bodyKeys: ['packed_quantity'], packed_quantity: null, quantity: 3 })).toEqual({
+ checked: 0,
+ packed_quantity: null,
+ });
+ });
+
+ it('PACKED-004: the box decides for the whole item', () => {
+ const partial = { checked: 0, packed_quantity: 2 };
+ expect(resolvePackedState(partial, { bodyKeys: ['checked'], checked: 1, quantity: 5 })).toEqual({
+ checked: 1,
+ packed_quantity: null,
+ });
+ expect(resolvePackedState(partial, { bodyKeys: ['checked'], checked: 0, quantity: 5 })).toEqual({
+ checked: 0,
+ packed_quantity: null,
+ });
+ });
+
+ it('PACKED-005: a lowered quantity the count reaches finishes the item, anything else is left alone', () => {
+ const partial = { checked: 0, packed_quantity: 4 };
+ expect(resolvePackedState(partial, { bodyKeys: ['quantity'], quantity: 4 })).toEqual({
+ checked: 1,
+ packed_quantity: null,
+ });
+ expect(resolvePackedState(partial, { bodyKeys: ['quantity'], quantity: 8 })).toBe(partial);
+ expect(resolvePackedState(partial, { bodyKeys: ['name'], quantity: 8 })).toBe(partial);
+ });
+});
diff --git a/shared/src/packing/packed-count.ts b/shared/src/packing/packed-count.ts
new file mode 100644
index 000000000..0f928cf25
--- /dev/null
+++ b/shared/src/packing/packed-count.ts
@@ -0,0 +1,35 @@
+/**
+ * The packed count of a multi-piece item (#2296) and its checkbox, kept in step.
+ *
+ * `packed_quantity` only holds a partial count: zero is stored as null, and a count
+ * that reaches the quantity is the checked box itself. That keeps one truth for
+ * "done" and lets every older client keep reading `checked`.
+ */
+export interface PackedState {
+ checked: number;
+ packed_quantity: number | null;
+}
+
+interface PackedInput {
+ /** The keys the write actually named, as the update's presence protocol has them. */
+ bodyKeys: string[];
+ checked?: number;
+ packed_quantity?: number | null;
+ /** The quantity after the write. */
+ quantity: number;
+}
+
+export function resolvePackedState(current: PackedState, input: PackedInput): PackedState {
+ const { bodyKeys, quantity } = input;
+ if (bodyKeys.includes('packed_quantity')) {
+ const count = Math.max(0, Math.min(quantity, Math.floor(Number(input.packed_quantity) || 0)));
+ if (count >= quantity) return { checked: 1, packed_quantity: null };
+ return { checked: 0, packed_quantity: count > 0 ? count : null };
+ }
+ // Ticking or unticking the box is a decision about the whole item.
+ if (bodyKeys.includes('checked')) return { checked: input.checked ? 1 : 0, packed_quantity: null };
+ // A lowered quantity the count already reaches finishes the item.
+ if (current.packed_quantity != null && current.packed_quantity >= quantity)
+ return { checked: 1, packed_quantity: null };
+ return current;
+}
diff --git a/shared/src/packing/packing.schema.ts b/shared/src/packing/packing.schema.ts
index 1a9f68226..9d8280c5c 100644
--- a/shared/src/packing/packing.schema.ts
+++ b/shared/src/packing/packing.schema.ts
@@ -29,6 +29,9 @@ export const packingItemSchema = z.object({
weight_grams: z.number().nullable().optional(),
bag_id: z.number().nullable().optional(),
quantity: z.number().optional(),
+ // How many of `quantity` are already in the bag (#2296). Null when the
+ // counter is not in use: the item is then simply checked or not.
+ packed_quantity: z.number().nullable().optional(),
// Three-tier sharing (#858). is_private is the raw SQLite INTEGER (0/1):
// 0 = Common (group pool, visible to all), 1 = restricted. owner_id is the
// "bringer". A restricted item with no recipients is Personal; with recipients
@@ -124,6 +127,9 @@ export const packingUpdateItemRequestSchema = z.object({
weight_grams: z.number().nullable().optional(),
bag_id: z.number().nullable().optional(),
quantity: z.number().optional(),
+ // Count packed pieces of a multi-piece item (#2296). Reaching the quantity
+ // checks the item; null or 0 clears the count. Ticking `checked` resets it.
+ packed_quantity: z.number().int().min(0).max(999).nullable().optional(),
// Toggle the item's privacy (#858).
is_private: z.boolean().optional(),
});
diff --git a/shared/src/place/place.schema.ts b/shared/src/place/place.schema.ts
index 1745221ef..3512a7065 100644
--- a/shared/src/place/place.schema.ts
+++ b/shared/src/place/place.schema.ts
@@ -188,6 +188,13 @@ export const placeSchema = z.object({
ratings: z.array(placeRatingVoteSchema).optional(),
rating_avg: z.number().nullable().optional(),
rating_count: z.number().optional(),
+ /**
+ * Where the place lies, as resolved from its position (place_regions): an ISO country
+ * code and the state or province. Read-only and only on the trip's place list, for
+ * filtering it (#2537); null until the position has been resolved.
+ */
+ country_code: z.string().nullable().optional(),
+ region_name: z.string().nullable().optional(),
});
export type Place = z.infer<typeof placeSchema>;
@@ -298,6 +305,8 @@ export const placeImportGpxRequestSchema = z.object({
importWaypoints: z.string().optional(),
importRoutes: z.string().optional(),
importTracks: z.string().optional(),
+ // Fill in the imported points from Google Places afterwards, as a list import can (#2536).
+ enrich: z.string().optional(),
});
export type PlaceImportGpxRequest = z.infer<typeof placeImportGpxRequestSchema>;
@@ -317,6 +326,7 @@ export type PlaceExportGpxRequest = z.infer<typeof placeExportGpxRequestSchema>;
export const placeImportMapRequestSchema = z.object({
importPoints: z.string().optional(),
importPaths: z.string().optional(),
+ enrich: z.string().optional(),
});
export type PlaceImportMapRequest = z.infer<typeof placeImportMapRequestSchema>;
@@ -327,3 +337,9 @@ export const placeListQuerySchema = z.object({
tag: z.string().optional(),
});
export type PlaceListQuery = z.infer<typeof placeListQuerySchema>;
+
+/** Use a file already attached in the trip as the place's own picture (#1242). */
+export const placeImageFromFileRequestSchema = z.object({
+ file_id: z.number().int().positive(),
+});
+export type PlaceImageFromFileRequest = z.infer<typeof placeImageFromFileRequestSchema>;
diff --git a/shared/src/roadtrip/planning.schema.ts b/shared/src/roadtrip/planning.schema.ts
index 67feae88b..a72bdf4ae 100644
--- a/shared/src/roadtrip/planning.schema.ts
+++ b/shared/src/roadtrip/planning.schema.ts
@@ -41,5 +41,12 @@ export const roadtripGpxImportSchema = z.object({
importWaypoints: z.boolean().default(true),
importRoutes: z.boolean().default(true),
importTracks: z.boolean().default(true),
+ // Look each imported waypoint up on Google afterwards, as a list import can (#2536).
+ enrich: z
+ .boolean()
+ .optional()
+ .describe(
+ 'Fill in photo, address, website and phone of the imported waypoints from Google Places, in the background. Needs a Google Maps key',
+ ),
});
export type RoadtripGpxImport = z.infer<typeof roadtripGpxImportSchema>;
diff --git a/shared/src/share/share.schema.ts b/shared/src/share/share.schema.ts
index ab7ac1eac..30ff71bc4 100644
--- a/shared/src/share/share.schema.ts
+++ b/shared/src/share/share.schema.ts
@@ -15,5 +15,9 @@ export const shareLinkRequestSchema = z.object({
share_packing: z.boolean().optional(),
share_budget: z.boolean().optional(),
share_collab: z.boolean().optional(),
+ // Narrow the itinerary to transport and stays (#1712): no activities, no day notes.
+ share_travel_only: z.boolean().optional(),
+ // Leave the place photos out of the shared page (#1712).
+ share_hide_images: z.boolean().optional(),
});
export type ShareLinkRequest = z.infer<typeof shareLinkRequestSchema>;
diff --git a/shared/src/vacay/vacay.schema.ts b/shared/src/vacay/vacay.schema.ts
index 7111065a0..4d8eadecd 100644
--- a/shared/src/vacay/vacay.schema.ts
+++ b/shared/src/vacay/vacay.schema.ts
@@ -103,6 +103,9 @@ export type VacayYearSettingsRequest = z.infer<typeof vacayYearSettingsRequestSc
export const vacayCompanyHolidayRequestSchema = z.object({
date: z.string(),
note: z.string().optional(),
+ // A half company holiday (#2439): 0.5 leaves the other half of the day open for a
+ // half vacation day. Omitted is a whole day, as before.
+ fraction: z.union([z.literal(0.5), z.literal(1)]).optional(),
});
export type VacayCompanyHolidayRequest = z.infer<typeof vacayCompanyHolidayRequestSchema>;
diff --git a/wiki/Backups.md b/wiki/Backups.md
index 0789710ae..d81994dc1 100644
--- a/wiki/Backups.md
+++ b/wiki/Backups.md
@@ -45,6 +45,21 @@ Before restoring, TREK runs integrity checks on the uploaded database:
> **Plugins & restart:** `travel.db` and `uploads/` are swapped in immediately. Plugin data and code are **staged** beside the live trees and applied right away: the running plugins hold their databases open, so the restore asks the plugin runtime to shut them down and swaps the trees in the moment the handles are closed. If the runtime isn't up (plugins switched off, or a restore that happens during startup), the staged trees are applied at the next boot instead. Restart the server after restoring an instance that uses plugins — the plugins are stopped for the swap and stay down until the process restarts, and the bundled encryption key is only read at startup.
+### Restoring on a new install, before setup
+
+To move TREK to a new server without setting it up first, put the backup ZIP where the container can read it and point `RESTORE_FROM_BACKUP` at it for the **first** start:
+
+```yaml
+services:
+ trek:
+ environment:
+ - RESTORE_FROM_BACKUP=/app/data/backup-2026-09-30.zip
+```
+
+On that start TREK restores the archive before it opens the database: the database, the encryption key it carries, the uploads and the plugins come back, the database is brought up to date, and no admin account is created. Sign in with an account from the backup. The same checks as above apply, and a backup that fails them stops the start with the reason in the log instead of starting an empty instance.
+
+The variable only acts while there is no database yet. Once the instance has one, a restart leaves it alone and logs a reminder, so it is safe to leave in the compose file, but you can remove it after the move.
+
## Auto-backup
Enable scheduled backups in the **Auto-Backup** section of the Backup tab.
diff --git a/wiki/Display-Settings.md b/wiki/Display-Settings.md
index a00ff987d..d7a308689 100644
--- a/wiki/Display-Settings.md
+++ b/wiki/Display-Settings.md
@@ -8,7 +8,7 @@ The General tab (Settings → General) controls your locale preferences and a fe
Open the user menu in the top navigation bar, select **Settings**, and stay on the **General** tab — it is the tab the page opens on.
-The tab is split into three sections: **Startup** (where opening TREK lands), **Language & region** (currency, language, temperature, distance, time format, week start) and **Travel & map** (booking route labels, always show booking routes, explore places on the map, blur booking codes, optimize route from accommodation).
+The tab is split into three sections: **Startup** (where opening TREK lands), **Language & region** (currency, language, place names, temperature, distance, time format, week start) and **Travel & map** (booking route labels, always show booking routes, explore places on the map, blur booking codes, optimize route from accommodation).
> Color mode (Light / Dark / Auto) is **not** here — it lives on the **Appearance** tab. See [Appearance-Settings](Appearance-Settings).
@@ -74,6 +74,10 @@ An administrator can set an instance-wide default in Admin → Default User Sett
Select your preferred language from the button grid (desktop) or dropdown (mobile). The change takes effect immediately without a page reload. See [Languages](Languages) for the full list of supported languages.
+## Place names
+
+The language place search, typed suggestions, place details and addresses answer in. **Same as the app** (the default) follows the language above. Pick another one to keep the interface in your language while places come back in, say, English or the local language of your trip. Where a place has no name in the chosen language, its local name is shown.
+
## Temperature unit
Affects the weather widget on trip days.
diff --git a/wiki/Environment-Variables.md b/wiki/Environment-Variables.md
index a184db2fb..38c60e0fe 100644
--- a/wiki/Environment-Variables.md
+++ b/wiki/Environment-Variables.md
@@ -453,6 +453,7 @@ through environment variables. `TREK_PLACE_PHOTO_DIR` below is unaffected.
|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|
| `TREK_PLACE_PHOTO_DIR` | Directory where cached Google place photos are stored. Created recursively on boot. Set this to point photo storage at a dedicated mounted volume. | `uploads/photos/google` |
| `BACKUP_UPLOAD_LIMIT_MB` | Maximum **compressed** size (in MB) of a restore-backup archive that may be uploaded. Raise it if your backups (which include the `uploads/` directory) exceed the default. Non-positive or invalid values abort startup. | `500` |
+| `RESTORE_FROM_BACKUP` | Path to a backup ZIP to restore on the **first** start, before any setup. Only acts while no database exists; afterwards it is ignored with a warning. A backup that fails the restore checks stops the start. See [Backups](Backups#restoring-on-a-new-install-before-setup). | none |
| `BACKUP_MAX_DECOMPRESSED_MB` | Maximum **decompressed** size (in MB) of a restore-backup archive — the zip-bomb guard. Independent of `BACKUP_UPLOAD_LIMIT_MB` and enforced on both restore paths, so a restore that fits the upload cap can still be refused with `Backup exceeds the maximum decompressed size.` Raise both when restoring a very large instance. | `5120` (5 GB) |
| `TREK_DB_JOURNAL_MODE` | SQLite [journal mode](https://sqlite.org/pragma.html#pragma_journal_mode): `DELETE`, `TRUNCATE`, `PERSIST`, `MEMORY`, `WAL` or `OFF`. Set `DELETE` when the data directory lives on network storage — see below. Values SQLite doesn't know log a warning and fall back. | `WAL` |
| `TREK_DB_SYNCHRONOUS` | SQLite [synchronous](https://sqlite.org/pragma.html#pragma_synchronous) level: `OFF`, `NORMAL`, `FULL` or `EXTRA`. The default follows the journal mode — `NORMAL` under WAL (what SQLite itself uses there), `FULL` otherwise, because a rollback journal at `NORMAL` can lose committed transactions on a power cut. | `NORMAL` / `FULL` |
diff --git a/wiki/MCP-Addon-Tools.md b/wiki/MCP-Addon-Tools.md
index 42388be82..32fc2beff 100644
--- a/wiki/MCP-Addon-Tools.md
+++ b/wiki/MCP-Addon-Tools.md
@@ -13,7 +13,7 @@ Requires `packing:read` or `packing:write` scope. The Packing addon is listed as
| Tool | Description |
|---|---|
| `create_packing_item` | Add an item to the packing checklist with optional category. |
-| `update_packing_item` | Rename an item or change its category. |
+| `update_packing_item` | Rename an item, change its category, or count how many of it are already packed. |
| `set_packing_item_sharing` | Move an item between the three sharing tiers: `common` puts it in the pool the whole trip packs from, `personal` keeps it to its owner, `shared` covers the trip members in `recipient_ids`. Only the item's owner may change this. |
| `toggle_packing_item` | Check or uncheck a packing item. |
| `delete_packing_item` | Remove a packing item. |
@@ -60,7 +60,7 @@ Requires `atlas:read` or `atlas:write` scope.
| `mark_region_visited` | Mark a sub-country region as visited (e.g. `"US-CA"`). |
| `unmark_region_visited` | Remove a region from the visited list. |
| `get_country_atlas_places` | Get places saved in the user's atlas for a specific country. |
-| `create_bucket_list_item` | Add a destination to your personal bucket list with optional coordinates, country code and target date. The same destination for the same target date is rejected as a duplicate. |
+| `create_bucket_list_item` | Add a destination to your personal bucket list with optional coordinates, country code, target date and `region_code` (a state or province, hatched on the Atlas map). The same destination for the same target date is rejected as a duplicate. |
| `update_bucket_list_item` | Update a bucket list item (name, notes, coordinates, target date). |
| `delete_bucket_list_item` | Remove an item from your bucket list. |
@@ -191,8 +191,8 @@ Requires `journey:read` or `journey:write` scope.
| `add_journey_trip` | Link an existing trip to a journey. |
| `remove_journey_trip` | Remove a trip from a journey. |
| `list_journey_entries` | List all entries in a journey (date, text, mood, linked trip). |
-| `create_journey_entry` | Add an entry with date (required), optional title, story text, time of day, location name, mood, and sort order. |
-| `update_journey_entry` | Edit a journey entry's title, story, date, time of day, place, coordinates, weather, tags, mood, pros/cons list or visibility. `stats_excluded: true` keeps the entry but takes it off the route and out of `get_journey_stats`; `dismissed: true` waves a trip-derived suggestion away without deleting it, so the trip sync does not offer it again. |
+| `create_journey_entry` | Add an entry with date (required), optional title, story text, time of day, location name, mood, and sort order. `is_draft: true` creates it as a draft that the journey share link leaves out. |
+| `update_journey_entry` | Edit a journey entry's title, story, date, time of day, place, coordinates, weather, tags, mood, pros/cons list or visibility. `stats_excluded: true` keeps the entry but takes it off the route and out of `get_journey_stats`; `dismissed: true` waves a trip-derived suggestion away without deleting it, so the trip sync does not offer it again. `is_draft` turns the entry into a draft or publishes it. |
| `delete_journey_entry` | Remove an entry from a journey. |
| `reorder_journey_entries` | Reorder entries by providing the new ordered list of entry IDs. |
| `list_journey_contributors` | List the contributors of a journey (owner and editors/viewers). |
diff --git a/wiki/MCP-Tools-and-Resources.md b/wiki/MCP-Tools-and-Resources.md
index b81a71f05..cc88f1258 100644
--- a/wiki/MCP-Tools-and-Resources.md
+++ b/wiki/MCP-Tools-and-Resources.md
@@ -47,7 +47,7 @@ Requires `trips:read` or `trips:write` scope.
| `copy_trip` | Duplicate a trip (days, places, itinerary, packing, budget, reservations). Packing items reset to unchecked. |
| `export_trip_ics` | Export the trip itinerary and reservations as iCalendar (`.ics`) text. |
| `get_share_link` | Get the current public share link for a trip and its permission flags. Requires `trips:share`. |
-| `create_share_link` | Create or update the public share link with configurable visibility flags. Requires `trips:share`. |
+| `create_share_link` | Create or update the public share link with configurable visibility flags, including the travel-only and without-photos options. Requires `trips:share`. |
| `delete_share_link` | Revoke the public share link for a trip. Requires `trips:share`. |
### Places
@@ -84,6 +84,9 @@ Requires `trips:read` or `trips:write` scope.
| `set_day_default_transport_mode` | Set the whole-day default travel mode. Per-leg modes still override it. Pass `null` to clear. |
| `assign_place_to_day` | Pin a place to a specific day in the itinerary. Requires `places:write`. |
| `unassign_place` | Remove a place assignment from a day. Requires `places:write`. |
+| `clear_day_assignments` | Remove every place from one day at once. The day, its notes and its bookings stay. Requires `places:write`. |
+| `set_assignment_route_excluded` | Keep a place on its day but out of the day's route, or route it again. Requires `places:write`. |
+| `set_place_image_from_file` | Use a picture already attached in the trip as a place image (the file is copied). Requires `places:write`. |
| `reorder_day_assignments` | Reorder places within a day by providing assignment IDs in order. Requires `places:write`. |
| `update_assignment_time` | Set start/end times for a place assignment (e.g. `"09:00"` – `"11:30"`). Pass `null` to clear. Requires `places:write`. |
| `move_assignment` | Move a place assignment to a different day. Requires `places:write`. |
@@ -159,8 +162,8 @@ Requires `budget:read` or `budget:write` scope. The Budget addon must be enabled
| `toggle_budget_member_paid` | Mark or unmark a member as having paid their share. |
| `get_settlement_summary` | Each member's net balance, the suggested payments to settle shared expenses, and each member's final budget (`finalBudgets`: expenses paid, net reimbursements, pending reimbursements, final cost, each figure with the rows it is made of under `sources`). `currency` says what the amounts are in: the `base` asked for when the server can quote it, otherwise the trip's base currency. An expense or payment in a foreign currency with no frozen rate, while the server has no live rate for it either, is left out of every figure and listed under `unconverted` (`item_ids`, `settlement_ids`, `currencies`). Call this before recording a settlement. |
| `list_settlements` | List the recorded settle-up payments for a trip — who paid whom, how much, and when. |
-| `create_settlement` | Record a settle-up payment: one member paid another the given amount, with the payment's currency and the day it happened. |
-| `update_settlement` | Update a recorded settle-up payment (payer, recipient, amount, currency and the day it happened). |
+| `create_settlement` | Record a settle-up payment: one member paid another the given amount, with the payment's currency, the day it happened and an optional note. |
+| `update_settlement` | Update a recorded settle-up payment (payer, recipient, amount, currency, the day it happened and its note). |
| `delete_settlement` | Delete a recorded settle-up payment. This is the undo for `create_settlement` and restores the affected balances. |
| `freeze_budget_rates` | Pin today's server exchange rate on every expense and settle-up payment in a foreign currency that has no rate frozen yet, the rows under `unconverted` included. Rows with a frozen rate, in the trip currency or without a currency are never touched, and no rate is taken from the caller. Returns the rows it froze (`items`, `settlements`) and the currencies the server could not quote (`unresolved`). Needs the budget edit permission; an error when the trip currency changed meanwhile, with nothing written. |
@@ -183,6 +186,7 @@ Requires `places:read` or `places:write` scope.
| `reverse_geocode` | `geo:read` | Get a human-readable address for given coordinates. |
| `resolve_maps_url` | `geo:read` | Resolve a Google Maps or Amap (高德地图) share URL to coordinates and place name. |
| `search_pois` | `geo:read` | List places of one or more categories inside a map rectangle, the MCP side of the category buttons on the trip map. Answers from TREK's place index where it can and from OpenStreetMap (Overpass) otherwise, names the source of each result, and never calls Google. |
+| `search_nearby_places` | `geo:read` | List named places of any kind around a coordinate, nearest first, each with its distance in metres. Takes `lat`, `lng`, an optional `radius` (50 to 5000 m, default 500), `limit` (up to 20) and `lang`. Answers from TREK's place index first, from Google Places only when the instance has a key and the index found nothing, and from OpenStreetMap otherwise. Answers are cached for 30 minutes. |
| `list_plugin_poi_categories` | `geo:read` | List the extra categories installed plugins add to the category buttons on the trip map (trailheads, EV chargers, step-free places, drinking water, campsites and the like), each with the `pluginId` and category `id` that `search_plugin_pois` takes and its label in the requested `lang`. Empty when no plugin adds categories, which is the normal case. |
| `search_plugin_pois` | `geo:read` | List the places of one plugin category inside a map rectangle, the MCP side of a plugin's category button. Takes `pluginId`, `category`, a `bbox` (narrowed to a centred 0.5 degree window when larger, reported as `clamped`) and an optional `lang`. Results have the `search_pois` shape plus the answering `pluginId`, a `rating` where the plugin has one and up to six `details` rows (label and value) only that plugin knows. An unknown category or a failing plugin is an error result. Never calls Google. |
| `search_airports` | `geo:read` | Search for airports by name, city, or IATA code. Returns IATA code, name, city, country, timezone. |
@@ -221,7 +225,7 @@ Requires `settings:read` or `settings:write`.
| Tool | Description |
|---|---|
-| `get_display_settings` | Read the user's units, time format, first day of the week, language, default currency and start page. Read this before rendering a temperature, a distance or a clock time. |
+| `get_display_settings` | Read the user's units, time format, first day of the week, language, the language of place names in search, default currency and start page. Read this before rendering a temperature, a distance or a clock time. |
| `update_display_settings` | Change one or more of those preferences. Only display preferences: API keys, map tokens and LLM settings are refused, whatever is passed. |
### Calendar feeds
diff --git a/wiki/Places-and-Search.md b/wiki/Places-and-Search.md
index fce38de56..e43f4aa2d 100644
--- a/wiki/Places-and-Search.md
+++ b/wiki/Places-and-Search.md
@@ -154,7 +154,7 @@ The key's block carries five switches under **What the key may be used for**:
> **Admin:** Set the key in **Admin → Settings → API Keys → Amap (高德地图) API Key**, then pick **Amap (高德地图)** under **Place search provider** in the same card. It needs a **Web 服务** (web service) key from [console.amap.com](https://console.amap.com/dev/key/app); a JS API key is a different credential and is rejected.
-Google Places is unreachable from most networks inside mainland China, and OpenStreetMap knows very little about Chinese restaurants, shops and shopping centres. With Amap selected it takes the slot Google otherwise holds: the TREK API and OpenStreetMap are still asked first, and Amap answers when they have nothing, in Chinese, with ratings, phone numbers and opening hours where Amap has them. Suggestions, place details and the reverse geocoding behind right-click-to-add-a-place go through Amap as well. Rows that came from Amap carry an Amap mark like every other source.
+Google Places is unreachable from most networks inside mainland China, and OpenStreetMap knows very little about Chinese restaurants, shops and shopping centres. With Amap selected it takes the slot Google otherwise holds, and for a search around a trip inside China it answers first: a search or a suggestion centred inside China goes to Amap before the TREK API and OpenStreetMap, which are asked only when Amap has nothing (Amap is never asked twice for the same search). Centred anywhere else, the TREK API and OpenStreetMap answer first and Amap only when they have nothing, so a search for the Eiffel Tower does not come back in Macau. Amap answers in Chinese, with ratings, phone numbers and opening hours where Amap has them. This order only applies when Amap is picked outright under **Place search provider**; on **Auto**, where Amap holds the slot because no Google key is set, the TREK API and OpenStreetMap always answer first. Suggestions, place details and the reverse geocoding behind right-click-to-add-a-place go through Amap as well. Rows that came from Amap carry an Amap mark like every other source.
Amap does not supply place photos here. Its images come with no licence statement TREK could show next to them, so an Amap place gets its picture from Wikimedia Commons like any other, with the credit and licence attached.
diff --git a/wiki/Public-Share-Links.md b/wiki/Public-Share-Links.md
index 876560024..2b9b99548 100644
--- a/wiki/Public-Share-Links.md
+++ b/wiki/Public-Share-Links.md
@@ -42,6 +42,17 @@ When creating or updating a share link you choose what the recipient can see. Th
Disabled toggles hide the corresponding tab from the public viewer entirely. Permission changes take effect immediately — you do not need to recreate the link.
+### Options
+
+Under the toggles, two options narrow what the Plan tab shows. Both are off by default and apply the moment you flip them.
+
+| Option | What it does |
+|--------|--------------|
+| **Travel & stays only** (`share_travel_only`) | The link shows how the trip gets from place to place and where it sleeps, and nothing else: each day keeps its transports and its stay, day notes and activities are left out, days with neither are not shown, and the Bookings tab lists only transports and hotel bookings. Useful for family or an emergency contact. |
+| **Without photos** (`share_hide_images`) | The place photos are left out of the page; places show their category icon instead. |
+
+Both are enforced by the server: a viewer of a travel-only link never receives the activities, and a link without photos does not serve them either.
+
### Which currency guests see
A public viewer has no account, so there is no "their" display currency to use. The Costs tab is rendered in **the sharer's display currency, falling back to the trip's own currency** — in other words, a guest sees the money the way the person who shared the trip sees it. If the sharer leaves their display currency on **Trip currency** (the default), guests read the trip in the trip's own currency. See [Currencies](Currencies).
@@ -52,7 +63,7 @@ The shared trip page speaks the planner's design. A light top bar carries the TR
The Plan tab appears whenever **Map & Plan** is on, which is every link created through the share UI, since that toggle is locked on there. A link whose `share_map` flag was turned off outside the UI (through the REST API or the `create_share_link` MCP tool, both of which take it as a plain boolean) has no Plan tab at all: the server withholds the days, places, assignments and notes entirely, and the viewer opens on the first section the owner did share.
-On a wide screen the Plan tab puts the days on the left and the map on the right, and the map stays in view while the days scroll past it. On a phone the map comes first and the days follow under it. Every day is a card like the planner's: its number on a tile, its name and date, its stays with check-in and check-out marked, and how many places it has. The plan of the day is open underneath, places with their photo or category colour, address, description, notes, planned time and links to Google Maps, the website and the phone number, and transports and notes as tinted rows. The chevron folds a day away.
+On a wide screen the Plan tab puts the days on the left and the map on the right, and the map stays in view while the days scroll past it. On a phone the map comes first and the days follow under it. Every day is a card like the planner's: its number on a tile, its name and date, its stays with check-in and check-out marked, and how many places it has. The plan of the day is open underneath, places with their photo or category colour, address, description, notes, planned time and links to Google Maps, the website and the phone number, and transports and notes as tinted rows. The chevron folds a day away. Under the last day, a **Not planned yet** card lists the places the trip has collected but not put on a day, drawn the same way (not on a travel-only link).
Which day the map shows is picked in the select at the map's top edge, with a step back and forth beside it, or by clicking a day's head; clicking it again goes back to the whole trip. A picked day numbers its stops on the map in visiting order, the same numbers the places wear in the list (a place the day returns to shows both, e.g. `1, 3`), and joins them with a dashed connector. That connector is a straight line showing sequence, not a driving route: TREK will not send a shared itinerary to a third-party routing service on an anonymous visitor's behalf. The whole trip shows every geocoded place as an unnumbered pin with no connector. On either view, pins that sit close together are grouped into a cluster bubble with their count, the same way the planner's map does it, so the stops of a busy day stay tappable on a phone; click a cluster to zoom in on its members, and at maximum zoom it fans them out.
diff --git a/wiki/TREK-Places-API.md b/wiki/TREK-Places-API.md
index 2386d351e..2fa825baa 100644
--- a/wiki/TREK-Places-API.md
+++ b/wiki/TREK-Places-API.md
@@ -38,6 +38,7 @@ Names are the ones the index has, which are the names used on the spot. The inde
| Booking imports, and stops given only by name in an imported Google Maps route | The coordinate of a venue, found by its name | OpenStreetMap's search service, which also resolves street addresses |
| Preparing a trip for offline use | Up to 3000 places around the trip, in one request | Nothing is cached, and offline search has nothing to answer from |
| MCP: `search_place` and `search_pois` | The same as the full search and the category buttons | The same fallbacks |
+| Places near a point (**Nearby** in the add place dialog, `search_nearby_places`) | Named places of any kind around the point, nearest first | Google Places when the index has nothing and a key exists, OpenStreetMap otherwise |
Where Google holds the keyed slot (a Google key, with neither Amap nor OpenStreetMap picked as the places provider), two things skip the index and OpenStreetMap for a search: the **Search Google instead** line under a result list (`provider: 'google'` on `search_place`) sends that one search to Google Places alone, and the admin switch **Search with Google only** sends every search and every suggestion there, `search_place` included; the category buttons and `search_pois` keep asking the index. See [Google and Amap](Places-and-Search#google-and-amap).
diff --git a/wiki/User-Settings.md b/wiki/User-Settings.md
index 3325f251c..30a5e3a65 100644
--- a/wiki/User-Settings.md
+++ b/wiki/User-Settings.md
@@ -35,6 +35,7 @@ The General tab controls the following preferences, all saved immediately on cha
- **Currency** — your display currency; **Trip currency** (the default) shows each trip in its own. See [Currencies](Currencies).
- **Language** — displayed as a button grid on desktop and a dropdown on mobile.
+- **Place names**: the language place search, suggestions and addresses answer in. **Same as the app** follows the language above; picking another one keeps the interface as it is and asks for place names in that language. Where a place has no name in it, the local name is shown.
- **Temperature unit** — Celsius (°C) or Fahrenheit (°F).
- **Distance unit** — Metric (km) or Imperial (mi).
- **Time format** — 24h (14:30) or 12h (2:30 PM).