From f0783d10c172e627171539b3ba166b8619ea859f Mon Sep 17 00:00:00 2001 From: memdmp Date: Thu, 24 Jul 2025 10:05:46 +0000 Subject: feat: more i18n --- src/lib/Timetable.svelte | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/lib/Timetable.svelte b/src/lib/Timetable.svelte index 5fa6e95..96e0c03 100644 --- a/src/lib/Timetable.svelte +++ b/src/lib/Timetable.svelte @@ -64,7 +64,7 @@ if (results.length > 1) { const [r, l] = [results.pop()!, results.pop()!]; results.push( - m.timeJoiner({ + m.time_joiner({ l, r, }) @@ -75,17 +75,17 @@ ? results[0] : results.length === 0 ? '' - : results.reduce((pv, cv) => m.timeJoiner2({ l: pv, r: cv })); + : results.reduce((pv, cv) => m.time_joiner2({ l: pv, r: cv })); if (relTime === '') - return m.timeImmediate({ + return m.time_immediate({ isPastTense: _totalMillis < 0 ? 'true' : 'false', }); if (_totalMillis < 0) - return m.timeInPast({ + return m.past_time({ relTime, }); else - return m.timeInFuture({ + return m.future_time({ relTime, }); }; @@ -374,29 +374,22 @@
{#if (placeName || placeId) && isResultsPage} -

No results

+

{m.no_results_title()}

- No results have been found for the station {placeName ?? placeId}.
- Please try again. + {#each m + .no_results_body({ stationName }) + .split('*') as part, idx}{#if idx % 2 === 0}{part}{:else}{part}{/if}{/each}

{:else if placeId} -

No results

-

- No results have been found for the station {placeName ?? placeId}.
- Please try again. -

+ TODO: add some loader here {:else} -

No Station

+

{m.welcome_title()}

- Please input a station in the search field above and select a search - result. + {m.welcome_body_1()}

- Examples: