From 4d6c7c6886e8fa4d2402a74863bd385e586b896a Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@estrogen.zone>
Date: Thu, 24 Jul 2025 09:56:44 +0000
Subject: feat: i18n shenanigans

---
 src/lib/Timetable.svelte | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

(limited to 'src/lib/Timetable.svelte')

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))}
-- 
cgit v1.2.3

