aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Timetable.svelte29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/lib/Timetable.svelte b/src/lib/Timetable.svelte
index d246579..5fa6e95 100644
--- a/src/lib/Timetable.svelte
+++ b/src/lib/Timetable.svelte
@@ -52,11 +52,15 @@
const minutes = Math.floor(totalMinutes) - hours * 60;
const seconds = Math.floor(totalSeconds) - hours * 60 * 60 - minutes * 60;
const results = [] as string[];
- if (hours) results.push(`${hours} ${hours !== 1 ? m.hours() : m.hour()}`);
- if (hours || minutes)
- results.push(`${minutes} ${minutes !== 1 ? m.minutes() : m.minute()}`);
+ if (hours)
+ results.push(
+ `${m.hours({
+ hours,
+ })}`
+ );
+ if (hours || minutes) results.push(`${m.minutes({ minutes })}`);
if (seconds && relativeSecondPrecision)
- results.push(`${seconds} ${seconds !== 1 ? m.seconds() : m.second()}`);
+ results.push(`${m.seconds({ seconds })}`);
if (results.length > 1) {
const [r, l] = [results.pop()!, results.pop()!];
results.push(
@@ -226,14 +230,11 @@
{@const notices = (() => {
let notices = [] as [pictogram: string[], content: string][];
if (departure.cancelled)
- notices.push([
- ['Cancellation', 'Attention'],
- m.brief_north_otter_cherish(),
- ]);
+ notices.push([['Cancellation', 'Attention'], m.connection_cancelled()]);
if (delayMinutes < -0.5) {
notices.push([
['Hint'],
- m.vehicle_is_early({
+ m.connection_early({
minutes: -delayMinutes,
arrival: isArrivals.toString(),
}),
@@ -245,7 +246,7 @@
: delayMinutes >= 2
? ['Delay', 'Hint']
: ['Hint'],
- m.next_long_lark_bask({
+ m.connection_delayed({
minutes: delayMinutes.toFixed(0),
}),
]);
@@ -317,11 +318,11 @@
? m.antsy_weird_cowfish_wish() + ' '
: ''}{isRelativeTime && Math.abs(expectedTime - receivedTime) < 1
? isArrivals
- ? m.hour_tidy_hawk_explore()
- : m.free_knotty_ray_soar()
+ ? m.arrival_in()
+ : m.departure_in()
: isArrivals
- ? m.polite_lucky_angelfish_amaze()
- : m.home_flaky_jurgen_ascend()}
+ ? m.arrival_at()
+ : m.departure_at()}
{#if Math.abs(expectedTime - receivedTime) < 1}
<span class="font-bold">
{@render renderLocalTime(new Date(receivedTime * 60 * 1000))}