Swedish interface: labels and short texts across every page

About 1,600 more headings, buttons, table columns, status words, placeholders and short messages are translated. Tables of words built when the app loads are now read when they are drawn, so they follow the language, and a test fails if text is translated at load time.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-16 20:16:39 +01:00
1 parent 25183c0320
commit 6e39430a1f
173 files changed
+3922 -2245

No files matched your search

+12 -12
View File
@@ -69,7 +69,7 @@ export interface WallData {
/** The headline in words for how many things need a look, or why there is no answer yet. */
export function wallHeadline(level: WallLevel, count: number, state: { loaded: boolean; failed: boolean }): string {
if (level === "critical" || level === "warning") return `${count} ${count === 1 ? "thing needs" : "things need"} attention`;
if (level === "unsure") return state.loaded ? "No alerts — but some checks couldn't run" : state.failed ? "Can't reach the server" : "Checking…";
if (level === "unsure") return state.loaded ? t("No alerts — but some checks couldn't run") : state.failed ? "Can't reach the server" : "Checking…";
return "All clear";
}
@@ -182,7 +182,7 @@ export default function WallView({
<header className="wall-header">
<img src="/logo.webp" alt="Homelab Manager" width={901} height={460} className="wall-logo" />
{data.environmentName && <span className="badge env-badge">{data.environmentName}</span>}
<div className="wall-clock" aria-label="Time">
<div className="wall-clock" aria-label={t("Time")}>
<div className="wall-time">{formatTime(now, false)}</div>
<div className="wall-date">
{now.toLocaleDateString([], { weekday: "long" })} {formatDate(now)}
@@ -197,7 +197,7 @@ export default function WallView({
<span>{data.headline}</span>
</section>
<section className="wall-tiles" aria-label="Summary">
<section className="wall-tiles" aria-label={t("Summary")}>
<div className={`wall-tile ${offline > 0 ? "wall-tile-bad" : ""}`}>
<div className="wall-tile-figure">{data.servers ? (data.servers.total === 0 ? "—" : `${data.servers.online}/${data.servers.total}`) : "…"}</div>
<div className="wall-tile-label">servers online</div>
@@ -226,7 +226,7 @@ export default function WallView({
{page.kind === "group" && <GroupPage data={data} groupId={page.groupId ?? ""} label={page.label} />}
{page.kind === "overview" && (data.groups ?? []).length > 0 && (
<section className="wall-groups" aria-label="By area">
<section className="wall-groups" aria-label={t("By area")}>
{(data.groups ?? []).map((g) => {
const alerts = g.alerts.critical + g.alerts.warning;
const level = g.failing > 0 || g.alerts.critical > 0 ? "bad" : alerts > 0 ? "warn" : "ok";
@@ -248,7 +248,7 @@ export default function WallView({
<>
<h2 className="wall-heading">{t("Needs attention")}</h2>
{data.problems.length === 0 ? (
<div className="wall-empty">Nothing right now.</div>
<div className="wall-empty">{t("Nothing right now.")}</div>
) : (
<ul className="wall-list">
{data.problems.slice(0, 7).map((a) => (
@@ -264,7 +264,7 @@ export default function WallView({
)}
{data.windows && data.windows.length > 0 && (
<>
<h2 className="wall-heading mt-4">In maintenance</h2>
<h2 className="wall-heading mt-4">{t("In maintenance")}</h2>
<ul className="wall-list wall-list-small">
{data.windows.slice(0, 8).map((w) => (
<li key={w.id}>
@@ -281,7 +281,7 @@ export default function WallView({
<>
<h2 className="wall-heading">{t("Integrations")}</h2>
{data.integrations.length === 0 ? (
<div className="wall-empty">None connected.</div>
<div className="wall-empty">{t("None connected.")}</div>
) : (
<ul className="wall-list wall-list-small">
{data.integrations.map((i) => (
@@ -300,14 +300,14 @@ export default function WallView({
</section>
) : (
<section className="wall-columns">
<div className="wall-empty">This board shows the numbers only.</div>
<div className="wall-empty">{t("This board shows the numbers only.")}</div>
</section>
)}
<footer className="wall-footer">
<span>
{display?.name && <strong>{display.name} · </strong>}
{data.updatedAt ? `Updated ${formatTime(data.updatedAt)}` : "Loading…"} · refreshes every {REFRESH_MS / 1000} s
{data.updatedAt ? `Updated ${formatTime(data.updatedAt)}` : t("Loading…")} · refreshes every {REFRESH_MS / 1000} s
{rotating && pages.length > 1 && (
<span className="wall-pager" aria-label={`Page ${pages.findIndex((p) => p.id === page.id) + 1} of ${pages.length}: ${page.label}`}>
{" "}
@@ -326,7 +326,7 @@ export default function WallView({
<label className="wall-rotate">
Rotate{" "}
<select
aria-label="Rotate through the pages every"
aria-label={t("Rotate through the pages every")}
value={rotation.seconds === null ? "off" : String(rotation.seconds)}
onChange={(e) => {
setPaused(false);
@@ -346,7 +346,7 @@ export default function WallView({
</label>
{rotating && pages.length > 1 && (
<button type="button" className="wall-link" onClick={() => setPaused((p) => !p)} aria-pressed={paused}>
{paused ? "Resume" : "Pause"}
{paused ? t("Resume") : t("Pause")}
</button>
)}
</>
@@ -377,7 +377,7 @@ function AlertsPage({ data, now }: { data: WallData; now: Date }) {
</ul>
{data.windows && data.windows.length > 0 && (
<>
<h2 className="wall-heading mt-4">In maintenance</h2>
<h2 className="wall-heading mt-4">{t("In maintenance")}</h2>
<ul className="wall-list wall-list-small wall-list-cols">
{data.windows.slice(0, 8).map((w) => (
<li key={w.id}>