mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
i18n(news/preferences): translate +page.svelte via $_() — header, all 5 sections
Reuses existing news.preferences sub-namespace (topicsHeading/Hint,
languagesHeading, sourcesHeading/Hint, weightsHeading/Hint/Reset,
weightsResetConfirm, onboardingHeading/Hint/Rerun) and adds 4 keys
(page_title_html, subtitle, sourcesHintHtml with {count}, sourcesLinkArrow).
Languages pills (Deutsch/English) routed via news.languages.*.
Baselines: hardcoded 1017 → 1009 (8 cleared); missing-keys baseline unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
98ce33e788
commit
42e4d58c8c
7 changed files with 45 additions and 20 deletions
|
|
@ -94,13 +94,17 @@
|
|||
},
|
||||
"preferences": {
|
||||
"title": "News-Einstellungen",
|
||||
"page_title_html": "News-Einstellungen — Mana",
|
||||
"subtitle": "Themen · Sprachen · Gewichtungen",
|
||||
"backToFeed": "Feed",
|
||||
"topicsHeading": "Themen",
|
||||
"topicsHint": "Welche Themen sollen im Feed auftauchen?",
|
||||
"languagesHeading": "Sprachen",
|
||||
"sourcesHeading": "Quellen",
|
||||
"sourcesHint": "Du blockst aktuell {count} Quellen.",
|
||||
"sourcesHintHtml": "Du blockst aktuell <strong>{count}</strong> Quellen.",
|
||||
"sourcesLink": "Quellen verwalten",
|
||||
"sourcesLinkArrow": "Quellen verwalten →",
|
||||
"weightsHeading": "Gelernte Gewichtungen",
|
||||
"weightsHint": "Über Reaktionen lernt der Feed deine Vorlieben: {topics} Themen-Gewichte, {sources} Quellen-Gewichte.",
|
||||
"weightsReset": "Zurücksetzen",
|
||||
|
|
|
|||
|
|
@ -94,13 +94,17 @@
|
|||
},
|
||||
"preferences": {
|
||||
"title": "News settings",
|
||||
"page_title_html": "News settings — Mana",
|
||||
"subtitle": "Topics · Languages · Weights",
|
||||
"backToFeed": "Feed",
|
||||
"topicsHeading": "Topics",
|
||||
"topicsHint": "Which topics should appear in the feed?",
|
||||
"languagesHeading": "Languages",
|
||||
"sourcesHeading": "Sources",
|
||||
"sourcesHint": "You're currently blocking {count} sources.",
|
||||
"sourcesHintHtml": "You're currently blocking <strong>{count}</strong> sources.",
|
||||
"sourcesLink": "Manage sources",
|
||||
"sourcesLinkArrow": "Manage sources →",
|
||||
"weightsHeading": "Learned weights",
|
||||
"weightsHint": "From your reactions the feed learns your preferences: {topics} topic weights, {sources} source weights.",
|
||||
"weightsReset": "Reset",
|
||||
|
|
|
|||
|
|
@ -94,13 +94,17 @@
|
|||
},
|
||||
"preferences": {
|
||||
"title": "Ajustes de noticias",
|
||||
"page_title_html": "Ajustes de noticias — Mana",
|
||||
"subtitle": "Temas · Idiomas · Pesos",
|
||||
"backToFeed": "Feed",
|
||||
"topicsHeading": "Temas",
|
||||
"topicsHint": "¿Qué temas deben aparecer en el feed?",
|
||||
"languagesHeading": "Idiomas",
|
||||
"sourcesHeading": "Fuentes",
|
||||
"sourcesHint": "Estás bloqueando {count} fuentes.",
|
||||
"sourcesHintHtml": "Estás bloqueando <strong>{count}</strong> fuentes.",
|
||||
"sourcesLink": "Gestionar fuentes",
|
||||
"sourcesLinkArrow": "Gestionar fuentes →",
|
||||
"weightsHeading": "Pesos aprendidos",
|
||||
"weightsHint": "El feed aprende tus preferencias a partir de tus reacciones: {topics} pesos de temas, {sources} pesos de fuentes.",
|
||||
"weightsReset": "Restablecer",
|
||||
|
|
|
|||
|
|
@ -94,13 +94,17 @@
|
|||
},
|
||||
"preferences": {
|
||||
"title": "Réglages des actualités",
|
||||
"page_title_html": "Réglages des actualités — Mana",
|
||||
"subtitle": "Thèmes · Langues · Pondérations",
|
||||
"backToFeed": "Fil",
|
||||
"topicsHeading": "Thèmes",
|
||||
"topicsHint": "Quels thèmes doivent apparaître dans le fil ?",
|
||||
"languagesHeading": "Langues",
|
||||
"sourcesHeading": "Sources",
|
||||
"sourcesHint": "Tu bloques actuellement {count} sources.",
|
||||
"sourcesHintHtml": "Tu bloques actuellement <strong>{count}</strong> sources.",
|
||||
"sourcesLink": "Gérer les sources",
|
||||
"sourcesLinkArrow": "Gérer les sources →",
|
||||
"weightsHeading": "Pondérations apprises",
|
||||
"weightsHint": "Le fil apprend tes préférences via tes réactions : {topics} pondérations de thèmes, {sources} pondérations de sources.",
|
||||
"weightsReset": "Réinitialiser",
|
||||
|
|
|
|||
|
|
@ -94,13 +94,17 @@
|
|||
},
|
||||
"preferences": {
|
||||
"title": "Impostazioni notizie",
|
||||
"page_title_html": "Impostazioni notizie — Mana",
|
||||
"subtitle": "Temi · Lingue · Pesi",
|
||||
"backToFeed": "Feed",
|
||||
"topicsHeading": "Temi",
|
||||
"topicsHint": "Quali temi devono apparire nel feed?",
|
||||
"languagesHeading": "Lingue",
|
||||
"sourcesHeading": "Fonti",
|
||||
"sourcesHint": "Stai bloccando {count} fonti.",
|
||||
"sourcesHintHtml": "Stai bloccando <strong>{count}</strong> fonti.",
|
||||
"sourcesLink": "Gestisci fonti",
|
||||
"sourcesLinkArrow": "Gestisci fonti →",
|
||||
"weightsHeading": "Pesi appresi",
|
||||
"weightsHint": "Dalle tue reazioni il feed impara le tue preferenze: {topics} pesi tema, {sources} pesi fonte.",
|
||||
"weightsReset": "Reimposta",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
import { ALL_TOPICS, type Topic, type Language } from '$lib/modules/news/types';
|
||||
import { TOPIC_LABELS } from '$lib/modules/news/sources-meta';
|
||||
import { RoutePage } from '$lib/components/shell';
|
||||
import { _ } from 'svelte-i18n';
|
||||
|
||||
const prefs$ = usePreferences();
|
||||
const prefs = $derived(prefs$.value);
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
await preferencesStore.setLanguages(next);
|
||||
}
|
||||
async function resetWeights() {
|
||||
if (!confirm('Alle gelernten Gewichtungen zurücksetzen?')) return;
|
||||
if (!confirm($_('news.preferences.weightsResetConfirm'))) return;
|
||||
await preferencesStore.resetWeights();
|
||||
}
|
||||
async function rerunOnboarding() {
|
||||
|
|
@ -45,21 +46,21 @@
|
|||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>News-Einstellungen — Mana</title>
|
||||
<title>{$_('news.preferences.page_title_html')}</title>
|
||||
</svelte:head>
|
||||
|
||||
<RoutePage appId="news" backHref="/news">
|
||||
<div class="pane">
|
||||
<header class="bar">
|
||||
<div class="title">
|
||||
<strong>News-Einstellungen</strong>
|
||||
<span class="sub">Themen · Sprachen · Gewichtungen</span>
|
||||
<strong>{$_('news.preferences.title')}</strong>
|
||||
<span class="sub">{$_('news.preferences.subtitle')}</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="card">
|
||||
<h2>Themen</h2>
|
||||
<p class="hint">Welche Themen sollen im Feed auftauchen?</p>
|
||||
<h2>{$_('news.preferences.topicsHeading')}</h2>
|
||||
<p class="hint">{$_('news.preferences.topicsHint')}</p>
|
||||
<div class="grid">
|
||||
{#each ALL_TOPICS as topic}
|
||||
<button
|
||||
|
|
@ -76,7 +77,7 @@
|
|||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Sprachen</h2>
|
||||
<h2>{$_('news.preferences.languagesHeading')}</h2>
|
||||
<div class="row">
|
||||
<button
|
||||
type="button"
|
||||
|
|
@ -84,7 +85,7 @@
|
|||
class:selected={prefs.preferredLanguages.includes('de')}
|
||||
onclick={() => toggleLang('de')}
|
||||
>
|
||||
🇩🇪 Deutsch
|
||||
🇩🇪 {$_('news.languages.de')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
|
|
@ -92,33 +93,38 @@
|
|||
class:selected={prefs.preferredLanguages.includes('en')}
|
||||
onclick={() => toggleLang('en')}
|
||||
>
|
||||
🇬🇧 English
|
||||
🇬🇧 {$_('news.languages.en')}
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Quellen</h2>
|
||||
<h2>{$_('news.preferences.sourcesHeading')}</h2>
|
||||
<p class="hint">
|
||||
Du blockst aktuell <strong>{prefs.blockedSources.length}</strong> Quellen.
|
||||
{@html $_('news.preferences.sourcesHintHtml', {
|
||||
values: { count: prefs.blockedSources.length },
|
||||
})}
|
||||
</p>
|
||||
<a class="btn-link" href="/news/sources">Quellen verwalten →</a>
|
||||
<a class="btn-link" href="/news/sources">{$_('news.preferences.sourcesLinkArrow')}</a>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Gelernte Gewichtungen</h2>
|
||||
<h2>{$_('news.preferences.weightsHeading')}</h2>
|
||||
<p class="hint">
|
||||
Über Reaktionen lernt der Feed deine Vorlieben:
|
||||
{topicWeightCount} Themen-Gewichte, {sourceWeightCount} Quellen-Gewichte.
|
||||
{$_('news.preferences.weightsHint', {
|
||||
values: { topics: topicWeightCount, sources: sourceWeightCount },
|
||||
})}
|
||||
</p>
|
||||
<button type="button" class="btn-secondary" onclick={resetWeights}>Zurücksetzen</button>
|
||||
<button type="button" class="btn-secondary" onclick={resetWeights}
|
||||
>{$_('news.preferences.weightsReset')}</button
|
||||
>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Onboarding</h2>
|
||||
<p class="hint">Themen, Sprachen und Quellen neu wählen.</p>
|
||||
<h2>{$_('news.preferences.onboardingHeading')}</h2>
|
||||
<p class="hint">{$_('news.preferences.onboardingHint')}</p>
|
||||
<button type="button" class="btn-secondary" onclick={rerunOnboarding}>
|
||||
Onboarding neu starten
|
||||
{$_('news.preferences.onboardingRerun')}
|
||||
</button>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -262,7 +262,6 @@
|
|||
"apps/mana/apps/web/src/routes/(app)/news-research/+page.svelte": 2,
|
||||
"apps/mana/apps/web/src/routes/(app)/news/[id]/+page.svelte": 3,
|
||||
"apps/mana/apps/web/src/routes/(app)/news/add/+page.svelte": 1,
|
||||
"apps/mana/apps/web/src/routes/(app)/news/preferences/+page.svelte": 8,
|
||||
"apps/mana/apps/web/src/routes/(app)/news/saved/+page.svelte": 1,
|
||||
"apps/mana/apps/web/src/routes/(app)/news/sources/+page.svelte": 1,
|
||||
"apps/mana/apps/web/src/routes/(app)/notes/[id]/+page.svelte": 5,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue