From 56a7a7851b09cb30a5cd543c8cb4f926109b4290 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 24 May 2026 13:22:34 +0000 Subject: refactor(locale): move hardcoded UI strings into english locale Adds optional namespaces (common, errors, commandPalette, headTitle, notifications, schedule, events, home, reader, routes, badgePreview, badgeWall) and extends existing ones (settings.*, lists.*, tools.*, user.*, hololive.*) on the Locale interface. New fields are optional so japanese.ts can omit them; svelte-i18n's fallbackLocale handles the runtime miss. HeadTitle gains an optional routeKey prop for type-safe lookup. defaultActions becomes a factory so the command palette re-reads locale on language toggle. The existing JP feedback translation in routes/settings is preserved via japanese.ts. Out of scope (kept hardcoded): service-worker.ts, app.html, Landing*.svelte, tools.ts registry, Easter Event 2025 pages. --- src/lib/List/Manga/CleanMangaList.svelte | 36 +++++++++++++++++------------ src/lib/List/Manga/MangaListTemplate.svelte | 7 ++++-- 2 files changed, 26 insertions(+), 17 deletions(-) (limited to 'src/lib/List/Manga') diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte index a52a9d7e..25e6d48f 100644 --- a/src/lib/List/Manga/CleanMangaList.svelte +++ b/src/lib/List/Manga/CleanMangaList.svelte @@ -145,7 +145,7 @@ const increment = (manga: Media) => { {#if !dummy} @@ -153,7 +153,7 @@ const increment = (manga: Media) => { @@ -168,11 +168,13 @@ const increment = (manga: Media) => { {:then status} {#if status} {#if status.status === 503} - due.moe's manga data source is currently down for maintenance. - Please check back later. + {$locale().lists.errors?.mangaDataDown?.split("due.moe's")[0]}due.moe{$locale().lists.errors?.mangaDataDown?.split("due.moe")[1]} {:else if status.status !== 200} - due.moe's manga data source is currently unavailable. Please - check back later. + {$locale().lists.errors?.mangaDataUnavailable?.split("due.moe's")[0]}due.moe{$locale().lists.errors?.mangaDataUnavailable?.split("due.moe")[1]} {:else} {/if} @@ -180,8 +182,9 @@ const increment = (manga: Media) => { {/if} {:catch} - due.moe's manga data source is currently unreachable. Please check - back later. + {$locale().lists.errors?.mangaDataUnreachable?.split("due.moe's")[0]}due.moe{$locale().lists.errors?.mangaDataUnreachable?.split("due.moe")[1]} {/await} {/if} @@ -191,21 +194,24 @@ const increment = (manga: Media) => { {/if}

- No manga to display. {$locale().lists.actions?.forceRefresh}

- Don't read manga? ($settings.disableManga = true)} data-umami-event="Disable No Manga" + >{$locale().lists.hideMangaPanel} - You can re-enable it later in the Settings. + {$locale().lists.reenableInSettings?.split('Settings')[0]}{$locale().navigation.settings}. {:else if $settings.displayMediaListFilter && !disableFilter && hasDistinguishingList}