From ec844767e3779741263dab631c7eac2a3e33fe6b Mon Sep 17 00:00:00 2001 From: Janlhin Date: Fri, 16 Oct 2026 08:34:58 +0800 Subject: [PATCH 1/2] i18n: extract the about, discord, drop, release-notes, what's-new, collections and notifications pieces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The remaining all-purpose components whose text is plain strings: the About modal, the Discord banner, the drop overlay, the release-notes empty state, the What's-new modal, the collections dialog (its delete confirmation now counts through a plural) and the notification hub, bell title and unread counts included. - 41 new keys in each catalog (229 total). - ReleaseNotes imports the store as `i18n`: its toneFor() declares a local `t`, and a `$t` in the template would collide with it — the same trap the toast dismiss button hit. - The notifications bell's hand-built "1 notification / 2 notifications" plural moves into the catalog. npm test: 310/310 · vite build clean · catalogs aligned (0 missing, 0 extra). --- .../frontend/src/components/AboutModal.svelte | 17 ++++--- .../src/components/CollectionsDialog.svelte | 18 ++++--- .../src/components/DiscordBanner.svelte | 7 +-- .../src/components/DropOverlay.svelte | 5 +- .../src/components/NotificationHub.svelte | 23 +++++---- .../src/components/ReleaseNotes.svelte | 4 +- .../src/components/WhatsNewModal.svelte | 13 ++--- cmd/opensave-app/frontend/src/locales/en.json | 51 ++++++++++++++++++- .../frontend/src/locales/zh-Hans.json | 45 +++++++++++++++- .../frontend/src/locales/zh-Hant.json | 45 +++++++++++++++- 10 files changed, 186 insertions(+), 42 deletions(-) diff --git a/cmd/opensave-app/frontend/src/components/AboutModal.svelte b/cmd/opensave-app/frontend/src/components/AboutModal.svelte index 6700d08a..6f366f86 100644 --- a/cmd/opensave-app/frontend/src/components/AboutModal.svelte +++ b/cmd/opensave-app/frontend/src/components/AboutModal.svelte @@ -5,6 +5,7 @@ import { navigate } from '../lib/stores.js'; import { backdropClose } from '../lib/backdrop.js'; import { DISCORD_URL, GITHUB_URL } from '../lib/links.js'; + import { t } from '../lib/i18n.js'; import logoUrl from '../assets/logo.png'; import X from 'lucide-svelte/icons/x'; import ExternalLink from 'lucide-svelte/icons/external-link'; @@ -39,18 +40,18 @@