From fa63871da7a6a9c0069e468ade6db148c00886ca Mon Sep 17 00:00:00 2001 From: Oliver Rasche Date: Mon, 9 Nov 2026 21:03:40 +0100 Subject: [PATCH] SSR control center: English UI strings throughout Widgets, backend module template and flash messages now match the rest of the backend, which is English. Co-Authored-By: Claude Fable 5 --- .../Controller/Backend/SsrController.php | 4 +- .../vitec/Classes/Widgets/SsrStatsWidget.php | 20 ++++---- .../vitec/Classes/Widgets/SsrStatusWidget.php | 22 ++++---- packages/vitec/Configuration/Services.yaml | 8 +-- .../Private/Templates/Ssr/Index.html | 50 +++++++++---------- 5 files changed, 52 insertions(+), 52 deletions(-) diff --git a/packages/vitec/Classes/Controller/Backend/SsrController.php b/packages/vitec/Classes/Controller/Backend/SsrController.php index af352bb..a4bc4e3 100644 --- a/packages/vitec/Classes/Controller/Backend/SsrController.php +++ b/packages/vitec/Classes/Controller/Backend/SsrController.php @@ -88,12 +88,12 @@ final class SsrController } if ($paths === []) { - $this->flash('Keine Pfade angegeben.', 'Purge', false); + $this->flash('No paths given.', 'Purge', false); } else { $result = $this->purgeService->purge($paths, 'module:' . $user); $this->flash( sprintf('HTTP %d — %s', $result['httpCode'], $result['message']), - $result['success'] ? 'Purge erfolgreich' : 'Purge fehlgeschlagen', + $result['success'] ? 'Purge successful' : 'Purge failed', $result['success'] ); } diff --git a/packages/vitec/Classes/Widgets/SsrStatsWidget.php b/packages/vitec/Classes/Widgets/SsrStatsWidget.php index 3e54ba0..3957fa0 100644 --- a/packages/vitec/Classes/Widgets/SsrStatsWidget.php +++ b/packages/vitec/Classes/Widgets/SsrStatsWidget.php @@ -10,8 +10,8 @@ use TYPO3\CMS\Dashboard\Widgets\WidgetInterface; /** * Dashboard tile: purge and health statistics from the two protocol - * tables. History depth = what vitec:ssr-health sampling (scheduler) - * and the purge log hold (14 days). + * tables. History depth = what vitec:ssr-health sampling (cron, every + * 5 minutes) and the purge log hold (14 days). */ final class SsrStatsWidget implements WidgetInterface { @@ -38,15 +38,15 @@ final class SsrStatsWidget implements WidgetInterface $maxCache = $this->scalar('SELECT MAX(cache_mb) FROM tx_vitec_ssrhealthlog WHERE crdate > ' . $d7); $rows = [ - ['Purges (24 h / 7 Tage)', $purges24h . ' / ' . $purges7d], - ['davon Komplett-Purges (7 T.)', (string)$full7d], - ['Fehlgeschlagene Purges (7 T.)', $failed7d > 0 + ['Purges (24 h / 7 days)', $purges24h . ' / ' . $purges7d], + ['of which full purges (7 d)', (string)$full7d], + ['Failed purges (7 d)', $failed7d > 0 ? '' . $failed7d . '' : '0'], - ['Verfügbarkeit (24 h)', htmlspecialchars($uptime) - . ' (' . $ok24h . '/' . $samples24h . ' Messungen)'], - ['∅ Antwortzeit (24 h)', $avgMs !== null ? $avgMs . ' ms' : '-'], - ['Max. Cache-Größe (7 T.)', $maxCache !== null ? $maxCache . ' MB' : '-'], + ['Availability (24 h)', htmlspecialchars($uptime) + . ' (' . $ok24h . '/' . $samples24h . ' samples)'], + ['Avg. response time (24 h)', $avgMs !== null ? $avgMs . ' ms' : '-'], + ['Max. cache size (7 d)', $maxCache !== null ? $maxCache . ' MB' : '-'], ]; $html = ''; @@ -55,7 +55,7 @@ final class SsrStatsWidget implements WidgetInterface } $html .= '
'; if ($samples24h === 0) { - $html .= '

Noch keine Messwerte: Scheduler-Task für vitec:ssr-health einrichten (z. B. alle 5 Minuten).

'; + $html .= '

No samples yet: the cron job for vitec:ssr-health fills this every 5 minutes.

'; } return $html; } diff --git a/packages/vitec/Classes/Widgets/SsrStatusWidget.php b/packages/vitec/Classes/Widgets/SsrStatusWidget.php index 42da2e5..468130e 100644 --- a/packages/vitec/Classes/Widgets/SsrStatusWidget.php +++ b/packages/vitec/Classes/Widgets/SsrStatusWidget.php @@ -37,24 +37,24 @@ final class SsrStatusWidget implements WidgetInterface }; $rows = []; - $rows[] = ['SSR-Auslieferung', $badge($flagOn, 'AN - Seiten kommen vom VPS', 'AUS - SPA wie bisher')]; + $rows[] = ['SSR delivery', $badge($flagOn, 'ON - pages served from the VPS', 'OFF - SPA as before')]; if ($health === null) { - $rows[] = ['SSR-Server', 'NICHT ERREICHBAR']; + $rows[] = ['SSR server', 'NOT REACHABLE']; } else { - $rows[] = ['SSR-Server', $badge((bool)($health['ok'] ?? false), 'läuft (' . (int)$health['responseMs'] . ' ms)', 'meldet Fehler')]; + $rows[] = ['SSR server', $badge((bool)($health['ok'] ?? false), 'running (' . (int)$health['responseMs'] . ' ms)', 'reports errors')]; $rows[] = ['Release', htmlspecialchars((string)($health['release']['release'] ?? '?')) - . ' (Commit ' . htmlspecialchars((string)($health['release']['commit'] ?? '?')) - . ', gebaut ' . htmlspecialchars($this->fmtDate((string)($health['release']['builtAt'] ?? ''))) . ')']; - $rows[] = ['Seiten-Cache', (int)($health['cachedPages'] ?? 0) . ' Seiten / ' . (int)($health['cacheMB'] ?? 0) . ' MB']; + . ' (commit ' . htmlspecialchars((string)($health['release']['commit'] ?? '?')) + . ', built ' . htmlspecialchars($this->fmtDate((string)($health['release']['builtAt'] ?? ''))) . ')']; + $rows[] = ['Page cache', (int)($health['cachedPages'] ?? 0) . ' pages / ' . (int)($health['cacheMB'] ?? 0) . ' MB']; } if ($lastPurge !== null) { - $rows[] = ['Letzter Purge', htmlspecialchars(date('d.m. H:i', (int)$lastPurge['crdate'])) + $rows[] = ['Last purge', htmlspecialchars(date('m-d H:i', (int)$lastPurge['crdate'])) . ' (' . htmlspecialchars((string)$lastPurge['trigger_source']) . ', ' - . ($lastPurge['success'] ? 'ok' : 'FEHLER') . ', ' + . ($lastPurge['success'] ? 'ok' : 'FAILED') . ', ' . htmlspecialchars(mb_strimwidth((string)$lastPurge['paths'], 0, 60, '…')) . ')']; } if (!$this->purgeService->isConfigured()) { - $rows[] = ['Auto-Purge', 'nicht konfiguriert (var/vitec-ssr-purge.env fehlt)']; + $rows[] = ['Auto purge', 'not configured (var/vitec-ssr-purge.env missing)']; } $html = ''; @@ -62,7 +62,7 @@ final class SsrStatusWidget implements WidgetInterface $html .= ''; } $html .= '
' . htmlspecialchars($label) . '' . $value . '
'; - $html .= '

Schalter: Site Management › Settings › VITEC. Modul "VITEC SSR" für Purge & Protokoll.

'; + $html .= '

Switch: Site Management › Settings › VITEC. Module "VITEC SSR" for purge & protocol.

'; return $html; } @@ -112,6 +112,6 @@ final class SsrStatusWidget implements WidgetInterface private function fmtDate(string $iso): string { $ts = strtotime($iso); - return $ts ? date('d.m.Y H:i', $ts) : '?'; + return $ts ? date('Y-m-d H:i', $ts) : '?'; } } diff --git a/packages/vitec/Configuration/Services.yaml b/packages/vitec/Configuration/Services.yaml index 9131c80..492c8b9 100644 --- a/packages/vitec/Configuration/Services.yaml +++ b/packages/vitec/Configuration/Services.yaml @@ -35,8 +35,8 @@ services: - name: dashboard.widget identifier: vitecSsrStatus groupNames: systemInfo - title: 'VITEC: SSR / VPS-Status' - description: 'Live-Zustand des SSR-Servers (Release, Cache, Erreichbarkeit) und der Auslieferungs-Schalter' + title: 'VITEC: SSR / VPS status' + description: 'Live state of the SSR server (release, cache, reachability) and the delivery switch' iconIdentifier: 'content-widget-text' height: 'medium' width: 'medium' @@ -46,8 +46,8 @@ services: - name: dashboard.widget identifier: vitecSsrStats groupNames: systemInfo - title: 'VITEC: SSR-Statistik' - description: 'Purge-Protokoll und Verfügbarkeit des SSR-Servers (14 Tage Historie)' + title: 'VITEC: SSR statistics' + description: 'Purge protocol and availability of the SSR server (14 days of history)' iconIdentifier: 'content-widget-number' height: 'medium' width: 'medium' diff --git a/packages/vitec/Resources/Private/Templates/Ssr/Index.html b/packages/vitec/Resources/Private/Templates/Ssr/Index.html index a4e559d..30afc17 100644 --- a/packages/vitec/Resources/Private/Templates/Ssr/Index.html +++ b/packages/vitec/Resources/Private/Templates/Ssr/Index.html @@ -1,75 +1,75 @@ -

VITEC SSR — Steuerung & Protokoll

+

VITEC SSR — Control & Protocol

Status

- + - + - +
SSR-AuslieferungSSR delivery - AN — Seiten kommen vom VPS - AUS — SPA wie bisher + ON — pages served from the VPS + OFF — SPA as before -
Umschalten: Site Management › Settings › VITEC +
Toggle: Site Management › Settings › VITEC
SSR-ServerSSR server - läuft {health.responseMs} ms
+ running {health.responseMs} ms
Release {health.release.release} - (Commit {health.release.commit})
- Cache: {health.cachedPages} Seiten / {health.cacheMB} MB + (commit {health.release.commit})
+ Cache: {health.cachedPages} pages / {health.cacheMB} MB
- nicht erreichbar {healthError} + not reachable {healthError}
Purge-KonfigurationPurge configuration ok - var/vitec-ssr-purge.env fehlt + var/vitec-ssr-purge.env missing
-

Cache leeren (Purge)

+

Purge cache

- +
- +
+ onsubmit="return confirm('Really purge the ENTIRE SSR cache?');"> - - — nötig nach Menü-/Footer-Änderungen bei abgeschaltetem Auto-Purge + + — needed after menu/footer changes while auto-purge is off
-

Purge-Protokoll (letzte 30)

+

Purge protocol (last 30)

- + - +
ZeitAuslöserPfadeErgebnisDauer
TimeTriggerPathsResultDuration
@{row.crdate}@{row.crdate} {row.trigger_source} {row.paths} @@ -84,13 +84,13 @@
-

Gesundheits-Messungen (letzte 10 — Historie via Scheduler-Task vitec:ssr-health)

+

Health samples (last 10 — history via cron vitec:ssr-health, every 5 minutes)

- + - + - +
ZeitStatusReleaseCacheAntwortzeit
TimeStatusReleaseCacheResponse time
@{row.crdate}@{row.crdate} ok @@ -98,7 +98,7 @@ {row.release_id}{row.cached_pages} Seiten / {row.cache_mb} MB{row.cached_pages} pages / {row.cache_mb} MB {row.response_ms} ms