From 783332cc0e4a875ff37ed8b71054a9a2da98670d Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 30 Jun 2026 22:26:44 +0200 Subject: [PATCH] feat(collections): /collections page, entry points and i18n (#1081) Adds the client side of the Collections addon: - A distinct /collections page (Atlas pattern, page/hook split) gated behind the addon: a multi-list rail, a Grid (default) / List / Map view switch, the idea/want/visited status with a one-tap badge, search and status filters, and considered empty states. Store + hook + model + websocket wiring; the place detail reuses the trip place inspector via a mode guard. - Entry points: a "Save to Collection" button next to Open-in-Google-Maps in the place inspector (and the two sidebar context menus), a "Copy to trip" modal, and a desktop-only two-column add-place picker (mobile keeps the single-column form). - The collection namespace and the new keys across all 22 locales. --- client/src/App.tsx | 19 + client/src/api/collections.ts | 89 ++++ .../components/Collections/CollectionGrid.tsx | 70 ++++ .../components/Collections/CollectionList.tsx | 61 +++ .../components/Collections/CollectionMap.tsx | 39 ++ .../Collections/CollectionPicker.tsx | 125 ++++++ .../Collections/CopyToTripModal.tsx | 131 ++++++ .../src/components/Collections/ListsRail.tsx | 235 +++++++++++ .../Collections/SaveToCollectionModal.tsx | 191 +++++++++ .../components/Collections/StatusBadge.tsx | 58 +++ .../src/components/Collections/saveTarget.ts | 28 ++ .../src/components/Planner/DayPlanSidebar.tsx | 9 +- .../src/components/Planner/PlaceFormModal.tsx | 25 +- .../src/components/Planner/PlaceInspector.tsx | 138 +++++-- .../components/Planner/usePlacesSidebar.ts | 11 +- client/src/pages/CollectionsPage.tsx | 385 ++++++++++++++++++ client/src/pages/TripPlannerPage.tsx | 2 +- .../src/pages/collections/collectionsModel.ts | 73 ++++ .../src/pages/collections/useCollections.ts | 286 +++++++++++++ client/src/store/collectionStore.ts | 236 +++++++++++ client/src/store/saveToCollectionStore.ts | 47 +++ shared/src/i18n/ar/admin.ts | 3 + shared/src/i18n/ar/collection.ts | 101 +++++ shared/src/i18n/ar/index.ts | 2 + shared/src/i18n/ar/inspector.ts | 2 + shared/src/i18n/br/admin.ts | 3 + shared/src/i18n/br/collection.ts | 101 +++++ shared/src/i18n/br/index.ts | 2 + shared/src/i18n/br/inspector.ts | 2 + shared/src/i18n/cs/admin.ts | 3 + shared/src/i18n/cs/collection.ts | 101 +++++ shared/src/i18n/cs/index.ts | 2 + shared/src/i18n/cs/inspector.ts | 2 + shared/src/i18n/de/admin.ts | 2 + shared/src/i18n/de/collection.ts | 101 +++++ shared/src/i18n/de/index.ts | 2 + shared/src/i18n/de/inspector.ts | 2 + shared/src/i18n/en/admin.ts | 3 + shared/src/i18n/en/collection.ts | 101 +++++ shared/src/i18n/en/index.ts | 2 + shared/src/i18n/en/inspector.ts | 2 + shared/src/i18n/es/admin.ts | 3 + shared/src/i18n/es/collection.ts | 101 +++++ shared/src/i18n/es/index.ts | 2 + shared/src/i18n/es/inspector.ts | 2 + shared/src/i18n/fr/admin.ts | 3 + shared/src/i18n/fr/collection.ts | 101 +++++ shared/src/i18n/fr/index.ts | 2 + shared/src/i18n/fr/inspector.ts | 2 + shared/src/i18n/gr/admin.ts | 3 + shared/src/i18n/gr/collection.ts | 101 +++++ shared/src/i18n/gr/index.ts | 2 + shared/src/i18n/gr/inspector.ts | 2 + shared/src/i18n/hu/admin.ts | 3 + shared/src/i18n/hu/collection.ts | 101 +++++ shared/src/i18n/hu/index.ts | 2 + shared/src/i18n/hu/inspector.ts | 2 + shared/src/i18n/id/admin.ts | 3 + shared/src/i18n/id/collection.ts | 101 +++++ shared/src/i18n/id/index.ts | 2 + shared/src/i18n/id/inspector.ts | 2 + shared/src/i18n/it/admin.ts | 3 + shared/src/i18n/it/collection.ts | 101 +++++ shared/src/i18n/it/index.ts | 2 + shared/src/i18n/it/inspector.ts | 2 + shared/src/i18n/ja/admin.ts | 3 + shared/src/i18n/ja/collection.ts | 101 +++++ shared/src/i18n/ja/index.ts | 2 + shared/src/i18n/ja/inspector.ts | 2 + shared/src/i18n/ko/admin.ts | 3 + shared/src/i18n/ko/collection.ts | 101 +++++ shared/src/i18n/ko/index.ts | 2 + shared/src/i18n/ko/inspector.ts | 2 + shared/src/i18n/nl/admin.ts | 3 + shared/src/i18n/nl/collection.ts | 101 +++++ shared/src/i18n/nl/index.ts | 2 + shared/src/i18n/nl/inspector.ts | 2 + shared/src/i18n/pl/admin.ts | 3 + shared/src/i18n/pl/collection.ts | 101 +++++ shared/src/i18n/pl/index.ts | 2 + shared/src/i18n/pl/inspector.ts | 2 + shared/src/i18n/ru/admin.ts | 3 + shared/src/i18n/ru/collection.ts | 101 +++++ shared/src/i18n/ru/index.ts | 2 + shared/src/i18n/ru/inspector.ts | 2 + shared/src/i18n/sv/admin.ts | 3 + shared/src/i18n/sv/collection.ts | 101 +++++ shared/src/i18n/sv/index.ts | 2 + shared/src/i18n/sv/inspector.ts | 2 + shared/src/i18n/tr/admin.ts | 3 + shared/src/i18n/tr/collection.ts | 101 +++++ shared/src/i18n/tr/index.ts | 2 + shared/src/i18n/tr/inspector.ts | 2 + shared/src/i18n/uk/admin.ts | 3 + shared/src/i18n/uk/collection.ts | 101 +++++ shared/src/i18n/uk/index.ts | 2 + shared/src/i18n/uk/inspector.ts | 2 + shared/src/i18n/vi/admin.ts | 3 + shared/src/i18n/vi/collection.ts | 101 +++++ shared/src/i18n/vi/index.ts | 2 + shared/src/i18n/vi/inspector.ts | 2 + shared/src/i18n/zh-TW/admin.ts | 3 + shared/src/i18n/zh-TW/collection.ts | 101 +++++ shared/src/i18n/zh-TW/index.ts | 2 + shared/src/i18n/zh-TW/inspector.ts | 2 + shared/src/i18n/zh/admin.ts | 3 + shared/src/i18n/zh/collection.ts | 101 +++++ shared/src/i18n/zh/index.ts | 2 + shared/src/i18n/zh/inspector.ts | 2 + 109 files changed, 4600 insertions(+), 33 deletions(-) create mode 100644 client/src/api/collections.ts create mode 100644 client/src/components/Collections/CollectionGrid.tsx create mode 100644 client/src/components/Collections/CollectionList.tsx create mode 100644 client/src/components/Collections/CollectionMap.tsx create mode 100644 client/src/components/Collections/CollectionPicker.tsx create mode 100644 client/src/components/Collections/CopyToTripModal.tsx create mode 100644 client/src/components/Collections/ListsRail.tsx create mode 100644 client/src/components/Collections/SaveToCollectionModal.tsx create mode 100644 client/src/components/Collections/StatusBadge.tsx create mode 100644 client/src/components/Collections/saveTarget.ts create mode 100644 client/src/pages/CollectionsPage.tsx create mode 100644 client/src/pages/collections/collectionsModel.ts create mode 100644 client/src/pages/collections/useCollections.ts create mode 100644 client/src/store/collectionStore.ts create mode 100644 client/src/store/saveToCollectionStore.ts create mode 100644 shared/src/i18n/ar/collection.ts create mode 100644 shared/src/i18n/br/collection.ts create mode 100644 shared/src/i18n/cs/collection.ts create mode 100644 shared/src/i18n/de/collection.ts create mode 100644 shared/src/i18n/en/collection.ts create mode 100644 shared/src/i18n/es/collection.ts create mode 100644 shared/src/i18n/fr/collection.ts create mode 100644 shared/src/i18n/gr/collection.ts create mode 100644 shared/src/i18n/hu/collection.ts create mode 100644 shared/src/i18n/id/collection.ts create mode 100644 shared/src/i18n/it/collection.ts create mode 100644 shared/src/i18n/ja/collection.ts create mode 100644 shared/src/i18n/ko/collection.ts create mode 100644 shared/src/i18n/nl/collection.ts create mode 100644 shared/src/i18n/pl/collection.ts create mode 100644 shared/src/i18n/ru/collection.ts create mode 100644 shared/src/i18n/sv/collection.ts create mode 100644 shared/src/i18n/tr/collection.ts create mode 100644 shared/src/i18n/uk/collection.ts create mode 100644 shared/src/i18n/vi/collection.ts create mode 100644 shared/src/i18n/zh-TW/collection.ts create mode 100644 shared/src/i18n/zh/collection.ts diff --git a/client/src/App.tsx b/client/src/App.tsx index 949acd59b..daeb0a6b2 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -17,11 +17,13 @@ import HelpPage from './pages/HelpPage' import AtlasPage from './pages/AtlasPage' import JourneyPage from './pages/JourneyPage' import JourneyDetailPage from './pages/JourneyDetailPage' +import CollectionsPage from './pages/CollectionsPage' import JourneyPublicPage from './pages/JourneyPublicPage' import SharedTripPage from './pages/SharedTripPage' import InAppNotificationsPage from './pages/InAppNotificationsPage.tsx' import OAuthAuthorizePage from './pages/OAuthAuthorizePage' import { ToastContainer } from './components/shared/Toast' +import SaveToCollectionModal from './components/Collections/SaveToCollectionModal' import BackgroundTasksWidget from './components/BackgroundTasks/BackgroundTasksWidget' import BottomNav from './components/Layout/BottomNav' import { TranslationProvider, useTranslation } from './i18n' @@ -203,6 +205,7 @@ export default function App() { {!isAuthPage && } {!isAuthPage && } + {!isAuthPage && } } /> @@ -302,6 +305,22 @@ export default function App() { } /> + + + + } + /> + + + + } + /> => + ax.get(base).then((r: AxiosResponse) => r.data), + get: (id: number): Promise => + ax.get(`${base}/${id}`).then((r: AxiosResponse) => r.data), + create: (body: CollectionCreateRequest): Promise<{ collection: Collection }> => + ax.post(base, body satisfies CollectionCreateRequest).then((r: AxiosResponse) => r.data), + update: (id: number, body: CollectionUpdateRequest): Promise<{ collection: Collection }> => + ax.patch(`${base}/${id}`, body satisfies CollectionUpdateRequest).then((r: AxiosResponse) => r.data), + remove: (id: number): Promise => + ax.delete(`${base}/${id}`).then((r: AxiosResponse) => r.data), + reorder: (orderedIds: number[]): Promise => + ax.post(`${base}/reorder`, { orderedIds }).then((r: AxiosResponse) => r.data), + + savePlace: (body: CollectionSavePlaceRequest): Promise => + ax.post(`${base}/places`, body satisfies CollectionSavePlaceRequest).then((r: AxiosResponse) => r.data), + saveFromTrip: (body: CollectionSaveFromTripRequest): Promise => + ax.post(`${base}/places/from-trip`, body satisfies CollectionSaveFromTripRequest).then((r: AxiosResponse) => r.data), + updatePlace: (pid: number, body: CollectionPlaceUpdateRequest): Promise<{ place: CollectionPlace }> => + ax.patch(`${base}/places/${pid}`, body satisfies CollectionPlaceUpdateRequest).then((r: AxiosResponse) => r.data), + setStatus: (pid: number, status: CollectionStatus): Promise<{ place: CollectionPlace }> => + ax.post(`${base}/places/${pid}/status`, { status }).then((r: AxiosResponse) => r.data), + deletePlace: (pid: number): Promise => + ax.delete(`${base}/places/${pid}`).then((r: AxiosResponse) => r.data), + deleteMany: (ids: number[]): Promise => + ax.post(`${base}/places/delete-many`, { ids }).then((r: AxiosResponse) => r.data), + + copyToTrip: (body: CollectionCopyToTripRequest): Promise => + ax.post(`${base}/copy-to-trip`, body satisfies CollectionCopyToTripRequest).then((r: AxiosResponse) => r.data), + membership: (params: MembershipQuery): Promise => + ax.get(`${base}/membership`, { params }).then((r: AxiosResponse) => r.data), + + invite: (collectionId: number, userId: number): Promise => + ax.post(`${base}/invite`, { collection_id: collectionId, user_id: userId } satisfies CollectionInviteRequest).then((r: AxiosResponse) => r.data), + acceptInvite: (collectionId: number): Promise => + ax.post(`${base}/invite/accept`, { collection_id: collectionId } satisfies CollectionInviteActionRequest).then((r: AxiosResponse) => r.data), + declineInvite: (collectionId: number): Promise => + ax.post(`${base}/invite/decline`, { collection_id: collectionId } satisfies CollectionInviteActionRequest).then((r: AxiosResponse) => r.data), + cancelInvite: (collectionId: number, userId: number): Promise => + ax.post(`${base}/invite/cancel`, { collection_id: collectionId, user_id: userId } satisfies CollectionInviteCancelRequest).then((r: AxiosResponse) => r.data), + leave: (collectionId: number): Promise => + ax.post(`${base}/leave`, { collection_id: collectionId }).then((r: AxiosResponse) => r.data), + availableUsers: (id: number): Promise<{ users: { id: number; username: string }[] }> => + ax.get(`${base}/${id}/available-users`).then((r: AxiosResponse) => r.data), +} diff --git a/client/src/components/Collections/CollectionGrid.tsx b/client/src/components/Collections/CollectionGrid.tsx new file mode 100644 index 000000000..0e6ef8926 --- /dev/null +++ b/client/src/components/Collections/CollectionGrid.tsx @@ -0,0 +1,70 @@ +import React from 'react' +import { Check } from 'lucide-react' +import type { CollectionPlace, CollectionStatus } from '@trek/shared' +import type { TranslationFn } from '../../types' +import PlaceAvatar from '../shared/PlaceAvatar' +import StatusBadge from './StatusBadge' + +interface CollectionGridProps { + places: CollectionPlace[] + selectedPlaceId: number | null + selectMode: boolean + selectedIds: number[] + onOpenPlace: (id: number) => void + onStatusChange: (placeId: number, status: CollectionStatus) => void + onToggleSelect: (id: number) => void + t: TranslationFn +} + +/** + * Grid view — PlaceAvatar thumb cards (rounded-xl) with the status badge in the + * top-right corner. In select mode a tap toggles the checkbox; otherwise it + * opens the place. + */ +export default function CollectionGrid({ + places, selectedPlaceId, selectMode, selectedIds, onOpenPlace, onStatusChange, onToggleSelect, t, +}: CollectionGridProps): React.ReactElement { + return ( +
+ {places.map(place => { + const selected = selectedIds.includes(place.id) + const active = selectedPlaceId === place.id + return ( + + ) + })} +
+ ) +} diff --git a/client/src/components/Collections/CollectionList.tsx b/client/src/components/Collections/CollectionList.tsx new file mode 100644 index 000000000..4aec166ca --- /dev/null +++ b/client/src/components/Collections/CollectionList.tsx @@ -0,0 +1,61 @@ +import React from 'react' +import { Check, MapPin } from 'lucide-react' +import type { CollectionPlace, CollectionStatus } from '@trek/shared' +import type { TranslationFn } from '../../types' +import PlaceAvatar from '../shared/PlaceAvatar' +import StatusBadge from './StatusBadge' + +interface CollectionListProps { + places: CollectionPlace[] + selectedPlaceId: number | null + selectMode: boolean + selectedIds: number[] + onOpenPlace: (id: number) => void + onStatusChange: (placeId: number, status: CollectionStatus) => void + onToggleSelect: (id: number) => void + t: TranslationFn +} + +/** + * Dense list view — one row per saved place with a one-tap status cycle on the + * badge. Click the row to open the place (or toggle in select mode). + */ +export default function CollectionList({ + places, selectedPlaceId, selectMode, selectedIds, onOpenPlace, onStatusChange, onToggleSelect, t, +}: CollectionListProps): React.ReactElement { + return ( +
+ {places.map(place => { + const selected = selectedIds.includes(place.id) + const active = selectedPlaceId === place.id + return ( +
(selectMode ? onToggleSelect(place.id) : onOpenPlace(place.id))} + onKeyDown={e => { if (e.key === 'Enter') onOpenPlace(place.id) }} + className={`flex items-center gap-3 px-3 py-2.5 cursor-pointer transition-colors hover:bg-surface-hover ${active ? 'bg-surface-selected' : ''}`} + > + {selectMode && ( +
+ {selected && } +
+ )} + +
+ {place.name} + {(place.category?.name || place.address) && ( + + {!place.category?.name && } + {place.category?.name || place.address} + + )} +
+ onStatusChange(place.id, next)} t={t} /> +
+ ) + })} +
+ ) +} diff --git a/client/src/components/Collections/CollectionMap.tsx b/client/src/components/Collections/CollectionMap.tsx new file mode 100644 index 000000000..c1f031632 --- /dev/null +++ b/client/src/components/Collections/CollectionMap.tsx @@ -0,0 +1,39 @@ +import React from 'react' +import { MapViewAuto } from '../Map/MapViewAuto' +import type { CollectionPlace } from '@trek/shared' +import { mappablePlaces } from '../../pages/collections/collectionsModel' + +interface CollectionMapProps { + places: CollectionPlace[] + selectedPlaceId: number | null + onOpenPlace: (id: number) => void + dark: boolean +} + +/** + * Map view — reuses the trip map stack (MapViewAuto → Leaflet / GL with marker + * clustering). One of the three list views; clicking a marker selects the place. + */ +export default function CollectionMap({ places, selectedPlaceId, onOpenPlace, dark }: CollectionMapProps): React.ReactElement { + const pts = mappablePlaces(places) + const center: [number, number] = pts.length > 0 + ? [pts[0].lat as number, pts[0].lng as number] + : [48.8566, 2.3522] + const tileUrl = dark + ? 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png' + : 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png' + + return ( +
+ 0 ? 6 : 3} + tileUrl={tileUrl} + fitKey={pts.length} + /> +
+ ) +} diff --git a/client/src/components/Collections/CollectionPicker.tsx b/client/src/components/Collections/CollectionPicker.tsx new file mode 100644 index 000000000..589686438 --- /dev/null +++ b/client/src/components/Collections/CollectionPicker.tsx @@ -0,0 +1,125 @@ +import React, { useEffect, useMemo, useState } from 'react' +import { Search, Bookmark, Loader2 } from 'lucide-react' +import PlaceAvatar from '../shared/PlaceAvatar' +import { collectionsApi } from '../../api/collections' +import type { CollectionPlace } from '@trek/shared' +import type { TranslationFn } from '../../types' + +interface LocationBias { + low: { lat: number; lng: number } + high: { lat: number; lng: number } +} + +interface CollectionPickerProps { + /** Trip bounding box used for autocomplete — sorts the saved places by + * proximity to the trip so the relevant ones surface first. */ + bias?: LocationBias + /** Fills the place form from the chosen saved place (handleSelectMapsResult). */ + onSelect: (place: CollectionPlace) => void + t: TranslationFn +} + +function distanceTo(p: CollectionPlace, center: { lat: number; lng: number }): number { + if (p.lat == null || p.lng == null) return Number.POSITIVE_INFINITY + const dlat = p.lat - center.lat + const dlng = p.lng - center.lng + return dlat * dlat + dlng * dlng +} + +/** + * Right-hand column of the desktop add-place modal: the user's saved collection + * places, searchable and proximity-sorted, so a place saved on an earlier trip + * can be dropped straight into the form. Clones the maps search + scrollable + * list pattern. Desktop only — gated by the caller. + */ +export default function CollectionPicker({ bias, onSelect, t }: CollectionPickerProps): React.ReactElement { + const [places, setPlaces] = useState([]) + const [loading, setLoading] = useState(true) + const [search, setSearch] = useState('') + + useEffect(() => { + let cancelled = false + setLoading(true) + collectionsApi.list() + .then(async (res) => { + const detail = await Promise.all(res.collections.map(c => collectionsApi.get(c.id).catch(() => null))) + if (cancelled) return + const seen = new Set() + const merged: CollectionPlace[] = [] + for (const d of detail) { + if (!d) continue + for (const p of d.places) { + if (seen.has(p.id)) continue + seen.add(p.id) + merged.push(p) + } + } + setPlaces(merged) + }) + .catch(() => { if (!cancelled) setPlaces([]) }) + .finally(() => { if (!cancelled) setLoading(false) }) + return () => { cancelled = true } + }, []) + + const center = useMemo( + () => (bias ? { lat: (bias.low.lat + bias.high.lat) / 2, lng: (bias.low.lng + bias.high.lng) / 2 } : null), + [bias], + ) + + const visible = useMemo(() => { + const q = search.trim().toLowerCase() + const list = q + ? places.filter(p => p.name.toLowerCase().includes(q) || (p.address ?? '').toLowerCase().includes(q)) + : [...places] + if (center) list.sort((a, b) => distanceTo(a, center) - distanceTo(b, center)) + else list.sort((a, b) => a.name.localeCompare(b.name)) + return list + }, [places, search, center]) + + return ( + + ) +} diff --git a/client/src/components/Collections/CopyToTripModal.tsx b/client/src/components/Collections/CopyToTripModal.tsx new file mode 100644 index 000000000..9089dbbf9 --- /dev/null +++ b/client/src/components/Collections/CopyToTripModal.tsx @@ -0,0 +1,131 @@ +import React, { useEffect, useMemo, useState } from 'react' +import { Search, MapPin, Loader2, Copy } from 'lucide-react' +import Modal from '../shared/Modal' +import { useToast } from '../shared/Toast' +import { tripsApi } from '../../api/client' +import { getApiErrorMessage } from '../../utils/apiError' +import type { TranslationFn } from '../../types' + +interface TripOption { + id: number + name: string + start_date?: string | null + end_date?: string | null + cover_image?: string | null +} + +interface CopyToTripModalProps { + isOpen: boolean + onClose: () => void + /** The collection place ids to copy. */ + placeIds: number[] + /** Delegates to collectionStore.copyToTrip; returns the server reconcile result. */ + onCopy: (tripId: number) => Promise<{ copied: number; skipped: { id: number; name: string }[] }> + t: TranslationFn +} + +/** + * Trip picker for "Copy to trip" — lists the user's trips (searchable), copies + * the selected collection places into the chosen trip and reconciles the server + * dedup result into a copied / skipped-duplicates toast. Works for a single + * place (detail panel) and bulk select-mode ("Copy N to trip"). + */ +export default function CopyToTripModal({ isOpen, onClose, placeIds, onCopy, t }: CopyToTripModalProps): React.ReactElement | null { + const toast = useToast() + const [trips, setTrips] = useState([]) + const [loading, setLoading] = useState(false) + const [search, setSearch] = useState('') + const [busyTripId, setBusyTripId] = useState(null) + + useEffect(() => { + if (!isOpen) return + let cancelled = false + setLoading(true) + setSearch('') + tripsApi.list() + .then((res: { trips?: TripOption[] }) => { if (!cancelled) setTrips(res.trips ?? []) }) + .catch(() => { if (!cancelled) setTrips([]) }) + .finally(() => { if (!cancelled) setLoading(false) }) + return () => { cancelled = true } + }, [isOpen]) + + const filtered = useMemo(() => { + const q = search.trim().toLowerCase() + if (!q) return trips + return trips.filter(tr => tr.name.toLowerCase().includes(q)) + }, [trips, search]) + + if (!isOpen) return null + + const handleCopy = async (tripId: number) => { + if (busyTripId != null || placeIds.length === 0) return + setBusyTripId(tripId) + try { + const res = await onCopy(tripId) + if (res.copied > 0) { + toast.success(t('collections.copiedCount', { count: res.copied })) + } + if (res.skipped.length > 0) { + toast.info(t('collections.skippedDuplicates', { count: res.skipped.length })) + } + if (res.copied === 0 && res.skipped.length === 0) { + toast.info(t('collections.copyNothing')) + } + onClose() + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } finally { + setBusyTripId(null) + } + } + + return ( + 1 ? t('collections.copyN', { count: placeIds.length }) : t('collections.copyToTripTitle')} + size="sm" + > +
+
+ + setSearch(e.target.value)} + placeholder={t('collections.copyToTripSearch')} + className="w-full pl-8 pr-3 py-2 rounded-lg border border-edge bg-surface-input text-content text-[13px] outline-none focus:border-accent" + /> +
+ {loading ? ( +
+ +
+ ) : filtered.length === 0 ? ( +

{t('collections.noTrips')}

+ ) : ( +
+ {filtered.map(trip => { + const busy = busyTripId === trip.id + return ( + + ) + })} +
+ )} +
+
+ ) +} diff --git a/client/src/components/Collections/ListsRail.tsx b/client/src/components/Collections/ListsRail.tsx new file mode 100644 index 000000000..afcf62393 --- /dev/null +++ b/client/src/components/Collections/ListsRail.tsx @@ -0,0 +1,235 @@ +import React, { useEffect, useRef, useState } from 'react' +import { Plus, Bookmark, Layers, MoreHorizontal, Pencil, Trash2, Users, Check } from 'lucide-react' +import type { Collection } from '@trek/shared' +import type { TranslationFn } from '../../types' +import { ALL_SAVED } from '../../store/collectionStore' +import type { ActiveCollectionId, IncomingCollectionInvite } from '../../store/collectionStore' + +const SWATCHES = ['#6366f1', '#ec4899', '#14b8a6', '#f97316', '#8b5cf6', '#ef4444', '#3b82f6', '#22c55e'] + +interface ListsRailProps { + ownedLists: Collection[] + sharedLists: Collection[] + activeId: ActiveCollectionId + incomingInvites: IncomingCollectionInvite[] + editingListId: number | null + editingName: string + setEditingName: (v: string) => void + onSelect: (id: ActiveCollectionId) => void + onNewList: () => void + onStartRename: (id: number, name: string) => void + onCommitRename: () => void + onSetColor: (id: number, color: string) => void + onRequestDelete: (id: number) => void + onAcceptInvite: (id: number) => void + onDeclineInvite: (id: number) => void + t: TranslationFn +} + +function ColorDot({ color }: { color?: string | null }): React.ReactElement { + return +} + +interface ListRowProps { + list: Collection + active: boolean + editing: boolean + editingName: string + setEditingName: (v: string) => void + onSelect: (id: number) => void + onStartRename: (id: number, name: string) => void + onCommitRename: () => void + onSetColor: (id: number, color: string) => void + onRequestDelete: (id: number) => void + t: TranslationFn +} + +function ListRow({ + list, active, editing, editingName, setEditingName, + onSelect, onStartRename, onCommitRename, onSetColor, onRequestDelete, t, +}: ListRowProps): React.ReactElement { + const [menuOpen, setMenuOpen] = useState(false) + const [colorOpen, setColorOpen] = useState(false) + const rowRef = useRef(null) + // Owner or accepted member may rename/recolour any accessible list; only the + // owner may delete it. + const canDelete = list.is_owner !== false + + useEffect(() => { + if (!menuOpen && !colorOpen) return + const onDown = (e: MouseEvent) => { + if (rowRef.current && !rowRef.current.contains(e.target as Node)) { setMenuOpen(false); setColorOpen(false) } + } + document.addEventListener('mousedown', onDown) + return () => document.removeEventListener('mousedown', onDown) + }, [menuOpen, colorOpen]) + + if (editing) { + return ( +
+ setEditingName(e.target.value)} + onKeyDown={e => { if (e.key === 'Enter') onCommitRename(); if (e.key === 'Escape') onCommitRename() }} + onBlur={onCommitRename} + className="w-full px-2 py-1.5 rounded-lg border border-accent bg-surface-input text-content text-[13px] outline-none" + /> +
+ ) + } + + return ( +
+ + + {menuOpen && !colorOpen && ( +
+ + + {canDelete && ( + + )} +
+ )} + {colorOpen && ( +
+
+ {SWATCHES.map(c => ( + + ))} +
+
+ )} +
+ ) +} + +/** + * Left rail of the user's lists: a "New list" action, the "All saved" union + * pseudo-list, owned lists (colour dot + count + rename/colour/delete menu), + * a shared section, and an incoming-invites block. + */ +export default function ListsRail(props: ListsRailProps): React.ReactElement { + const { + ownedLists, sharedLists, activeId, incomingInvites, + editingListId, editingName, setEditingName, + onSelect, onNewList, onStartRename, onCommitRename, onSetColor, onRequestDelete, + onAcceptInvite, onDeclineInvite, t, + } = props + + return ( +
+ + + + + {ownedLists.length > 0 &&
} + {ownedLists.map(list => ( + + ))} + + {sharedLists.length > 0 && ( + <> +
+ {t('collections.shared')} +
+ {sharedLists.map(list => ( + + ))} + + )} + + {incomingInvites.length > 0 && ( + <> +
+ {t('collections.invites.title')} ({incomingInvites.length}) +
+ {incomingInvites.map(inv => ( +
+

{inv.name}

+

{t('collections.invites.from')} {inv.from.username}

+
+ + +
+
+ ))} + + )} +
+ ) +} diff --git a/client/src/components/Collections/SaveToCollectionModal.tsx b/client/src/components/Collections/SaveToCollectionModal.tsx new file mode 100644 index 000000000..521fd84d4 --- /dev/null +++ b/client/src/components/Collections/SaveToCollectionModal.tsx @@ -0,0 +1,191 @@ +import React, { useEffect, useMemo, useState, useCallback } from 'react' +import { useNavigate } from 'react-router-dom' +import { Bookmark, BookmarkCheck, Check, Loader2, Plus } from 'lucide-react' +import Modal from '../shared/Modal' +import { useToast } from '../shared/Toast' +import { useTranslation } from '../../i18n' +import { collectionsApi } from '../../api/collections' +import { useSaveToCollectionStore } from '../../store/saveToCollectionStore' +import { getApiErrorMessage } from '../../utils/apiError' +import type { Collection, CollectionMembership } from '@trek/shared' + +/** + * Globally-mounted list picker for the "Save to Collection" entry points + * (PlaceInspector footer button + the two trip-sidebar context menus). Reads the + * active target from saveToCollectionStore, shows every list the user owns or + * co-owns, and toggles the place in/out of each — a check marks the lists that + * already hold it. Each change refreshes membership and bumps the store version + * so the inspector bookmark indicator stays in sync. One mount, no prop drilling. + */ +export default function SaveToCollectionModal(): React.ReactElement | null { + const target = useSaveToCollectionStore(s => s.target) + const close = useSaveToCollectionStore(s => s.close) + const bumpVersion = useSaveToCollectionStore(s => s.bumpVersion) + const { t } = useTranslation() + const toast = useToast() + const navigate = useNavigate() + + const [lists, setLists] = useState([]) + const [membership, setMembership] = useState(null) + const [loading, setLoading] = useState(false) + const [busyId, setBusyId] = useState(null) + + const membershipQuery = useMemo(() => { + if (!target) return null + return { + google_place_id: target.google_place_id ?? undefined, + google_ftid: target.google_ftid ?? undefined, + name: target.name, + lat: target.lat ?? undefined, + lng: target.lng ?? undefined, + } + }, [target]) + + const refreshMembership = useCallback(async () => { + if (!membershipQuery) return + try { + const m = await collectionsApi.membership(membershipQuery) + setMembership(m) + } catch { + setMembership({ saved: false, lists: [] }) + } + }, [membershipQuery]) + + // Load lists + membership whenever the picker opens for a new target. + useEffect(() => { + if (!target) return + let cancelled = false + setLoading(true) + setMembership(null) + Promise.all([collectionsApi.list().catch(() => ({ collections: [], incomingInvites: [] })), membershipQuery ? collectionsApi.membership(membershipQuery).catch(() => ({ saved: false, lists: [] as CollectionMembership['lists'] })) : Promise.resolve({ saved: false, lists: [] as CollectionMembership['lists'] })]) + .then(([listRes, m]) => { + if (cancelled) return + setLists(listRes.collections) + setMembership(m) + }) + .finally(() => { if (!cancelled) setLoading(false) }) + return () => { cancelled = true } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [target]) + + if (!target) return null + + const savedByCollection = new Map() + for (const l of membership?.lists ?? []) savedByCollection.set(l.collection_id, l.place_id) + + const handleToggle = async (list: Collection) => { + if (busyId != null) return + const savedPlaceId = savedByCollection.get(list.id) + setBusyId(list.id) + try { + if (savedPlaceId != null) { + await collectionsApi.deletePlace(savedPlaceId) + toast.success(t('collections.removedFromList', { name: list.name })) + } else { + await collectionsApi.savePlace({ + collection_id: list.id, + source_trip_id: target.source_trip_id ?? null, + source_place_id: target.source_place_id ?? null, + name: target.name, + description: target.description ?? null, + lat: target.lat ?? null, + lng: target.lng ?? null, + address: target.address ?? null, + category_id: target.category_id ?? null, + price: target.price ?? null, + currency: target.currency ?? null, + notes: target.notes ?? null, + image_url: target.image_url ?? null, + google_place_id: target.google_place_id ?? null, + google_ftid: target.google_ftid ?? null, + osm_id: target.osm_id ?? null, + website: target.website ?? null, + phone: target.phone ?? null, + force: true, + }) + toast.success(t('collections.addedToList', { name: list.name })) + } + await refreshMembership() + bumpVersion() + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } finally { + setBusyId(null) + } + } + + return ( + + + +
+ } + > +
+

