diff options
| author | Fuwn <[email protected]> | 2024-02-07 08:05:03 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-02-07 08:05:03 -0800 |
| commit | 2f24d972aff6d991be67612cc97305250f83c131 (patch) | |
| tree | ffd325889cda810af7569c0f78001c2df388357f /src/routes | |
| parent | feat(api): health check endpoint (diff) | |
| download | due.moe-2f24d972aff6d991be67612cc97305250f83c131.tar.xz due.moe-2f24d972aff6d991be67612cc97305250f83c131.zip | |
feat(locale): localise hololive
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/hololive/+page.svelte | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/routes/hololive/+page.svelte b/src/routes/hololive/+page.svelte index 0ed25b57..25c1d058 100644 --- a/src/routes/hololive/+page.svelte +++ b/src/routes/hololive/+page.svelte @@ -5,6 +5,7 @@ import HeadTitle from '$lib/Home/HeadTitle.svelte'; import { parseScheduleHtml } from '$lib/hololive'; import proxy from '$lib/Utility/proxy'; + import locale from '$stores/locale'; interface ParseResult { lives: { @@ -78,15 +79,24 @@ <div class="stream card"> <p> [{#if live.streaming} - <b class="live">LIVE</b>{:else if new Date(live.time).getTime() < Date.now()} - <span class="ended">Ended</span>{:else} - <span class="upcoming">Upcoming</span>{/if}] + <b class="live">{$locale().hololive.live}</b + >{:else if new Date(live.time).getTime() < Date.now()} + <span class="ended">{$locale().hololive.ended}</span>{:else} + <span class="upcoming">{$locale().hololive.upcoming}</span>{/if}] <b>{live.streamer}</b> <span class="opaque">|</span> {new Date(live.time).toLocaleString()} {#if live.guests.length > 0} <br /> <small> - With {live.guests.join(', ').replace(/, ([^,]+)$/, ', & $1')} + {$locale().hololive.with}{live.guests + .join($locale().hololive.comma) + .replace( + new RegExp( + `${$locale().hololive.comma}([^${$locale().hololive.commaNoSpace}]+)$`, + 'g' + ), + `${$locale().hololive.comma}${$locale().hololive.ampersand}$1` + )} </small> {/if} </p> |