aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-02-09 00:35:42 -0800
committerFuwn <[email protected]>2024-02-09 00:35:42 -0800
commitebe122f871dd9fbbf0a2f8b2f88a5aa0e1edac61 (patch)
tree562fb2c2e412d20c4e1bcaf13fa76c811ad1811b /src
parentfeat(hololive): change parse error message (diff)
downloaddue.moe-ebe122f871dd9fbbf0a2f8b2f88a5aa0e1edac61.tar.xz
due.moe-ebe122f871dd9fbbf0a2f8b2f88a5aa0e1edac61.zip
feat(locale): localise hololive errors
Diffstat (limited to 'src')
-rw-r--r--src/lib/Locale/english.ts4
-rw-r--r--src/lib/Locale/japanese.ts4
-rw-r--r--src/lib/Locale/layout.ts2
-rw-r--r--src/routes/hololive/+page.svelte6
4 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/Locale/english.ts b/src/lib/Locale/english.ts
index bb70a6dd..24814f47 100644
--- a/src/lib/Locale/english.ts
+++ b/src/lib/Locale/english.ts
@@ -252,7 +252,9 @@ const English: Locale = {
minute: 'numeric'
// second: 'numeric'
// timeZoneName: 'short'
- }).format
+ }).format,
+ loadError: 'Could not load schedule.',
+ parseError: 'hololive timed out.'
},
dateFormatter: new Intl.DateTimeFormat('en-US', {
year: 'numeric',
diff --git a/src/lib/Locale/japanese.ts b/src/lib/Locale/japanese.ts
index e691faef..88d6f081 100644
--- a/src/lib/Locale/japanese.ts
+++ b/src/lib/Locale/japanese.ts
@@ -255,7 +255,9 @@ const Japanese: Locale = {
minute: 'numeric'
// second: 'numeric'
// timeZoneName: 'short'
- }).format
+ }).format,
+ loadError: 'スケジュールを読み込めませんでした。',
+ parseError: 'hololiveのタイムアウト。'
},
dateFormatter: new Intl.DateTimeFormat('ja-JP', {
// era: 'long',
diff --git a/src/lib/Locale/layout.ts b/src/lib/Locale/layout.ts
index 8eb52069..6194c4fc 100644
--- a/src/lib/Locale/layout.ts
+++ b/src/lib/Locale/layout.ts
@@ -242,6 +242,8 @@ export interface Locale {
ampersand: LocaleValue;
ended: LocaleValue;
dateFormatter: (date?: number | Date | undefined) => string;
+ loadError: LocaleValue;
+ parseError: LocaleValue;
};
dateFormatter: (date?: number | Date | undefined) => string;
}
diff --git a/src/routes/hololive/+page.svelte b/src/routes/hololive/+page.svelte
index 47123b00..d30766b9 100644
--- a/src/routes/hololive/+page.svelte
+++ b/src/routes/hololive/+page.svelte
@@ -109,7 +109,8 @@
</div>
{:catch}
<Message loader="ripple" slot>
- hololive timed out. <a href={'#'} on:click={() => location.reload()}>Try again?</a>
+ {$locale().hololive.parseError}
+ <a href={'#'} on:click={() => location.reload()}>Try again?</a>
</Message>
{/await}
{:else}
@@ -119,7 +120,8 @@
{/if}
{:catch}
<Message message="" loader="ripple" slot>
- Could not load schedule. Please <a href={'#'} on:click={() => location.reload()}>try again</a> later.
+ {$locale().hololive.loadError} Please
+ <a href={'#'} on:click={() => location.reload()}>try again</a> later.
</Message>
{/await}