{target.name}

+ {loading ? ( +
+ +
+ ) : lists.length === 0 ? ( +
+
+ +
+

{t('collections.noListsYet')}

+ +
+ ) : ( +
+ {lists.map(list => { + const saved = savedByCollection.has(list.id) + const busy = busyId === list.id + return ( + + ) + })} +
+ )} +
+ + ) +} diff --git a/client/src/components/Collections/StatusBadge.tsx b/client/src/components/Collections/StatusBadge.tsx new file mode 100644 index 000000000..e7ff80d85 --- /dev/null +++ b/client/src/components/Collections/StatusBadge.tsx @@ -0,0 +1,58 @@ +import React from 'react' +import type { CollectionStatus } from '@trek/shared' +import type { TranslationFn } from '../../types' +import { STATUS_META, nextStatus } from '../../pages/collections/collectionsModel' + +interface StatusBadgeProps { + status: CollectionStatus + /** One-tap cycle: idea → want → visited → idea. Omit for a read-only badge. */ + onChange?: (next: CollectionStatus) => void + showLabel?: boolean + size?: number + t: TranslationFn +} + +/** + * Coloured per-place status pill (idea / want-to-go / visited). When `onChange` + * is supplied a single tap cycles the status optimistically; otherwise it is a + * static badge. Looks intentional in both light and dark mode via the + * accent/success tokens in STATUS_META. + */ +export default function StatusBadge({ status, onChange, showLabel = true, size = 13, t }: StatusBadgeProps): React.ReactElement { + const meta = STATUS_META[status] + const Icon = meta.icon + const label = t(meta.labelKey) + const interactive = !!onChange + + const handleClick = (e: React.MouseEvent) => { + if (!onChange) return + e.preventDefault() + e.stopPropagation() + onChange(nextStatus(status)) + } + + const content = ( + <> + + {showLabel && {label}} + + ) + + const className = `inline-flex items-center gap-1.5 rounded-full text-[11px] leading-none ${showLabel ? 'px-2.5 py-1' : 'p-1.5'} border border-edge bg-surface-card/80 backdrop-blur-sm` + + if (!interactive) { + return {content} + } + + return ( + + ) +} diff --git a/client/src/components/Collections/saveTarget.ts b/client/src/components/Collections/saveTarget.ts new file mode 100644 index 000000000..5638b56a9 --- /dev/null +++ b/client/src/components/Collections/saveTarget.ts @@ -0,0 +1,28 @@ +import type { Place } from '../../types' +import type { SaveToCollectionTarget } from '../../store/saveToCollectionStore' + +/** + * Build a Save-to-Collection picker target from a trip pool place, carrying the + * provenance ids so the saved copy remembers its origin trip/place. + */ +export function placeToSaveTarget(place: Place): SaveToCollectionTarget { + return { + name: place.name, + source_trip_id: place.trip_id ?? null, + source_place_id: place.id, + description: place.description ?? null, + lat: place.lat ?? null, + lng: place.lng ?? null, + address: place.address ?? null, + category_id: place.category_id ?? null, + price: place.price ?? null, + currency: place.currency ?? null, + notes: place.notes ?? null, + image_url: place.image_url ?? null, + google_place_id: place.google_place_id ?? null, + google_ftid: place.google_ftid ?? null, + osm_id: place.osm_id ?? null, + website: place.website ?? null, + phone: place.phone ?? null, + } +} diff --git a/client/src/components/Planner/DayPlanSidebar.tsx b/client/src/components/Planner/DayPlanSidebar.tsx index f188c7e34..c5e45348b 100644 --- a/client/src/components/Planner/DayPlanSidebar.tsx +++ b/client/src/components/Planner/DayPlanSidebar.tsx @@ -3,7 +3,7 @@ interface DragDataPayload { placeId?: string; assignmentId?: string; noteId?: st declare global { interface Window { __dragData: DragDataPayload | null } } import React, { useState, useEffect, useLayoutEffect, useRef, useMemo } from 'react' -import { ChevronDown, ChevronRight, ChevronUp, Navigation, RotateCcw, ExternalLink, Clock, Pencil, GripVertical, Ticket, Plus, FileText, Trash2, Car, Lock, Hotel, Footprints, Route as RouteIcon } from 'lucide-react' +import { ChevronDown, ChevronRight, ChevronUp, Navigation, RotateCcw, ExternalLink, Clock, Pencil, GripVertical, Ticket, Plus, FileText, Trash2, Car, Lock, Hotel, Footprints, Route as RouteIcon, Bookmark } from 'lucide-react' import { assignmentsApi, reservationsApi } from '../../api/client' import { calculateRoute, calculateRouteWithLegs, optimizeRoute, generateGoogleMapsUrl } from '../Map/RouteCalculator' import PlaceAvatar from '../shared/PlaceAvatar' @@ -17,6 +17,9 @@ import { getCategoryIcon } from '../shared/categoryIcons' import { useTripStore } from '../../store/tripStore' import { useCanDo } from '../../store/permissionsStore' import { useSettingsStore } from '../../store/settingsStore' +import { useAddonStore } from '../../store/addonStore' +import { useSaveToCollectionStore } from '../../store/saveToCollectionStore' +import { placeToSaveTarget } from '../Collections/saveTarget' import { useTranslation } from '../../i18n' import { isDayInAccommodationRange, getAccommodationAnchors, getDayBookendHotels } from '../../utils/dayOrder' import { @@ -1058,6 +1061,7 @@ 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 collectionsEnabled = useAddonStore(s => s.isEnabled('collections')) const { tripId, trip, @@ -1623,7 +1627,8 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP canEditDays && 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) }, place.website && { label: t('inspector.website'), icon: ExternalLink, onClick: () => window.open(place.website, '_blank') }, - googleMapsUrl && { label: 'Google Maps', icon: Navigation, onClick: () => window.open(googleMapsUrl, '_blank') }, + googleMapsUrl && { label: t('inspector.google'), icon: Navigation, onClick: () => window.open(googleMapsUrl, '_blank') }, + collectionsEnabled && { label: t('inspector.saveToCollection'), icon: Bookmark, onClick: () => useSaveToCollectionStore.getState().open(placeToSaveTarget(place)) }, { divider: true }, canEditDays && onDeletePlace && { label: t('common.delete'), icon: Trash2, danger: true, onClick: () => onDeletePlace(place.id) }, ]) diff --git a/client/src/components/Planner/PlaceFormModal.tsx b/client/src/components/Planner/PlaceFormModal.tsx index c58ab21bd..4464718a9 100644 --- a/client/src/components/Planner/PlaceFormModal.tsx +++ b/client/src/components/Planner/PlaceFormModal.tsx @@ -5,6 +5,8 @@ import { mapsApi } from '../../api/client' import { useAuthStore } from '../../store/authStore' import { useCanDo } from '../../store/permissionsStore' import { useTripStore } from '../../store/tripStore' +import { useAddonStore } from '../../store/addonStore' +import CollectionPicker from '../Collections/CollectionPicker' import { useToast } from '../shared/Toast' import { Search, Paperclip, X, AlertTriangle, Loader2 } from 'lucide-react' import { useTranslation } from '../../i18n' @@ -33,6 +35,10 @@ interface PlaceFormModalProps { onCategoryCreated: (category: { name: string; color?: string; icon?: string }) => Promise | undefined assignmentId: number | null dayAssignments?: Assignment[] + /** Mobile keeps the untouched single-column form; desktop adds the saved-place + * picker column when the Collections addon is enabled. Sourced from the trip + * planner's matchMedia('(max-width:767px)'). */ + isMobile?: boolean } @@ -67,7 +73,7 @@ function findDuplicatePlace( function usePlaceFormModal(props: PlaceFormModalProps) { const { isOpen, onClose, onSave, place, prefillCoords, tripId, categories, - onCategoryCreated, assignmentId, dayAssignments = [], + onCategoryCreated, assignmentId, dayAssignments = [], isMobile = false, } = props const [form, setForm] = useState(DEFAULT_FORM) const [mapsSearch, setMapsSearch] = useState('') @@ -90,6 +96,7 @@ function usePlaceFormModal(props: PlaceFormModalProps) { const can = useCanDo() const tripObj = useTripStore((s) => s.trip) const canUploadFiles = can('file_upload', tripObj) + const collectionsEnabled = useAddonStore((s) => s.isEnabled('collections')) useEffect(() => { if (place) { @@ -416,6 +423,8 @@ function usePlaceFormModal(props: PlaceFormModalProps) { onCategoryCreated, assignmentId, dayAssignments, + isMobile, + collectionsEnabled, form, setForm, mapsSearch, @@ -478,6 +487,8 @@ export default function PlaceFormModal(props: PlaceFormModalProps) { onCategoryCreated, assignmentId, dayAssignments, + isMobile, + collectionsEnabled, form, setForm, mapsSearch, @@ -525,12 +536,15 @@ export default function PlaceFormModal(props: PlaceFormModalProps) { handleSubmit, duplicateWarning, } = S + // Desktop + Collections addon → two columns (form + saved-place picker). Mobile + // always keeps the original single-column form untouched. + const twoColumn = !isMobile && collectionsEnabled return ( + ) + })} + + ) +} + +function StatusChips({ + statusFilter, counts, onChange, t, +}: { statusFilter: StatusFilter; counts: Record; onChange: (f: StatusFilter) => void; t: TranslationFn }): React.ReactElement { + const chips: { key: StatusFilter; label: string; color?: string }[] = [ + { key: 'all', label: t('collections.status.filterAll') }, + ...STATUS_ORDER.map(s => ({ key: s as StatusFilter, label: t(STATUS_META[s].labelKey), color: STATUS_META[s].color })), + ] + return ( +
+ {chips.map(chip => { + const active = statusFilter === chip.key + return ( + + ) + })} +
+ ) +} + +function EmptyState({ icon, title, text }: { icon: React.ReactNode; title: string; text: string }): React.ReactElement { + return ( +
+
{icon}
+

{title}

+

{text}

+
+ ) +} + +export default function CollectionsPage(): React.ReactElement { + const c = useCollections() + const { t } = c + + const title = c.isAllSaved ? t('collections.allSaved') : (c.activeCollection?.name ?? t('collections.title')) + const hasPlaces = c.places.length > 0 + const noLists = !c.loading && c.collections.length === 0 + const showSelect = !c.isAllSaved && (c.isOwner || c.activeCollection?.is_owner === false) + + let body: React.ReactElement + if (c.placesLoading && !hasPlaces) { + body = ( +
+
+
+ ) + } else if (!hasPlaces) { + body = ( + } + title={t('collections.empty.title')} + text={t('collections.empty.text')} + /> + ) + } else if (c.visiblePlaces.length === 0) { + body = ( + } + title={t('collections.empty.noMatchTitle')} + text={t('collections.empty.noMatchText')} + /> + ) + } else if (c.view === 'grid') { + body = ( + + ) + } else if (c.view === 'list') { + body = ( + + ) + } else { + const mappable = mappablePlaces(c.visiblePlaces) + body = mappable.length === 0 ? ( + } + title={t('collections.empty.noMatchTitle')} + text={t('collections.empty.noMatchText')} + /> + ) : ( + + ) + } + + return ( +
+ +
+ {/* Lists rail — desktop sidebar / mobile slide-over */} + + + {/* Main column */} +
+
+ {/* Header */} +
+
+ +

{title}

+ {c.activeCollection?.is_owner === false && ( + {t('collections.shared')} + )} +
+
+ + {showSelect && ( + + )} + +
+
+ + {/* Toolbar: search + status chips */} +
+ +
+ + c.setSearch(e.target.value)} + placeholder={t('collections.search')} + className="w-44 sm:w-56 pl-8 pr-3 py-1.5 rounded-lg border border-edge bg-surface-input text-content text-[13px] outline-none focus:border-accent" + /> +
+
+ + {/* Select-mode action bar */} + {c.selectMode && c.selectedIds.length > 0 && ( +
+ {t('collections.selectedCount', { count: c.selectedIds.length })} +
+ + + +
+ )} + + {noLists ? ( + } title={t('collections.empty.firstTitle')} text={t('collections.empty.firstText')} /> + ) : body} +
+
+
+ + {/* Mobile rail slide-over */} + {c.mobileRailOpen && ( +
c.setMobileRailOpen(false)}> +
+
e.stopPropagation()}> + { c.setMobileRailOpen(false); c.setShowNewList(true) }} + onStartRename={c.handleStartRename} + onCommitRename={c.handleCommitRename} + onSetColor={c.handleSetColor} + onRequestDelete={c.setConfirmDeleteList} + onAcceptInvite={c.handleAcceptInvite} + onDeclineInvite={c.handleDeclineInvite} + t={t} + /> +
+
+ )} + + {/* Detail panel — re-pointed PlaceInspector in collection mode. The outer + layer is click-through (pointer-events-none) so the grid behind stays + interactive; only the floating card re-enables pointer events. */} + {c.detailPlace && ( +
+
+
+ +
+
+
+ )} + + {/* Copy to trip */} + + + {/* New list modal */} + c.setShowNewList(false)} + title={t('collections.newList')} + size="sm" + footer={ +
+ + +
+ } + > +
+
+ + c.setNewListName(e.target.value)} + onKeyDown={e => { if (e.key === 'Enter' && c.newListName.trim()) c.handleCreateList() }} + placeholder={t('collections.listNamePlaceholder')} + className="w-full px-3 py-2 rounded-lg border border-edge bg-surface-input text-content text-[14px] outline-none focus:border-accent" + /> +
+
+ +
+ {SWATCHES.map(col => ( +
+
+
+
+ + {/* Delete-list confirm */} + c.setConfirmDeleteList(null)} + title={t('collections.deleteList')} + size="sm" + footer={ +
+ + +
+ } + > +

{t('collections.deleteListConfirm')}

+
+
+ ) +} diff --git a/client/src/pages/TripPlannerPage.tsx b/client/src/pages/TripPlannerPage.tsx index c3aeac3b4..8098ac405 100644 --- a/client/src/pages/TripPlannerPage.tsx +++ b/client/src/pages/TripPlannerPage.tsx @@ -697,7 +697,7 @@ export default function TripPlannerPage(): React.ReactElement | null { )}
- { setShowPlaceForm(false); setEditingPlace(null); setEditingAssignmentId(null); setPrefillCoords(null) }} onSave={handleSavePlace} place={editingPlace} prefillCoords={prefillCoords} assignmentId={editingAssignmentId} dayAssignments={editingPlace ? Object.values(assignments).flat() : []} tripId={tripId} categories={categories} onCategoryCreated={cat => tripActions.addCategory?.(cat)} /> + { setShowPlaceForm(false); setEditingPlace(null); setEditingAssignmentId(null); setPrefillCoords(null) }} onSave={handleSavePlace} place={editingPlace} prefillCoords={prefillCoords} assignmentId={editingAssignmentId} dayAssignments={editingPlace ? Object.values(assignments).flat() : []} tripId={tripId} categories={categories} onCategoryCreated={cat => tripActions.addCategory?.(cat)} isMobile={isMobile} /> setShowTripForm(false)} diff --git a/client/src/pages/collections/collectionsModel.ts b/client/src/pages/collections/collectionsModel.ts new file mode 100644 index 000000000..cbd163cbe --- /dev/null +++ b/client/src/pages/collections/collectionsModel.ts @@ -0,0 +1,73 @@ +import { Circle, Bookmark, CheckCircle2 } from 'lucide-react' +import type { LucideIcon } from 'lucide-react' +import type { CollectionPlace, CollectionStatus } from '@trek/shared' +import { COLLECTION_STATUSES } from '@trek/shared' +import type { StatusFilter } from '../../store/collectionStore' + +/** + * Pure data shaping + presentation metadata for the Collections page. No React + * state/effects live here — see atlas/atlasModel.ts for the same split. The + * page hook (useCollections) and the view components share these helpers. + */ + +export interface StatusMeta { + icon: LucideIcon + /** i18n key for the human label. */ + labelKey: string + /** CSS colour token / hex for the badge. */ + color: string +} + +export const STATUS_META: Record = { + idea: { icon: Circle, labelKey: 'collections.status.idea', color: 'var(--text-muted)' }, + want: { icon: Bookmark, labelKey: 'collections.status.want', color: 'var(--accent)' }, + visited: { icon: CheckCircle2, labelKey: 'collections.status.visited', color: '#10b981' }, +} + +/** Stable order for the filter chips + the one-tap cycle. */ +export const STATUS_ORDER: CollectionStatus[] = [...COLLECTION_STATUSES] + +/** idea → want → visited → idea */ +export function nextStatus(status: CollectionStatus): CollectionStatus { + const i = STATUS_ORDER.indexOf(status) + return STATUS_ORDER[(i + 1) % STATUS_ORDER.length] +} + +/** Sort places by explicit sort_order, falling back to created_at (newest first). */ +export function sortPlaces(places: CollectionPlace[]): CollectionPlace[] { + return [...places].sort((a, b) => { + const so = (a.sort_order ?? 0) - (b.sort_order ?? 0) + if (so !== 0) return so + return (b.created_at ?? '').localeCompare(a.created_at ?? '') + }) +} + +/** Apply the active status filter + free-text search (name/address/notes). */ +export function filterPlaces( + places: CollectionPlace[], + statusFilter: StatusFilter, + search: string, +): CollectionPlace[] { + const q = search.trim().toLowerCase() + return places.filter(p => { + if (statusFilter !== 'all' && p.status !== statusFilter) return false + if (!q) return true + return ( + p.name.toLowerCase().includes(q) || + (p.address ?? '').toLowerCase().includes(q) || + (p.notes ?? '').toLowerCase().includes(q) + ) + }) +} + +/** Count places per status for the filter chips. */ +export function statusCounts(places: CollectionPlace[]): Record { + const counts: Record = { all: places.length, idea: 0, want: 0, visited: 0 } + for (const p of places) counts[p.status] += 1 + return counts +} + +/** Only the places that can render on a map. */ +export function mappablePlaces(places: CollectionPlace[]): CollectionPlace[] { + return places.filter(p => typeof p.lat === 'number' && typeof p.lng === 'number') +} diff --git a/client/src/pages/collections/useCollections.ts b/client/src/pages/collections/useCollections.ts new file mode 100644 index 000000000..a6431fbfd --- /dev/null +++ b/client/src/pages/collections/useCollections.ts @@ -0,0 +1,286 @@ +import { useCallback, useEffect, useMemo, useState } from 'react' +import { useNavigate, useParams } from 'react-router-dom' +import { useTranslation } from '../../i18n' +import { useSettingsStore } from '../../store/settingsStore' +import { useToast } from '../../components/shared/Toast' +import { getApiErrorMessage } from '../../types' +import { addListener, removeListener } from '../../api/websocket' +import { useCollectionStore, ALL_SAVED } from '../../store/collectionStore' +import type { ActiveCollectionId } from '../../store/collectionStore' +import type { CollectionStatus } from '@trek/shared' +import type { Category, Place } from '../../types' +import { filterPlaces, sortPlaces, statusCounts } from './collectionsModel' + +/** + * Collections page logic — owns the page-local UI state (new/edit-list forms, + * mobile rail drawer), pulls the collection store, wires the WebSocket live sync + * (incl. collections:deleted clearing the active list) and keeps the route param + * (/collections/:id) in sync with the active list. CollectionsPage stays a pure + * wiring container around the rail + toolbar + view JSX. + */ +export function useCollections() { + const { t, language } = useTranslation() + const navigate = useNavigate() + const { id: routeId } = useParams<{ id: string }>() + const toast = useToast() + + const dm = useSettingsStore(s => s.settings.dark_mode) + const dark = dm === true || dm === 'dark' || (dm === 'auto' && typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches) + + const store = useCollectionStore() + const { + collections, activeId, places, members, incomingInvites, + view, statusFilter, search, selectedPlaceId, selectMode, selectedIds, + loading, placesLoading, + loadAll, setActive, + createCollection, updateCollection, deleteCollection, + setStatus, deletePlace, deleteMany, copyToTrip, clearSelection, + acceptInvite, declineInvite, + setView, setStatusFilter, setSearch, setSelectedPlaceId, setSelectMode, toggleSelect, + } = store + + // ── Page-local UI state ───────────────────────────────────────────── + const [showNewList, setShowNewList] = useState(false) + const [newListName, setNewListName] = useState('') + const [newListColor, setNewListColor] = useState('#6366f1') + const [editingListId, setEditingListId] = useState(null) + const [editingName, setEditingName] = useState('') + const [confirmDeleteList, setConfirmDeleteList] = useState(null) + const [mobileRailOpen, setMobileRailOpen] = useState(false) + const [creating, setCreating] = useState(false) + // The place ids the Copy-to-trip modal is open for (null = closed). Single + // place from the detail panel, or the select-mode set for a bulk copy. + const [copyIds, setCopyIds] = useState(null) + + // Initial load. + useEffect(() => { loadAll() }, []) + + // Keep the active list in sync with the URL (/collections/:id, or the + // "All saved" union at /collections). + useEffect(() => { + const next: ActiveCollectionId = routeId ? Number(routeId) : ALL_SAVED + if (Number.isNaN(next as number)) return + if (next !== activeId) setActive(next) + // Only re-run when the route or the loaded list set changes. + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [routeId, collections.length]) + + // Live sync via WebSocket. collections:deleted must bounce a member off a + // list that was removed under them. + const handleWsMessage = useCallback((msg: { type: string; collectionId?: number }) => { + if (!msg.type?.startsWith('collections:')) return + if (msg.type === 'collections:deleted') { + if (msg.collectionId != null && activeId === msg.collectionId) { + navigate('/collections') + } + loadAll() + return + } + if (msg.type === 'collections:invite') { + toast.info(t('collections.invites.received')) + } + // invite / accepted / declined / cancelled / left / updated → reload. + loadAll() + if (typeof activeId === 'number') setActive(activeId) + }, [activeId]) + + useEffect(() => { + addListener(handleWsMessage) + return () => removeListener(handleWsMessage) + }, [handleWsMessage]) + + // ── Derived ───────────────────────────────────────────────────────── + const activeCollection = useMemo( + () => (typeof activeId === 'number' ? collections.find(c => c.id === activeId) ?? null : null), + [collections, activeId], + ) + const isAllSaved = activeId === ALL_SAVED + const isOwner = activeCollection?.is_owner ?? false + + const ownedLists = useMemo(() => collections.filter(c => c.is_owner !== false), [collections]) + const sharedLists = useMemo(() => collections.filter(c => c.is_owner === false), [collections]) + + const visiblePlaces = useMemo( + () => sortPlaces(filterPlaces(places, statusFilter, search)), + [places, statusFilter, search], + ) + const counts = useMemo(() => statusCounts(places), [places]) + + // ── Handlers ──────────────────────────────────────────────────────── + const handleSelectList = useCallback((id: ActiveCollectionId) => { + setMobileRailOpen(false) + navigate(id === ALL_SAVED || id === null ? '/collections' : `/collections/${id}`) + }, [navigate]) + + const handleCreateList = useCallback(async () => { + const name = newListName.trim() + if (!name) return + setCreating(true) + try { + const created = await createCollection(name, newListColor) + setShowNewList(false) + setNewListName('') + setNewListColor('#6366f1') + if (created) navigate(`/collections/${created.id}`) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } finally { + setCreating(false) + } + }, [newListName, newListColor, createCollection, navigate, toast, t]) + + const handleStartRename = useCallback((id: number, currentName: string) => { + setEditingListId(id) + setEditingName(currentName) + }, []) + + const handleCommitRename = useCallback(async () => { + if (editingListId == null) return + const name = editingName.trim() + if (name) { + try { + await updateCollection(editingListId, { name }) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + } + setEditingListId(null) + setEditingName('') + }, [editingListId, editingName, updateCollection, toast, t]) + + const handleSetColor = useCallback(async (id: number, color: string) => { + try { + await updateCollection(id, { color }) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + }, [updateCollection, toast, t]) + + const handleDeleteList = useCallback(async () => { + if (confirmDeleteList == null) return + const id = confirmDeleteList + setConfirmDeleteList(null) + try { + await deleteCollection(id) + if (activeId === id) navigate('/collections') + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + }, [confirmDeleteList, deleteCollection, activeId, navigate, toast, t]) + + const handleStatusChange = useCallback(async (placeId: number, status: CollectionStatus) => { + try { + await setStatus(placeId, status) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + }, [setStatus, toast, t]) + + const handleDeletePlace = useCallback(async (placeId: number) => { + try { + await deletePlace(placeId) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + }, [deletePlace, toast, t]) + + const handleDeleteSelected = useCallback(async () => { + if (selectedIds.length === 0) return + try { + await deleteMany(selectedIds) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + }, [selectedIds, deleteMany, toast, t]) + + const handleAcceptInvite = useCallback(async (collectionId: number) => { + try { + await acceptInvite(collectionId) + navigate(`/collections/${collectionId}`) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + }, [acceptInvite, navigate, toast, t]) + + const handleDeclineInvite = useCallback(async (collectionId: number) => { + try { + await declineInvite(collectionId) + } catch (err) { + toast.error(getApiErrorMessage(err, t('common.error'))) + } + }, [declineInvite, toast, t]) + + // ── Detail panel (re-pointed PlaceInspector in collection mode) ────── + const selectedPlace = useMemo( + () => places.find(p => p.id === selectedPlaceId) ?? null, + [places, selectedPlaceId], + ) + + // PlaceInspector expects a trip Place; the collection place lacks trip_id, so + // shim it (collection mode guards every trip-only sub-panel anyway). + const detailPlace = useMemo( + () => (selectedPlace ? ({ ...selectedPlace, trip_id: selectedPlace.source_trip_id ?? 0 } as unknown as Place) : null), + [selectedPlace], + ) + + // A single-entry categories array so the inspector header can show the chip. + const detailCategories = useMemo( + () => (selectedPlace?.category ? ([selectedPlace.category] as unknown as Category[]) : []), + [selectedPlace], + ) + + const handleCloseDetail = useCallback(() => setSelectedPlaceId(null), [setSelectedPlaceId]) + + const handleDetailStatus = useCallback((status: CollectionStatus) => { + if (selectedPlaceId != null) handleStatusChange(selectedPlaceId, status) + }, [selectedPlaceId, handleStatusChange]) + + const handleDetailRemove = useCallback(async () => { + if (selectedPlaceId == null) return + await handleDeletePlace(selectedPlaceId) + setSelectedPlaceId(null) + }, [selectedPlaceId, handleDeletePlace, setSelectedPlaceId]) + + // ── Copy to trip ──────────────────────────────────────────────────── + const openCopyForSelectedPlace = useCallback(() => { + if (selectedPlaceId != null) setCopyIds([selectedPlaceId]) + }, [selectedPlaceId]) + + const openCopyForSelection = useCallback(() => { + if (selectedIds.length > 0) setCopyIds([...selectedIds]) + }, [selectedIds]) + + const closeCopy = useCallback(() => setCopyIds(null), []) + + const handleCopyToTrip = useCallback(async (tripId: number) => { + const ids = copyIds ?? [] + const res = await copyToTrip(tripId, ids) + if (selectMode) clearSelection() + return res + }, [copyIds, copyToTrip, selectMode, clearSelection]) + + return { + t, language, dark, navigate, + // store data + collections, ownedLists, sharedLists, activeCollection, isAllSaved, isOwner, + activeId, places, visiblePlaces, members, incomingInvites, counts, + view, statusFilter, search, selectedPlaceId, selectMode, selectedIds, + loading, placesLoading, + // store setters + setView, setStatusFilter, setSearch, setSelectedPlaceId, setSelectMode, toggleSelect, + // local UI state + showNewList, setShowNewList, newListName, setNewListName, newListColor, setNewListColor, creating, + editingListId, editingName, setEditingName, + confirmDeleteList, setConfirmDeleteList, + mobileRailOpen, setMobileRailOpen, + // detail panel + copy-to-trip + selectedPlace, detailPlace, detailCategories, handleCloseDetail, + handleDetailStatus, handleDetailRemove, + copyIds, openCopyForSelectedPlace, openCopyForSelection, closeCopy, handleCopyToTrip, + // handlers + handleSelectList, handleCreateList, + handleStartRename, handleCommitRename, handleSetColor, handleDeleteList, + handleStatusChange, handleDeletePlace, handleDeleteSelected, + handleAcceptInvite, handleDeclineInvite, + } +} diff --git a/client/src/store/collectionStore.ts b/client/src/store/collectionStore.ts new file mode 100644 index 000000000..ddb5dc307 --- /dev/null +++ b/client/src/store/collectionStore.ts @@ -0,0 +1,236 @@ +import { create } from 'zustand' +import { collectionsApi } from '../api/collections' +import type { + Collection, + CollectionPlace, + CollectionMember, + CollectionStatus, + CollectionListResponse, +} from '@trek/shared' + +/** A pending invitation the current user has received (derived server-side). */ +export type IncomingCollectionInvite = CollectionListResponse['incomingInvites'][number] + +/** Sentinel id for the client-side "All saved" union pseudo-list. */ +export const ALL_SAVED = 'all' as const +export type ActiveCollectionId = number | typeof ALL_SAVED | null + +export type CollectionView = 'grid' | 'list' | 'map' +export type StatusFilter = CollectionStatus | 'all' + +interface CollectionState { + collections: Collection[] + activeId: ActiveCollectionId + places: CollectionPlace[] + members: CollectionMember[] + incomingInvites: IncomingCollectionInvite[] + view: CollectionView + statusFilter: StatusFilter + search: string + selectedPlaceId: number | null + selectMode: boolean + selectedIds: number[] + loading: boolean + placesLoading: boolean + + loadAll: () => Promise + loadCollection: (id: number) => Promise + setActive: (id: ActiveCollectionId) => Promise + refreshActive: () => Promise + + createCollection: (name: string, color?: string, icon?: string) => Promise + updateCollection: (id: number, updates: { name?: string; color?: string; icon?: string; description?: string | null }) => Promise + deleteCollection: (id: number) => Promise + reorderCollections: (orderedIds: number[]) => Promise + + setStatus: (placeId: number, status: CollectionStatus) => Promise + deletePlace: (placeId: number) => Promise + deleteMany: (ids: number[]) => Promise + copyToTrip: (tripId: number, placeIds: number[], force?: boolean) => Promise<{ copied: number; skipped: { id: number; name: string }[] }> + + invite: (collectionId: number, userId: number) => Promise + acceptInvite: (collectionId: number) => Promise + declineInvite: (collectionId: number) => Promise + cancelInvite: (collectionId: number, userId: number) => Promise + leave: (collectionId: number) => Promise + + setView: (view: CollectionView) => void + setStatusFilter: (filter: StatusFilter) => void + setSearch: (search: string) => void + setSelectedPlaceId: (id: number | null) => void + setSelectMode: (on: boolean) => void + toggleSelect: (id: number) => void + clearSelection: () => void +} + +export const useCollectionStore = create((set, get) => ({ + collections: [], + activeId: null, + places: [], + members: [], + incomingInvites: [], + view: 'grid', + statusFilter: 'all', + search: '', + selectedPlaceId: null, + selectMode: false, + selectedIds: [], + loading: false, + placesLoading: false, + + loadAll: async () => { + set({ loading: true }) + try { + const data = await collectionsApi.list() + set({ collections: data.collections, incomingInvites: data.incomingInvites }) + } finally { + set({ loading: false }) + } + }, + + loadCollection: async (id: number) => { + set({ placesLoading: true }) + try { + const data = await collectionsApi.get(id) + set({ + activeId: id, + places: data.places, + members: data.collection.members ?? [], + }) + } finally { + set({ placesLoading: false }) + } + }, + + setActive: async (id: ActiveCollectionId) => { + set({ selectMode: false, selectedIds: [], selectedPlaceId: null }) + if (id === null) { + set({ activeId: null, places: [], members: [] }) + return + } + if (id === ALL_SAVED) { + set({ activeId: ALL_SAVED, members: [], placesLoading: true }) + try { + // Client-side union of every list the user owns or co-owns (no server change). + const lists = get().collections + const results = await Promise.all(lists.map(l => collectionsApi.get(l.id).catch(() => null))) + const seen = new Set() + const merged: CollectionPlace[] = [] + for (const res of results) { + if (!res) continue + for (const p of res.places) { + if (seen.has(p.id)) continue + seen.add(p.id) + merged.push(p) + } + } + set({ places: merged }) + } finally { + set({ placesLoading: false }) + } + return + } + await get().loadCollection(id) + }, + + refreshActive: async () => { + const { activeId } = get() + if (activeId === null) return + await get().setActive(activeId) + }, + + createCollection: async (name: string, color?: string, icon?: string) => { + const data = await collectionsApi.create({ name, color, icon }) + await get().loadAll() + return data.collection ?? null + }, + + updateCollection: async (id, updates) => { + await collectionsApi.update(id, updates) + await get().loadAll() + if (get().activeId === id) await get().loadCollection(id) + }, + + deleteCollection: async (id: number) => { + await collectionsApi.remove(id) + if (get().activeId === id) set({ activeId: null, places: [], members: [] }) + await get().loadAll() + }, + + reorderCollections: async (orderedIds: number[]) => { + // optimistic + const byId = new Map(get().collections.map(c => [c.id, c])) + const reordered = orderedIds.map(id => byId.get(id)).filter(Boolean) as Collection[] + set({ collections: reordered }) + try { + await collectionsApi.reorder(orderedIds) + } finally { + await get().loadAll() + } + }, + + setStatus: async (placeId: number, status: CollectionStatus) => { + // optimistic + set({ places: get().places.map(p => (p.id === placeId ? { ...p, status } : p)) }) + try { + await collectionsApi.setStatus(placeId, status) + } catch { + await get().refreshActive() + } + }, + + deletePlace: async (placeId: number) => { + set({ places: get().places.filter(p => p.id !== placeId) }) + await collectionsApi.deletePlace(placeId) + await get().loadAll() + }, + + deleteMany: async (ids: number[]) => { + const idSet = new Set(ids) + set({ places: get().places.filter(p => !idSet.has(p.id)), selectedIds: [], selectMode: false }) + await collectionsApi.deleteMany(ids) + await get().loadAll() + }, + + copyToTrip: async (tripId: number, placeIds: number[], force?: boolean) => { + const res = await collectionsApi.copyToTrip({ trip_id: tripId, place_ids: placeIds, force }) + return res + }, + + invite: async (collectionId: number, userId: number) => { + await collectionsApi.invite(collectionId, userId) + if (get().activeId === collectionId) await get().loadCollection(collectionId) + }, + + acceptInvite: async (collectionId: number) => { + await collectionsApi.acceptInvite(collectionId) + await get().loadAll() + }, + + declineInvite: async (collectionId: number) => { + await collectionsApi.declineInvite(collectionId) + await get().loadAll() + }, + + cancelInvite: async (collectionId: number, userId: number) => { + await collectionsApi.cancelInvite(collectionId, userId) + if (get().activeId === collectionId) await get().loadCollection(collectionId) + }, + + leave: async (collectionId: number) => { + await collectionsApi.leave(collectionId) + if (get().activeId === collectionId) set({ activeId: null, places: [], members: [] }) + await get().loadAll() + }, + + setView: (view: CollectionView) => set({ view }), + setStatusFilter: (filter: StatusFilter) => set({ statusFilter: filter }), + setSearch: (search: string) => set({ search }), + setSelectedPlaceId: (id: number | null) => set({ selectedPlaceId: id }), + setSelectMode: (on: boolean) => set({ selectMode: on, selectedIds: on ? get().selectedIds : [] }), + toggleSelect: (id: number) => { + const selected = get().selectedIds + set({ selectedIds: selected.includes(id) ? selected.filter(x => x !== id) : [...selected, id] }) + }, + clearSelection: () => set({ selectedIds: [], selectMode: false }), +})) diff --git a/client/src/store/saveToCollectionStore.ts b/client/src/store/saveToCollectionStore.ts new file mode 100644 index 000000000..d9f5e4234 --- /dev/null +++ b/client/src/store/saveToCollectionStore.ts @@ -0,0 +1,47 @@ +import { create } from 'zustand' + +/** + * The raw place payload handed to the "Save to Collection" picker. Carries the + * provenance ids (source_trip_id / source_place_id) when the place originates + * from a trip, plus the maps identity used both to save and to dedup. Every + * field is optional except the name so the same target shape works for a trip + * pool place, a day-assignment place or a manually entered one. + */ +export interface SaveToCollectionTarget { + name: string + source_trip_id?: number | null + source_place_id?: number | null + description?: string | null + lat?: number | null + lng?: number | null + address?: string | null + category_id?: number | null + price?: number | null + currency?: string | null + notes?: string | null + image_url?: string | null + google_place_id?: string | null + google_ftid?: string | null + osm_id?: string | null + website?: string | null + phone?: string | null +} + +interface SaveToCollectionState { + /** The place currently shown in the picker, or null when it is closed. */ + target: SaveToCollectionTarget | null + /** Bumped after every add/remove so other surfaces (the inspector bookmark + * indicator) can re-check membership without prop threading. */ + version: number + open: (target: SaveToCollectionTarget) => void + close: () => void + bumpVersion: () => void +} + +export const useSaveToCollectionStore = create((set, get) => ({ + target: null, + version: 0, + open: (target) => set({ target }), + close: () => set({ target: null }), + bumpVersion: () => set({ version: get().version + 1 }), +})) diff --git a/shared/src/i18n/ar/admin.ts b/shared/src/i18n/ar/admin.ts index 10d6eb661..09744f2f8 100644 --- a/shared/src/i18n/ar/admin.ts +++ b/shared/src/i18n/ar/admin.ts @@ -313,6 +313,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Journey', // en-fallback 'admin.addons.catalog.journey.description': 'Trip tracking & travel journal with check-ins, photos, and daily stories', // en-fallback + 'admin.addons.catalog.collections.name': 'المجموعات', + 'admin.addons.catalog.collections.description': + 'مكتبة أماكن شخصية — احفظ الأماكن عبر الرحلات في قوائم مسماة، وانسخها إلى أي رحلة، وشاركها مع الآخرين', 'admin.passkey.title': 'تسجيل الدخول بمفتاح المرور', 'admin.passkey.cardHint': 'اسمح للمستخدمين بتسجيل الدخول باستخدام مفاتيح المرور (WebAuthn). معطّل افتراضيًا.', 'admin.passkey.login': 'تفعيل تسجيل الدخول بمفتاح المرور', diff --git a/shared/src/i18n/ar/collection.ts b/shared/src/i18n/ar/collection.ts new file mode 100644 index 000000000..fca21b57b --- /dev/null +++ b/shared/src/i18n/ar/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'المجموعات', + 'collections.subtitle': 'أماكنك المحفوظة، منظمة في قوائم', + + 'collections.newList': 'قائمة جديدة', + 'collections.create': 'إنشاء', + 'collections.editList': 'إعادة تسمية', + 'collections.listMenu': 'خيارات القائمة', + 'collections.deleteList': 'حذف القائمة', + 'collections.deleteListConfirm': 'سيؤدي هذا إلى حذف القائمة وجميع الأماكن المحفوظة فيها نهائيًا. لا يمكن التراجع عن ذلك.', + 'collections.listName': 'اسم القائمة', + 'collections.listNamePlaceholder': 'مثال: طوكيو 2025', + 'collections.listColor': 'اللون', + 'collections.allSaved': 'كل المحفوظات', + 'collections.shared': 'مشتركة', + + 'collections.empty.title': 'لا توجد أماكن بعد', + 'collections.empty.text': 'احفظ أماكن من أي رحلة لبناء هذه القائمة.', + 'collections.empty.noMatchTitle': 'لا توجد نتائج', + 'collections.empty.noMatchText': 'لا توجد أماكن محفوظة تطابق التصفية أو البحث.', + 'collections.empty.firstTitle': 'ابدأ مجموعتك الأولى', + 'collections.empty.firstText': 'أنشئ قائمة لحفظ الأماكن التي تريد تذكّرها عبر الرحلات.', + + 'collections.view.grid': 'شبكة', + 'collections.view.list': 'قائمة', + 'collections.view.map': 'خريطة', + + 'collections.status.idea': 'فكرة', + 'collections.status.want': 'أريد الذهاب', + 'collections.status.visited': 'تمت الزيارة', + 'collections.status.filterAll': 'الكل', + 'collections.status.cycleHint': 'انقر للتغيير', + + 'collections.copyToTrip': 'نسخ إلى رحلة', + 'collections.copyToTripTitle': 'نسخ إلى رحلة', + 'collections.copyN': 'نسخ {count} إلى رحلة', + 'collections.copyToTripSearch': 'البحث عن الرحلات', + 'collections.copyToTripConfirm': 'نسخ', + 'collections.noTrips': 'لا توجد رحلات بعد', + 'collections.alreadyInTrip': 'موجود بالفعل في هذه الرحلة', + 'collections.copied': 'تم النسخ إلى الرحلة', + 'collections.copiedCount': 'تم نسخ {count} أماكن', + 'collections.skippedDuplicates': 'تم تخطي {count} عناصر مكررة', + 'collections.copyNothing': 'لا شيء لنسخه', + 'collections.removeFromList': 'إزالة من القائمة', + 'collections.removeFromListConfirm': 'إزالة هذا المكان من القائمة؟', + 'collections.removeFromCollection': 'إزالة من المجموعة', + + 'collections.saved': 'تم الحفظ في {name}', + 'collections.savedUndo': 'تراجع', + 'collections.viewInCollection': 'عرض', + 'collections.duplicateWarning': 'هذا المكان موجود بالفعل في القائمة', + + 'collections.search': 'البحث عن أماكن', + 'collections.selectMode': 'تحديد', + 'collections.selectedCount': 'تم تحديد {count}', + + 'collections.pickList': 'حفظ في قائمة', + 'collections.pickListPlaceholder': 'اختر قائمة', + 'collections.addedToList': 'تمت الإضافة إلى {name}', + 'collections.removedFromList': 'تمت الإزالة من {name}', + 'collections.inLists': 'في قوائمك', + 'collections.otherLists': 'إضافة إلى قائمة', + 'collections.noListsYet': 'أنشئ قائمة أولًا لحفظ الأماكن.', + 'collections.removedFromAll': 'تمت الإزالة من المجموعة', + 'collections.picker.title': 'الأماكن المحفوظة', + 'collections.picker.search': 'ابحث في أماكنك المحفوظة', + 'collections.picker.empty': 'لا توجد أماكن محفوظة لإضافتها', + 'collections.picker.hint': 'اختر مكانًا من مجموعاتك', + 'collections.picker.use': 'استخدام', + + 'collections.share.title': 'مشاركة القائمة', + 'collections.share.members': 'الأعضاء', + 'collections.share.owner': 'المالك', + 'collections.share.pending': 'دعوة معلّقة', + 'collections.share.invite': 'دعوة شخص', + 'collections.share.inviteUser': 'اختر مستخدمًا', + 'collections.share.sendInvite': 'إرسال الدعوة', + 'collections.share.inviteHint': 'يمكن للأشخاص المدعوين عرض هذه القائمة وتحريرها.', + 'collections.share.cancel': 'إلغاء', + 'collections.share.leave': 'مغادرة القائمة', + 'collections.share.remove': 'إزالة', + + 'collections.invites.title': 'الدعوات', + 'collections.invites.from': 'من', + 'collections.invites.accept': 'قبول', + 'collections.invites.decline': 'رفض', + 'collections.invites.received': 'لديك دعوة قائمة جديدة', + 'collections.invite.sent': 'تم إرسال الدعوة', + 'collections.invite.error': 'تعذّر إرسال الدعوة', + 'collections.invite.accepted': 'تم قبول الدعوة', + 'collections.invite.declined': 'تم رفض الدعوة', + + 'collections.widget.title': 'المجموعات', + 'collections.widget.empty': 'لا توجد أماكن محفوظة بعد', + 'collections.widget.savedCount': '{count} محفوظة', +}; + +export default collection; diff --git a/shared/src/i18n/ar/index.ts b/shared/src/i18n/ar/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/ar/index.ts +++ b/shared/src/i18n/ar/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/ar/inspector.ts b/shared/src/i18n/ar/inspector.ts index fcecf8b09..ae98810c9 100644 --- a/shared/src/i18n/ar/inspector.ts +++ b/shared/src/i18n/ar/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'حجز قيد الانتظار', 'inspector.google': 'فتح في Google Maps', 'inspector.website': 'فتح الموقع الإلكتروني', + 'inspector.saveToCollection': 'حفظ في مجموعة', + 'inspector.savedToCollection': 'محفوظ', 'inspector.addRes': 'حجز', 'inspector.editRes': 'تعديل الحجز', 'inspector.participants': 'المشاركون', diff --git a/shared/src/i18n/br/admin.ts b/shared/src/i18n/br/admin.ts index dec1adcd2..88fc3f083 100644 --- a/shared/src/i18n/br/admin.ts +++ b/shared/src/i18n/br/admin.ts @@ -319,6 +319,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Jornada', 'admin.addons.catalog.journey.description': 'Rastreamento de viagens e diário de viajante com check-ins, fotos e histórias diárias', + 'admin.addons.catalog.collections.name': 'Coleções', + 'admin.addons.catalog.collections.description': + 'Biblioteca pessoal de lugares — salve lugares entre viagens em listas nomeadas, copie para qualquer viagem, compartilhe com outras pessoas', 'admin.passkey.title': 'Login com passkey', 'admin.passkey.cardHint': 'Permite que os usuários entrem com passkeys (WebAuthn). Desativado por padrão.', 'admin.passkey.login': 'Ativar login com passkey', diff --git a/shared/src/i18n/br/collection.ts b/shared/src/i18n/br/collection.ts new file mode 100644 index 000000000..5050a4887 --- /dev/null +++ b/shared/src/i18n/br/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Coleções', + 'collections.subtitle': 'Seus lugares salvos, organizados em listas', + + 'collections.newList': 'Nova lista', + 'collections.create': 'Criar', + 'collections.editList': 'Renomear', + 'collections.listMenu': 'Opções da lista', + 'collections.deleteList': 'Excluir lista', + 'collections.deleteListConfirm': 'Isso exclui permanentemente a lista e todos os lugares salvos nela. Não é possível desfazer.', + 'collections.listName': 'Nome da lista', + 'collections.listNamePlaceholder': 'ex.: Tóquio 2025', + 'collections.listColor': 'Cor', + 'collections.allSaved': 'Todos os salvos', + 'collections.shared': 'Compartilhada', + + 'collections.empty.title': 'Nenhum lugar ainda', + 'collections.empty.text': 'Salve lugares de qualquer viagem para montar esta lista.', + 'collections.empty.noMatchTitle': 'Nenhum resultado', + 'collections.empty.noMatchText': 'Nenhum lugar salvo corresponde ao seu filtro ou busca.', + 'collections.empty.firstTitle': 'Comece sua primeira coleção', + 'collections.empty.firstText': 'Crie uma lista para salvar lugares que você quer lembrar entre as viagens.', + + 'collections.view.grid': 'Grade', + 'collections.view.list': 'Lista', + 'collections.view.map': 'Mapa', + + 'collections.status.idea': 'Ideia', + 'collections.status.want': 'Quero ir', + 'collections.status.visited': 'Visitado', + 'collections.status.filterAll': 'Todos', + 'collections.status.cycleHint': 'toque para alterar', + + 'collections.copyToTrip': 'Copiar para viagem', + 'collections.copyToTripTitle': 'Copiar para viagem', + 'collections.copyN': 'Copiar {count} para viagem', + 'collections.copyToTripSearch': 'Buscar viagens', + 'collections.copyToTripConfirm': 'Copiar', + 'collections.noTrips': 'Nenhuma viagem ainda', + 'collections.alreadyInTrip': 'Já está nesta viagem', + 'collections.copied': 'Copiado para a viagem', + 'collections.copiedCount': '{count} lugares copiados', + 'collections.skippedDuplicates': '{count} duplicados ignorados', + 'collections.copyNothing': 'Nada para copiar', + 'collections.removeFromList': 'Remover da lista', + 'collections.removeFromListConfirm': 'Remover este lugar da lista?', + 'collections.removeFromCollection': 'Remover da Coleção', + + 'collections.saved': 'Salvo em {name}', + 'collections.savedUndo': 'Desfazer', + 'collections.viewInCollection': 'Ver', + 'collections.duplicateWarning': 'Este lugar já está na lista', + + 'collections.search': 'Buscar lugares', + 'collections.selectMode': 'Selecionar', + 'collections.selectedCount': '{count} selecionados', + + 'collections.pickList': 'Salvar na lista', + 'collections.pickListPlaceholder': 'Escolha uma lista', + 'collections.addedToList': 'Adicionado a {name}', + 'collections.removedFromList': 'Removido de {name}', + 'collections.inLists': 'Nas suas listas', + 'collections.otherLists': 'Adicionar a uma lista', + 'collections.noListsYet': 'Crie uma lista primeiro para salvar lugares.', + 'collections.removedFromAll': 'Removido da coleção', + 'collections.picker.title': 'Lugares salvos', + 'collections.picker.search': 'Buscar nos seus lugares salvos', + 'collections.picker.empty': 'Nenhum lugar salvo para adicionar', + 'collections.picker.hint': 'Escolha um lugar das suas coleções', + 'collections.picker.use': 'Usar', + + 'collections.share.title': 'Compartilhar lista', + 'collections.share.members': 'Membros', + 'collections.share.owner': 'Proprietário', + 'collections.share.pending': 'convite pendente', + 'collections.share.invite': 'Convidar alguém', + 'collections.share.inviteUser': 'Selecionar usuário', + 'collections.share.sendInvite': 'Enviar convite', + 'collections.share.inviteHint': 'As pessoas convidadas podem ver e editar esta lista.', + 'collections.share.cancel': 'Cancelar', + 'collections.share.leave': 'Sair da lista', + 'collections.share.remove': 'Remover', + + 'collections.invites.title': 'Convites', + 'collections.invites.from': 'de', + 'collections.invites.accept': 'Aceitar', + 'collections.invites.decline': 'Recusar', + 'collections.invites.received': 'Você tem um novo convite de lista', + 'collections.invite.sent': 'Convite enviado', + 'collections.invite.error': 'Não foi possível enviar o convite', + 'collections.invite.accepted': 'Convite aceito', + 'collections.invite.declined': 'Convite recusado', + + 'collections.widget.title': 'Coleções', + 'collections.widget.empty': 'Nenhum lugar salvo ainda', + 'collections.widget.savedCount': '{count} salvos', +}; + +export default collection; diff --git a/shared/src/i18n/br/index.ts b/shared/src/i18n/br/index.ts index 531b85712..34cccd9b9 100644 --- a/shared/src/i18n/br/index.ts +++ b/shared/src/i18n/br/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/br/inspector.ts b/shared/src/i18n/br/inspector.ts index 9f833bddd..60236426a 100644 --- a/shared/src/i18n/br/inspector.ts +++ b/shared/src/i18n/br/inspector.ts @@ -13,6 +13,8 @@ const inspector: TranslationStrings = { 'inspector.confirmedRes': 'Reserva confirmada', 'inspector.pendingRes': 'Reserva pendente', 'inspector.google': 'Abrir no Google Maps', + 'inspector.saveToCollection': 'Salvar na Coleção', + 'inspector.savedToCollection': 'Salvo', 'inspector.website': 'Abrir site', 'inspector.addRes': 'Reserva', 'inspector.editRes': 'Editar reserva', diff --git a/shared/src/i18n/cs/admin.ts b/shared/src/i18n/cs/admin.ts index 2dfef8e27..2da2751e5 100644 --- a/shared/src/i18n/cs/admin.ts +++ b/shared/src/i18n/cs/admin.ts @@ -316,6 +316,9 @@ const admin: TranslationStrings = { 'admin.tabs.notifications': 'Oznámení', 'admin.addons.catalog.journey.name': 'Cestovní deník', 'admin.addons.catalog.journey.description': 'Sledování cest a cestovní deník s odbaveními, fotkami a denními příběhy', + 'admin.addons.catalog.collections.name': 'Sbírky', + 'admin.addons.catalog.collections.description': + 'Osobní knihovna míst — ukládejte místa napříč výlety do pojmenovaných seznamů, kopírujte do libovolného výletu, sdílejte s ostatními', 'admin.passkey.title': 'Přihlášení přístupovým klíčem', 'admin.passkey.cardHint': 'Umožněte uživatelům přihlašovat se pomocí přístupových klíčů (WebAuthn). Ve výchozím nastavení vypnuto.', diff --git a/shared/src/i18n/cs/collection.ts b/shared/src/i18n/cs/collection.ts new file mode 100644 index 000000000..d73531277 --- /dev/null +++ b/shared/src/i18n/cs/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Sbírky', + 'collections.subtitle': 'Vaše uložená místa uspořádaná do seznamů', + + 'collections.newList': 'Nový seznam', + 'collections.create': 'Vytvořit', + 'collections.editList': 'Přejmenovat', + 'collections.listMenu': 'Možnosti seznamu', + 'collections.deleteList': 'Smazat seznam', + 'collections.deleteListConfirm': 'Tímto se trvale smaže seznam i všechna uložená místa. Tuto akci nelze vrátit zpět.', + 'collections.listName': 'Název seznamu', + 'collections.listNamePlaceholder': 'např. Tokio 2025', + 'collections.listColor': 'Barva', + 'collections.allSaved': 'Vše uložené', + 'collections.shared': 'Sdílené', + + 'collections.empty.title': 'Zatím žádná místa', + 'collections.empty.text': 'Ukládejte místa z libovolného výletu a naplňte tak tento seznam.', + 'collections.empty.noMatchTitle': 'Žádné výsledky', + 'collections.empty.noMatchText': 'Žádné uložené místo neodpovídá vašemu filtru nebo hledání.', + 'collections.empty.firstTitle': 'Začněte svou první sbírku', + 'collections.empty.firstText': 'Vytvořte seznam a ukládejte místa, která si chcete pamatovat napříč výlety.', + + 'collections.view.grid': 'Mřížka', + 'collections.view.list': 'Seznam', + 'collections.view.map': 'Mapa', + + 'collections.status.idea': 'Nápad', + 'collections.status.want': 'Chci navštívit', + 'collections.status.visited': 'Navštíveno', + 'collections.status.filterAll': 'Vše', + 'collections.status.cycleHint': 'klepnutím změníte', + + 'collections.copyToTrip': 'Kopírovat do výletu', + 'collections.copyToTripTitle': 'Kopírovat do výletu', + 'collections.copyN': 'Kopírovat {count} do výletu', + 'collections.copyToTripSearch': 'Hledat výlety', + 'collections.copyToTripConfirm': 'Kopírovat', + 'collections.noTrips': 'Zatím žádné výlety', + 'collections.alreadyInTrip': 'Již v tomto výletu', + 'collections.copied': 'Zkopírováno do výletu', + 'collections.copiedCount': 'Zkopírováno míst: {count}', + 'collections.skippedDuplicates': 'Přeskočeno duplicit: {count}', + 'collections.copyNothing': 'Není co kopírovat', + 'collections.removeFromList': 'Odebrat ze seznamu', + 'collections.removeFromListConfirm': 'Odebrat toto místo ze seznamu?', + 'collections.removeFromCollection': 'Odebrat ze sbírky', + + 'collections.saved': 'Uloženo do {name}', + 'collections.savedUndo': 'Zpět', + 'collections.viewInCollection': 'Zobrazit', + 'collections.duplicateWarning': 'Toto místo už v seznamu je', + + 'collections.search': 'Hledat místa', + 'collections.selectMode': 'Vybrat', + 'collections.selectedCount': 'Vybráno: {count}', + + 'collections.pickList': 'Uložit do seznamu', + 'collections.pickListPlaceholder': 'Vyberte seznam', + 'collections.addedToList': 'Přidáno do {name}', + 'collections.removedFromList': 'Odebráno z {name}', + 'collections.inLists': 'Ve vašich seznamech', + 'collections.otherLists': 'Přidat do seznamu', + 'collections.noListsYet': 'Nejprve vytvořte seznam, abyste mohli ukládat místa.', + 'collections.removedFromAll': 'Odebráno ze sbírky', + 'collections.picker.title': 'Uložená místa', + 'collections.picker.search': 'Prohledat uložená místa', + 'collections.picker.empty': 'Žádná uložená místa k přidání', + 'collections.picker.hint': 'Vyberte místo ze svých sbírek', + 'collections.picker.use': 'Použít', + + 'collections.share.title': 'Sdílet seznam', + 'collections.share.members': 'Členové', + 'collections.share.owner': 'Vlastník', + 'collections.share.pending': 'čekající pozvánka', + 'collections.share.invite': 'Pozvat někoho', + 'collections.share.inviteUser': 'Vyberte uživatele', + 'collections.share.sendInvite': 'Odeslat pozvánku', + 'collections.share.inviteHint': 'Pozvaní lidé mohou tento seznam zobrazit a upravovat.', + 'collections.share.cancel': 'Zrušit', + 'collections.share.leave': 'Opustit seznam', + 'collections.share.remove': 'Odebrat', + + 'collections.invites.title': 'Pozvánky', + 'collections.invites.from': 'od', + 'collections.invites.accept': 'Přijmout', + 'collections.invites.decline': 'Odmítnout', + 'collections.invites.received': 'Máte novou pozvánku do seznamu', + 'collections.invite.sent': 'Pozvánka odeslána', + 'collections.invite.error': 'Pozvánku se nepodařilo odeslat', + 'collections.invite.accepted': 'Pozvánka přijata', + 'collections.invite.declined': 'Pozvánka odmítnuta', + + 'collections.widget.title': 'Sbírky', + 'collections.widget.empty': 'Zatím žádná uložená místa', + 'collections.widget.savedCount': 'Uloženo: {count}', +}; + +export default collection; diff --git a/shared/src/i18n/cs/index.ts b/shared/src/i18n/cs/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/cs/index.ts +++ b/shared/src/i18n/cs/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/cs/inspector.ts b/shared/src/i18n/cs/inspector.ts index 0af3899b5..6caf556cc 100644 --- a/shared/src/i18n/cs/inspector.ts +++ b/shared/src/i18n/cs/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Čekající rezervace', 'inspector.google': 'Otevřít v Google Mapách', 'inspector.website': 'Otevřít webové stránky', + 'inspector.saveToCollection': 'Uložit do sbírky', + 'inspector.savedToCollection': 'Uloženo', 'inspector.addRes': 'Rezervace', 'inspector.editRes': 'Upravit rezervaci', 'inspector.participants': 'Účastníci', diff --git a/shared/src/i18n/de/admin.ts b/shared/src/i18n/de/admin.ts index 53b79a3d8..deaa167c5 100644 --- a/shared/src/i18n/de/admin.ts +++ b/shared/src/i18n/de/admin.ts @@ -322,6 +322,8 @@ const admin: TranslationStrings = { 'admin.tabs.notifications': 'Benachrichtigungen', 'admin.addons.catalog.journey.name': 'Journey', 'admin.addons.catalog.journey.description': 'Reise-Tracking & Tagebuch mit Check-ins, Fotos und Tagesberichten', + 'admin.addons.catalog.collections.name': 'Sammlungen', + 'admin.addons.catalog.collections.description': 'Persönliche Orte-Bibliothek — speichere Orte aus Reisen in benannten Listen, kopiere sie in jede Reise, teile sie mit anderen', 'admin.passkey.title': 'Passkey-Anmeldung', 'admin.passkey.cardHint': 'Erlaube Benutzern die Anmeldung mit Passkeys (WebAuthn). Standardmäßig deaktiviert.', 'admin.passkey.login': 'Passkey-Anmeldung aktivieren', diff --git a/shared/src/i18n/de/collection.ts b/shared/src/i18n/de/collection.ts new file mode 100644 index 000000000..8a174dedd --- /dev/null +++ b/shared/src/i18n/de/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Sammlungen', + 'collections.subtitle': 'Deine gespeicherten Orte, in Listen organisiert', + + 'collections.newList': 'Neue Liste', + 'collections.create': 'Erstellen', + 'collections.editList': 'Umbenennen', + 'collections.listMenu': 'Listenoptionen', + 'collections.deleteList': 'Liste löschen', + 'collections.deleteListConfirm': 'Dies löscht die Liste und alle gespeicherten Orte endgültig. Das kann nicht rückgängig gemacht werden.', + 'collections.listName': 'Listenname', + 'collections.listNamePlaceholder': 'z. B. Tokio 2025', + 'collections.listColor': 'Farbe', + 'collections.allSaved': 'Alle gespeicherten', + 'collections.shared': 'Geteilt', + + 'collections.empty.title': 'Noch keine Orte', + 'collections.empty.text': 'Speichere Orte aus jeder Reise, um diese Liste aufzubauen.', + 'collections.empty.noMatchTitle': 'Keine Treffer', + 'collections.empty.noMatchText': 'Keine gespeicherten Orte passen zu deinem Filter oder deiner Suche.', + 'collections.empty.firstTitle': 'Starte deine erste Sammlung', + 'collections.empty.firstText': 'Erstelle eine Liste, um Orte zu speichern, die du dir über Reisen hinweg merken willst.', + + 'collections.view.grid': 'Raster', + 'collections.view.list': 'Liste', + 'collections.view.map': 'Karte', + + 'collections.status.idea': 'Idee', + 'collections.status.want': 'Will hin', + 'collections.status.visited': 'Besucht', + 'collections.status.filterAll': 'Alle', + 'collections.status.cycleHint': 'tippen zum Ändern', + + 'collections.copyToTrip': 'In Reise kopieren', + 'collections.copyToTripTitle': 'In Reise kopieren', + 'collections.copyN': '{count} in Reise kopieren', + 'collections.copyToTripSearch': 'Reisen suchen', + 'collections.copyToTripConfirm': 'Kopieren', + 'collections.noTrips': 'Noch keine Reisen', + 'collections.alreadyInTrip': 'Bereits in dieser Reise', + 'collections.copied': 'In Reise kopiert', + 'collections.copiedCount': '{count} Orte kopiert', + 'collections.skippedDuplicates': '{count} Duplikate übersprungen', + 'collections.copyNothing': 'Nichts zu kopieren', + 'collections.removeFromList': 'Aus Liste entfernen', + 'collections.removeFromListConfirm': 'Diesen Ort aus der Liste entfernen?', + 'collections.removeFromCollection': 'Aus Sammlung entfernen', + + 'collections.saved': 'In {name} gespeichert', + 'collections.savedUndo': 'Rückgängig', + 'collections.viewInCollection': 'Ansehen', + 'collections.duplicateWarning': 'Dieser Ort ist bereits in der Liste', + + 'collections.search': 'Orte suchen', + 'collections.selectMode': 'Auswählen', + 'collections.selectedCount': '{count} ausgewählt', + + 'collections.pickList': 'In Liste speichern', + 'collections.pickListPlaceholder': 'Liste wählen', + 'collections.addedToList': 'Zu {name} hinzugefügt', + 'collections.removedFromList': 'Aus {name} entfernt', + 'collections.inLists': 'In deinen Listen', + 'collections.otherLists': 'Zu einer Liste hinzufügen', + 'collections.noListsYet': 'Erstelle zuerst eine Liste, um Orte zu speichern.', + 'collections.removedFromAll': 'Aus Sammlung entfernt', + 'collections.picker.title': 'Gespeicherte Orte', + 'collections.picker.search': 'Gespeicherte Orte durchsuchen', + 'collections.picker.empty': 'Keine gespeicherten Orte zum Hinzufügen', + 'collections.picker.hint': 'Wähle einen Ort aus deinen Sammlungen', + 'collections.picker.use': 'Übernehmen', + + 'collections.share.title': 'Liste teilen', + 'collections.share.members': 'Mitglieder', + 'collections.share.owner': 'Besitzer', + 'collections.share.pending': 'ausstehende Einladung', + 'collections.share.invite': 'Jemanden einladen', + 'collections.share.inviteUser': 'Benutzer wählen', + 'collections.share.sendInvite': 'Einladung senden', + 'collections.share.inviteHint': 'Eingeladene Personen können diese Liste ansehen und bearbeiten.', + 'collections.share.cancel': 'Abbrechen', + 'collections.share.leave': 'Liste verlassen', + 'collections.share.remove': 'Entfernen', + + 'collections.invites.title': 'Einladungen', + 'collections.invites.from': 'von', + 'collections.invites.accept': 'Annehmen', + 'collections.invites.decline': 'Ablehnen', + 'collections.invites.received': 'Du hast eine neue Listeneinladung', + 'collections.invite.sent': 'Einladung gesendet', + 'collections.invite.error': 'Einladung konnte nicht gesendet werden', + 'collections.invite.accepted': 'Einladung angenommen', + 'collections.invite.declined': 'Einladung abgelehnt', + + 'collections.widget.title': 'Sammlungen', + 'collections.widget.empty': 'Noch keine gespeicherten Orte', + 'collections.widget.savedCount': '{count} gespeichert', +}; + +export default collection; diff --git a/shared/src/i18n/de/index.ts b/shared/src/i18n/de/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/de/index.ts +++ b/shared/src/i18n/de/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/de/inspector.ts b/shared/src/i18n/de/inspector.ts index 27955f03a..38ad4e76e 100644 --- a/shared/src/i18n/de/inspector.ts +++ b/shared/src/i18n/de/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Ausstehende Reservierung', 'inspector.google': 'In Google Maps öffnen', 'inspector.website': 'Webseite öffnen', + 'inspector.saveToCollection': 'In Sammlung speichern', + 'inspector.savedToCollection': 'Gespeichert', 'inspector.addRes': 'Reservierung', 'inspector.editRes': 'Reservierung bearbeiten', 'inspector.participants': 'Teilnehmer', diff --git a/shared/src/i18n/en/admin.ts b/shared/src/i18n/en/admin.ts index 3d1340be5..d95f8ca3b 100644 --- a/shared/src/i18n/en/admin.ts +++ b/shared/src/i18n/en/admin.ts @@ -331,6 +331,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Journey', 'admin.addons.catalog.journey.description': 'Trip tracking & travel journal with check-ins, photos, and daily stories', + 'admin.addons.catalog.collections.name': 'Collections', + 'admin.addons.catalog.collections.description': + 'Personal place library — save places across trips into named lists, copy into any trip, share with others', 'admin.passkey.title': 'Passkey login', 'admin.passkey.cardHint': 'Let users sign in with passkeys (WebAuthn). Off by default.', 'admin.passkey.login': 'Enable passkey login', diff --git a/shared/src/i18n/en/collection.ts b/shared/src/i18n/en/collection.ts new file mode 100644 index 000000000..ab46d192e --- /dev/null +++ b/shared/src/i18n/en/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Collections', + 'collections.subtitle': 'Your saved places, organised into lists', + + 'collections.newList': 'New list', + 'collections.create': 'Create', + 'collections.editList': 'Rename', + 'collections.listMenu': 'List options', + 'collections.deleteList': 'Delete list', + 'collections.deleteListConfirm': 'This permanently deletes the list and all of its saved places. This cannot be undone.', + 'collections.listName': 'List name', + 'collections.listNamePlaceholder': 'e.g. Tokyo 2025', + 'collections.listColor': 'Colour', + 'collections.allSaved': 'All saved', + 'collections.shared': 'Shared', + + 'collections.empty.title': 'No places yet', + 'collections.empty.text': 'Save places from any trip to build this list.', + 'collections.empty.noMatchTitle': 'No matches', + 'collections.empty.noMatchText': 'No saved places match your filter or search.', + 'collections.empty.firstTitle': 'Start your first collection', + 'collections.empty.firstText': 'Create a list to save places you want to remember across trips.', + + 'collections.view.grid': 'Grid', + 'collections.view.list': 'List', + 'collections.view.map': 'Map', + + 'collections.status.idea': 'Idea', + 'collections.status.want': 'Want to go', + 'collections.status.visited': 'Visited', + 'collections.status.filterAll': 'All', + 'collections.status.cycleHint': 'tap to change', + + 'collections.copyToTrip': 'Copy to trip', + 'collections.copyToTripTitle': 'Copy to trip', + 'collections.copyN': 'Copy {count} to trip', + 'collections.copyToTripSearch': 'Search trips', + 'collections.copyToTripConfirm': 'Copy', + 'collections.noTrips': 'No trips yet', + 'collections.alreadyInTrip': 'Already in this trip', + 'collections.copied': 'Copied to trip', + 'collections.copiedCount': 'Copied {count} places', + 'collections.skippedDuplicates': 'Skipped {count} duplicates', + 'collections.copyNothing': 'Nothing to copy', + 'collections.removeFromList': 'Remove from list', + 'collections.removeFromListConfirm': 'Remove this place from the list?', + 'collections.removeFromCollection': 'Remove from Collection', + + 'collections.saved': 'Saved to {name}', + 'collections.savedUndo': 'Undo', + 'collections.viewInCollection': 'View', + 'collections.duplicateWarning': 'This place is already in the list', + + 'collections.search': 'Search places', + 'collections.selectMode': 'Select', + 'collections.selectedCount': '{count} selected', + + 'collections.pickList': 'Save to list', + 'collections.pickListPlaceholder': 'Choose a list', + 'collections.addedToList': 'Added to {name}', + 'collections.removedFromList': 'Removed from {name}', + 'collections.inLists': 'In your lists', + 'collections.otherLists': 'Add to a list', + 'collections.noListsYet': 'Create a list first to save places.', + 'collections.removedFromAll': 'Removed from collection', + 'collections.picker.title': 'Saved places', + 'collections.picker.search': 'Search your saved places', + 'collections.picker.empty': 'No saved places to add', + 'collections.picker.hint': 'Pick a place from your collections', + 'collections.picker.use': 'Use', + + 'collections.share.title': 'Share list', + 'collections.share.members': 'Members', + 'collections.share.owner': 'Owner', + 'collections.share.pending': 'pending invite', + 'collections.share.invite': 'Invite someone', + 'collections.share.inviteUser': 'Select user', + 'collections.share.sendInvite': 'Send invite', + 'collections.share.inviteHint': 'Invited people can view and edit this list.', + 'collections.share.cancel': 'Cancel', + 'collections.share.leave': 'Leave list', + 'collections.share.remove': 'Remove', + + 'collections.invites.title': 'Invites', + 'collections.invites.from': 'from', + 'collections.invites.accept': 'Accept', + 'collections.invites.decline': 'Decline', + 'collections.invites.received': 'You have a new list invite', + 'collections.invite.sent': 'Invite sent', + 'collections.invite.error': 'Could not send invite', + 'collections.invite.accepted': 'Invite accepted', + 'collections.invite.declined': 'Invite declined', + + 'collections.widget.title': 'Collections', + 'collections.widget.empty': 'No saved places yet', + 'collections.widget.savedCount': '{count} saved', +}; + +export default collection; diff --git a/shared/src/i18n/en/index.ts b/shared/src/i18n/en/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/en/index.ts +++ b/shared/src/i18n/en/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/en/inspector.ts b/shared/src/i18n/en/inspector.ts index d42c8804e..532c2d166 100644 --- a/shared/src/i18n/en/inspector.ts +++ b/shared/src/i18n/en/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Pending Reservation', 'inspector.google': 'Open in Google Maps', 'inspector.website': 'Open Website', + 'inspector.saveToCollection': 'Save to Collection', + 'inspector.savedToCollection': 'Saved', 'inspector.addRes': 'Reservation', 'inspector.editRes': 'Edit Reservation', 'inspector.participants': 'Participants', diff --git a/shared/src/i18n/es/admin.ts b/shared/src/i18n/es/admin.ts index 10bde40fc..630535ecf 100644 --- a/shared/src/i18n/es/admin.ts +++ b/shared/src/i18n/es/admin.ts @@ -327,6 +327,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Travesía', 'admin.addons.catalog.journey.description': 'Seguimiento de viajes y diario de viajero con registros de ubicación, fotos e historias diarias', + 'admin.addons.catalog.collections.name': 'Colecciones', + 'admin.addons.catalog.collections.description': + 'Biblioteca personal de lugares: guarda lugares de tus viajes en listas con nombre, cópialos a cualquier viaje y compártelos con otros', 'admin.passkey.title': 'Inicio de sesión con passkey', 'admin.passkey.cardHint': 'Permite que los usuarios inicien sesión con passkeys (WebAuthn). Desactivado de forma predeterminada.', diff --git a/shared/src/i18n/es/collection.ts b/shared/src/i18n/es/collection.ts new file mode 100644 index 000000000..166d43b0c --- /dev/null +++ b/shared/src/i18n/es/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Colecciones', + 'collections.subtitle': 'Tus lugares guardados, organizados en listas', + + 'collections.newList': 'Nueva lista', + 'collections.create': 'Crear', + 'collections.editList': 'Renombrar', + 'collections.listMenu': 'Opciones de la lista', + 'collections.deleteList': 'Eliminar lista', + 'collections.deleteListConfirm': 'Esto elimina de forma permanente la lista y todos sus lugares guardados. No se puede deshacer.', + 'collections.listName': 'Nombre de la lista', + 'collections.listNamePlaceholder': 'p. ej. Tokio 2025', + 'collections.listColor': 'Color', + 'collections.allSaved': 'Todos los guardados', + 'collections.shared': 'Compartida', + + 'collections.empty.title': 'Aún no hay lugares', + 'collections.empty.text': 'Guarda lugares de cualquier viaje para crear esta lista.', + 'collections.empty.noMatchTitle': 'Sin coincidencias', + 'collections.empty.noMatchText': 'Ningún lugar guardado coincide con tu filtro o búsqueda.', + 'collections.empty.firstTitle': 'Empieza tu primera colección', + 'collections.empty.firstText': 'Crea una lista para guardar lugares que quieras recordar entre viajes.', + + 'collections.view.grid': 'Cuadrícula', + 'collections.view.list': 'Lista', + 'collections.view.map': 'Mapa', + + 'collections.status.idea': 'Idea', + 'collections.status.want': 'Quiero ir', + 'collections.status.visited': 'Visitado', + 'collections.status.filterAll': 'Todos', + 'collections.status.cycleHint': 'toca para cambiar', + + 'collections.copyToTrip': 'Copiar al viaje', + 'collections.copyToTripTitle': 'Copiar al viaje', + 'collections.copyN': 'Copiar {count} al viaje', + 'collections.copyToTripSearch': 'Buscar viajes', + 'collections.copyToTripConfirm': 'Copiar', + 'collections.noTrips': 'Aún no hay viajes', + 'collections.alreadyInTrip': 'Ya está en este viaje', + 'collections.copied': 'Copiado al viaje', + 'collections.copiedCount': '{count} lugares copiados', + 'collections.skippedDuplicates': '{count} duplicados omitidos', + 'collections.copyNothing': 'Nada que copiar', + 'collections.removeFromList': 'Quitar de la lista', + 'collections.removeFromListConfirm': '¿Quitar este lugar de la lista?', + 'collections.removeFromCollection': 'Quitar de la colección', + + 'collections.saved': 'Guardado en {name}', + 'collections.savedUndo': 'Deshacer', + 'collections.viewInCollection': 'Ver', + 'collections.duplicateWarning': 'Este lugar ya está en la lista', + + 'collections.search': 'Buscar lugares', + 'collections.selectMode': 'Seleccionar', + 'collections.selectedCount': '{count} seleccionados', + + 'collections.pickList': 'Guardar en una lista', + 'collections.pickListPlaceholder': 'Elige una lista', + 'collections.addedToList': 'Añadido a {name}', + 'collections.removedFromList': 'Quitado de {name}', + 'collections.inLists': 'En tus listas', + 'collections.otherLists': 'Añadir a una lista', + 'collections.noListsYet': 'Crea primero una lista para guardar lugares.', + 'collections.removedFromAll': 'Quitado de la colección', + 'collections.picker.title': 'Lugares guardados', + 'collections.picker.search': 'Busca en tus lugares guardados', + 'collections.picker.empty': 'No hay lugares guardados para añadir', + 'collections.picker.hint': 'Elige un lugar de tus colecciones', + 'collections.picker.use': 'Usar', + + 'collections.share.title': 'Compartir lista', + 'collections.share.members': 'Miembros', + 'collections.share.owner': 'Propietario', + 'collections.share.pending': 'invitación pendiente', + 'collections.share.invite': 'Invitar a alguien', + 'collections.share.inviteUser': 'Seleccionar usuario', + 'collections.share.sendInvite': 'Enviar invitación', + 'collections.share.inviteHint': 'Las personas invitadas pueden ver y editar esta lista.', + 'collections.share.cancel': 'Cancelar', + 'collections.share.leave': 'Salir de la lista', + 'collections.share.remove': 'Quitar', + + 'collections.invites.title': 'Invitaciones', + 'collections.invites.from': 'de', + 'collections.invites.accept': 'Aceptar', + 'collections.invites.decline': 'Rechazar', + 'collections.invites.received': 'Tienes una nueva invitación a una lista', + 'collections.invite.sent': 'Invitación enviada', + 'collections.invite.error': 'No se pudo enviar la invitación', + 'collections.invite.accepted': 'Invitación aceptada', + 'collections.invite.declined': 'Invitación rechazada', + + 'collections.widget.title': 'Colecciones', + 'collections.widget.empty': 'Aún no hay lugares guardados', + 'collections.widget.savedCount': '{count} guardados', +}; + +export default collection; diff --git a/shared/src/i18n/es/index.ts b/shared/src/i18n/es/index.ts index d5ab81176..2b9ef6f0a 100644 --- a/shared/src/i18n/es/index.ts +++ b/shared/src/i18n/es/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/es/inspector.ts b/shared/src/i18n/es/inspector.ts index 386915e4a..a237dc39f 100644 --- a/shared/src/i18n/es/inspector.ts +++ b/shared/src/i18n/es/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Reserva pendiente', 'inspector.google': 'Abrir en Google Maps', 'inspector.website': 'Abrir la web', + 'inspector.saveToCollection': 'Guardar en colección', + 'inspector.savedToCollection': 'Guardado', 'inspector.addRes': 'Reserva', 'inspector.editRes': 'Editar reserva', 'inspector.participants': 'Participantes', diff --git a/shared/src/i18n/fr/admin.ts b/shared/src/i18n/fr/admin.ts index c1284508f..7bc7a25fa 100644 --- a/shared/src/i18n/fr/admin.ts +++ b/shared/src/i18n/fr/admin.ts @@ -324,6 +324,9 @@ const admin: TranslationStrings = { 'admin.tabs.notifications': 'Notifications', 'admin.addons.catalog.journey.name': 'Journal de voyage', 'admin.addons.catalog.journey.description': 'Suivi de voyages et journal avec check-ins, photos et récits quotidiens', + 'admin.addons.catalog.collections.name': 'Collections', + 'admin.addons.catalog.collections.description': + 'Bibliothèque personnelle de lieux — enregistrez des lieux de vos voyages dans des listes nommées, copiez-les dans n’importe quel voyage et partagez-les', 'admin.passkey.title': 'Connexion par passkey', 'admin.passkey.cardHint': 'Permettez aux utilisateurs de se connecter avec des passkeys (WebAuthn). Désactivé par défaut.', diff --git a/shared/src/i18n/fr/collection.ts b/shared/src/i18n/fr/collection.ts new file mode 100644 index 000000000..234e6ebc8 --- /dev/null +++ b/shared/src/i18n/fr/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Collections', + 'collections.subtitle': 'Vos lieux enregistrés, organisés en listes', + + 'collections.newList': 'Nouvelle liste', + 'collections.create': 'Créer', + 'collections.editList': 'Renommer', + 'collections.listMenu': 'Options de la liste', + 'collections.deleteList': 'Supprimer la liste', + 'collections.deleteListConfirm': 'Cela supprime définitivement la liste et tous ses lieux enregistrés. Cette action est irréversible.', + 'collections.listName': 'Nom de la liste', + 'collections.listNamePlaceholder': 'p. ex. Tokyo 2025', + 'collections.listColor': 'Couleur', + 'collections.allSaved': 'Tous les enregistrés', + 'collections.shared': 'Partagée', + + 'collections.empty.title': 'Aucun lieu pour le moment', + 'collections.empty.text': 'Enregistrez des lieux depuis n’importe quel voyage pour constituer cette liste.', + 'collections.empty.noMatchTitle': 'Aucun résultat', + 'collections.empty.noMatchText': 'Aucun lieu enregistré ne correspond à votre filtre ou à votre recherche.', + 'collections.empty.firstTitle': 'Commencez votre première collection', + 'collections.empty.firstText': 'Créez une liste pour enregistrer les lieux à retenir d’un voyage à l’autre.', + + 'collections.view.grid': 'Grille', + 'collections.view.list': 'Liste', + 'collections.view.map': 'Carte', + + 'collections.status.idea': 'Idée', + 'collections.status.want': 'À visiter', + 'collections.status.visited': 'Visité', + 'collections.status.filterAll': 'Tous', + 'collections.status.cycleHint': 'touchez pour changer', + + 'collections.copyToTrip': 'Copier vers un voyage', + 'collections.copyToTripTitle': 'Copier vers un voyage', + 'collections.copyN': 'Copier {count} vers un voyage', + 'collections.copyToTripSearch': 'Rechercher des voyages', + 'collections.copyToTripConfirm': 'Copier', + 'collections.noTrips': 'Aucun voyage pour le moment', + 'collections.alreadyInTrip': 'Déjà dans ce voyage', + 'collections.copied': 'Copié vers le voyage', + 'collections.copiedCount': '{count} lieux copiés', + 'collections.skippedDuplicates': '{count} doublons ignorés', + 'collections.copyNothing': 'Rien à copier', + 'collections.removeFromList': 'Retirer de la liste', + 'collections.removeFromListConfirm': 'Retirer ce lieu de la liste ?', + 'collections.removeFromCollection': 'Retirer de la collection', + + 'collections.saved': 'Enregistré dans {name}', + 'collections.savedUndo': 'Annuler', + 'collections.viewInCollection': 'Voir', + 'collections.duplicateWarning': 'Ce lieu est déjà dans la liste', + + 'collections.search': 'Rechercher des lieux', + 'collections.selectMode': 'Sélectionner', + 'collections.selectedCount': '{count} sélectionnés', + + 'collections.pickList': 'Enregistrer dans une liste', + 'collections.pickListPlaceholder': 'Choisir une liste', + 'collections.addedToList': 'Ajouté à {name}', + 'collections.removedFromList': 'Retiré de {name}', + 'collections.inLists': 'Dans vos listes', + 'collections.otherLists': 'Ajouter à une liste', + 'collections.noListsYet': 'Créez d’abord une liste pour enregistrer des lieux.', + 'collections.removedFromAll': 'Retiré de la collection', + 'collections.picker.title': 'Lieux enregistrés', + 'collections.picker.search': 'Rechercher dans vos lieux enregistrés', + 'collections.picker.empty': 'Aucun lieu enregistré à ajouter', + 'collections.picker.hint': 'Choisissez un lieu dans vos collections', + 'collections.picker.use': 'Utiliser', + + 'collections.share.title': 'Partager la liste', + 'collections.share.members': 'Membres', + 'collections.share.owner': 'Propriétaire', + 'collections.share.pending': 'invitation en attente', + 'collections.share.invite': 'Inviter quelqu’un', + 'collections.share.inviteUser': 'Sélectionner un utilisateur', + 'collections.share.sendInvite': 'Envoyer l’invitation', + 'collections.share.inviteHint': 'Les personnes invitées peuvent voir et modifier cette liste.', + 'collections.share.cancel': 'Annuler', + 'collections.share.leave': 'Quitter la liste', + 'collections.share.remove': 'Retirer', + + 'collections.invites.title': 'Invitations', + 'collections.invites.from': 'de', + 'collections.invites.accept': 'Accepter', + 'collections.invites.decline': 'Refuser', + 'collections.invites.received': 'Vous avez une nouvelle invitation à une liste', + 'collections.invite.sent': 'Invitation envoyée', + 'collections.invite.error': 'Impossible d’envoyer l’invitation', + 'collections.invite.accepted': 'Invitation acceptée', + 'collections.invite.declined': 'Invitation refusée', + + 'collections.widget.title': 'Collections', + 'collections.widget.empty': 'Aucun lieu enregistré pour le moment', + 'collections.widget.savedCount': '{count} enregistrés', +}; + +export default collection; diff --git a/shared/src/i18n/fr/index.ts b/shared/src/i18n/fr/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/fr/index.ts +++ b/shared/src/i18n/fr/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/fr/inspector.ts b/shared/src/i18n/fr/inspector.ts index 2d6d35ca1..270909329 100644 --- a/shared/src/i18n/fr/inspector.ts +++ b/shared/src/i18n/fr/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Réservation en attente', 'inspector.google': 'Ouvrir dans Google Maps', 'inspector.website': 'Ouvrir le site web', + 'inspector.saveToCollection': 'Enregistrer dans une collection', + 'inspector.savedToCollection': 'Enregistré', 'inspector.addRes': 'Réservation', 'inspector.editRes': 'Modifier la réservation', 'inspector.participants': 'Participants', diff --git a/shared/src/i18n/gr/admin.ts b/shared/src/i18n/gr/admin.ts index 087876fed..6cd8ba583 100644 --- a/shared/src/i18n/gr/admin.ts +++ b/shared/src/i18n/gr/admin.ts @@ -331,6 +331,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Ταξίδι', 'admin.addons.catalog.journey.description': 'Παρακολούθηση ταξιδιών & ημερολόγιο ταξιδιών με αφίξεις, φωτογραφίες και καθημερινές ιστορίες', + 'admin.addons.catalog.collections.name': 'Συλλογές', + 'admin.addons.catalog.collections.description': + 'Προσωπική βιβλιοθήκη μερών — αποθήκευσε μέρη από όλα τα ταξίδια σε ονομασμένες λίστες, αντίγραψέ τα σε οποιοδήποτε ταξίδι, μοιράσου τα με άλλους', 'admin.passkey.title': 'Σύνδεση με passkey', 'admin.passkey.cardHint': 'Επιτρέψτε στους χρήστες να συνδέονται με passkeys (WebAuthn). Απενεργοποιημένο από προεπιλογή.', diff --git a/shared/src/i18n/gr/collection.ts b/shared/src/i18n/gr/collection.ts new file mode 100644 index 000000000..1f6e244f4 --- /dev/null +++ b/shared/src/i18n/gr/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Συλλογές', + 'collections.subtitle': 'Τα αποθηκευμένα σου μέρη, οργανωμένα σε λίστες', + + 'collections.newList': 'Νέα λίστα', + 'collections.create': 'Δημιουργία', + 'collections.editList': 'Μετονομασία', + 'collections.listMenu': 'Επιλογές λίστας', + 'collections.deleteList': 'Διαγραφή λίστας', + 'collections.deleteListConfirm': 'Αυτό διαγράφει οριστικά τη λίστα και όλα τα αποθηκευμένα μέρη της. Δεν είναι δυνατή η αναίρεση.', + 'collections.listName': 'Όνομα λίστας', + 'collections.listNamePlaceholder': 'π.χ. Τόκιο 2025', + 'collections.listColor': 'Χρώμα', + 'collections.allSaved': 'Όλα τα αποθηκευμένα', + 'collections.shared': 'Κοινόχρηστη', + + 'collections.empty.title': 'Δεν υπάρχουν μέρη ακόμα', + 'collections.empty.text': 'Αποθήκευσε μέρη από οποιοδήποτε ταξίδι για να φτιάξεις αυτή τη λίστα.', + 'collections.empty.noMatchTitle': 'Καμία αντιστοιχία', + 'collections.empty.noMatchText': 'Κανένα αποθηκευμένο μέρος δεν ταιριάζει με το φίλτρο ή την αναζήτησή σου.', + 'collections.empty.firstTitle': 'Ξεκίνα την πρώτη σου συλλογή', + 'collections.empty.firstText': 'Δημιούργησε μια λίστα για να αποθηκεύεις μέρη που θες να θυμάσαι σε όλα τα ταξίδια.', + + 'collections.view.grid': 'Πλέγμα', + 'collections.view.list': 'Λίστα', + 'collections.view.map': 'Χάρτης', + + 'collections.status.idea': 'Ιδέα', + 'collections.status.want': 'Θέλω να πάω', + 'collections.status.visited': 'Επισκέφθηκα', + 'collections.status.filterAll': 'Όλα', + 'collections.status.cycleHint': 'πάτησε για αλλαγή', + + 'collections.copyToTrip': 'Αντιγραφή σε ταξίδι', + 'collections.copyToTripTitle': 'Αντιγραφή σε ταξίδι', + 'collections.copyN': 'Αντιγραφή {count} σε ταξίδι', + 'collections.copyToTripSearch': 'Αναζήτηση ταξιδιών', + 'collections.copyToTripConfirm': 'Αντιγραφή', + 'collections.noTrips': 'Δεν υπάρχουν ταξίδια ακόμα', + 'collections.alreadyInTrip': 'Υπάρχει ήδη σε αυτό το ταξίδι', + 'collections.copied': 'Αντιγράφηκε στο ταξίδι', + 'collections.copiedCount': 'Αντιγράφηκαν {count} μέρη', + 'collections.skippedDuplicates': 'Παραλείφθηκαν {count} διπλότυπα', + 'collections.copyNothing': 'Τίποτα προς αντιγραφή', + 'collections.removeFromList': 'Αφαίρεση από τη λίστα', + 'collections.removeFromListConfirm': 'Αφαίρεση αυτού του μέρους από τη λίστα;', + 'collections.removeFromCollection': 'Αφαίρεση από τη Συλλογή', + + 'collections.saved': 'Αποθηκεύτηκε στο {name}', + 'collections.savedUndo': 'Αναίρεση', + 'collections.viewInCollection': 'Προβολή', + 'collections.duplicateWarning': 'Αυτό το μέρος υπάρχει ήδη στη λίστα', + + 'collections.search': 'Αναζήτηση μερών', + 'collections.selectMode': 'Επιλογή', + 'collections.selectedCount': '{count} επιλεγμένα', + + 'collections.pickList': 'Αποθήκευση σε λίστα', + 'collections.pickListPlaceholder': 'Διάλεξε μια λίστα', + 'collections.addedToList': 'Προστέθηκε στο {name}', + 'collections.removedFromList': 'Αφαιρέθηκε από το {name}', + 'collections.inLists': 'Στις λίστες σου', + 'collections.otherLists': 'Προσθήκη σε λίστα', + 'collections.noListsYet': 'Δημιούργησε πρώτα μια λίστα για να αποθηκεύεις μέρη.', + 'collections.removedFromAll': 'Αφαιρέθηκε από τη συλλογή', + 'collections.picker.title': 'Αποθηκευμένα μέρη', + 'collections.picker.search': 'Αναζήτηση στα αποθηκευμένα μέρη σου', + 'collections.picker.empty': 'Δεν υπάρχουν αποθηκευμένα μέρη για προσθήκη', + 'collections.picker.hint': 'Διάλεξε ένα μέρος από τις συλλογές σου', + 'collections.picker.use': 'Χρήση', + + 'collections.share.title': 'Κοινή χρήση λίστας', + 'collections.share.members': 'Μέλη', + 'collections.share.owner': 'Ιδιοκτήτης', + 'collections.share.pending': 'εκκρεμής πρόσκληση', + 'collections.share.invite': 'Προσκάλεσε κάποιον', + 'collections.share.inviteUser': 'Επιλογή χρήστη', + 'collections.share.sendInvite': 'Αποστολή πρόσκλησης', + 'collections.share.inviteHint': 'Τα προσκεκλημένα άτομα μπορούν να δουν και να επεξεργαστούν αυτή τη λίστα.', + 'collections.share.cancel': 'Άκυρο', + 'collections.share.leave': 'Αποχώρηση από τη λίστα', + 'collections.share.remove': 'Αφαίρεση', + + 'collections.invites.title': 'Προσκλήσεις', + 'collections.invites.from': 'από', + 'collections.invites.accept': 'Αποδοχή', + 'collections.invites.decline': 'Απόρριψη', + 'collections.invites.received': 'Έχεις μια νέα πρόσκληση λίστας', + 'collections.invite.sent': 'Η πρόσκληση στάλθηκε', + 'collections.invite.error': 'Δεν ήταν δυνατή η αποστολή της πρόσκλησης', + 'collections.invite.accepted': 'Η πρόσκληση έγινε αποδεκτή', + 'collections.invite.declined': 'Η πρόσκληση απορρίφθηκε', + + 'collections.widget.title': 'Συλλογές', + 'collections.widget.empty': 'Δεν υπάρχουν αποθηκευμένα μέρη ακόμα', + 'collections.widget.savedCount': '{count} αποθηκευμένα', +}; + +export default collection; diff --git a/shared/src/i18n/gr/index.ts b/shared/src/i18n/gr/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/gr/index.ts +++ b/shared/src/i18n/gr/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/gr/inspector.ts b/shared/src/i18n/gr/inspector.ts index 8a9825b72..4b420798a 100644 --- a/shared/src/i18n/gr/inspector.ts +++ b/shared/src/i18n/gr/inspector.ts @@ -13,6 +13,8 @@ const inspector: TranslationStrings = { 'inspector.confirmedRes': 'Επιβεβαιωμένη Κράτηση', 'inspector.pendingRes': 'Εκκρεμής Κράτηση', 'inspector.google': 'Άνοιγμα στο Google Maps', + 'inspector.saveToCollection': 'Αποθήκευση στη Συλλογή', + 'inspector.savedToCollection': 'Αποθηκεύτηκε', 'inspector.website': 'Άνοιγμα Ιστοσελίδας', 'inspector.addRes': 'Κράτηση', 'inspector.editRes': 'Επεξεργασία Κράτησης', diff --git a/shared/src/i18n/hu/admin.ts b/shared/src/i18n/hu/admin.ts index bbbb4475b..0bdf64317 100644 --- a/shared/src/i18n/hu/admin.ts +++ b/shared/src/i18n/hu/admin.ts @@ -323,6 +323,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Útinaplók', 'admin.addons.catalog.journey.description': 'Utazáskövetés és útinapló bejelentkezésekkel, fotókkal és napi történetekkel', + 'admin.addons.catalog.collections.name': 'Gyűjtemények', + 'admin.addons.catalog.collections.description': + 'Személyes helykönyvtár — ments helyeket utazásokon átívelően elnevezett listákba, másold bármelyik utazásba, oszd meg másokkal', 'admin.passkey.title': 'Passkey-bejelentkezés', 'admin.passkey.cardHint': 'Engedélyezd a felhasználóknak a bejelentkezést passkey-vel (WebAuthn). Alapból kikapcsolva.', diff --git a/shared/src/i18n/hu/collection.ts b/shared/src/i18n/hu/collection.ts new file mode 100644 index 000000000..9b8e313e0 --- /dev/null +++ b/shared/src/i18n/hu/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Gyűjtemények', + 'collections.subtitle': 'Mentett helyeid listákba rendezve', + + 'collections.newList': 'Új lista', + 'collections.create': 'Létrehozás', + 'collections.editList': 'Átnevezés', + 'collections.listMenu': 'Lista beállításai', + 'collections.deleteList': 'Lista törlése', + 'collections.deleteListConfirm': 'Ez véglegesen törli a listát és az összes benne mentett helyet. Ez nem vonható vissza.', + 'collections.listName': 'Lista neve', + 'collections.listNamePlaceholder': 'pl. Tokió 2025', + 'collections.listColor': 'Szín', + 'collections.allSaved': 'Összes mentett', + 'collections.shared': 'Megosztott', + + 'collections.empty.title': 'Még nincsenek helyek', + 'collections.empty.text': 'Ments helyeket bármelyik utazásból, hogy feltöltsd ezt a listát.', + 'collections.empty.noMatchTitle': 'Nincs találat', + 'collections.empty.noMatchText': 'Egyetlen mentett hely sem felel meg a szűrőnek vagy a keresésnek.', + 'collections.empty.firstTitle': 'Kezdd el az első gyűjteményed', + 'collections.empty.firstText': 'Hozz létre egy listát, hogy elmenthesd a helyeket, amelyekre utazásokon átívelően emlékezni szeretnél.', + + 'collections.view.grid': 'Rács', + 'collections.view.list': 'Lista', + 'collections.view.map': 'Térkép', + + 'collections.status.idea': 'Ötlet', + 'collections.status.want': 'Szeretnék odamenni', + 'collections.status.visited': 'Meglátogatva', + 'collections.status.filterAll': 'Összes', + 'collections.status.cycleHint': 'koppints a módosításhoz', + + 'collections.copyToTrip': 'Másolás utazásba', + 'collections.copyToTripTitle': 'Másolás utazásba', + 'collections.copyN': '{count} másolása utazásba', + 'collections.copyToTripSearch': 'Utazások keresése', + 'collections.copyToTripConfirm': 'Másolás', + 'collections.noTrips': 'Még nincsenek utazások', + 'collections.alreadyInTrip': 'Már ebben az utazásban van', + 'collections.copied': 'Utazásba másolva', + 'collections.copiedCount': '{count} hely másolva', + 'collections.skippedDuplicates': '{count} duplikátum kihagyva', + 'collections.copyNothing': 'Nincs mit másolni', + 'collections.removeFromList': 'Eltávolítás a listából', + 'collections.removeFromListConfirm': 'Eltávolítod ezt a helyet a listából?', + 'collections.removeFromCollection': 'Eltávolítás a gyűjteményből', + + 'collections.saved': 'Mentve ide: {name}', + 'collections.savedUndo': 'Visszavonás', + 'collections.viewInCollection': 'Megtekintés', + 'collections.duplicateWarning': 'Ez a hely már szerepel a listában', + + 'collections.search': 'Helyek keresése', + 'collections.selectMode': 'Kijelölés', + 'collections.selectedCount': '{count} kijelölve', + + 'collections.pickList': 'Mentés listába', + 'collections.pickListPlaceholder': 'Válassz listát', + 'collections.addedToList': 'Hozzáadva ehhez: {name}', + 'collections.removedFromList': 'Eltávolítva innen: {name}', + 'collections.inLists': 'A listáidban', + 'collections.otherLists': 'Hozzáadás listához', + 'collections.noListsYet': 'Előbb hozz létre egy listát a helyek mentéséhez.', + 'collections.removedFromAll': 'Eltávolítva a gyűjteményből', + 'collections.picker.title': 'Mentett helyek', + 'collections.picker.search': 'Mentett helyek keresése', + 'collections.picker.empty': 'Nincs hozzáadható mentett hely', + 'collections.picker.hint': 'Válassz egy helyet a gyűjteményeidből', + 'collections.picker.use': 'Használat', + + 'collections.share.title': 'Lista megosztása', + 'collections.share.members': 'Tagok', + 'collections.share.owner': 'Tulajdonos', + 'collections.share.pending': 'függőben lévő meghívó', + 'collections.share.invite': 'Meghívás', + 'collections.share.inviteUser': 'Válassz felhasználót', + 'collections.share.sendInvite': 'Meghívó küldése', + 'collections.share.inviteHint': 'A meghívott személyek megtekinthetik és szerkeszthetik ezt a listát.', + 'collections.share.cancel': 'Mégse', + 'collections.share.leave': 'Lista elhagyása', + 'collections.share.remove': 'Eltávolítás', + + 'collections.invites.title': 'Meghívók', + 'collections.invites.from': 'tőle:', + 'collections.invites.accept': 'Elfogadás', + 'collections.invites.decline': 'Elutasítás', + 'collections.invites.received': 'Új listameghívót kaptál', + 'collections.invite.sent': 'Meghívó elküldve', + 'collections.invite.error': 'A meghívót nem sikerült elküldeni', + 'collections.invite.accepted': 'Meghívó elfogadva', + 'collections.invite.declined': 'Meghívó elutasítva', + + 'collections.widget.title': 'Gyűjtemények', + 'collections.widget.empty': 'Még nincsenek mentett helyek', + 'collections.widget.savedCount': '{count} mentve', +}; + +export default collection; diff --git a/shared/src/i18n/hu/index.ts b/shared/src/i18n/hu/index.ts index 531b85712..34cccd9b9 100644 --- a/shared/src/i18n/hu/index.ts +++ b/shared/src/i18n/hu/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/hu/inspector.ts b/shared/src/i18n/hu/inspector.ts index 896fb6f90..43de7a74c 100644 --- a/shared/src/i18n/hu/inspector.ts +++ b/shared/src/i18n/hu/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Függőben lévő foglalás', 'inspector.google': 'Megnyitás a Google Térképben', 'inspector.website': 'Weboldal megnyitása', + 'inspector.saveToCollection': 'Mentés gyűjteménybe', + 'inspector.savedToCollection': 'Mentve', 'inspector.addRes': 'Foglalás', 'inspector.editRes': 'Foglalás szerkesztése', 'inspector.participants': 'Résztvevők', diff --git a/shared/src/i18n/id/admin.ts b/shared/src/i18n/id/admin.ts index 9e608a718..cc1ef715d 100644 --- a/shared/src/i18n/id/admin.ts +++ b/shared/src/i18n/id/admin.ts @@ -320,6 +320,9 @@ const admin: TranslationStrings = { 'admin.tabs.permissions': 'Izin', 'admin.addons.catalog.journey.name': 'Journey', 'admin.addons.catalog.journey.description': 'Pelacakan perjalanan & jurnal dengan check-in, foto, dan cerita harian', + 'admin.addons.catalog.collections.name': 'Koleksi', + 'admin.addons.catalog.collections.description': + 'Pustaka tempat pribadi — simpan tempat lintas perjalanan ke dalam daftar bernama, salin ke perjalanan mana pun, bagikan dengan orang lain', 'admin.passkey.title': 'Login dengan passkey', 'admin.passkey.cardHint': 'Izinkan pengguna masuk dengan passkey (WebAuthn). Nonaktif secara default.', 'admin.passkey.login': 'Aktifkan login dengan passkey', diff --git a/shared/src/i18n/id/collection.ts b/shared/src/i18n/id/collection.ts new file mode 100644 index 000000000..95e33d8a2 --- /dev/null +++ b/shared/src/i18n/id/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Koleksi', + 'collections.subtitle': 'Tempat yang kamu simpan, tertata dalam daftar', + + 'collections.newList': 'Daftar baru', + 'collections.create': 'Buat', + 'collections.editList': 'Ganti nama', + 'collections.listMenu': 'Opsi daftar', + 'collections.deleteList': 'Hapus daftar', + 'collections.deleteListConfirm': 'Ini menghapus daftar dan semua tempat tersimpan di dalamnya secara permanen. Tindakan ini tidak dapat dibatalkan.', + 'collections.listName': 'Nama daftar', + 'collections.listNamePlaceholder': 'mis. Tokyo 2025', + 'collections.listColor': 'Warna', + 'collections.allSaved': 'Semua tersimpan', + 'collections.shared': 'Dibagikan', + + 'collections.empty.title': 'Belum ada tempat', + 'collections.empty.text': 'Simpan tempat dari perjalanan mana pun untuk mengisi daftar ini.', + 'collections.empty.noMatchTitle': 'Tidak ada yang cocok', + 'collections.empty.noMatchText': 'Tidak ada tempat tersimpan yang cocok dengan filter atau pencarianmu.', + 'collections.empty.firstTitle': 'Mulai koleksi pertamamu', + 'collections.empty.firstText': 'Buat daftar untuk menyimpan tempat yang ingin kamu ingat di seluruh perjalanan.', + + 'collections.view.grid': 'Kisi', + 'collections.view.list': 'Daftar', + 'collections.view.map': 'Peta', + + 'collections.status.idea': 'Ide', + 'collections.status.want': 'Ingin ke sana', + 'collections.status.visited': 'Dikunjungi', + 'collections.status.filterAll': 'Semua', + 'collections.status.cycleHint': 'ketuk untuk mengubah', + + 'collections.copyToTrip': 'Salin ke perjalanan', + 'collections.copyToTripTitle': 'Salin ke perjalanan', + 'collections.copyN': 'Salin {count} ke perjalanan', + 'collections.copyToTripSearch': 'Cari perjalanan', + 'collections.copyToTripConfirm': 'Salin', + 'collections.noTrips': 'Belum ada perjalanan', + 'collections.alreadyInTrip': 'Sudah ada di perjalanan ini', + 'collections.copied': 'Disalin ke perjalanan', + 'collections.copiedCount': '{count} tempat disalin', + 'collections.skippedDuplicates': '{count} duplikat dilewati', + 'collections.copyNothing': 'Tidak ada yang bisa disalin', + 'collections.removeFromList': 'Hapus dari daftar', + 'collections.removeFromListConfirm': 'Hapus tempat ini dari daftar?', + 'collections.removeFromCollection': 'Hapus dari Koleksi', + + 'collections.saved': 'Disimpan ke {name}', + 'collections.savedUndo': 'Urungkan', + 'collections.viewInCollection': 'Lihat', + 'collections.duplicateWarning': 'Tempat ini sudah ada di daftar', + + 'collections.search': 'Cari tempat', + 'collections.selectMode': 'Pilih', + 'collections.selectedCount': '{count} dipilih', + + 'collections.pickList': 'Simpan ke daftar', + 'collections.pickListPlaceholder': 'Pilih daftar', + 'collections.addedToList': 'Ditambahkan ke {name}', + 'collections.removedFromList': 'Dihapus dari {name}', + 'collections.inLists': 'Di daftarmu', + 'collections.otherLists': 'Tambahkan ke daftar', + 'collections.noListsYet': 'Buat daftar dulu untuk menyimpan tempat.', + 'collections.removedFromAll': 'Dihapus dari koleksi', + 'collections.picker.title': 'Tempat tersimpan', + 'collections.picker.search': 'Cari tempat tersimpanmu', + 'collections.picker.empty': 'Tidak ada tempat tersimpan untuk ditambahkan', + 'collections.picker.hint': 'Pilih tempat dari koleksimu', + 'collections.picker.use': 'Gunakan', + + 'collections.share.title': 'Bagikan daftar', + 'collections.share.members': 'Anggota', + 'collections.share.owner': 'Pemilik', + 'collections.share.pending': 'undangan tertunda', + 'collections.share.invite': 'Undang seseorang', + 'collections.share.inviteUser': 'Pilih pengguna', + 'collections.share.sendInvite': 'Kirim undangan', + 'collections.share.inviteHint': 'Orang yang diundang dapat melihat dan mengedit daftar ini.', + 'collections.share.cancel': 'Batal', + 'collections.share.leave': 'Tinggalkan daftar', + 'collections.share.remove': 'Hapus', + + 'collections.invites.title': 'Undangan', + 'collections.invites.from': 'dari', + 'collections.invites.accept': 'Terima', + 'collections.invites.decline': 'Tolak', + 'collections.invites.received': 'Kamu punya undangan daftar baru', + 'collections.invite.sent': 'Undangan terkirim', + 'collections.invite.error': 'Tidak dapat mengirim undangan', + 'collections.invite.accepted': 'Undangan diterima', + 'collections.invite.declined': 'Undangan ditolak', + + 'collections.widget.title': 'Koleksi', + 'collections.widget.empty': 'Belum ada tempat tersimpan', + 'collections.widget.savedCount': '{count} tersimpan', +}; + +export default collection; diff --git a/shared/src/i18n/id/index.ts b/shared/src/i18n/id/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/id/index.ts +++ b/shared/src/i18n/id/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/id/inspector.ts b/shared/src/i18n/id/inspector.ts index 7a4ef4209..5593dbc11 100644 --- a/shared/src/i18n/id/inspector.ts +++ b/shared/src/i18n/id/inspector.ts @@ -13,6 +13,8 @@ const inspector: TranslationStrings = { 'inspector.confirmedRes': 'Reservasi Dikonfirmasi', 'inspector.pendingRes': 'Reservasi Menunggu', 'inspector.google': 'Buka di Google Maps', + 'inspector.saveToCollection': 'Simpan ke Koleksi', + 'inspector.savedToCollection': 'Tersimpan', 'inspector.website': 'Buka Situs Web', 'inspector.addRes': 'Reservasi', 'inspector.editRes': 'Edit Reservasi', diff --git a/shared/src/i18n/it/admin.ts b/shared/src/i18n/it/admin.ts index 7f5f4ac8e..e4849115f 100644 --- a/shared/src/i18n/it/admin.ts +++ b/shared/src/i18n/it/admin.ts @@ -322,6 +322,9 @@ const admin: TranslationStrings = { 'admin.tabs.notifications': 'Notifiche', 'admin.addons.catalog.journey.name': 'Diario di viaggio', 'admin.addons.catalog.journey.description': 'Tracciamento viaggi e diario con check-in, foto e storie quotidiane', + 'admin.addons.catalog.collections.name': 'Raccolte', + 'admin.addons.catalog.collections.description': + 'Libreria personale di luoghi: salva luoghi dai tuoi viaggi in liste con nome, copiali in qualsiasi viaggio e condividili con altri', 'admin.passkey.title': 'Accesso con passkey', 'admin.passkey.cardHint': 'Consenti agli utenti di accedere con le passkey (WebAuthn). Disattivato per impostazione predefinita.', diff --git a/shared/src/i18n/it/collection.ts b/shared/src/i18n/it/collection.ts new file mode 100644 index 000000000..9f2857539 --- /dev/null +++ b/shared/src/i18n/it/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Raccolte', + 'collections.subtitle': 'I tuoi luoghi salvati, organizzati in liste', + + 'collections.newList': 'Nuova lista', + 'collections.create': 'Crea', + 'collections.editList': 'Rinomina', + 'collections.listMenu': 'Opzioni della lista', + 'collections.deleteList': 'Elimina lista', + 'collections.deleteListConfirm': 'Questa azione elimina definitivamente la lista e tutti i luoghi salvati. Non può essere annullata.', + 'collections.listName': 'Nome della lista', + 'collections.listNamePlaceholder': 'es. Tokyo 2025', + 'collections.listColor': 'Colore', + 'collections.allSaved': 'Tutti i salvati', + 'collections.shared': 'Condivisa', + + 'collections.empty.title': 'Ancora nessun luogo', + 'collections.empty.text': 'Salva luoghi da qualsiasi viaggio per creare questa lista.', + 'collections.empty.noMatchTitle': 'Nessun risultato', + 'collections.empty.noMatchText': 'Nessun luogo salvato corrisponde al filtro o alla ricerca.', + 'collections.empty.firstTitle': 'Inizia la tua prima raccolta', + 'collections.empty.firstText': 'Crea una lista per salvare i luoghi da ricordare tra un viaggio e l’altro.', + + 'collections.view.grid': 'Griglia', + 'collections.view.list': 'Lista', + 'collections.view.map': 'Mappa', + + 'collections.status.idea': 'Idea', + 'collections.status.want': 'Da visitare', + 'collections.status.visited': 'Visitato', + 'collections.status.filterAll': 'Tutti', + 'collections.status.cycleHint': 'tocca per cambiare', + + 'collections.copyToTrip': 'Copia nel viaggio', + 'collections.copyToTripTitle': 'Copia nel viaggio', + 'collections.copyN': 'Copia {count} nel viaggio', + 'collections.copyToTripSearch': 'Cerca viaggi', + 'collections.copyToTripConfirm': 'Copia', + 'collections.noTrips': 'Ancora nessun viaggio', + 'collections.alreadyInTrip': 'Già in questo viaggio', + 'collections.copied': 'Copiato nel viaggio', + 'collections.copiedCount': '{count} luoghi copiati', + 'collections.skippedDuplicates': '{count} duplicati ignorati', + 'collections.copyNothing': 'Niente da copiare', + 'collections.removeFromList': 'Rimuovi dalla lista', + 'collections.removeFromListConfirm': 'Rimuovere questo luogo dalla lista?', + 'collections.removeFromCollection': 'Rimuovi dalla raccolta', + + 'collections.saved': 'Salvato in {name}', + 'collections.savedUndo': 'Annulla', + 'collections.viewInCollection': 'Vedi', + 'collections.duplicateWarning': 'Questo luogo è già nella lista', + + 'collections.search': 'Cerca luoghi', + 'collections.selectMode': 'Seleziona', + 'collections.selectedCount': '{count} selezionati', + + 'collections.pickList': 'Salva in una lista', + 'collections.pickListPlaceholder': 'Scegli una lista', + 'collections.addedToList': 'Aggiunto a {name}', + 'collections.removedFromList': 'Rimosso da {name}', + 'collections.inLists': 'Nelle tue liste', + 'collections.otherLists': 'Aggiungi a una lista', + 'collections.noListsYet': 'Crea prima una lista per salvare i luoghi.', + 'collections.removedFromAll': 'Rimosso dalla raccolta', + 'collections.picker.title': 'Luoghi salvati', + 'collections.picker.search': 'Cerca tra i tuoi luoghi salvati', + 'collections.picker.empty': 'Nessun luogo salvato da aggiungere', + 'collections.picker.hint': 'Scegli un luogo dalle tue raccolte', + 'collections.picker.use': 'Usa', + + 'collections.share.title': 'Condividi lista', + 'collections.share.members': 'Membri', + 'collections.share.owner': 'Proprietario', + 'collections.share.pending': 'invito in sospeso', + 'collections.share.invite': 'Invita qualcuno', + 'collections.share.inviteUser': 'Seleziona utente', + 'collections.share.sendInvite': 'Invia invito', + 'collections.share.inviteHint': 'Le persone invitate possono vedere e modificare questa lista.', + 'collections.share.cancel': 'Annulla', + 'collections.share.leave': 'Abbandona lista', + 'collections.share.remove': 'Rimuovi', + + 'collections.invites.title': 'Inviti', + 'collections.invites.from': 'da', + 'collections.invites.accept': 'Accetta', + 'collections.invites.decline': 'Rifiuta', + 'collections.invites.received': 'Hai un nuovo invito a una lista', + 'collections.invite.sent': 'Invito inviato', + 'collections.invite.error': 'Impossibile inviare l’invito', + 'collections.invite.accepted': 'Invito accettato', + 'collections.invite.declined': 'Invito rifiutato', + + 'collections.widget.title': 'Raccolte', + 'collections.widget.empty': 'Ancora nessun luogo salvato', + 'collections.widget.savedCount': '{count} salvati', +}; + +export default collection; diff --git a/shared/src/i18n/it/index.ts b/shared/src/i18n/it/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/it/index.ts +++ b/shared/src/i18n/it/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/it/inspector.ts b/shared/src/i18n/it/inspector.ts index 7927eb878..acc4521fb 100644 --- a/shared/src/i18n/it/inspector.ts +++ b/shared/src/i18n/it/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Prenotazione in attesa', 'inspector.google': 'Apri in Google Maps', 'inspector.website': 'Apri sito web', + 'inspector.saveToCollection': 'Salva nella raccolta', + 'inspector.savedToCollection': 'Salvato', 'inspector.addRes': 'Prenotazione', 'inspector.editRes': 'Modifica prenotazione', 'inspector.participants': 'Partecipanti', diff --git a/shared/src/i18n/ja/admin.ts b/shared/src/i18n/ja/admin.ts index 0bbb9d199..becc8e791 100644 --- a/shared/src/i18n/ja/admin.ts +++ b/shared/src/i18n/ja/admin.ts @@ -308,6 +308,9 @@ const admin: TranslationStrings = { 'admin.tabs.permissions': '権限', 'admin.addons.catalog.journey.name': '日記', 'admin.addons.catalog.journey.description': 'チェックイン、写真、日ごとのストーリーで旅を記録', + 'admin.addons.catalog.collections.name': 'コレクション', + 'admin.addons.catalog.collections.description': + '個人の場所ライブラリ — 旅行をまたいで場所を名前付きリストに保存し、どの旅行にもコピーして、他の人と共有', 'admin.passkey.title': 'パスキーログイン', 'admin.passkey.cardHint': 'ユーザーがパスキー(WebAuthn)でサインインできるようにします。既定では無効です。', 'admin.passkey.login': 'パスキーログインを有効化', diff --git a/shared/src/i18n/ja/collection.ts b/shared/src/i18n/ja/collection.ts new file mode 100644 index 000000000..fff4d3a21 --- /dev/null +++ b/shared/src/i18n/ja/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'コレクション', + 'collections.subtitle': '保存した場所をリストごとに整理', + + 'collections.newList': '新しいリスト', + 'collections.create': '作成', + 'collections.editList': '名前を変更', + 'collections.listMenu': 'リストオプション', + 'collections.deleteList': 'リストを削除', + 'collections.deleteListConfirm': 'リストと保存済みのすべての場所が完全に削除されます。この操作は元に戻せません。', + 'collections.listName': 'リスト名', + 'collections.listNamePlaceholder': '例: 東京 2025', + 'collections.listColor': '色', + 'collections.allSaved': 'すべての保存済み', + 'collections.shared': '共有', + + 'collections.empty.title': 'まだ場所がありません', + 'collections.empty.text': 'どの旅行からでも場所を保存してこのリストを作りましょう。', + 'collections.empty.noMatchTitle': '該当なし', + 'collections.empty.noMatchText': 'フィルターや検索に一致する保存済みの場所がありません。', + 'collections.empty.firstTitle': '最初のコレクションを始めましょう', + 'collections.empty.firstText': 'リストを作成して、旅行をまたいで覚えておきたい場所を保存しましょう。', + + 'collections.view.grid': 'グリッド', + 'collections.view.list': 'リスト', + 'collections.view.map': 'マップ', + + 'collections.status.idea': 'アイデア', + 'collections.status.want': '行きたい', + 'collections.status.visited': '訪問済み', + 'collections.status.filterAll': 'すべて', + 'collections.status.cycleHint': 'タップで変更', + + 'collections.copyToTrip': '旅行にコピー', + 'collections.copyToTripTitle': '旅行にコピー', + 'collections.copyN': '{count}件を旅行にコピー', + 'collections.copyToTripSearch': '旅行を検索', + 'collections.copyToTripConfirm': 'コピー', + 'collections.noTrips': 'まだ旅行がありません', + 'collections.alreadyInTrip': 'この旅行にすでにあります', + 'collections.copied': '旅行にコピーしました', + 'collections.copiedCount': '{count}件の場所をコピーしました', + 'collections.skippedDuplicates': '{count}件の重複をスキップしました', + 'collections.copyNothing': 'コピーするものがありません', + 'collections.removeFromList': 'リストから削除', + 'collections.removeFromListConfirm': 'この場所をリストから削除しますか?', + 'collections.removeFromCollection': 'コレクションから削除', + + 'collections.saved': '{name}に保存しました', + 'collections.savedUndo': '元に戻す', + 'collections.viewInCollection': '表示', + 'collections.duplicateWarning': 'この場所はすでにリストにあります', + + 'collections.search': '場所を検索', + 'collections.selectMode': '選択', + 'collections.selectedCount': '{count}件選択中', + + 'collections.pickList': 'リストに保存', + 'collections.pickListPlaceholder': 'リストを選択', + 'collections.addedToList': '{name}に追加しました', + 'collections.removedFromList': '{name}から削除しました', + 'collections.inLists': 'あなたのリスト内', + 'collections.otherLists': 'リストに追加', + 'collections.noListsYet': 'まずリストを作成して場所を保存しましょう。', + 'collections.removedFromAll': 'コレクションから削除しました', + 'collections.picker.title': '保存済みの場所', + 'collections.picker.search': '保存済みの場所を検索', + 'collections.picker.empty': '追加できる保存済みの場所がありません', + 'collections.picker.hint': 'コレクションから場所を選択', + 'collections.picker.use': '使用', + + 'collections.share.title': 'リストを共有', + 'collections.share.members': 'メンバー', + 'collections.share.owner': 'オーナー', + 'collections.share.pending': '招待保留中', + 'collections.share.invite': '誰かを招待', + 'collections.share.inviteUser': 'ユーザーを選択', + 'collections.share.sendInvite': '招待を送信', + 'collections.share.inviteHint': '招待された人はこのリストを表示・編集できます。', + 'collections.share.cancel': 'キャンセル', + 'collections.share.leave': 'リストから退出', + 'collections.share.remove': '削除', + + 'collections.invites.title': '招待', + 'collections.invites.from': '送信者', + 'collections.invites.accept': '承認', + 'collections.invites.decline': '辞退', + 'collections.invites.received': '新しいリストの招待があります', + 'collections.invite.sent': '招待を送信しました', + 'collections.invite.error': '招待を送信できませんでした', + 'collections.invite.accepted': '招待を承認しました', + 'collections.invite.declined': '招待を辞退しました', + + 'collections.widget.title': 'コレクション', + 'collections.widget.empty': 'まだ保存した場所がありません', + 'collections.widget.savedCount': '{count}件保存済み', +}; + +export default collection; diff --git a/shared/src/i18n/ja/index.ts b/shared/src/i18n/ja/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/ja/index.ts +++ b/shared/src/i18n/ja/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/ja/inspector.ts b/shared/src/i18n/ja/inspector.ts index ed9ad9a7f..62955f0ff 100644 --- a/shared/src/i18n/ja/inspector.ts +++ b/shared/src/i18n/ja/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': '保留中の予約', 'inspector.google': 'Googleマップで開く', 'inspector.website': 'Webサイトを開く', + 'inspector.saveToCollection': 'コレクションに保存', + 'inspector.savedToCollection': '保存済み', 'inspector.addRes': '予約', 'inspector.editRes': '予約を編集', 'inspector.participants': '参加者', diff --git a/shared/src/i18n/ko/admin.ts b/shared/src/i18n/ko/admin.ts index c4b6e93f5..b7a52041f 100644 --- a/shared/src/i18n/ko/admin.ts +++ b/shared/src/i18n/ko/admin.ts @@ -312,6 +312,9 @@ const admin: TranslationStrings = { 'admin.tabs.permissions': '권한', 'admin.addons.catalog.journey.name': 'Journey', 'admin.addons.catalog.journey.description': '체크인, 사진, 일별 이야기가 있는 여행 기록 및 여행 일지', + 'admin.addons.catalog.collections.name': '컬렉션', + 'admin.addons.catalog.collections.description': + '개인 장소 라이브러리 — 여행 전반의 장소를 이름이 있는 목록에 저장하고, 어떤 여행에도 복사하고, 다른 사람과 공유하세요', 'admin.passkey.title': '패스키 로그인', 'admin.passkey.cardHint': '사용자가 패스키(WebAuthn)로 로그인할 수 있게 합니다. 기본값은 꺼짐입니다.', 'admin.passkey.login': '패스키 로그인 활성화', diff --git a/shared/src/i18n/ko/collection.ts b/shared/src/i18n/ko/collection.ts new file mode 100644 index 000000000..2f003df47 --- /dev/null +++ b/shared/src/i18n/ko/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': '컬렉션', + 'collections.subtitle': '저장한 장소를 목록으로 정리하세요', + + 'collections.newList': '새 목록', + 'collections.create': '만들기', + 'collections.editList': '이름 바꾸기', + 'collections.listMenu': '목록 옵션', + 'collections.deleteList': '목록 삭제', + 'collections.deleteListConfirm': '목록과 저장된 모든 장소가 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.', + 'collections.listName': '목록 이름', + 'collections.listNamePlaceholder': '예: 도쿄 2025', + 'collections.listColor': '색상', + 'collections.allSaved': '모든 저장 항목', + 'collections.shared': '공유됨', + + 'collections.empty.title': '아직 장소가 없습니다', + 'collections.empty.text': '여행에서 장소를 저장해 이 목록을 만들어 보세요.', + 'collections.empty.noMatchTitle': '일치 항목 없음', + 'collections.empty.noMatchText': '필터나 검색과 일치하는 저장된 장소가 없습니다.', + 'collections.empty.firstTitle': '첫 컬렉션을 시작하세요', + 'collections.empty.firstText': '목록을 만들어 여행 전반에 걸쳐 기억하고 싶은 장소를 저장하세요.', + + 'collections.view.grid': '그리드', + 'collections.view.list': '목록', + 'collections.view.map': '지도', + + 'collections.status.idea': '아이디어', + 'collections.status.want': '가고 싶은 곳', + 'collections.status.visited': '방문함', + 'collections.status.filterAll': '전체', + 'collections.status.cycleHint': '탭하여 변경', + + 'collections.copyToTrip': '여행에 복사', + 'collections.copyToTripTitle': '여행에 복사', + 'collections.copyN': '{count}개를 여행에 복사', + 'collections.copyToTripSearch': '여행 검색', + 'collections.copyToTripConfirm': '복사', + 'collections.noTrips': '아직 여행이 없습니다', + 'collections.alreadyInTrip': '이미 이 여행에 있습니다', + 'collections.copied': '여행에 복사됨', + 'collections.copiedCount': '{count}개 장소를 복사했습니다', + 'collections.skippedDuplicates': '중복 {count}개를 건너뛰었습니다', + 'collections.copyNothing': '복사할 항목이 없습니다', + 'collections.removeFromList': '목록에서 제거', + 'collections.removeFromListConfirm': '이 장소를 목록에서 제거할까요?', + 'collections.removeFromCollection': '컬렉션에서 제거', + + 'collections.saved': '{name}에 저장됨', + 'collections.savedUndo': '실행 취소', + 'collections.viewInCollection': '보기', + 'collections.duplicateWarning': '이 장소는 이미 목록에 있습니다', + + 'collections.search': '장소 검색', + 'collections.selectMode': '선택', + 'collections.selectedCount': '{count}개 선택됨', + + 'collections.pickList': '목록에 저장', + 'collections.pickListPlaceholder': '목록 선택', + 'collections.addedToList': '{name}에 추가됨', + 'collections.removedFromList': '{name}에서 제거됨', + 'collections.inLists': '내 목록에 있음', + 'collections.otherLists': '목록에 추가', + 'collections.noListsYet': '먼저 목록을 만들어 장소를 저장하세요.', + 'collections.removedFromAll': '컬렉션에서 제거됨', + 'collections.picker.title': '저장된 장소', + 'collections.picker.search': '저장된 장소 검색', + 'collections.picker.empty': '추가할 저장된 장소가 없습니다', + 'collections.picker.hint': '컬렉션에서 장소를 선택하세요', + 'collections.picker.use': '사용', + + 'collections.share.title': '목록 공유', + 'collections.share.members': '멤버', + 'collections.share.owner': '소유자', + 'collections.share.pending': '대기 중인 초대', + 'collections.share.invite': '초대하기', + 'collections.share.inviteUser': '사용자 선택', + 'collections.share.sendInvite': '초대 보내기', + 'collections.share.inviteHint': '초대받은 사람은 이 목록을 보고 편집할 수 있습니다.', + 'collections.share.cancel': '취소', + 'collections.share.leave': '목록 나가기', + 'collections.share.remove': '제거', + + 'collections.invites.title': '초대', + 'collections.invites.from': '보낸 사람', + 'collections.invites.accept': '수락', + 'collections.invites.decline': '거절', + 'collections.invites.received': '새 목록 초대가 있습니다', + 'collections.invite.sent': '초대를 보냈습니다', + 'collections.invite.error': '초대를 보낼 수 없습니다', + 'collections.invite.accepted': '초대를 수락했습니다', + 'collections.invite.declined': '초대를 거절했습니다', + + 'collections.widget.title': '컬렉션', + 'collections.widget.empty': '아직 저장한 장소가 없습니다', + 'collections.widget.savedCount': '{count}개 저장됨', +}; + +export default collection; diff --git a/shared/src/i18n/ko/index.ts b/shared/src/i18n/ko/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/ko/index.ts +++ b/shared/src/i18n/ko/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/ko/inspector.ts b/shared/src/i18n/ko/inspector.ts index ba1276177..2c562cd6a 100644 --- a/shared/src/i18n/ko/inspector.ts +++ b/shared/src/i18n/ko/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': '대기 중인 예약', 'inspector.google': 'Google Maps에서 열기', 'inspector.website': '웹사이트 열기', + 'inspector.saveToCollection': '컬렉션에 저장', + 'inspector.savedToCollection': '저장됨', 'inspector.addRes': '예약', 'inspector.editRes': '예약 편집', 'inspector.participants': '참가자', diff --git a/shared/src/i18n/nl/admin.ts b/shared/src/i18n/nl/admin.ts index 993c2c4a8..167928510 100644 --- a/shared/src/i18n/nl/admin.ts +++ b/shared/src/i18n/nl/admin.ts @@ -323,6 +323,9 @@ const admin: TranslationStrings = { 'admin.tabs.notifications': 'Meldingen', 'admin.addons.catalog.journey.name': 'Reisverslag', 'admin.addons.catalog.journey.description': "Reistracking & reisdagboek met check-ins, foto's en dagelijkse verhalen", + 'admin.addons.catalog.collections.name': 'Collecties', + 'admin.addons.catalog.collections.description': + 'Persoonlijke plekkenbibliotheek — sla plekken uit je reizen op in benoemde lijsten, kopieer ze naar elke reis en deel ze met anderen', 'admin.passkey.title': 'Inloggen met passkey', 'admin.passkey.cardHint': 'Laat gebruikers inloggen met passkeys (WebAuthn). Standaard uit.', 'admin.passkey.login': 'Inloggen met passkey inschakelen', diff --git a/shared/src/i18n/nl/collection.ts b/shared/src/i18n/nl/collection.ts new file mode 100644 index 000000000..c35ef5394 --- /dev/null +++ b/shared/src/i18n/nl/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Collecties', + 'collections.subtitle': 'Je opgeslagen plekken, geordend in lijsten', + + 'collections.newList': 'Nieuwe lijst', + 'collections.create': 'Aanmaken', + 'collections.editList': 'Hernoemen', + 'collections.listMenu': 'Lijstopties', + 'collections.deleteList': 'Lijst verwijderen', + 'collections.deleteListConfirm': 'Hiermee worden de lijst en alle opgeslagen plekken definitief verwijderd. Dit kan niet ongedaan worden gemaakt.', + 'collections.listName': 'Lijstnaam', + 'collections.listNamePlaceholder': 'bijv. Tokio 2025', + 'collections.listColor': 'Kleur', + 'collections.allSaved': 'Alle opgeslagen', + 'collections.shared': 'Gedeeld', + + 'collections.empty.title': 'Nog geen plekken', + 'collections.empty.text': 'Sla plekken op uit elke reis om deze lijst op te bouwen.', + 'collections.empty.noMatchTitle': 'Geen resultaten', + 'collections.empty.noMatchText': 'Geen opgeslagen plekken komen overeen met je filter of zoekopdracht.', + 'collections.empty.firstTitle': 'Begin je eerste collectie', + 'collections.empty.firstText': 'Maak een lijst om plekken op te slaan die je over reizen heen wilt onthouden.', + + 'collections.view.grid': 'Raster', + 'collections.view.list': 'Lijst', + 'collections.view.map': 'Kaart', + + 'collections.status.idea': 'Idee', + 'collections.status.want': 'Wil heen', + 'collections.status.visited': 'Bezocht', + 'collections.status.filterAll': 'Alle', + 'collections.status.cycleHint': 'tik om te wijzigen', + + 'collections.copyToTrip': 'Naar reis kopiëren', + 'collections.copyToTripTitle': 'Naar reis kopiëren', + 'collections.copyN': '{count} naar reis kopiëren', + 'collections.copyToTripSearch': 'Reizen zoeken', + 'collections.copyToTripConfirm': 'Kopiëren', + 'collections.noTrips': 'Nog geen reizen', + 'collections.alreadyInTrip': 'Al in deze reis', + 'collections.copied': 'Naar reis gekopieerd', + 'collections.copiedCount': '{count} plekken gekopieerd', + 'collections.skippedDuplicates': '{count} duplicaten overgeslagen', + 'collections.copyNothing': 'Niets om te kopiëren', + 'collections.removeFromList': 'Uit lijst verwijderen', + 'collections.removeFromListConfirm': 'Deze plek uit de lijst verwijderen?', + 'collections.removeFromCollection': 'Uit collectie verwijderen', + + 'collections.saved': 'Opgeslagen in {name}', + 'collections.savedUndo': 'Ongedaan maken', + 'collections.viewInCollection': 'Bekijken', + 'collections.duplicateWarning': 'Deze plek staat al in de lijst', + + 'collections.search': 'Plekken zoeken', + 'collections.selectMode': 'Selecteren', + 'collections.selectedCount': '{count} geselecteerd', + + 'collections.pickList': 'In lijst opslaan', + 'collections.pickListPlaceholder': 'Kies een lijst', + 'collections.addedToList': 'Toegevoegd aan {name}', + 'collections.removedFromList': 'Verwijderd uit {name}', + 'collections.inLists': 'In je lijsten', + 'collections.otherLists': 'Aan een lijst toevoegen', + 'collections.noListsYet': 'Maak eerst een lijst om plekken op te slaan.', + 'collections.removedFromAll': 'Uit collectie verwijderd', + 'collections.picker.title': 'Opgeslagen plekken', + 'collections.picker.search': 'Zoek in je opgeslagen plekken', + 'collections.picker.empty': 'Geen opgeslagen plekken om toe te voegen', + 'collections.picker.hint': 'Kies een plek uit je collecties', + 'collections.picker.use': 'Gebruiken', + + 'collections.share.title': 'Lijst delen', + 'collections.share.members': 'Leden', + 'collections.share.owner': 'Eigenaar', + 'collections.share.pending': 'uitnodiging in afwachting', + 'collections.share.invite': 'Iemand uitnodigen', + 'collections.share.inviteUser': 'Gebruiker selecteren', + 'collections.share.sendInvite': 'Uitnodiging sturen', + 'collections.share.inviteHint': 'Uitgenodigde personen kunnen deze lijst bekijken en bewerken.', + 'collections.share.cancel': 'Annuleren', + 'collections.share.leave': 'Lijst verlaten', + 'collections.share.remove': 'Verwijderen', + + 'collections.invites.title': 'Uitnodigingen', + 'collections.invites.from': 'van', + 'collections.invites.accept': 'Accepteren', + 'collections.invites.decline': 'Weigeren', + 'collections.invites.received': 'Je hebt een nieuwe lijstuitnodiging', + 'collections.invite.sent': 'Uitnodiging verzonden', + 'collections.invite.error': 'Kon uitnodiging niet versturen', + 'collections.invite.accepted': 'Uitnodiging geaccepteerd', + 'collections.invite.declined': 'Uitnodiging geweigerd', + + 'collections.widget.title': 'Collecties', + 'collections.widget.empty': 'Nog geen opgeslagen plekken', + 'collections.widget.savedCount': '{count} opgeslagen', +}; + +export default collection; diff --git a/shared/src/i18n/nl/index.ts b/shared/src/i18n/nl/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/nl/index.ts +++ b/shared/src/i18n/nl/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/nl/inspector.ts b/shared/src/i18n/nl/inspector.ts index a7727eec4..e1af9100b 100644 --- a/shared/src/i18n/nl/inspector.ts +++ b/shared/src/i18n/nl/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Reservering in behandeling', 'inspector.google': 'Openen in Google Maps', 'inspector.website': 'Website openen', + 'inspector.saveToCollection': 'In collectie opslaan', + 'inspector.savedToCollection': 'Opgeslagen', 'inspector.addRes': 'Reservering', 'inspector.editRes': 'Reservering bewerken', 'inspector.participants': 'Deelnemers', diff --git a/shared/src/i18n/pl/admin.ts b/shared/src/i18n/pl/admin.ts index d7c352bd9..87fed4277 100644 --- a/shared/src/i18n/pl/admin.ts +++ b/shared/src/i18n/pl/admin.ts @@ -327,6 +327,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Dziennik podróży', 'admin.addons.catalog.journey.description': 'Śledzenie podróży i dziennik z zameldowaniami, zdjęciami i codziennymi historiami', + 'admin.addons.catalog.collections.name': 'Kolekcje', + 'admin.addons.catalog.collections.description': + 'Osobista biblioteka miejsc — zapisuj miejsca z podróży na nazwanych listach, kopiuj je do dowolnej podróży i udostępniaj innym', 'admin.passkey.title': 'Logowanie kluczem dostępu', 'admin.passkey.cardHint': 'Pozwól użytkownikom logować się kluczami dostępu (WebAuthn). Domyślnie wyłączone.', 'admin.passkey.login': 'Włącz logowanie kluczem dostępu', diff --git a/shared/src/i18n/pl/collection.ts b/shared/src/i18n/pl/collection.ts new file mode 100644 index 000000000..6fad7d3f5 --- /dev/null +++ b/shared/src/i18n/pl/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Kolekcje', + 'collections.subtitle': 'Twoje zapisane miejsca, uporządkowane na listach', + + 'collections.newList': 'Nowa lista', + 'collections.create': 'Utwórz', + 'collections.editList': 'Zmień nazwę', + 'collections.listMenu': 'Opcje listy', + 'collections.deleteList': 'Usuń listę', + 'collections.deleteListConfirm': 'Spowoduje to trwałe usunięcie listy i wszystkich zapisanych w niej miejsc. Tej operacji nie można cofnąć.', + 'collections.listName': 'Nazwa listy', + 'collections.listNamePlaceholder': 'np. Tokio 2025', + 'collections.listColor': 'Kolor', + 'collections.allSaved': 'Wszystkie zapisane', + 'collections.shared': 'Udostępniona', + + 'collections.empty.title': 'Brak miejsc', + 'collections.empty.text': 'Zapisuj miejsca z dowolnej podróży, aby zbudować tę listę.', + 'collections.empty.noMatchTitle': 'Brak wyników', + 'collections.empty.noMatchText': 'Żadne zapisane miejsce nie pasuje do filtra ani wyszukiwania.', + 'collections.empty.firstTitle': 'Rozpocznij swoją pierwszą kolekcję', + 'collections.empty.firstText': 'Utwórz listę, aby zapisywać miejsca, które chcesz pamiętać między podróżami.', + + 'collections.view.grid': 'Siatka', + 'collections.view.list': 'Lista', + 'collections.view.map': 'Mapa', + + 'collections.status.idea': 'Pomysł', + 'collections.status.want': 'Chcę odwiedzić', + 'collections.status.visited': 'Odwiedzone', + 'collections.status.filterAll': 'Wszystkie', + 'collections.status.cycleHint': 'dotknij, aby zmienić', + + 'collections.copyToTrip': 'Kopiuj do podróży', + 'collections.copyToTripTitle': 'Kopiuj do podróży', + 'collections.copyN': 'Kopiuj {count} do podróży', + 'collections.copyToTripSearch': 'Szukaj podróży', + 'collections.copyToTripConfirm': 'Kopiuj', + 'collections.noTrips': 'Brak podróży', + 'collections.alreadyInTrip': 'Już w tej podróży', + 'collections.copied': 'Skopiowano do podróży', + 'collections.copiedCount': 'Skopiowano {count} miejsc', + 'collections.skippedDuplicates': 'Pominięto {count} duplikatów', + 'collections.copyNothing': 'Nie ma czego kopiować', + 'collections.removeFromList': 'Usuń z listy', + 'collections.removeFromListConfirm': 'Usunąć to miejsce z listy?', + 'collections.removeFromCollection': 'Usuń z kolekcji', + + 'collections.saved': 'Zapisano w {name}', + 'collections.savedUndo': 'Cofnij', + 'collections.viewInCollection': 'Pokaż', + 'collections.duplicateWarning': 'To miejsce jest już na liście', + + 'collections.search': 'Szukaj miejsc', + 'collections.selectMode': 'Zaznacz', + 'collections.selectedCount': 'Zaznaczono: {count}', + + 'collections.pickList': 'Zapisz na liście', + 'collections.pickListPlaceholder': 'Wybierz listę', + 'collections.addedToList': 'Dodano do {name}', + 'collections.removedFromList': 'Usunięto z {name}', + 'collections.inLists': 'Na twoich listach', + 'collections.otherLists': 'Dodaj do listy', + 'collections.noListsYet': 'Najpierw utwórz listę, aby zapisywać miejsca.', + 'collections.removedFromAll': 'Usunięto z kolekcji', + 'collections.picker.title': 'Zapisane miejsca', + 'collections.picker.search': 'Przeszukaj zapisane miejsca', + 'collections.picker.empty': 'Brak zapisanych miejsc do dodania', + 'collections.picker.hint': 'Wybierz miejsce ze swoich kolekcji', + 'collections.picker.use': 'Użyj', + + 'collections.share.title': 'Udostępnij listę', + 'collections.share.members': 'Członkowie', + 'collections.share.owner': 'Właściciel', + 'collections.share.pending': 'oczekujące zaproszenie', + 'collections.share.invite': 'Zaproś kogoś', + 'collections.share.inviteUser': 'Wybierz użytkownika', + 'collections.share.sendInvite': 'Wyślij zaproszenie', + 'collections.share.inviteHint': 'Zaproszone osoby mogą przeglądać i edytować tę listę.', + 'collections.share.cancel': 'Anuluj', + 'collections.share.leave': 'Opuść listę', + 'collections.share.remove': 'Usuń', + + 'collections.invites.title': 'Zaproszenia', + 'collections.invites.from': 'od', + 'collections.invites.accept': 'Akceptuj', + 'collections.invites.decline': 'Odrzuć', + 'collections.invites.received': 'Masz nowe zaproszenie do listy', + 'collections.invite.sent': 'Zaproszenie wysłane', + 'collections.invite.error': 'Nie udało się wysłać zaproszenia', + 'collections.invite.accepted': 'Zaproszenie zaakceptowane', + 'collections.invite.declined': 'Zaproszenie odrzucone', + + 'collections.widget.title': 'Kolekcje', + 'collections.widget.empty': 'Brak zapisanych miejsc', + 'collections.widget.savedCount': '{count} zapisanych', +}; + +export default collection; diff --git a/shared/src/i18n/pl/index.ts b/shared/src/i18n/pl/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/pl/index.ts +++ b/shared/src/i18n/pl/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/pl/inspector.ts b/shared/src/i18n/pl/inspector.ts index 7e652dccb..2aba14a25 100644 --- a/shared/src/i18n/pl/inspector.ts +++ b/shared/src/i18n/pl/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Oczekująca rezerwacja', 'inspector.google': 'Otwórz w Mapach Google', 'inspector.website': 'Otwórz stronę internetową', + 'inspector.saveToCollection': 'Zapisz w kolekcji', + 'inspector.savedToCollection': 'Zapisano', 'inspector.addRes': 'Rezerwacja', 'inspector.editRes': 'Edytuj rezerwację', 'inspector.participants': 'Uczestnicy', diff --git a/shared/src/i18n/ru/admin.ts b/shared/src/i18n/ru/admin.ts index 30053b7f4..6015ffd1c 100644 --- a/shared/src/i18n/ru/admin.ts +++ b/shared/src/i18n/ru/admin.ts @@ -322,6 +322,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Путешествие', 'admin.addons.catalog.journey.description': 'Отслеживание поездок и дневник путешествий с отметками, фото и ежедневными историями', + 'admin.addons.catalog.collections.name': 'Коллекции', + 'admin.addons.catalog.collections.description': + 'Личная библиотека мест — сохраняйте места из разных поездок в именованные списки, копируйте в любую поездку, делитесь с другими', 'admin.passkey.title': 'Вход по passkey', 'admin.passkey.cardHint': 'Разрешите пользователям входить с помощью passkeys (WebAuthn). По умолчанию выключено.', 'admin.passkey.login': 'Включить вход по passkey', diff --git a/shared/src/i18n/ru/collection.ts b/shared/src/i18n/ru/collection.ts new file mode 100644 index 000000000..3b194b610 --- /dev/null +++ b/shared/src/i18n/ru/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Коллекции', + 'collections.subtitle': 'Ваши сохранённые места, организованные в списки', + + 'collections.newList': 'Новый список', + 'collections.create': 'Создать', + 'collections.editList': 'Переименовать', + 'collections.listMenu': 'Параметры списка', + 'collections.deleteList': 'Удалить список', + 'collections.deleteListConfirm': 'Это навсегда удалит список и все сохранённые в нём места. Это нельзя отменить.', + 'collections.listName': 'Название списка', + 'collections.listNamePlaceholder': 'например, Токио 2025', + 'collections.listColor': 'Цвет', + 'collections.allSaved': 'Все сохранённые', + 'collections.shared': 'Общий', + + 'collections.empty.title': 'Пока нет мест', + 'collections.empty.text': 'Сохраняйте места из любой поездки, чтобы наполнить этот список.', + 'collections.empty.noMatchTitle': 'Совпадений нет', + 'collections.empty.noMatchText': 'Нет сохранённых мест, подходящих под ваш фильтр или поиск.', + 'collections.empty.firstTitle': 'Создайте свою первую коллекцию', + 'collections.empty.firstText': 'Создайте список, чтобы сохранять места, которые хотите запомнить между поездками.', + + 'collections.view.grid': 'Сетка', + 'collections.view.list': 'Список', + 'collections.view.map': 'Карта', + + 'collections.status.idea': 'Идея', + 'collections.status.want': 'Хочу посетить', + 'collections.status.visited': 'Посещено', + 'collections.status.filterAll': 'Все', + 'collections.status.cycleHint': 'нажмите, чтобы изменить', + + 'collections.copyToTrip': 'Скопировать в поездку', + 'collections.copyToTripTitle': 'Скопировать в поездку', + 'collections.copyN': 'Скопировать {count} в поездку', + 'collections.copyToTripSearch': 'Поиск поездок', + 'collections.copyToTripConfirm': 'Скопировать', + 'collections.noTrips': 'Пока нет поездок', + 'collections.alreadyInTrip': 'Уже в этой поездке', + 'collections.copied': 'Скопировано в поездку', + 'collections.copiedCount': 'Скопировано мест: {count}', + 'collections.skippedDuplicates': 'Пропущено дубликатов: {count}', + 'collections.copyNothing': 'Нечего копировать', + 'collections.removeFromList': 'Удалить из списка', + 'collections.removeFromListConfirm': 'Удалить это место из списка?', + 'collections.removeFromCollection': 'Удалить из коллекции', + + 'collections.saved': 'Сохранено в {name}', + 'collections.savedUndo': 'Отменить', + 'collections.viewInCollection': 'Открыть', + 'collections.duplicateWarning': 'Это место уже есть в списке', + + 'collections.search': 'Поиск мест', + 'collections.selectMode': 'Выбрать', + 'collections.selectedCount': 'Выбрано: {count}', + + 'collections.pickList': 'Сохранить в список', + 'collections.pickListPlaceholder': 'Выберите список', + 'collections.addedToList': 'Добавлено в {name}', + 'collections.removedFromList': 'Удалено из {name}', + 'collections.inLists': 'В ваших списках', + 'collections.otherLists': 'Добавить в список', + 'collections.noListsYet': 'Сначала создайте список, чтобы сохранять места.', + 'collections.removedFromAll': 'Удалено из коллекции', + 'collections.picker.title': 'Сохранённые места', + 'collections.picker.search': 'Поиск по сохранённым местам', + 'collections.picker.empty': 'Нет сохранённых мест для добавления', + 'collections.picker.hint': 'Выберите место из своих коллекций', + 'collections.picker.use': 'Использовать', + + 'collections.share.title': 'Поделиться списком', + 'collections.share.members': 'Участники', + 'collections.share.owner': 'Владелец', + 'collections.share.pending': 'ожидает приглашения', + 'collections.share.invite': 'Пригласить', + 'collections.share.inviteUser': 'Выберите пользователя', + 'collections.share.sendInvite': 'Отправить приглашение', + 'collections.share.inviteHint': 'Приглашённые могут просматривать и редактировать этот список.', + 'collections.share.cancel': 'Отмена', + 'collections.share.leave': 'Покинуть список', + 'collections.share.remove': 'Удалить', + + 'collections.invites.title': 'Приглашения', + 'collections.invites.from': 'от', + 'collections.invites.accept': 'Принять', + 'collections.invites.decline': 'Отклонить', + 'collections.invites.received': 'У вас новое приглашение в список', + 'collections.invite.sent': 'Приглашение отправлено', + 'collections.invite.error': 'Не удалось отправить приглашение', + 'collections.invite.accepted': 'Приглашение принято', + 'collections.invite.declined': 'Приглашение отклонено', + + 'collections.widget.title': 'Коллекции', + 'collections.widget.empty': 'Пока нет сохранённых мест', + 'collections.widget.savedCount': 'Сохранено: {count}', +}; + +export default collection; diff --git a/shared/src/i18n/ru/index.ts b/shared/src/i18n/ru/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/ru/index.ts +++ b/shared/src/i18n/ru/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/ru/inspector.ts b/shared/src/i18n/ru/inspector.ts index 51bd2aa1d..80ba9681a 100644 --- a/shared/src/i18n/ru/inspector.ts +++ b/shared/src/i18n/ru/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Ожидающее бронирование', 'inspector.google': 'Открыть в Google Maps', 'inspector.website': 'Открыть сайт', + 'inspector.saveToCollection': 'Сохранить в коллекцию', + 'inspector.savedToCollection': 'Сохранено', 'inspector.addRes': 'Бронирование', 'inspector.editRes': 'Редактировать бронирование', 'inspector.participants': 'Участники', diff --git a/shared/src/i18n/sv/admin.ts b/shared/src/i18n/sv/admin.ts index 62946aeeb..cc6aeab71 100644 --- a/shared/src/i18n/sv/admin.ts +++ b/shared/src/i18n/sv/admin.ts @@ -331,6 +331,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Journey', 'admin.addons.catalog.journey.description': 'Resespårning och resedagbok med incheckningar, foton och dagliga inlägg', + 'admin.addons.catalog.collections.name': 'Samlingar', + 'admin.addons.catalog.collections.description': + 'Personligt platsbibliotek — spara platser mellan resor i namngivna listor, kopiera till valfri resa, dela med andra', 'admin.passkey.title': 'Inloggningsnyckel', 'admin.passkey.cardHint': 'Låter användare att logga in med inloggningsnyckel (WebAuthn). Avstängt som standard.', 'admin.passkey.login': 'Aktivera inloggningsnyckel', diff --git a/shared/src/i18n/sv/collection.ts b/shared/src/i18n/sv/collection.ts new file mode 100644 index 000000000..1128d8976 --- /dev/null +++ b/shared/src/i18n/sv/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Samlingar', + 'collections.subtitle': 'Dina sparade platser, organiserade i listor', + + 'collections.newList': 'Ny lista', + 'collections.create': 'Skapa', + 'collections.editList': 'Byt namn', + 'collections.listMenu': 'Listalternativ', + 'collections.deleteList': 'Ta bort lista', + 'collections.deleteListConfirm': 'Detta tar bort listan och alla sparade platser permanent. Detta kan inte ångras.', + 'collections.listName': 'Listnamn', + 'collections.listNamePlaceholder': 't.ex. Tokyo 2025', + 'collections.listColor': 'Färg', + 'collections.allSaved': 'Alla sparade', + 'collections.shared': 'Delad', + + 'collections.empty.title': 'Inga platser ännu', + 'collections.empty.text': 'Spara platser från valfri resa för att bygga upp den här listan.', + 'collections.empty.noMatchTitle': 'Inga träffar', + 'collections.empty.noMatchText': 'Inga sparade platser matchar ditt filter eller din sökning.', + 'collections.empty.firstTitle': 'Skapa din första samling', + 'collections.empty.firstText': 'Skapa en lista för att spara platser du vill minnas mellan resor.', + + 'collections.view.grid': 'Rutnät', + 'collections.view.list': 'Lista', + 'collections.view.map': 'Karta', + + 'collections.status.idea': 'Idé', + 'collections.status.want': 'Vill besöka', + 'collections.status.visited': 'Besökt', + 'collections.status.filterAll': 'Alla', + 'collections.status.cycleHint': 'tryck för att ändra', + + 'collections.copyToTrip': 'Kopiera till resa', + 'collections.copyToTripTitle': 'Kopiera till resa', + 'collections.copyN': 'Kopiera {count} till resa', + 'collections.copyToTripSearch': 'Sök resor', + 'collections.copyToTripConfirm': 'Kopiera', + 'collections.noTrips': 'Inga resor ännu', + 'collections.alreadyInTrip': 'Redan i den här resan', + 'collections.copied': 'Kopierad till resa', + 'collections.copiedCount': '{count} platser kopierade', + 'collections.skippedDuplicates': '{count} dubbletter hoppades över', + 'collections.copyNothing': 'Inget att kopiera', + 'collections.removeFromList': 'Ta bort från lista', + 'collections.removeFromListConfirm': 'Ta bort den här platsen från listan?', + 'collections.removeFromCollection': 'Ta bort från samling', + + 'collections.saved': 'Sparad i {name}', + 'collections.savedUndo': 'Ångra', + 'collections.viewInCollection': 'Visa', + 'collections.duplicateWarning': 'Den här platsen finns redan i listan', + + 'collections.search': 'Sök platser', + 'collections.selectMode': 'Välj', + 'collections.selectedCount': '{count} valda', + + 'collections.pickList': 'Spara i lista', + 'collections.pickListPlaceholder': 'Välj en lista', + 'collections.addedToList': 'Tillagd i {name}', + 'collections.removedFromList': 'Borttagen från {name}', + 'collections.inLists': 'I dina listor', + 'collections.otherLists': 'Lägg till i en lista', + 'collections.noListsYet': 'Skapa en lista först för att spara platser.', + 'collections.removedFromAll': 'Borttagen från samlingen', + 'collections.picker.title': 'Sparade platser', + 'collections.picker.search': 'Sök bland dina sparade platser', + 'collections.picker.empty': 'Inga sparade platser att lägga till', + 'collections.picker.hint': 'Välj en plats från dina samlingar', + 'collections.picker.use': 'Använd', + + 'collections.share.title': 'Dela lista', + 'collections.share.members': 'Medlemmar', + 'collections.share.owner': 'Ägare', + 'collections.share.pending': 'väntande inbjudan', + 'collections.share.invite': 'Bjud in någon', + 'collections.share.inviteUser': 'Välj användare', + 'collections.share.sendInvite': 'Skicka inbjudan', + 'collections.share.inviteHint': 'Inbjudna personer kan visa och redigera den här listan.', + 'collections.share.cancel': 'Avbryt', + 'collections.share.leave': 'Lämna lista', + 'collections.share.remove': 'Ta bort', + + 'collections.invites.title': 'Inbjudningar', + 'collections.invites.from': 'från', + 'collections.invites.accept': 'Acceptera', + 'collections.invites.decline': 'Avböj', + 'collections.invites.received': 'Du har en ny listinbjudan', + 'collections.invite.sent': 'Inbjudan skickad', + 'collections.invite.error': 'Det gick inte att skicka inbjudan', + 'collections.invite.accepted': 'Inbjudan accepterad', + 'collections.invite.declined': 'Inbjudan avböjd', + + 'collections.widget.title': 'Samlingar', + 'collections.widget.empty': 'Inga sparade platser ännu', + 'collections.widget.savedCount': '{count} sparade', +}; + +export default collection; diff --git a/shared/src/i18n/sv/index.ts b/shared/src/i18n/sv/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/sv/index.ts +++ b/shared/src/i18n/sv/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/sv/inspector.ts b/shared/src/i18n/sv/inspector.ts index 787d2c9f7..b8fc02314 100644 --- a/shared/src/i18n/sv/inspector.ts +++ b/shared/src/i18n/sv/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Pendlande bokning', 'inspector.google': 'Öppna i Google Maps', 'inspector.website': 'Öppna hemsida', + 'inspector.saveToCollection': 'Spara i samling', + 'inspector.savedToCollection': 'Sparad', 'inspector.addRes': 'Bokning', 'inspector.editRes': 'Redigera bokning', 'inspector.participants': 'Deltagare', diff --git a/shared/src/i18n/tr/admin.ts b/shared/src/i18n/tr/admin.ts index c5daf4c76..02bcd1dc6 100644 --- a/shared/src/i18n/tr/admin.ts +++ b/shared/src/i18n/tr/admin.ts @@ -325,6 +325,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Seyahat', 'admin.addons.catalog.journey.description': 'Check-in, fotoğraf ve günlük hikâyelerle seyahat takibi ve seyahat günlüğü', + 'admin.addons.catalog.collections.name': 'Koleksiyonlar', + 'admin.addons.catalog.collections.description': + 'Kişisel yer kitaplığı — yerleri geziler arasında adlandırılmış listelere kaydet, herhangi bir geziye kopyala, başkalarıyla paylaş', 'admin.passkey.title': 'Passkey ile oturum açma', 'admin.passkey.cardHint': 'Kullanıcıların passkey (WebAuthn) ile oturum açmasına izin verin. Varsayılan olarak kapalı.', diff --git a/shared/src/i18n/tr/collection.ts b/shared/src/i18n/tr/collection.ts new file mode 100644 index 000000000..f68c5acbb --- /dev/null +++ b/shared/src/i18n/tr/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Koleksiyonlar', + 'collections.subtitle': 'Kaydettiğin yerler, listeler halinde düzenlenmiş', + + 'collections.newList': 'Yeni liste', + 'collections.create': 'Oluştur', + 'collections.editList': 'Yeniden adlandır', + 'collections.listMenu': 'Liste seçenekleri', + 'collections.deleteList': 'Listeyi sil', + 'collections.deleteListConfirm': 'Bu, listeyi ve içindeki tüm kaydedilmiş yerleri kalıcı olarak siler. Bu işlem geri alınamaz.', + 'collections.listName': 'Liste adı', + 'collections.listNamePlaceholder': 'örn. Tokyo 2025', + 'collections.listColor': 'Renk', + 'collections.allSaved': 'Tüm kayıtlılar', + 'collections.shared': 'Paylaşılan', + + 'collections.empty.title': 'Henüz yer yok', + 'collections.empty.text': 'Bu listeyi oluşturmak için herhangi bir geziden yer kaydet.', + 'collections.empty.noMatchTitle': 'Eşleşme yok', + 'collections.empty.noMatchText': 'Filtrenle veya aramanla eşleşen kayıtlı yer yok.', + 'collections.empty.firstTitle': 'İlk koleksiyonunu başlat', + 'collections.empty.firstText': 'Geziler arasında hatırlamak istediğin yerleri kaydetmek için bir liste oluştur.', + + 'collections.view.grid': 'Izgara', + 'collections.view.list': 'Liste', + 'collections.view.map': 'Harita', + + 'collections.status.idea': 'Fikir', + 'collections.status.want': 'Gitmek istiyorum', + 'collections.status.visited': 'Gidildi', + 'collections.status.filterAll': 'Tümü', + 'collections.status.cycleHint': 'değiştirmek için dokun', + + 'collections.copyToTrip': 'Geziye kopyala', + 'collections.copyToTripTitle': 'Geziye kopyala', + 'collections.copyN': '{count} öğeyi geziye kopyala', + 'collections.copyToTripSearch': 'Gezi ara', + 'collections.copyToTripConfirm': 'Kopyala', + 'collections.noTrips': 'Henüz gezi yok', + 'collections.alreadyInTrip': 'Bu gezide zaten var', + 'collections.copied': 'Geziye kopyalandı', + 'collections.copiedCount': '{count} yer kopyalandı', + 'collections.skippedDuplicates': '{count} yinelenen atlandı', + 'collections.copyNothing': 'Kopyalanacak bir şey yok', + 'collections.removeFromList': 'Listeden kaldır', + 'collections.removeFromListConfirm': 'Bu yer listeden kaldırılsın mı?', + 'collections.removeFromCollection': 'Koleksiyondan kaldır', + + 'collections.saved': '{name} listesine kaydedildi', + 'collections.savedUndo': 'Geri al', + 'collections.viewInCollection': 'Görüntüle', + 'collections.duplicateWarning': 'Bu yer listede zaten var', + + 'collections.search': 'Yer ara', + 'collections.selectMode': 'Seç', + 'collections.selectedCount': '{count} seçildi', + + 'collections.pickList': 'Listeye kaydet', + 'collections.pickListPlaceholder': 'Bir liste seç', + 'collections.addedToList': '{name} listesine eklendi', + 'collections.removedFromList': '{name} listesinden kaldırıldı', + 'collections.inLists': 'Listelerinde', + 'collections.otherLists': 'Bir listeye ekle', + 'collections.noListsYet': 'Yer kaydetmek için önce bir liste oluştur.', + 'collections.removedFromAll': 'Koleksiyondan kaldırıldı', + 'collections.picker.title': 'Kaydedilen yerler', + 'collections.picker.search': 'Kaydedilen yerlerinde ara', + 'collections.picker.empty': 'Eklenecek kayıtlı yer yok', + 'collections.picker.hint': 'Koleksiyonlarından bir yer seç', + 'collections.picker.use': 'Kullan', + + 'collections.share.title': 'Listeyi paylaş', + 'collections.share.members': 'Üyeler', + 'collections.share.owner': 'Sahip', + 'collections.share.pending': 'bekleyen davet', + 'collections.share.invite': 'Birini davet et', + 'collections.share.inviteUser': 'Kullanıcı seç', + 'collections.share.sendInvite': 'Davet gönder', + 'collections.share.inviteHint': 'Davet edilen kişiler bu listeyi görüntüleyebilir ve düzenleyebilir.', + 'collections.share.cancel': 'İptal', + 'collections.share.leave': 'Listeden ayrıl', + 'collections.share.remove': 'Kaldır', + + 'collections.invites.title': 'Davetler', + 'collections.invites.from': 'gönderen', + 'collections.invites.accept': 'Kabul et', + 'collections.invites.decline': 'Reddet', + 'collections.invites.received': 'Yeni bir liste davetin var', + 'collections.invite.sent': 'Davet gönderildi', + 'collections.invite.error': 'Davet gönderilemedi', + 'collections.invite.accepted': 'Davet kabul edildi', + 'collections.invite.declined': 'Davet reddedildi', + + 'collections.widget.title': 'Koleksiyonlar', + 'collections.widget.empty': 'Henüz kaydedilmiş yer yok', + 'collections.widget.savedCount': '{count} kayıtlı', +}; + +export default collection; diff --git a/shared/src/i18n/tr/index.ts b/shared/src/i18n/tr/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/tr/index.ts +++ b/shared/src/i18n/tr/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/tr/inspector.ts b/shared/src/i18n/tr/inspector.ts index 358f2aa11..a059764bf 100644 --- a/shared/src/i18n/tr/inspector.ts +++ b/shared/src/i18n/tr/inspector.ts @@ -13,6 +13,8 @@ const inspector: TranslationStrings = { 'inspector.confirmedRes': 'Onaylanmış Rezervasyon', 'inspector.pendingRes': 'Bekleyen Rezervasyon', 'inspector.google': "Google Haritalar'da aç", + 'inspector.saveToCollection': 'Koleksiyona kaydet', + 'inspector.savedToCollection': 'Kaydedildi', 'inspector.website': 'Web Sitesini Aç', 'inspector.addRes': 'Rezervasyon', 'inspector.editRes': 'Rezervasyonu Düzenle', diff --git a/shared/src/i18n/uk/admin.ts b/shared/src/i18n/uk/admin.ts index 4d41a59a3..f8197ce79 100644 --- a/shared/src/i18n/uk/admin.ts +++ b/shared/src/i18n/uk/admin.ts @@ -321,6 +321,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Journey', 'admin.addons.catalog.journey.description': 'Відстеження поїздок і щоденник подорожей з позначками, фото та щоденними історіями', + 'admin.addons.catalog.collections.name': 'Колекції', + 'admin.addons.catalog.collections.description': + 'Особиста бібліотека місць — зберігайте місця з різних подорожей у іменовані списки, копіюйте в будь-яку подорож, діліться з іншими', 'admin.passkey.title': 'Вхід за допомогою passkey', 'admin.passkey.cardHint': 'Дозволити користувачам входити за допомогою passkey (WebAuthn). За замовчуванням вимкнено.', diff --git a/shared/src/i18n/uk/collection.ts b/shared/src/i18n/uk/collection.ts new file mode 100644 index 000000000..28cd3c78c --- /dev/null +++ b/shared/src/i18n/uk/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Колекції', + 'collections.subtitle': 'Ваші збережені місця, упорядковані у списки', + + 'collections.newList': 'Новий список', + 'collections.create': 'Створити', + 'collections.editList': 'Перейменувати', + 'collections.listMenu': 'Параметри списку', + 'collections.deleteList': 'Видалити список', + 'collections.deleteListConfirm': 'Це назавжди видалить список і всі збережені в ньому місця. Це не можна скасувати.', + 'collections.listName': 'Назва списку', + 'collections.listNamePlaceholder': 'напр., Токіо 2025', + 'collections.listColor': 'Колір', + 'collections.allSaved': 'Усі збережені', + 'collections.shared': 'Спільний', + + 'collections.empty.title': 'Поки немає місць', + 'collections.empty.text': 'Зберігайте місця з будь-якої подорожі, щоб наповнити цей список.', + 'collections.empty.noMatchTitle': 'Немає збігів', + 'collections.empty.noMatchText': 'Жодне збережене місце не відповідає вашому фільтру чи пошуку.', + 'collections.empty.firstTitle': 'Створіть свою першу колекцію', + 'collections.empty.firstText': 'Створіть список, щоб зберігати місця, які хочете пам’ятати між подорожами.', + + 'collections.view.grid': 'Сітка', + 'collections.view.list': 'Список', + 'collections.view.map': 'Карта', + + 'collections.status.idea': 'Ідея', + 'collections.status.want': 'Хочу відвідати', + 'collections.status.visited': 'Відвідано', + 'collections.status.filterAll': 'Усі', + 'collections.status.cycleHint': 'торкніться, щоб змінити', + + 'collections.copyToTrip': 'Скопіювати в подорож', + 'collections.copyToTripTitle': 'Скопіювати в подорож', + 'collections.copyN': 'Скопіювати {count} у подорож', + 'collections.copyToTripSearch': 'Пошук подорожей', + 'collections.copyToTripConfirm': 'Скопіювати', + 'collections.noTrips': 'Поки немає подорожей', + 'collections.alreadyInTrip': 'Уже в цій подорожі', + 'collections.copied': 'Скопійовано в подорож', + 'collections.copiedCount': 'Скопійовано місць: {count}', + 'collections.skippedDuplicates': 'Пропущено дублікатів: {count}', + 'collections.copyNothing': 'Нема чого копіювати', + 'collections.removeFromList': 'Видалити зі списку', + 'collections.removeFromListConfirm': 'Видалити це місце зі списку?', + 'collections.removeFromCollection': 'Видалити з колекції', + + 'collections.saved': 'Збережено в {name}', + 'collections.savedUndo': 'Скасувати', + 'collections.viewInCollection': 'Відкрити', + 'collections.duplicateWarning': 'Це місце вже є у списку', + + 'collections.search': 'Пошук місць', + 'collections.selectMode': 'Вибрати', + 'collections.selectedCount': 'Вибрано: {count}', + + 'collections.pickList': 'Зберегти у список', + 'collections.pickListPlaceholder': 'Виберіть список', + 'collections.addedToList': 'Додано до {name}', + 'collections.removedFromList': 'Видалено з {name}', + 'collections.inLists': 'У ваших списках', + 'collections.otherLists': 'Додати до списку', + 'collections.noListsYet': 'Спершу створіть список, щоб зберігати місця.', + 'collections.removedFromAll': 'Видалено з колекції', + 'collections.picker.title': 'Збережені місця', + 'collections.picker.search': 'Пошук збережених місць', + 'collections.picker.empty': 'Немає збережених місць для додавання', + 'collections.picker.hint': 'Виберіть місце зі своїх колекцій', + 'collections.picker.use': 'Використати', + + 'collections.share.title': 'Поділитися списком', + 'collections.share.members': 'Учасники', + 'collections.share.owner': 'Власник', + 'collections.share.pending': 'очікує запрошення', + 'collections.share.invite': 'Запросити', + 'collections.share.inviteUser': 'Виберіть користувача', + 'collections.share.sendInvite': 'Надіслати запрошення', + 'collections.share.inviteHint': 'Запрошені можуть переглядати та редагувати цей список.', + 'collections.share.cancel': 'Скасувати', + 'collections.share.leave': 'Покинути список', + 'collections.share.remove': 'Видалити', + + 'collections.invites.title': 'Запрошення', + 'collections.invites.from': 'від', + 'collections.invites.accept': 'Прийняти', + 'collections.invites.decline': 'Відхилити', + 'collections.invites.received': 'У вас нове запрошення до списку', + 'collections.invite.sent': 'Запрошення надіслано', + 'collections.invite.error': 'Не вдалося надіслати запрошення', + 'collections.invite.accepted': 'Запрошення прийнято', + 'collections.invite.declined': 'Запрошення відхилено', + + 'collections.widget.title': 'Колекції', + 'collections.widget.empty': 'Поки немає збережених місць', + 'collections.widget.savedCount': 'Збережено: {count}', +}; + +export default collection; diff --git a/shared/src/i18n/uk/index.ts b/shared/src/i18n/uk/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/uk/index.ts +++ b/shared/src/i18n/uk/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/uk/inspector.ts b/shared/src/i18n/uk/inspector.ts index ff0ef9d7b..e0ca4ea0d 100644 --- a/shared/src/i18n/uk/inspector.ts +++ b/shared/src/i18n/uk/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': 'Очікуване бронювання', 'inspector.google': 'Відкрити в Google Maps', 'inspector.website': 'Відкрити сайт', + 'inspector.saveToCollection': 'Зберегти в колекцію', + 'inspector.savedToCollection': 'Збережено', 'inspector.addRes': 'Бронювання', 'inspector.editRes': 'Редагувати бронювання', 'inspector.participants': 'Учасники', diff --git a/shared/src/i18n/vi/admin.ts b/shared/src/i18n/vi/admin.ts index 4bad9906e..9292acd31 100644 --- a/shared/src/i18n/vi/admin.ts +++ b/shared/src/i18n/vi/admin.ts @@ -331,6 +331,9 @@ const admin: TranslationStrings = { 'admin.addons.catalog.journey.name': 'Hành trình', 'admin.addons.catalog.journey.description': 'Theo dõi chuyến đi & nhật ký du lịch với thông tin đăng ký, ảnh và câu chuyện hàng ngày', + 'admin.addons.catalog.collections.name': 'Bộ sưu tập', + 'admin.addons.catalog.collections.description': + 'Thư viện địa điểm cá nhân — lưu địa điểm qua các chuyến đi vào danh sách có tên, sao chép vào bất kỳ chuyến đi nào, chia sẻ với người khác', 'admin.passkey.title': 'Đăng nhập bằng mật mã', 'admin.passkey.cardHint': 'Cho phép người dùng đăng nhập bằng mật mã (WebAuthn). Tắt theo mặc định.', 'admin.passkey.login': 'Kích hoạt đăng nhập bằng mật mã', diff --git a/shared/src/i18n/vi/collection.ts b/shared/src/i18n/vi/collection.ts new file mode 100644 index 000000000..a52c6dfcf --- /dev/null +++ b/shared/src/i18n/vi/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': 'Bộ sưu tập', + 'collections.subtitle': 'Những địa điểm bạn đã lưu, sắp xếp thành danh sách', + + 'collections.newList': 'Danh sách mới', + 'collections.create': 'Tạo', + 'collections.editList': 'Đổi tên', + 'collections.listMenu': 'Tùy chọn danh sách', + 'collections.deleteList': 'Xóa danh sách', + 'collections.deleteListConfirm': 'Thao tác này xóa vĩnh viễn danh sách và tất cả địa điểm đã lưu trong đó. Không thể hoàn tác.', + 'collections.listName': 'Tên danh sách', + 'collections.listNamePlaceholder': 'vd. Tokyo 2025', + 'collections.listColor': 'Màu', + 'collections.allSaved': 'Tất cả đã lưu', + 'collections.shared': 'Được chia sẻ', + + 'collections.empty.title': 'Chưa có địa điểm nào', + 'collections.empty.text': 'Lưu địa điểm từ bất kỳ chuyến đi nào để xây dựng danh sách này.', + 'collections.empty.noMatchTitle': 'Không có kết quả', + 'collections.empty.noMatchText': 'Không có địa điểm đã lưu nào khớp với bộ lọc hoặc tìm kiếm của bạn.', + 'collections.empty.firstTitle': 'Bắt đầu bộ sưu tập đầu tiên của bạn', + 'collections.empty.firstText': 'Tạo một danh sách để lưu những địa điểm bạn muốn ghi nhớ qua các chuyến đi.', + + 'collections.view.grid': 'Lưới', + 'collections.view.list': 'Danh sách', + 'collections.view.map': 'Bản đồ', + + 'collections.status.idea': 'Ý tưởng', + 'collections.status.want': 'Muốn đến', + 'collections.status.visited': 'Đã đến', + 'collections.status.filterAll': 'Tất cả', + 'collections.status.cycleHint': 'chạm để thay đổi', + + 'collections.copyToTrip': 'Sao chép vào chuyến đi', + 'collections.copyToTripTitle': 'Sao chép vào chuyến đi', + 'collections.copyN': 'Sao chép {count} vào chuyến đi', + 'collections.copyToTripSearch': 'Tìm chuyến đi', + 'collections.copyToTripConfirm': 'Sao chép', + 'collections.noTrips': 'Chưa có chuyến đi nào', + 'collections.alreadyInTrip': 'Đã có trong chuyến đi này', + 'collections.copied': 'Đã sao chép vào chuyến đi', + 'collections.copiedCount': 'Đã sao chép {count} địa điểm', + 'collections.skippedDuplicates': 'Đã bỏ qua {count} mục trùng lặp', + 'collections.copyNothing': 'Không có gì để sao chép', + 'collections.removeFromList': 'Xóa khỏi danh sách', + 'collections.removeFromListConfirm': 'Xóa địa điểm này khỏi danh sách?', + 'collections.removeFromCollection': 'Xóa khỏi Bộ sưu tập', + + 'collections.saved': 'Đã lưu vào {name}', + 'collections.savedUndo': 'Hoàn tác', + 'collections.viewInCollection': 'Xem', + 'collections.duplicateWarning': 'Địa điểm này đã có trong danh sách', + + 'collections.search': 'Tìm địa điểm', + 'collections.selectMode': 'Chọn', + 'collections.selectedCount': 'Đã chọn {count}', + + 'collections.pickList': 'Lưu vào danh sách', + 'collections.pickListPlaceholder': 'Chọn một danh sách', + 'collections.addedToList': 'Đã thêm vào {name}', + 'collections.removedFromList': 'Đã xóa khỏi {name}', + 'collections.inLists': 'Trong danh sách của bạn', + 'collections.otherLists': 'Thêm vào danh sách', + 'collections.noListsYet': 'Tạo một danh sách trước để lưu địa điểm.', + 'collections.removedFromAll': 'Đã xóa khỏi bộ sưu tập', + 'collections.picker.title': 'Địa điểm đã lưu', + 'collections.picker.search': 'Tìm trong địa điểm đã lưu của bạn', + 'collections.picker.empty': 'Không có địa điểm đã lưu nào để thêm', + 'collections.picker.hint': 'Chọn một địa điểm từ bộ sưu tập của bạn', + 'collections.picker.use': 'Dùng', + + 'collections.share.title': 'Chia sẻ danh sách', + 'collections.share.members': 'Thành viên', + 'collections.share.owner': 'Chủ sở hữu', + 'collections.share.pending': 'lời mời đang chờ', + 'collections.share.invite': 'Mời ai đó', + 'collections.share.inviteUser': 'Chọn người dùng', + 'collections.share.sendInvite': 'Gửi lời mời', + 'collections.share.inviteHint': 'Người được mời có thể xem và chỉnh sửa danh sách này.', + 'collections.share.cancel': 'Hủy', + 'collections.share.leave': 'Rời khỏi danh sách', + 'collections.share.remove': 'Xóa', + + 'collections.invites.title': 'Lời mời', + 'collections.invites.from': 'từ', + 'collections.invites.accept': 'Chấp nhận', + 'collections.invites.decline': 'Từ chối', + 'collections.invites.received': 'Bạn có một lời mời danh sách mới', + 'collections.invite.sent': 'Đã gửi lời mời', + 'collections.invite.error': 'Không thể gửi lời mời', + 'collections.invite.accepted': 'Đã chấp nhận lời mời', + 'collections.invite.declined': 'Đã từ chối lời mời', + + 'collections.widget.title': 'Bộ sưu tập', + 'collections.widget.empty': 'Chưa có địa điểm đã lưu', + 'collections.widget.savedCount': 'Đã lưu {count}', +}; + +export default collection; diff --git a/shared/src/i18n/vi/index.ts b/shared/src/i18n/vi/index.ts index 36f5a56b4..bcd280f42 100644 --- a/shared/src/i18n/vi/index.ts +++ b/shared/src/i18n/vi/index.ts @@ -40,6 +40,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; const locale = { ...common, @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/vi/inspector.ts b/shared/src/i18n/vi/inspector.ts index 80cfaf9bf..45bee6d5e 100644 --- a/shared/src/i18n/vi/inspector.ts +++ b/shared/src/i18n/vi/inspector.ts @@ -13,6 +13,8 @@ const inspector: TranslationStrings = { 'inspector.confirmedRes': 'Đã xác nhận đặt chỗ', 'inspector.pendingRes': 'Đang chờ đặt chỗ', 'inspector.google': 'Mở trong Google Maps', + 'inspector.saveToCollection': 'Lưu vào Bộ sưu tập', + 'inspector.savedToCollection': 'Đã lưu', 'inspector.website': 'Mở trang web', 'inspector.addRes': 'Sự đặt chỗ', 'inspector.editRes': 'Chỉnh sửa đặt chỗ', diff --git a/shared/src/i18n/zh-TW/admin.ts b/shared/src/i18n/zh-TW/admin.ts index 23df9cf2b..8498dd5a5 100644 --- a/shared/src/i18n/zh-TW/admin.ts +++ b/shared/src/i18n/zh-TW/admin.ts @@ -308,6 +308,9 @@ const admin: TranslationStrings = { 'admin.tabs.permissions': '許可權', 'admin.addons.catalog.journey.name': '旅程', 'admin.addons.catalog.journey.description': '旅行追蹤與旅行日誌,包含打卡、照片和每日故事', + 'admin.addons.catalog.collections.name': '收藏', + 'admin.addons.catalog.collections.description': + '個人地點庫 — 將各行程的地點儲存到具名清單中,複製到任意行程,並與他人分享', 'admin.passkey.title': 'Passkey 登入', 'admin.passkey.cardHint': '讓使用者使用 Passkey(WebAuthn)登入。預設為關閉。', 'admin.passkey.login': '啟用 Passkey 登入', diff --git a/shared/src/i18n/zh-TW/collection.ts b/shared/src/i18n/zh-TW/collection.ts new file mode 100644 index 000000000..d1b6febdc --- /dev/null +++ b/shared/src/i18n/zh-TW/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': '收藏', + 'collections.subtitle': '你儲存的地點,依清單整理', + + 'collections.newList': '新增清單', + 'collections.create': '建立', + 'collections.editList': '重新命名', + 'collections.listMenu': '清單選項', + 'collections.deleteList': '刪除清單', + 'collections.deleteListConfirm': '這將永久刪除該清單及其所有已儲存的地點,且無法復原。', + 'collections.listName': '清單名稱', + 'collections.listNamePlaceholder': '例如:東京 2025', + 'collections.listColor': '顏色', + 'collections.allSaved': '全部已儲存', + 'collections.shared': '已分享', + + 'collections.empty.title': '尚無地點', + 'collections.empty.text': '從任何行程儲存地點來建立此清單。', + 'collections.empty.noMatchTitle': '沒有符合項目', + 'collections.empty.noMatchText': '沒有符合篩選或搜尋的已儲存地點。', + 'collections.empty.firstTitle': '開始你的第一個收藏', + 'collections.empty.firstText': '建立一個清單,儲存你想跨行程記住的地點。', + + 'collections.view.grid': '網格', + 'collections.view.list': '清單', + 'collections.view.map': '地圖', + + 'collections.status.idea': '想法', + 'collections.status.want': '想去', + 'collections.status.visited': '已造訪', + 'collections.status.filterAll': '全部', + 'collections.status.cycleHint': '點按切換', + + 'collections.copyToTrip': '複製到行程', + 'collections.copyToTripTitle': '複製到行程', + 'collections.copyN': '將 {count} 個複製到行程', + 'collections.copyToTripSearch': '搜尋行程', + 'collections.copyToTripConfirm': '複製', + 'collections.noTrips': '尚無行程', + 'collections.alreadyInTrip': '已在此行程中', + 'collections.copied': '已複製到行程', + 'collections.copiedCount': '已複製 {count} 個地點', + 'collections.skippedDuplicates': '已略過 {count} 個重複項目', + 'collections.copyNothing': '沒有可複製的內容', + 'collections.removeFromList': '從清單中移除', + 'collections.removeFromListConfirm': '將此地點從清單中移除?', + 'collections.removeFromCollection': '從收藏中移除', + + 'collections.saved': '已儲存至 {name}', + 'collections.savedUndo': '復原', + 'collections.viewInCollection': '檢視', + 'collections.duplicateWarning': '此地點已在清單中', + + 'collections.search': '搜尋地點', + 'collections.selectMode': '選取', + 'collections.selectedCount': '已選取 {count} 個', + + 'collections.pickList': '儲存到清單', + 'collections.pickListPlaceholder': '選擇清單', + 'collections.addedToList': '已新增至 {name}', + 'collections.removedFromList': '已從 {name} 移除', + 'collections.inLists': '在你的清單中', + 'collections.otherLists': '新增到清單', + 'collections.noListsYet': '請先建立一個清單來儲存地點。', + 'collections.removedFromAll': '已從收藏中移除', + 'collections.picker.title': '已儲存的地點', + 'collections.picker.search': '搜尋你已儲存的地點', + 'collections.picker.empty': '沒有可新增的已儲存地點', + 'collections.picker.hint': '從你的收藏中選擇一個地點', + 'collections.picker.use': '使用', + + 'collections.share.title': '分享清單', + 'collections.share.members': '成員', + 'collections.share.owner': '擁有者', + 'collections.share.pending': '待處理邀請', + 'collections.share.invite': '邀請他人', + 'collections.share.inviteUser': '選擇使用者', + 'collections.share.sendInvite': '傳送邀請', + 'collections.share.inviteHint': '受邀者可以檢視和編輯此清單。', + 'collections.share.cancel': '取消', + 'collections.share.leave': '退出清單', + 'collections.share.remove': '移除', + + 'collections.invites.title': '邀請', + 'collections.invites.from': '來自', + 'collections.invites.accept': '接受', + 'collections.invites.decline': '拒絕', + 'collections.invites.received': '你有一個新的清單邀請', + 'collections.invite.sent': '邀請已傳送', + 'collections.invite.error': '無法傳送邀請', + 'collections.invite.accepted': '已接受邀請', + 'collections.invite.declined': '已拒絕邀請', + + 'collections.widget.title': '收藏', + 'collections.widget.empty': '尚無已儲存的地點', + 'collections.widget.savedCount': '已儲存 {count} 個', +}; + +export default collection; diff --git a/shared/src/i18n/zh-TW/index.ts b/shared/src/i18n/zh-TW/index.ts index 295db70cd..df6ca22e7 100644 --- a/shared/src/i18n/zh-TW/index.ts +++ b/shared/src/i18n/zh-TW/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/zh-TW/inspector.ts b/shared/src/i18n/zh-TW/inspector.ts index 65f9b2cd7..483dcb963 100644 --- a/shared/src/i18n/zh-TW/inspector.ts +++ b/shared/src/i18n/zh-TW/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': '待確認預訂', 'inspector.google': '在 Google Maps 中開啟', 'inspector.website': '開啟網站', + 'inspector.saveToCollection': '儲存到收藏', + 'inspector.savedToCollection': '已儲存', 'inspector.addRes': '預訂', 'inspector.editRes': '編輯預訂', 'inspector.participants': '參與者', diff --git a/shared/src/i18n/zh/admin.ts b/shared/src/i18n/zh/admin.ts index a2f493884..be5b7df08 100644 --- a/shared/src/i18n/zh/admin.ts +++ b/shared/src/i18n/zh/admin.ts @@ -306,6 +306,9 @@ const admin: TranslationStrings = { 'admin.tabs.notifications': '通知', 'admin.addons.catalog.journey.name': '旅程', 'admin.addons.catalog.journey.description': '旅行追踪与旅行日志,包含签到、照片和每日故事', + 'admin.addons.catalog.collections.name': '收藏', + 'admin.addons.catalog.collections.description': + '个人地点库 — 将各行程的地点保存到命名列表中,复制到任意行程,并与他人共享', 'admin.passkey.title': '通行密钥登录', 'admin.passkey.cardHint': '允许用户使用通行密钥(WebAuthn)登录。默认关闭。', 'admin.passkey.login': '启用通行密钥登录', diff --git a/shared/src/i18n/zh/collection.ts b/shared/src/i18n/zh/collection.ts new file mode 100644 index 000000000..d8bcd2011 --- /dev/null +++ b/shared/src/i18n/zh/collection.ts @@ -0,0 +1,101 @@ +import type { TranslationStrings } from '../types'; + +const collection: TranslationStrings = { + 'collections.title': '收藏', + 'collections.subtitle': '你保存的地点,按列表整理', + + 'collections.newList': '新建列表', + 'collections.create': '创建', + 'collections.editList': '重命名', + 'collections.listMenu': '列表选项', + 'collections.deleteList': '删除列表', + 'collections.deleteListConfirm': '这将永久删除该列表及其所有已保存的地点,且无法撤销。', + 'collections.listName': '列表名称', + 'collections.listNamePlaceholder': '例如:东京 2025', + 'collections.listColor': '颜色', + 'collections.allSaved': '全部已保存', + 'collections.shared': '已共享', + + 'collections.empty.title': '还没有地点', + 'collections.empty.text': '从任意行程保存地点来构建此列表。', + 'collections.empty.noMatchTitle': '没有匹配项', + 'collections.empty.noMatchText': '没有符合筛选或搜索的已保存地点。', + 'collections.empty.firstTitle': '开始你的第一个收藏', + 'collections.empty.firstText': '创建一个列表,保存你想跨行程记住的地点。', + + 'collections.view.grid': '网格', + 'collections.view.list': '列表', + 'collections.view.map': '地图', + + 'collections.status.idea': '想法', + 'collections.status.want': '想去', + 'collections.status.visited': '已去过', + 'collections.status.filterAll': '全部', + 'collections.status.cycleHint': '点按切换', + + 'collections.copyToTrip': '复制到行程', + 'collections.copyToTripTitle': '复制到行程', + 'collections.copyN': '将 {count} 个复制到行程', + 'collections.copyToTripSearch': '搜索行程', + 'collections.copyToTripConfirm': '复制', + 'collections.noTrips': '还没有行程', + 'collections.alreadyInTrip': '已在此行程中', + 'collections.copied': '已复制到行程', + 'collections.copiedCount': '已复制 {count} 个地点', + 'collections.skippedDuplicates': '已跳过 {count} 个重复项', + 'collections.copyNothing': '没有可复制的内容', + 'collections.removeFromList': '从列表中移除', + 'collections.removeFromListConfirm': '将此地点从列表中移除?', + 'collections.removeFromCollection': '从收藏中移除', + + 'collections.saved': '已保存到 {name}', + 'collections.savedUndo': '撤销', + 'collections.viewInCollection': '查看', + 'collections.duplicateWarning': '此地点已在列表中', + + 'collections.search': '搜索地点', + 'collections.selectMode': '选择', + 'collections.selectedCount': '已选择 {count} 个', + + 'collections.pickList': '保存到列表', + 'collections.pickListPlaceholder': '选择列表', + 'collections.addedToList': '已添加到 {name}', + 'collections.removedFromList': '已从 {name} 移除', + 'collections.inLists': '在你的列表中', + 'collections.otherLists': '添加到列表', + 'collections.noListsYet': '请先创建一个列表来保存地点。', + 'collections.removedFromAll': '已从收藏中移除', + 'collections.picker.title': '已保存的地点', + 'collections.picker.search': '搜索你已保存的地点', + 'collections.picker.empty': '没有可添加的已保存地点', + 'collections.picker.hint': '从你的收藏中选择一个地点', + 'collections.picker.use': '使用', + + 'collections.share.title': '共享列表', + 'collections.share.members': '成员', + 'collections.share.owner': '所有者', + 'collections.share.pending': '待处理邀请', + 'collections.share.invite': '邀请他人', + 'collections.share.inviteUser': '选择用户', + 'collections.share.sendInvite': '发送邀请', + 'collections.share.inviteHint': '被邀请的人可以查看和编辑此列表。', + 'collections.share.cancel': '取消', + 'collections.share.leave': '退出列表', + 'collections.share.remove': '移除', + + 'collections.invites.title': '邀请', + 'collections.invites.from': '来自', + 'collections.invites.accept': '接受', + 'collections.invites.decline': '拒绝', + 'collections.invites.received': '你有一个新的列表邀请', + 'collections.invite.sent': '邀请已发送', + 'collections.invite.error': '无法发送邀请', + 'collections.invite.accepted': '已接受邀请', + 'collections.invite.declined': '已拒绝邀请', + + 'collections.widget.title': '收藏', + 'collections.widget.empty': '还没有保存的地点', + 'collections.widget.savedCount': '已保存 {count} 个', +}; + +export default collection; diff --git a/shared/src/i18n/zh/index.ts b/shared/src/i18n/zh/index.ts index bfa9b73c4..b9af5461f 100644 --- a/shared/src/i18n/zh/index.ts +++ b/shared/src/i18n/zh/index.ts @@ -39,6 +39,7 @@ import trip from './trip'; import trips from './trips'; import undo from './undo'; import vacay from './vacay'; +import collection from './collection'; import help from './help'; const locale = { @@ -54,6 +55,7 @@ const locale = { ...login, ...register, ...vacay, + ...collection, ...atlas, ...trip, ...places, diff --git a/shared/src/i18n/zh/inspector.ts b/shared/src/i18n/zh/inspector.ts index b2c0d908b..8ffb6a775 100644 --- a/shared/src/i18n/zh/inspector.ts +++ b/shared/src/i18n/zh/inspector.ts @@ -14,6 +14,8 @@ const inspector: TranslationStrings = { 'inspector.pendingRes': '待确认预订', 'inspector.google': '在 Google Maps 中打开', 'inspector.website': '打开网站', + 'inspector.saveToCollection': '保存到收藏', + 'inspector.savedToCollection': '已保存', 'inspector.addRes': '预订', 'inspector.editRes': '编辑预订', 'inspector.participants': '参与者',