diff --git a/.pkg b/.pkg index a4f06a166..1ba232325 100644 --- a/.pkg +++ b/.pkg @@ -17,7 +17,7 @@ [adr] url=git@github.com:triptix-tech/adr.git branch=master - commit=a632a7e41d58900f2422ef0d3207d83a14aeeb09 + commit=bd3bb6bb8f1b5c0e066acd975767df27d5de22f8 [googletest] url=git@github.com:motis-project/googletest.git branch=master diff --git a/.pkg.lock b/.pkg.lock index 856f4da94..2e42d6894 100644 --- a/.pkg.lock +++ b/.pkg.lock @@ -1,4 +1,4 @@ -14822555216836180477 +5061172279391244024 cista 847b27100b7e730370b810ce62206a66b0bf2d79 zlib-ng 68ab3e2d80253ec5dc3c83691d9ff70477b32cd3 boost 930f38eb0365ceb7853273e03da4d9e7787abfb9 @@ -46,5 +46,5 @@ reflect-cpp c54fe66de4650b60c23aadd4a06d9db4ffeda22f FTXUI dd6a5d371fd7a3e2937bb579955003c54b727233 tg 20c0f298b8ce58de29a790290f44dca7c4ecc364 utf8proc 779b780da3b99d123133eb99707b65c7e4324cc8 -adr a632a7e41d58900f2422ef0d3207d83a14aeeb09 +adr bd3bb6bb8f1b5c0e066acd975767df27d5de22f8 openapi-cpp 6b5fd40a2b552fc5656aeff56f203a34c1d9e9af diff --git a/include/motis/hashes.h b/include/motis/hashes.h index f913b2e34..5f4d10a4c 100644 --- a/include/motis/hashes.h +++ b/include/motis/hashes.h @@ -14,7 +14,7 @@ constexpr auto const osr_version = []() { return meta_entry_t{"osr_bin_ver", 7U}; }; constexpr auto const adr_version = []() { - return meta_entry_t{"adr_bin_ver", 2U}; + return meta_entry_t{"adr_bin_ver", 3U}; }; constexpr auto const n_version = []() { return meta_entry_t{"nigiri_bin_ver", 7U}; diff --git a/ui/src/lib/i18n/fr.ts b/ui/src/lib/i18n/fr.ts new file mode 100644 index 000000000..bcbf08e0d --- /dev/null +++ b/ui/src/lib/i18n/fr.ts @@ -0,0 +1,33 @@ +import type { Translations } from './translation'; + +const translations: Translations = { + walk: 'Marche', + bike: 'Vélo', + car: 'Voiture', + from: 'De', + to: 'À', + arrival: 'Arrivée', + departure: 'Départ', + duration: 'Durée', + arrivals: 'Arrivées', + later: 'plus tard', + earlier: 'plus tôt', + departures: 'Départ', + switchToArrivals: 'Basculer vers les arrivées', + switchToDepartures: 'Basculer vers les départs', + track: 'Voie', + arrivalOnTrack: 'Arrivée sur la voie', + tripIntermediateStops: (n: number) => { + switch (n) { + case 0: + return 'Aucun arrêt intermédiaire'; + case 1: + return '1 arrêt intermédiaire'; + default: + return `${n} arrêts intermédiaires`; + } + }, + sharingProvider: 'Fournisseur' +}; + +export default translations; diff --git a/ui/src/lib/i18n/translation.ts b/ui/src/lib/i18n/translation.ts index 3a262fe1f..229ff4799 100644 --- a/ui/src/lib/i18n/translation.ts +++ b/ui/src/lib/i18n/translation.ts @@ -1,6 +1,7 @@ import { browser } from '$app/environment'; import en from './en'; import de from './de'; +import fr from './fr'; export type Translations = { walk: string; @@ -26,7 +27,8 @@ export type Translations = { const translations: Map = new Map( Object.entries({ en, - de + de, + fr }) ); diff --git a/ui/src/routes/RailViz.svelte b/ui/src/routes/RailViz.svelte index 10067c5c2..ea7dc8b63 100644 --- a/ui/src/routes/RailViz.svelte +++ b/ui/src/routes/RailViz.svelte @@ -82,6 +82,9 @@ currDistance += distance; } + if (Math.abs(totalDistance - currDistance) > 1) { + console.log(totalDistance, currDistance); + } keyFrames.push({ point: coordinates[coordinates.length - 1], time: arrival, heading: 0 }); return { keyFrames, arrival, departure, arrivalDelay }; }; @@ -90,6 +93,16 @@ const i = keyframes.findIndex((s) => s.time >= timestamp); if (i === -1 || i === 0) { + console.log( + 'not found, timestamp=', + new Date(timestamp), + ' #keyframes=', + new Date(keyframes.length), + ' first=', + new Date(keyframes[0].time), + ', last=', + new Date(keyframes[keyframes.length - 1].time) + ); return; } @@ -112,7 +125,7 @@ const now = new Date().getTime(); const tripsWithFrame = trips - .filter((t) => now >= t.departure && now < t.arrival) + .filter((t) => now >= t.departure && now <= t.arrival) .map((t) => { return { ...t, @@ -178,7 +191,7 @@ const min = lngLatToStr(b.getNorthWest()); const max = lngLatToStr(b.getSouthEast()); const startTime = new Date(); - const endTime = new Date(startTime.getTime() + 60000); + const endTime = new Date(startTime.getTime() + 180000); return trips({ query: { min,