add localisation support

currently only en_GB (TODO: dynamic language pack imports)
This commit is contained in:
ari melody 2025-07-13 18:35:26 +01:00
parent 970590497f
commit e326ac858e
Signed by: ari
GPG key ID: CF99829C92678188
17 changed files with 263 additions and 90 deletions

View file

@ -4,6 +4,9 @@
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import Notification from '$lib/ui/Notification.svelte';
import Lang from '$lib/lang.js';
const lang = Lang('en_GB');
if (!$account) goto("/");
@ -31,13 +34,13 @@
</script>
<header>
<h1>Notifications</h1>
<h1>{lang.string('navigation.notifications')}</h1>
</header>
<div class="notifications">
{#if $notifications.length === 0}
<div class="loading throb">
<span>fetching notifications...</span>
<span>{lang.string('notification.fetching')}</span>
</div>
{:else}
{#each $notifications as notif}