i18n: wire statsIntro into renderer-texts + drop unused statsScannedAtNever

Two related locale-table fixes:

1. statsIntro was already defined in both DE+EN but never applied — the HTML's German static text stayed visible when the user picked English. Wired it through renderer-texts: the locale strings now include the <code>{streamer}/live/</code> / <code>{streamer}/</code> markup that the HTML carried inline, and the setText pass uses applyHtml to render them so the inline <code> styling survives. The locale strings are static developer-authored content (no untrusted input) so the inline <code> tags are safe.

2. statsScannedAtNever was defined in both DE+EN but had zero callsites — leftover from an earlier stats-card iteration. Removed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
xRangerDE 2026-05-11 11:19:20 +02:00
parent 6d28aa1972
commit 564d123431
3 changed files with 4 additions and 4 deletions

View File

@ -100,11 +100,10 @@ const UI_TEXT_DE = {
autoVodScanNow: 'Jetzt scannen', autoVodScanNow: 'Jetzt scannen',
autoRecordScanNow: 'Live-Status pruefen', autoRecordScanNow: 'Live-Status pruefen',
statsTitle: 'Archiv-Statistik', statsTitle: 'Archiv-Statistik',
statsIntro: 'Aggregiert ueber den Download-Ordner. Live-Aufnahmen liegen unter {streamer}/live/, VOD-Downloads direkt unter {streamer}/. Lade-Zeit skaliert mit der Anzahl Dateien.', statsIntro: 'Aggregiert ueber den Download-Ordner. Live-Aufnahmen liegen unter <code>{streamer}/live/</code>, VOD-Downloads direkt unter <code>{streamer}/</code>. Lade-Zeit skaliert mit der Anzahl Dateien.',
statsRefresh: 'Aktualisieren', statsRefresh: 'Aktualisieren',
statsScanning: 'Scanne...', statsScanning: 'Scanne...',
statsScannedAt: 'Letzter Scan', statsScannedAt: 'Letzter Scan',
statsScannedAtNever: 'Noch nicht gescannt',
statsSummaryTitle: 'Uebersicht', statsSummaryTitle: 'Uebersicht',
statsTopStreamersTitle: 'Top Streamer (nach Groesse)', statsTopStreamersTitle: 'Top Streamer (nach Groesse)',
statsActivityTitle: 'Aktivitaet (letzte 30 Tage)', statsActivityTitle: 'Aktivitaet (letzte 30 Tage)',

View File

@ -101,11 +101,10 @@ const UI_TEXT_EN = {
autoVodScanNow: 'Scan now', autoVodScanNow: 'Scan now',
autoRecordScanNow: 'Check live status', autoRecordScanNow: 'Check live status',
statsTitle: 'Archive statistics', statsTitle: 'Archive statistics',
statsIntro: 'Aggregated across the download folder. Live recordings live under {streamer}/live/, VOD downloads under {streamer}/. Scan time scales with file count.', statsIntro: 'Aggregated across the download folder. Live recordings live under <code>{streamer}/live/</code>, VOD downloads under <code>{streamer}/</code>. Scan time scales with file count.',
statsRefresh: 'Refresh', statsRefresh: 'Refresh',
statsScanning: 'Scanning...', statsScanning: 'Scanning...',
statsScannedAt: 'Last scan', statsScannedAt: 'Last scan',
statsScannedAtNever: 'Not yet scanned',
statsSummaryTitle: 'Overview', statsSummaryTitle: 'Overview',
statsTopStreamersTitle: 'Top streamers (by size)', statsTopStreamersTitle: 'Top streamers (by size)',
statsActivityTitle: 'Activity (last 30 days)', statsActivityTitle: 'Activity (last 30 days)',

View File

@ -85,6 +85,8 @@ function applyLanguageToStaticUI(): void {
} }
setText('navSettingsText', UI_TEXT.static.navSettings); setText('navSettingsText', UI_TEXT.static.navSettings);
setText('statsTitle', UI_TEXT.static.statsTitle); setText('statsTitle', UI_TEXT.static.statsTitle);
const statsIntroEl = document.getElementById('statsIntro');
if (statsIntroEl) applyHtml(statsIntroEl, UI_TEXT.static.statsIntro);
setText('statsSummaryTitle', UI_TEXT.static.statsSummaryTitle); setText('statsSummaryTitle', UI_TEXT.static.statsSummaryTitle);
setText('statsTopStreamersTitle', UI_TEXT.static.statsTopStreamersTitle); setText('statsTopStreamersTitle', UI_TEXT.static.statsTopStreamersTitle);
setText('statsActivityTitle', UI_TEXT.static.statsActivityTitle); setText('statsActivityTitle', UI_TEXT.static.statsActivityTitle);