From c0bf9aad1c5bcf17cec7c9ccec5d26d64d2a1d41 Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 27 Apr 2026 14:43:18 +0200 Subject: [PATCH] =?UTF-8?q?i18n(news):=20translate=20workbench=20ListView?= =?UTF-8?q?=20via=20$=5F()=20=E2=80=94=20onboarding=20CTA,=20toolbar,=20li?= =?UTF-8?q?st=20rows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds news.workbench sub-namespace (cta_title/hint/action, err_short, empty_short, open_aria); reuses news.feed.* (articles count, refresh, savedLink, settingsLink, loading) and news.reactions.* (interested/ notInterested/blockSource) for the workbench-embedded ListView. Baselines: hardcoded 1066 → 1058 (8 cleared); missing-keys baseline unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../web/src/lib/i18n/locales/news/de.json | 8 +++++ .../web/src/lib/i18n/locales/news/en.json | 8 +++++ .../web/src/lib/i18n/locales/news/es.json | 8 +++++ .../web/src/lib/i18n/locales/news/fr.json | 8 +++++ .../web/src/lib/i18n/locales/news/it.json | 8 +++++ .../web/src/lib/modules/news/ListView.svelte | 36 +++++++++++-------- scripts/i18n-hardcoded-baseline.json | 1 - 7 files changed, 61 insertions(+), 16 deletions(-) diff --git a/apps/mana/apps/web/src/lib/i18n/locales/news/de.json b/apps/mana/apps/web/src/lib/i18n/locales/news/de.json index 8c909a59b..c6a5bb8e0 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/news/de.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/news/de.json @@ -133,5 +133,13 @@ "title": "News", "empty": "Keine ungelesenen News.", "viewAll": "Alle ansehen" + }, + "workbench": { + "cta_title": "News Hub einrichten", + "cta_hint": "Wähle Themen, Sprachen und Quellen — danach erscheinen hier deine Artikel.", + "cta_action": "Jetzt einrichten", + "err_short": "Fehler", + "empty_short": "Keine neuen Artikel.", + "open_aria": "Öffnen" } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/news/en.json b/apps/mana/apps/web/src/lib/i18n/locales/news/en.json index 3c08c660f..7cc040b32 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/news/en.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/news/en.json @@ -133,5 +133,13 @@ "title": "News", "empty": "No unread news.", "viewAll": "View all" + }, + "workbench": { + "cta_title": "Set up the News Hub", + "cta_hint": "Pick topics, languages and sources — after that your articles appear here.", + "cta_action": "Set up now", + "err_short": "Error", + "empty_short": "No new articles.", + "open_aria": "Open" } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/news/es.json b/apps/mana/apps/web/src/lib/i18n/locales/news/es.json index 633c8a858..32f16f26d 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/news/es.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/news/es.json @@ -133,5 +133,13 @@ "title": "Noticias", "empty": "Sin noticias por leer.", "viewAll": "Ver todo" + }, + "workbench": { + "cta_title": "Configurar el News Hub", + "cta_hint": "Elige temas, idiomas y fuentes — luego tus artículos aparecerán aquí.", + "cta_action": "Configurar ahora", + "err_short": "Error", + "empty_short": "No hay artículos nuevos.", + "open_aria": "Abrir" } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/news/fr.json b/apps/mana/apps/web/src/lib/i18n/locales/news/fr.json index 76044f83f..0e55d6bc2 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/news/fr.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/news/fr.json @@ -133,5 +133,13 @@ "title": "Actualités", "empty": "Aucune actualité non lue.", "viewAll": "Tout voir" + }, + "workbench": { + "cta_title": "Configurer le News Hub", + "cta_hint": "Choisis thèmes, langues et sources — ensuite tes articles apparaîtront ici.", + "cta_action": "Configurer maintenant", + "err_short": "Erreur", + "empty_short": "Aucun nouvel article.", + "open_aria": "Ouvrir" } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/news/it.json b/apps/mana/apps/web/src/lib/i18n/locales/news/it.json index bd519af63..7e348bcbb 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/news/it.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/news/it.json @@ -133,5 +133,13 @@ "title": "Notizie", "empty": "Nessuna notizia da leggere.", "viewAll": "Vedi tutte" + }, + "workbench": { + "cta_title": "Configura il News Hub", + "cta_hint": "Scegli temi, lingue e fonti — poi i tuoi articoli appariranno qui.", + "cta_action": "Configura ora", + "err_short": "Errore", + "empty_short": "Nessun nuovo articolo.", + "open_aria": "Apri" } } diff --git a/apps/mana/apps/web/src/lib/modules/news/ListView.svelte b/apps/mana/apps/web/src/lib/modules/news/ListView.svelte index 79a14289d..5567eef49 100644 --- a/apps/mana/apps/web/src/lib/modules/news/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/news/ListView.svelte @@ -29,6 +29,7 @@ import { articlesStore } from '$lib/modules/news/stores/articles.svelte'; import { feedCacheStore } from '$lib/modules/news/stores/feed-cache.svelte'; import type { LocalCachedArticle } from '$lib/modules/news/types'; + import { _ } from 'svelte-i18n'; // We accept ViewProps for protocol compatibility but the workbench // view doesn't navigate within itself — every "open" jumps to the @@ -97,18 +98,18 @@
{#if !prefs.onboardingCompleted}
-

News Hub einrichten

+

{$_('news.workbench.cta_title')}

- Wähle Themen, Sprachen und Quellen — danach erscheinen hier deine Artikel. + {$_('news.workbench.cta_hint')}

- Jetzt einrichten + {$_('news.workbench.cta_action')}
{:else}
- {ranked.length} Artikel + {$_('news.feed.articles', { values: { count: ranked.length } })} {#if feedCacheStore.lastError} - · Fehler + · {$_('news.workbench.err_short')} {/if}
@@ -117,22 +118,22 @@ class="tool" onclick={refresh} disabled={feedCacheStore.inFlight} - title="Neu laden" + title={$_('news.feed.refresh')} > {feedCacheStore.inFlight ? '…' : '↻'} - 📑 - + 📑 +
{#if ranked.length === 0}
{#if pool.length === 0} -

Lade Artikel…

+

{$_('news.feed.loading')}

{:else} -

Keine neuen Artikel.

- +

{$_('news.workbench.empty_short')}

+ {/if}
{:else} @@ -140,7 +141,12 @@ {#each ranked.slice(0, 30) as { article } (article.id)}
  • {#if article.imageUrl} - {/if} @@ -158,7 +164,7 @@ type="button" class="rxn" onclick={() => react(article, 'interested')} - title="Interessiert" + title={$_('news.reactions.interested')} > ❤️ @@ -166,7 +172,7 @@ type="button" class="rxn" onclick={() => react(article, 'not_interested')} - title="Nicht für mich" + title={$_('news.reactions.notInterested')} > 👎 @@ -174,7 +180,7 @@ type="button" class="rxn" onclick={() => react(article, 'source_blocked')} - title="Quelle ausblenden" + title={$_('news.reactions.blockSource')} > 🚫 diff --git a/scripts/i18n-hardcoded-baseline.json b/scripts/i18n-hardcoded-baseline.json index 7fd9c1c74..bf345ce89 100644 --- a/scripts/i18n-hardcoded-baseline.json +++ b/scripts/i18n-hardcoded-baseline.json @@ -139,7 +139,6 @@ "apps/mana/apps/web/src/lib/modules/music/views/DetailView.svelte": 6, "apps/mana/apps/web/src/lib/modules/myday/ListView.svelte": 7, "apps/mana/apps/web/src/lib/modules/news-research/ListView.svelte": 3, - "apps/mana/apps/web/src/lib/modules/news/ListView.svelte": 8, "apps/mana/apps/web/src/lib/modules/news/widgets/NewsUnreadWidget.svelte": 2, "apps/mana/apps/web/src/lib/modules/notes/ListView.svelte": 4, "apps/mana/apps/web/src/lib/modules/photos/components/albums/CreateAlbumModal.svelte": 3,