Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tt-only
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Nov 24, 2024
2 parents 9dc0f1b + b2debb3 commit 510190a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pkg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[adr]
[email protected]:triptix-tech/adr.git
branch=master
commit=a632a7e41d58900f2422ef0d3207d83a14aeeb09
commit=bd3bb6bb8f1b5c0e066acd975767df27d5de22f8
[googletest]
[email protected]:motis-project/googletest.git
branch=master
Expand Down
4 changes: 2 additions & 2 deletions .pkg.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
14822555216836180477
5061172279391244024
cista 847b27100b7e730370b810ce62206a66b0bf2d79
zlib-ng 68ab3e2d80253ec5dc3c83691d9ff70477b32cd3
boost 930f38eb0365ceb7853273e03da4d9e7787abfb9
Expand Down Expand Up @@ -46,5 +46,5 @@ reflect-cpp c54fe66de4650b60c23aadd4a06d9db4ffeda22f
FTXUI dd6a5d371fd7a3e2937bb579955003c54b727233
tg 20c0f298b8ce58de29a790290f44dca7c4ecc364
utf8proc 779b780da3b99d123133eb99707b65c7e4324cc8
adr a632a7e41d58900f2422ef0d3207d83a14aeeb09
adr bd3bb6bb8f1b5c0e066acd975767df27d5de22f8
openapi-cpp 6b5fd40a2b552fc5656aeff56f203a34c1d9e9af
2 changes: 1 addition & 1 deletion include/motis/hashes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
33 changes: 33 additions & 0 deletions ui/src/lib/i18n/fr.ts
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 3 additions & 1 deletion ui/src/lib/i18n/translation.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -26,7 +27,8 @@ export type Translations = {
const translations: Map<string, Translations> = new Map(
Object.entries({
en,
de
de,
fr
})
);

Expand Down
17 changes: 15 additions & 2 deletions ui/src/routes/RailViz.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
};
Expand All @@ -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;
}
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 510190a

Please sign in to comment.