From c0f7f81e2376997bbcbc691f5321b5893b0343c1 Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 5 Nov 2026 13:02:28 +0100 Subject: [PATCH] fix(tours): offer waypoints as places only where a trip takes them, and say when every point was there already The waypoints switch showed in every Tours import dialog; it now shows in the trip's import only. Confirming it when every point was already in the trip closed the dialog without a word. --- .../src/components/Planner/PlacesSidebar.tsx | 2 +- .../Tours/TourGpxPreviewDialog.test.tsx | 24 ++++++++++--- .../components/Tours/TourGpxPreviewDialog.tsx | 30 ++++++++++++---- .../components/Tours/ToursSidebar.test.tsx | 11 +++--- .../components/Tours/useTourGpxImport.test.ts | 27 ++++++++++++++ .../src/components/Tours/useTourGpxImport.ts | 36 +++++++++++++------ .../screens/trip/sheets/MImportSheet.tsx | 2 +- shared/src/i18n/ar/tours.ts | 1 + shared/src/i18n/az/tours.ts | 1 + shared/src/i18n/br/tours.ts | 1 + shared/src/i18n/ca/tours.ts | 1 + shared/src/i18n/cs/tours.ts | 1 + shared/src/i18n/de/tours.ts | 1 + shared/src/i18n/en/tours.ts | 1 + shared/src/i18n/es/tours.ts | 1 + shared/src/i18n/et/tours.ts | 1 + shared/src/i18n/fr/tours.ts | 1 + shared/src/i18n/gr/tours.ts | 1 + shared/src/i18n/he/tours.ts | 1 + shared/src/i18n/hu/tours.ts | 1 + shared/src/i18n/id/tours.ts | 1 + shared/src/i18n/it/tours.ts | 1 + shared/src/i18n/ja/tours.ts | 1 + shared/src/i18n/ko/tours.ts | 1 + shared/src/i18n/nl/tours.ts | 1 + shared/src/i18n/pl/tours.ts | 1 + shared/src/i18n/ru/tours.ts | 1 + shared/src/i18n/sk/tours.ts | 1 + shared/src/i18n/sv/tours.ts | 1 + shared/src/i18n/th/tours.ts | 1 + shared/src/i18n/tours-locales.spec.ts | 2 +- shared/src/i18n/tr/tours.ts | 1 + shared/src/i18n/uk/tours.ts | 1 + shared/src/i18n/vi/tours.ts | 1 + shared/src/i18n/zh-TW/tours.ts | 1 + shared/src/i18n/zh/tours.ts | 1 + 36 files changed, 132 insertions(+), 30 deletions(-) diff --git a/client/src/components/Planner/PlacesSidebar.tsx b/client/src/components/Planner/PlacesSidebar.tsx index 8c1bec473..45aec1b19 100644 --- a/client/src/components/Planner/PlacesSidebar.tsx +++ b/client/src/components/Planner/PlacesSidebar.tsx @@ -83,7 +83,7 @@ const PlacesSidebar = React.memo(function PlacesSidebar(props: PlacesSidebarProp initialFiles={fileImportFiles} /> {/* With Tours on, a route or track file from this column lands in the Tours preview. */} - + {categoryPickerOpen && ( { describe('TourGpxPreviewDialog with points beside the lines (#2969)', () => { it('FE-GPX-PREVIEW-005: offers the points as places, on by default, and imports them with the tour', () => { const current = gpxImport([track()], { points: 4, areas: 0, other: 0 }); - render(); + render(); expect(screen.getByTestId('gpx-preview-points')).toBeInTheDocument(); // Added as places, they are not listed as left out. expect(screen.queryByTestId('gpx-preview-left-out')).toBeNull(); @@ -96,7 +96,7 @@ describe('TourGpxPreviewDialog with points beside the lines (#2969)', () => { it('FE-GPX-PREVIEW-006: switched off, the points are named as left out and not imported', () => { const current = gpxImport([track()], { points: 4, areas: 1, other: 0 }); - render(); + render(); fireEvent.click(screen.getByRole('button', { name: /tours\.import\.pointsAsPlaces|Add the points as places/ })); expect(screen.getByTestId('gpx-preview-left-out')).toHaveTextContent(/tours\.import\.leftOutPoints|4 pins/); fireEvent.click(screen.getByTestId('gpx-preview-import')); @@ -105,7 +105,7 @@ describe('TourGpxPreviewDialog with points beside the lines (#2969)', () => { it('FE-GPX-PREVIEW-007: a file whose every track the trip holds can still bring its points', () => { const current = gpxImport([track({ duplicate: true })], { points: 2, areas: 0, other: 0 }); - render(); + render(); const button = screen.getByTestId('gpx-preview-import'); expect(button).toBeEnabled(); expect(button).toHaveTextContent(/tours\.import\.pointsConfirm|Add places/); @@ -113,4 +113,20 @@ describe('TourGpxPreviewDialog with points beside the lines (#2969)', () => { fireEvent.click(button); expect(current.confirm).toHaveBeenCalledWith({ tour_type: 'hike' }, { points: true }); }); + + it('FE-GPX-PREVIEW-008: not offered, as for a recording picked for a tour, the points stay out', () => { + const current = gpxImport([track()], { points: 4, areas: 0, other: 0 }); + render(); + expect(screen.queryByTestId('gpx-preview-points')).toBeNull(); + expect(screen.getByTestId('gpx-preview-left-out')).toHaveTextContent(/tours\.import\.leftOutPoints|4 pins/); + fireEvent.click(screen.getByTestId('gpx-preview-import')); + expect(current.confirm).toHaveBeenCalledWith({ tour_type: 'hike' }, { points: false }); + }); + + it('FE-GPX-PREVIEW-009: not offered, a file of known tracks has nothing to import, points or not', () => { + const current = gpxImport([track({ duplicate: true })], { points: 2, areas: 0, other: 0 }); + render(); + expect(screen.getByTestId('gpx-preview-import')).toBeDisabled(); + expect(screen.getByText(/tours\.import\.previewAllDuplicates|nothing to import/)).toBeInTheDocument(); + }); }); diff --git a/client/src/components/Tours/TourGpxPreviewDialog.tsx b/client/src/components/Tours/TourGpxPreviewDialog.tsx index d4b1f7ecf..b39e84b94 100644 --- a/client/src/components/Tours/TourGpxPreviewDialog.tsx +++ b/client/src/components/Tours/TourGpxPreviewDialog.tsx @@ -113,8 +113,8 @@ function leftOutOf(files: readonly GpxPreviewFile[]): TourFileLeftOut { /** * #2969: the single points of the files (GPX waypoints, KML pins), which no - * tour is made of, offered as places of the trip. On by default: a file with - * a route and its stops is usually meant as both. + * tour is made of, offered as places of the trip where the dialog's caller + * asks for it. */ function PreviewPoints({ count, on, onToggle }: { count: number; on: boolean; onToggle: () => void }) { const { t } = useTranslation(); @@ -183,18 +183,22 @@ function PreviewLeftOut({ leftOut }: { leftOut: TourFileLeftOut }) { * as recorded, gets no riding time and is not checked for access. Closing it * stores nothing. `initial` presets the type, as a recording imported for a * tour takes that tour's (ACT-01); left out, it is a hike. A KML or KMZ file - * is shown the same way, with what it holds besides (IO-02). + * is shown the same way, with what it holds besides (IO-02). `offerPoints` + * offers the file's single points as places (#2969); only the places column + * asks for it, a recording picked for a tour is imported for its line alone. */ export default function TourGpxPreviewDialog({ gpxImport, initial, + offerPoints = false, }: { gpxImport: TourGpxImport; initial?: TourGpxImportFields; + offerPoints?: boolean; }) { const { preview } = gpxImport; if (!preview) return null; - return ; + return ; } const HIKE: TourGpxImportFields = { tour_type: 'hike' }; @@ -207,16 +211,20 @@ function canConfirm(fresh: number, addsPoints: boolean, typeComplete: boolean): /** The points offered as places, and below them whatever else stays out. */ function PreviewExtras({ leftOut, + offerPoints, withPoints, onTogglePoints, }: { leftOut: TourFileLeftOut; + offerPoints: boolean; withPoints: boolean; onTogglePoints: () => void; }) { return ( <> - {leftOut.points > 0 && } + {offerPoints && leftOut.points > 0 && ( + + )} ); @@ -226,17 +234,20 @@ function PreviewDialog({ gpxImport, files, initial, + offerPoints, }: { gpxImport: TourGpxImport; files: GpxPreviewFile[]; initial: TourGpxImportFields; + offerPoints: boolean; }) { const { t } = useTranslation(); const labelId = useId(); const tileUrl = useTileUrl(OFM_POSITRON); const choices = useGpxImportChoices(initial); const leftOut = useMemo(() => leftOutOf(files), [files]); - const [withPoints, setWithPoints] = useState(true); + // On by default where offered: a file with a route and its stops is usually meant as both. + const [withPoints, setWithPoints] = useState(offerPoints); const addsPoints = withPoints && leftOut.points > 0; const tracks = files.flatMap((file) => file.tracks.map((track) => ({ file: file.file, track }))); @@ -314,7 +325,12 @@ function PreviewDialog({ ))} - setWithPoints((on) => !on)} /> + setWithPoints((on) => !on)} + /> {fresh === 0 && !addsPoints && (
}> diff --git a/client/src/components/Tours/ToursSidebar.test.tsx b/client/src/components/Tours/ToursSidebar.test.tsx index ec3eac244..78be1d9c8 100644 --- a/client/src/components/Tours/ToursSidebar.test.tsx +++ b/client/src/components/Tours/ToursSidebar.test.tsx @@ -458,7 +458,7 @@ describe('ToursSidebar', () => { left_out: { points: 3, areas: 1, other: 0 }, }) const importCall = vi.spyOn(tourGpxApi, 'import').mockResolvedValue({ tours: [tour], caution: false, skipped: 0 }) - const pinsCall = vi.spyOn(placesApi, 'importMapFile').mockResolvedValue({ count: 3 }) + const pinsCall = vi.spyOn(placesApi, 'importMapFile') seedStore(useTripStore, { refreshPlaces: vi.fn().mockResolvedValue(undefined) }) render( @@ -471,11 +471,11 @@ describe('ToursSidebar', () => { const rows = screen.getAllByTestId('gpx-preview-track') expect(rows.map((row) => row.textContent?.slice(0, 1))).toEqual(['1', '2']) expect(rows[1]).toHaveTextContent('No heights in the file') - // The pins are offered as places (#2969); only the area stays out. - expect(screen.getByTestId('gpx-preview-points')).toHaveTextContent('3 pins') + // Only the places column offers the pins as places (#2969); here they stay out. + expect(screen.queryByTestId('gpx-preview-points')).toBeNull() const leftOut = screen.getByTestId('gpx-preview-left-out') expect(leftOut).toHaveTextContent('Not imported') - expect(leftOut).not.toHaveTextContent('pins') + expect(leftOut).toHaveTextContent('3 pins') expect(leftOut).toHaveTextContent('1 area') expect(leftOut).not.toHaveTextContent('other item') expect(within(leftOut).getByRole('button', { name: 'Not imported' })).toBeInTheDocument() @@ -483,8 +483,7 @@ describe('ToursSidebar', () => { fireEvent.click(screen.getByRole('button', { name: 'Import 2 tours' })) await waitFor(() => expect(importCall).toHaveBeenCalledWith(1, file, { tour_type: 'hike' })) await waitFor(() => expect(toast.success).toHaveBeenCalledWith('1 tour imported')) - expect(pinsCall).toHaveBeenCalledWith(1, file, { points: true, paths: false }) - expect(toast.success).toHaveBeenCalledWith('3 places added') + expect(pinsCall).not.toHaveBeenCalled() vi.restoreAllMocks() }) diff --git a/client/src/components/Tours/useTourGpxImport.test.ts b/client/src/components/Tours/useTourGpxImport.test.ts index efb44d98b..7effac2e0 100644 --- a/client/src/components/Tours/useTourGpxImport.test.ts +++ b/client/src/components/Tours/useTourGpxImport.test.ts @@ -131,4 +131,31 @@ describe('useTourGpxImport with points beside the lines (#2969)', () => { expect(addToast).toHaveBeenCalledWith('tours.import.pointsFailedIn', 'error', undefined); expect(tourRepo.importGpx).toHaveBeenCalledTimes(2); }); + + it('says so when every line and every point is already in the trip, instead of closing without a word', async () => { + vi.spyOn(placesApi, 'importGpx').mockResolvedValue({ count: 0, skipped: 3 }); + vi.spyOn(placesApi, 'importMapFile').mockResolvedValue({ count: 0 }); + const { result } = await previewed(() => ({ + tracks: [{ ...line, duplicate: true }], + left_out: { points: 3, areas: 0, other: 0 }, + })); + await act(() => result.current.confirm({ tour_type: 'hike' }, { points: true })); + expect(tourRepo.importGpx).not.toHaveBeenCalled(); + expect(addToast).toHaveBeenCalledTimes(1); + expect(addToast).toHaveBeenCalledWith('tours.import.allSkipped', 'warning', undefined); + expect(result.current.preview).toBeNull(); + }); + + it('names the points left out as known beside the places that did come in', async () => { + vi.spyOn(placesApi, 'importGpx').mockResolvedValue({ count: 1, skipped: 2 }); + vi.spyOn(placesApi, 'importMapFile').mockResolvedValue({ count: 2 }); + const { result } = await previewed((picked) => ({ + tracks: [{ ...line, duplicate: true }], + left_out: { points: picked === route ? 3 : 2, areas: 0, other: 0 }, + })); + await act(() => result.current.confirm({ tour_type: 'hike' }, { points: true })); + expect(addToast).toHaveBeenCalledWith('tours.import.pointsImported', 'success', undefined); + expect(addToast).toHaveBeenCalledWith('tours.import.pointsSkipped', 'warning', undefined); + expect(addToast).not.toHaveBeenCalledWith('tours.import.allSkipped', 'warning', undefined); + }); }); diff --git a/client/src/components/Tours/useTourGpxImport.ts b/client/src/components/Tours/useTourGpxImport.ts index f24c80efa..f913b54a8 100644 --- a/client/src/components/Tours/useTourGpxImport.ts +++ b/client/src/components/Tours/useTourGpxImport.ts @@ -78,22 +78,33 @@ async function importTours( return sum; } +interface PointsImported { + places: number; + /** Points the preview counted that did not come in, almost always because the trip already holds them. */ + skipped: number; +} + /** The points of each file that holds any, added as places (#2969); a file that fails is handed to `onError`. */ async function importPoints( tripId: number, files: readonly GpxPreviewFile[], onError: (file: File) => void -): Promise { - let places = 0; +): Promise { + const sum: PointsImported = { places: 0, skipped: 0 }; for (const { file, leftOut } of files) { if (!leftOut?.points) continue; try { - places += await tourRepo.importFilePoints(tripId, file); + const added = await tourRepo.importFilePoints(tripId, file); + sum.places += added; + // Measured against the preview's count rather than the import's own + // skipped figure: the map import counts paths it was told to leave out + // as skipped too, the GPX import does not. + sum.skipped += Math.max(0, leftOut.points - added); } catch { onError(file); } } - return places; + return sum; } interface TourGpxImportOptions { @@ -180,11 +191,12 @@ export function useTourGpxImport({ tripId, canEdit, onToursChanged, onImported, setImporting(true); try { const { tours: imported, skipped, caution } = await importTours(tripId, preview, fields, fileError); - const places = extras.points + const points = extras.points ? await importPoints(tripId, preview, (file) => toast.error(t('tours.import.pointsFailedIn', { name: file.name })) ) - : 0; + : { places: 0, skipped: 0 }; + const places = points.places; setPreview(null); if (places > 0) { if (imported.length === 0) await refreshPlaces(tripId); @@ -200,10 +212,14 @@ export function useTourGpxImport({ tripId, canEdit, onToursChanged, onImported, if (caution) toast.info(t('tours.import.caution')); onImported?.(imported); } - if (skipped > 0) { - toast.warning( - imported.length > 0 ? t('tours.import.skipped', { count: skipped }) : t('tours.import.allSkipped') - ); + // Nothing came in although something was sent: one warning, so the + // dialog never closes on a file the trip already holds without a word. + const addedAny = imported.length > 0 || places > 0; + if (!addedAny && (skipped > 0 || points.skipped > 0)) { + toast.warning(t('tours.import.allSkipped')); + } else { + if (skipped > 0) toast.warning(t('tours.import.skipped', { count: skipped })); + if (points.skipped > 0) toast.warning(t('tours.import.pointsSkipped')); } } finally { setImporting(false); diff --git a/client/src/mobile/screens/trip/sheets/MImportSheet.tsx b/client/src/mobile/screens/trip/sheets/MImportSheet.tsx index 142507622..e0e5b4ca3 100644 --- a/client/src/mobile/screens/trip/sheets/MImportSheet.tsx +++ b/client/src/mobile/screens/trip/sheets/MImportSheet.tsx @@ -103,7 +103,7 @@ export default function MImportSheet({ planner, open, onClose }: MImportSheetPro )} {step === 'list' && !fileStep && setStep('menu')} onDone={onClose} />} - + ) } diff --git a/shared/src/i18n/ar/tours.ts b/shared/src/i18n/ar/tours.ts index faf1eb941..6ad7b6989 100644 --- a/shared/src/i18n/ar/tours.ts +++ b/shared/src/i18n/ar/tours.ts @@ -971,6 +971,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'النقاط المفردة ليست جزءًا من الجولة، بل تُضاف إلى أماكن الرحلة.', 'tours.import.pointsConfirm': 'أضف الأماكن', 'tours.import.pointsFailedIn': 'تعذّرت إضافة النقاط في {name} كأماكن.', + 'tours.import.pointsSkipped': 'كانت بعض النقاط موجودة بالفعل في هذه الرحلة فتم تخطيها.', 'tours.import.pointsImported': 'أُضيف {count} مكان', 'tours.import.pointsImported.zero': 'أُضيف {count} مكان', 'tours.import.pointsImported.one': 'أُضيف مكان واحد', diff --git a/shared/src/i18n/az/tours.ts b/shared/src/i18n/az/tours.ts index d46ba3614..123fefef4 100644 --- a/shared/src/i18n/az/tours.ts +++ b/shared/src/i18n/az/tours.ts @@ -962,6 +962,7 @@ const tours: TranslationStrings = { 'Tək nöqtələr turun bir hissəsi deyil. Onlar əvəzinə səyahətin məkanlarına əlavə olunur.', 'tours.import.pointsConfirm': 'Məkanları əlavə et', 'tours.import.pointsFailedIn': '{name} faylındakı nöqtələr məkan kimi əlavə edilə bilmədi.', + 'tours.import.pointsSkipped': 'Nöqtələrin bəziləri artıq bu səyahətdə idi və ötürüldü.', 'tours.import.pointsImported': '{count} məkan əlavə edildi', 'tours.import.pointsImported.one': '{count} məkan əlavə edildi', 'tours.import.unreadableIn': '{name} oxunmadı: fayl zədələnib və ya GPX, KML, KMZ deyil', diff --git a/shared/src/i18n/br/tours.ts b/shared/src/i18n/br/tours.ts index 24673ab77..fb3aa7158 100644 --- a/shared/src/i18n/br/tours.ts +++ b/shared/src/i18n/br/tours.ts @@ -967,6 +967,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Pontos avulsos não fazem parte de um passeio. Eles entram nos lugares da viagem.', 'tours.import.pointsConfirm': 'Adicionar lugares', 'tours.import.pointsFailedIn': 'Não foi possível adicionar os pontos de {name} como lugares.', + 'tours.import.pointsSkipped': 'Alguns pontos já estavam nesta viagem e foram ignorados.', 'tours.import.pointsImported': '{count} lugares adicionados', 'tours.import.pointsImported.one': '{count} lugar adicionado', 'tours.import.unreadableIn': 'Não foi possível ler {name}: o arquivo está danificado ou não é GPX, KML nem KMZ', diff --git a/shared/src/i18n/ca/tours.ts b/shared/src/i18n/ca/tours.ts index b8e3a3b4c..5b5bd6177 100644 --- a/shared/src/i18n/ca/tours.ts +++ b/shared/src/i18n/ca/tours.ts @@ -969,6 +969,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Els punts solts no formen part de cap ruta. S’afegeixen als llocs del viatge.', 'tours.import.pointsConfirm': 'Afegeix llocs', 'tours.import.pointsFailedIn': 'No s’han pogut afegir els punts de {name} com a llocs.', + 'tours.import.pointsSkipped': "Alguns punts ja eren en aquest viatge i s'han omès.", 'tours.import.pointsImported': '{count} llocs afegits', 'tours.import.pointsImported.one': '{count} lloc afegit', 'tours.import.unreadableIn': "No s'ha pogut llegir {name}: el fitxer està malmès o no és GPX, KML ni KMZ", diff --git a/shared/src/i18n/cs/tours.ts b/shared/src/i18n/cs/tours.ts index 506c4bc03..81b472502 100644 --- a/shared/src/i18n/cs/tours.ts +++ b/shared/src/i18n/cs/tours.ts @@ -955,6 +955,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Samostatné body nejsou součástí trasy. Přidají se místo toho k místům cesty.', 'tours.import.pointsConfirm': 'Přidat místa', 'tours.import.pointsFailedIn': 'Body ze souboru {name} se nepodařilo přidat jako místa.', + 'tours.import.pointsSkipped': 'Některé body už v této cestě byly, proto byly přeskočeny.', 'tours.import.pointsImported': '{count} míst přidáno', 'tours.import.pointsImported.one': '{count} místo přidáno', 'tours.import.pointsImported.few': '{count} místa přidána', diff --git a/shared/src/i18n/de/tours.ts b/shared/src/i18n/de/tours.ts index a33cab953..84a0be198 100644 --- a/shared/src/i18n/de/tours.ts +++ b/shared/src/i18n/de/tours.ts @@ -978,6 +978,7 @@ const tours: TranslationStrings = { 'Einzelne Punkte gehören zu keiner Tour. Sie kommen stattdessen zu den Orten der Reise.', 'tours.import.pointsConfirm': 'Orte hinzufügen', 'tours.import.pointsFailedIn': 'Die Punkte aus {name} konnten nicht als Orte hinzugefügt werden.', + 'tours.import.pointsSkipped': 'Einige Punkte waren schon in dieser Reise und wurden übersprungen.', 'tours.import.pointsImported': '{count} Orte hinzugefügt', 'tours.import.pointsImported.one': '{count} Ort hinzugefügt', 'tours.import.unreadableIn': diff --git a/shared/src/i18n/en/tours.ts b/shared/src/i18n/en/tours.ts index 6b1e1ef02..9c6b031c9 100644 --- a/shared/src/i18n/en/tours.ts +++ b/shared/src/i18n/en/tours.ts @@ -949,6 +949,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Single points are not part of a tour. They join the places of the trip instead.', 'tours.import.pointsConfirm': 'Add places', 'tours.import.pointsFailedIn': 'The points in {name} could not be added as places.', + 'tours.import.pointsSkipped': 'Some of the points were already in this trip and were skipped.', 'tours.import.pointsImported': '{count} places added', 'tours.import.pointsImported.one': '{count} place added', 'tours.import.unreadableIn': 'Could not read {name}: the file is damaged or not GPX, KML or KMZ', diff --git a/shared/src/i18n/es/tours.ts b/shared/src/i18n/es/tours.ts index aa34492dd..6e8429b24 100644 --- a/shared/src/i18n/es/tours.ts +++ b/shared/src/i18n/es/tours.ts @@ -967,6 +967,7 @@ const tours: TranslationStrings = { 'Los puntos sueltos no forman parte de una ruta. Se añaden a los lugares del viaje.', 'tours.import.pointsConfirm': 'Añadir lugares', 'tours.import.pointsFailedIn': 'No se pudieron añadir los puntos de {name} como lugares.', + 'tours.import.pointsSkipped': 'Algunos puntos ya estaban en este viaje y se han omitido.', 'tours.import.pointsImported': '{count} lugares añadidos', 'tours.import.pointsImported.one': '{count} lugar añadido', 'tours.import.unreadableIn': 'No se ha podido leer {name}: el archivo está dañado o no es GPX, KML ni KMZ', diff --git a/shared/src/i18n/et/tours.ts b/shared/src/i18n/et/tours.ts index 92b76dcad..edd798d3b 100644 --- a/shared/src/i18n/et/tours.ts +++ b/shared/src/i18n/et/tours.ts @@ -952,6 +952,7 @@ const tours: TranslationStrings = { 'Üksikud punktid ei kuulu matka juurde. Need lisatakse hoopis reisi kohtade hulka.', 'tours.import.pointsConfirm': 'Lisa kohad', 'tours.import.pointsFailedIn': 'Faili {name} punkte ei õnnestunud kohtadena lisada.', + 'tours.import.pointsSkipped': 'Mõned punktid olid juba selles reisis ja jäeti vahele.', 'tours.import.pointsImported': '{count} kohta lisatud', 'tours.import.pointsImported.one': '{count} koht lisatud', 'tours.import.unreadableIn': 'Faili {name} ei saanud lugeda: see on vigane või pole GPX, KML ega KMZ', diff --git a/shared/src/i18n/fr/tours.ts b/shared/src/i18n/fr/tours.ts index 61ef097d9..0c8e8b816 100644 --- a/shared/src/i18n/fr/tours.ts +++ b/shared/src/i18n/fr/tours.ts @@ -985,6 +985,7 @@ const tours: TranslationStrings = { 'Les points isolés ne font pas partie d’un parcours. Ils rejoignent les lieux du voyage.', 'tours.import.pointsConfirm': 'Ajouter les lieux', 'tours.import.pointsFailedIn': 'Les points de {name} n’ont pas pu être ajoutés comme lieux.', + 'tours.import.pointsSkipped': 'Certains points étaient déjà dans ce voyage et ont été ignorés.', 'tours.import.pointsImported': '{count} lieux ajoutés', 'tours.import.pointsImported.one': '{count} lieu ajouté', 'tours.import.unreadableIn': 'Impossible de lire {name} : le fichier est endommagé ou n’est pas un GPX, KML ou KMZ', diff --git a/shared/src/i18n/gr/tours.ts b/shared/src/i18n/gr/tours.ts index 3d627c3c2..68af85f5a 100644 --- a/shared/src/i18n/gr/tours.ts +++ b/shared/src/i18n/gr/tours.ts @@ -989,6 +989,7 @@ const tours: TranslationStrings = { 'Τα μεμονωμένα σημεία δεν ανήκουν σε διαδρομή. Προστίθενται στις τοποθεσίες του ταξιδιού.', 'tours.import.pointsConfirm': 'Προσθήκη τοποθεσιών', 'tours.import.pointsFailedIn': 'Δεν ήταν δυνατή η προσθήκη των σημείων του {name} ως τοποθεσίες.', + 'tours.import.pointsSkipped': 'Ορισμένα σημεία υπήρχαν ήδη σε αυτό το ταξίδι και παραλείφθηκαν.', 'tours.import.pointsImported': '{count} τοποθεσίες προστέθηκαν', 'tours.import.pointsImported.one': '{count} τοποθεσία προστέθηκε', 'tours.import.unreadableIn': diff --git a/shared/src/i18n/he/tours.ts b/shared/src/i18n/he/tours.ts index 2ee985128..1deb4265a 100644 --- a/shared/src/i18n/he/tours.ts +++ b/shared/src/i18n/he/tours.ts @@ -947,6 +947,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'נקודות בודדות אינן חלק ממסלול. הן מתווספות למקומות של הטיול.', 'tours.import.pointsConfirm': 'הוספת מקומות', 'tours.import.pointsFailedIn': 'לא ניתן היה להוסיף את הנקודות מ-{name} כמקומות.', + 'tours.import.pointsSkipped': 'חלק מהנקודות כבר היו בטיול הזה ולכן דולגו.', 'tours.import.pointsImported': '{count} מקומות נוספו', 'tours.import.pointsImported.one': 'מקום אחד נוסף', 'tours.import.pointsImported.two': '{count} מקומות נוספו', diff --git a/shared/src/i18n/hu/tours.ts b/shared/src/i18n/hu/tours.ts index fdf66a8a5..105ae5390 100644 --- a/shared/src/i18n/hu/tours.ts +++ b/shared/src/i18n/hu/tours.ts @@ -967,6 +967,7 @@ const tours: TranslationStrings = { 'Az önálló pontok nem részei egy túrának. Helyettük az utazás helyei közé kerülnek.', 'tours.import.pointsConfirm': 'Helyek hozzáadása', 'tours.import.pointsFailedIn': 'A(z) {name} pontjait nem sikerült helyekként hozzáadni.', + 'tours.import.pointsSkipped': 'Néhány pont már szerepelt ebben az utazásban, ezért kimaradt.', 'tours.import.pointsImported': '{count} hely hozzáadva', 'tours.import.pointsImported.one': '{count} hely hozzáadva', 'tours.import.unreadableIn': 'A(z) {name} nem olvasható: a fájl sérült, vagy nem GPX, KML vagy KMZ', diff --git a/shared/src/i18n/id/tours.ts b/shared/src/i18n/id/tours.ts index cfac0a79b..092710b3e 100644 --- a/shared/src/i18n/id/tours.ts +++ b/shared/src/i18n/id/tours.ts @@ -958,6 +958,7 @@ const tours: TranslationStrings = { 'Titik tunggal bukan bagian dari tur. Titik itu masuk ke tempat-tempat perjalanan.', 'tours.import.pointsConfirm': 'Tambahkan tempat', 'tours.import.pointsFailedIn': 'Titik di {name} tidak dapat ditambahkan sebagai tempat.', + 'tours.import.pointsSkipped': 'Beberapa titik sudah ada di perjalanan ini dan dilewati.', 'tours.import.pointsImported': '{count} tempat ditambahkan', 'tours.import.unreadableIn': '{name} tidak dapat dibaca: berkas rusak atau bukan GPX, KML, atau KMZ', 'tours.import.archiveNoKmlIn': 'Tidak ada berkas KML di {name}', diff --git a/shared/src/i18n/it/tours.ts b/shared/src/i18n/it/tours.ts index 8d483fbac..8d8869837 100644 --- a/shared/src/i18n/it/tours.ts +++ b/shared/src/i18n/it/tours.ts @@ -974,6 +974,7 @@ const tours: TranslationStrings = { 'I punti singoli non fanno parte di un percorso. Vengono aggiunti ai luoghi del viaggio.', 'tours.import.pointsConfirm': 'Aggiungi luoghi', 'tours.import.pointsFailedIn': 'Non è stato possibile aggiungere i punti di {name} come luoghi.', + 'tours.import.pointsSkipped': 'Alcuni punti erano già in questo viaggio e sono stati saltati.', 'tours.import.pointsImported': '{count} luoghi aggiunti', 'tours.import.pointsImported.one': '{count} luogo aggiunto', 'tours.import.unreadableIn': 'Impossibile leggere {name}: il file è danneggiato o non è GPX, KML o KMZ', diff --git a/shared/src/i18n/ja/tours.ts b/shared/src/i18n/ja/tours.ts index 01d313025..a5b283202 100644 --- a/shared/src/i18n/ja/tours.ts +++ b/shared/src/i18n/ja/tours.ts @@ -933,6 +933,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': '単独のポイントはツアーに含まれません。代わりに旅行の場所に追加されます。', 'tours.import.pointsConfirm': '場所を追加', 'tours.import.pointsFailedIn': '{name} のポイントを場所として追加できませんでした。', + 'tours.import.pointsSkipped': '一部のポイントはすでにこの旅行にあったため、スキップされました。', 'tours.import.pointsImported': '{count} 件の場所を追加しました', 'tours.import.unreadableIn': '{name}を読み込めませんでした:ファイルが破損しているか、GPX、KML、KMZではありません', 'tours.import.archiveNoKmlIn': '{name}にKMLファイルが見つかりません', diff --git a/shared/src/i18n/ko/tours.ts b/shared/src/i18n/ko/tours.ts index 98f79993f..49b325697 100644 --- a/shared/src/i18n/ko/tours.ts +++ b/shared/src/i18n/ko/tours.ts @@ -925,6 +925,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': '단일 포인트는 투어에 포함되지 않습니다. 대신 여행의 장소에 추가됩니다.', 'tours.import.pointsConfirm': '장소 추가', 'tours.import.pointsFailedIn': '{name}의 포인트를 장소로 추가하지 못했습니다.', + 'tours.import.pointsSkipped': '일부 포인트는 이미 이 여행에 있어 건너뛰었습니다.', 'tours.import.pointsImported': '장소 {count}개를 추가했습니다', 'tours.import.unreadableIn': '{name}을(를) 읽을 수 없습니다: 파일이 손상되었거나 GPX, KML, KMZ가 아닙니다', 'tours.import.archiveNoKmlIn': '{name}에 KML 파일이 없습니다', diff --git a/shared/src/i18n/nl/tours.ts b/shared/src/i18n/nl/tours.ts index b5edc00f9..a35915b65 100644 --- a/shared/src/i18n/nl/tours.ts +++ b/shared/src/i18n/nl/tours.ts @@ -970,6 +970,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Losse punten horen niet bij een tocht. Ze komen bij de plekken van de reis.', 'tours.import.pointsConfirm': 'Plekken toevoegen', 'tours.import.pointsFailedIn': 'De punten uit {name} konden niet als plekken worden toegevoegd.', + 'tours.import.pointsSkipped': 'Sommige punten stonden al in deze reis en zijn overgeslagen.', 'tours.import.pointsImported': '{count} plekken toegevoegd', 'tours.import.pointsImported.one': '{count} plek toegevoegd', 'tours.import.unreadableIn': '{name} kon niet worden gelezen: het bestand is beschadigd of geen GPX, KML of KMZ', diff --git a/shared/src/i18n/pl/tours.ts b/shared/src/i18n/pl/tours.ts index afd28eafd..7d3f390aa 100644 --- a/shared/src/i18n/pl/tours.ts +++ b/shared/src/i18n/pl/tours.ts @@ -988,6 +988,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Pojedyncze punkty nie należą do trasy. Trafiają do miejsc podróży.', 'tours.import.pointsConfirm': 'Dodaj miejsca', 'tours.import.pointsFailedIn': 'Nie udało się dodać punktów z {name} jako miejsc.', + 'tours.import.pointsSkipped': 'Niektóre punkty były już w tej podróży i zostały pominięte.', 'tours.import.pointsImported': 'Dodano {count} miejsca', 'tours.import.pointsImported.one': 'Dodano {count} miejsce', 'tours.import.pointsImported.few': 'Dodano {count} miejsca', diff --git a/shared/src/i18n/ru/tours.ts b/shared/src/i18n/ru/tours.ts index 8727b2fe7..432c98bb6 100644 --- a/shared/src/i18n/ru/tours.ts +++ b/shared/src/i18n/ru/tours.ts @@ -992,6 +992,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Отдельные точки не входят в маршрут. Они добавляются к местам поездки.', 'tours.import.pointsConfirm': 'Добавить места', 'tours.import.pointsFailedIn': 'Не удалось добавить точки из {name} как места.', + 'tours.import.pointsSkipped': 'Некоторые точки уже были в этой поездке и были пропущены.', 'tours.import.pointsImported': 'Добавлено {count} места', 'tours.import.pointsImported.one': 'Добавлено {count} место', 'tours.import.pointsImported.few': 'Добавлено {count} места', diff --git a/shared/src/i18n/sk/tours.ts b/shared/src/i18n/sk/tours.ts index 8699db6e2..6a02bb74e 100644 --- a/shared/src/i18n/sk/tours.ts +++ b/shared/src/i18n/sk/tours.ts @@ -957,6 +957,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Samostatné body nie sú súčasťou trasy. Pridajú sa namiesto toho k miestam cesty.', 'tours.import.pointsConfirm': 'Pridať miesta', 'tours.import.pointsFailedIn': 'Body zo súboru {name} sa nepodarilo pridať ako miesta.', + 'tours.import.pointsSkipped': 'Niektoré body už v tejto ceste boli, preto boli preskočené.', 'tours.import.pointsImported': '{count} miest pridaných', 'tours.import.pointsImported.one': '{count} miesto pridané', 'tours.import.pointsImported.few': '{count} miesta pridané', diff --git a/shared/src/i18n/sv/tours.ts b/shared/src/i18n/sv/tours.ts index 9d451c03b..89839efa0 100644 --- a/shared/src/i18n/sv/tours.ts +++ b/shared/src/i18n/sv/tours.ts @@ -949,6 +949,7 @@ const tours: TranslationStrings = { 'Enskilda punkter ingår inte i en tur. De läggs till bland resans platser i stället.', 'tours.import.pointsConfirm': 'Lägg till platser', 'tours.import.pointsFailedIn': 'Punkterna i {name} kunde inte läggas till som platser.', + 'tours.import.pointsSkipped': 'Några av punkterna fanns redan i den här resan och hoppades över.', 'tours.import.pointsImported': '{count} platser tillagda', 'tours.import.pointsImported.one': '{count} plats tillagd', 'tours.import.unreadableIn': 'Det gick inte att läsa {name}: filen är skadad eller inte GPX, KML eller KMZ', diff --git a/shared/src/i18n/th/tours.ts b/shared/src/i18n/th/tours.ts index 27c938f7b..a14b2c676 100644 --- a/shared/src/i18n/th/tours.ts +++ b/shared/src/i18n/th/tours.ts @@ -910,6 +910,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'จุดเดี่ยวไม่ได้เป็นส่วนหนึ่งของทัวร์ แต่จะถูกเพิ่มเข้าไปในสถานที่ของทริปแทน', 'tours.import.pointsConfirm': 'เพิ่มสถานที่', 'tours.import.pointsFailedIn': 'ไม่สามารถเพิ่มจุดใน {name} เป็นสถานที่ได้', + 'tours.import.pointsSkipped': 'บางจุดมีอยู่ในทริปนี้แล้วจึงถูกข้ามไป', 'tours.import.pointsImported': 'เพิ่มสถานที่ {count} แห่งแล้ว', 'tours.import.unreadableIn': 'ไม่สามารถอ่าน {name} ได้: ไฟล์เสียหายหรือไม่ใช่ GPX, KML หรือ KMZ', 'tours.import.archiveNoKmlIn': 'ไม่พบไฟล์ KML ใน {name}', diff --git a/shared/src/i18n/tours-locales.spec.ts b/shared/src/i18n/tours-locales.spec.ts index 32ebedaeb..2c457a049 100644 --- a/shared/src/i18n/tours-locales.spec.ts +++ b/shared/src/i18n/tours-locales.spec.ts @@ -20,7 +20,7 @@ const toursModules = import.meta.glob<{ default: TranslationStrings }>('./*/tour const TOUR_DOMAINS: { file: string; generalKeyCount: number; modules: DomainModules }[] = [ { file: 'tours', - generalKeyCount: 1356, + generalKeyCount: 1357, modules: toursModules, }, { diff --git a/shared/src/i18n/tr/tours.ts b/shared/src/i18n/tr/tours.ts index 8674a93fb..21582be65 100644 --- a/shared/src/i18n/tr/tours.ts +++ b/shared/src/i18n/tr/tours.ts @@ -960,6 +960,7 @@ const tours: TranslationStrings = { 'Tekil noktalar bir turun parçası değildir. Bunun yerine seyahatin yerlerine eklenir.', 'tours.import.pointsConfirm': 'Yerleri ekle', 'tours.import.pointsFailedIn': '{name} içindeki noktalar yer olarak eklenemedi.', + 'tours.import.pointsSkipped': 'Noktaların bazıları zaten bu seyahatteydi ve atlandı.', 'tours.import.pointsImported': '{count} yer eklendi', 'tours.import.pointsImported.one': '{count} yer eklendi', 'tours.import.unreadableIn': '{name} okunamadı: dosya bozuk ya da GPX, KML veya KMZ değil', diff --git a/shared/src/i18n/uk/tours.ts b/shared/src/i18n/uk/tours.ts index adb5e4f2b..855a9ee8e 100644 --- a/shared/src/i18n/uk/tours.ts +++ b/shared/src/i18n/uk/tours.ts @@ -983,6 +983,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': 'Окремі точки не входять до маршруту. Вони додаються до місць подорожі.', 'tours.import.pointsConfirm': 'Додати місця', 'tours.import.pointsFailedIn': 'Не вдалося додати точки з {name} як місця.', + 'tours.import.pointsSkipped': 'Деякі точки вже були в цій подорожі й були пропущені.', 'tours.import.pointsImported': 'Додано {count} місця', 'tours.import.pointsImported.one': 'Додано {count} місце', 'tours.import.pointsImported.few': 'Додано {count} місця', diff --git a/shared/src/i18n/vi/tours.ts b/shared/src/i18n/vi/tours.ts index 7dfb04ec1..9525a9188 100644 --- a/shared/src/i18n/vi/tours.ts +++ b/shared/src/i18n/vi/tours.ts @@ -945,6 +945,7 @@ const tours: TranslationStrings = { 'Các điểm đơn lẻ không thuộc về chuyến đi bộ. Chúng được thêm vào các địa điểm của chuyến đi.', 'tours.import.pointsConfirm': 'Thêm địa điểm', 'tours.import.pointsFailedIn': 'Không thể thêm các điểm trong {name} làm địa điểm.', + 'tours.import.pointsSkipped': 'Một số điểm đã có trong chuyến đi này nên đã được bỏ qua.', 'tours.import.pointsImported': 'Đã thêm {count} địa điểm', 'tours.import.unreadableIn': 'Không thể đọc {name}: tệp bị hỏng hoặc không phải GPX, KML hay KMZ', 'tours.import.archiveNoKmlIn': 'Không tìm thấy tệp KML trong {name}', diff --git a/shared/src/i18n/zh-TW/tours.ts b/shared/src/i18n/zh-TW/tours.ts index 2894686de..6c5393732 100644 --- a/shared/src/i18n/zh-TW/tours.ts +++ b/shared/src/i18n/zh-TW/tours.ts @@ -877,6 +877,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': '單一點不屬於路線,而是新增到行程的地點中。', 'tours.import.pointsConfirm': '新增地點', 'tours.import.pointsFailedIn': '無法將 {name} 中的點新增為地點。', + 'tours.import.pointsSkipped': '部分點已在此行程中,已略過。', 'tours.import.pointsImported': '已新增 {count} 個地點', 'tours.import.unreadableIn': '無法讀取 {name}:檔案已損毀,或不是 GPX、KML 或 KMZ', 'tours.import.archiveNoKmlIn': '{name} 中沒有 KML 檔案', diff --git a/shared/src/i18n/zh/tours.ts b/shared/src/i18n/zh/tours.ts index 101642838..58602de09 100644 --- a/shared/src/i18n/zh/tours.ts +++ b/shared/src/i18n/zh/tours.ts @@ -878,6 +878,7 @@ const tours: TranslationStrings = { 'tours.import.pointsAsPlacesHint': '单个点不属于路线,而是添加到行程的地点中。', 'tours.import.pointsConfirm': '添加地点', 'tours.import.pointsFailedIn': '无法将 {name} 中的点添加为地点。', + 'tours.import.pointsSkipped': '部分点已在此行程中,已跳过。', 'tours.import.pointsImported': '已添加 {count} 个地点', 'tours.import.unreadableIn': '无法读取 {name}:文件已损坏,或不是 GPX、KML 或 KMZ', 'tours.import.archiveNoKmlIn': '{name} 中没有 KML 文件',