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

+19 -19
View File
@@ -12,11 +12,11 @@ import PageIntro from "../components/PageIntro";
import { t } from "../i18n";
const KINDS: { kind: ConsistencyKind; title: string; blurb: string }[] = [
{ kind: "ip_conflict", title: "Address conflicts", blurb: "The same address reported by more than one server." },
{ kind: "ip_conflict", get title() { return t("Address conflicts"); }, blurb: "The same address reported by more than one server." },
{ kind: "dns_stale", title: "DNS out of date", blurb: "A DNS record named after a server that points at an address the server doesn't have." },
{ kind: "ipam_stale", title: "IPAM out of date", blurb: "An IPAM entry labelled with a server's name at an address the server doesn't have." },
{ kind: "not_in_ipam", title: "Not in IPAM", blurb: "Addresses in use — reported by a server or pointed at by DNS — that IPAM doesn't list." },
{ kind: "no_dns", title: "No DNS record", blurb: "Server addresses on your LAN that no DNS record points at." },
{ kind: "not_in_ipam", get title() { return t("Not in IPAM"); }, blurb: "Addresses in use — reported by a server or pointed at by DNS — that IPAM doesn't list." },
{ kind: "no_dns", get title() { return t("No DNS record"); }, blurb: "Server addresses on your LAN that no DNS record points at." },
];
const SEVERITY_BADGE: Record<ConsistencySeverity, string> = {
@@ -78,10 +78,10 @@ export default function Consistency({ user }: { user: CurrentUser }) {
async function ignore(f: ConsistencyFinding) {
const reason = await promptDialog({
title: "Ignore this finding",
title: t("Ignore this finding"),
message: "Why is this fine? (optional — shown in the Ignored list)",
placeholder: "e.g. intentional, or a test machine",
confirmLabel: "Ignore",
confirmLabel: t("Ignore"),
});
if (reason === null) return; // cancelled
setBusyKey(f.key);
@@ -124,11 +124,11 @@ export default function Consistency({ user }: { user: CurrentUser }) {
if (!report || !f.ip) return;
const suggestion = f.ip.includes(":") ? `${f.ip}/64` : `${f.ip.split(".").slice(0, 3).join(".")}.0/24`;
const range = await promptDialog({
title: "Exclude a range",
message: "Leave this range out of the report entirely — every address in it, from servers, IPAM and DNS alike.",
title: t("Exclude a range"),
message: t("Leave this range out of the report entirely — every address in it, from servers, IPAM and DNS alike."),
label: "Range (a network like 192.168.16.0/20, or a single address)",
defaultValue: suggestion,
confirmLabel: "Exclude",
confirmLabel: t("Exclude"),
required: true,
});
if (range === null || !range.trim()) return;
@@ -165,7 +165,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
{t("Export CSV")}
</button>
<button className="btn btn-outline-secondary" onClick={() => void load()} disabled={loading}>
{loading ? "Checking…" : "Refresh"}
{loading ? "Checking…" : t("Refresh")}
</button>
</div>
</div>
@@ -202,7 +202,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
{report && (
<div className="card mb-3">
<div className="card-body">
<div className="fw-bold">Excluded ranges</div>
<div className="fw-bold">{t("Excluded ranges")}</div>
<div className="text-secondary small mb-2">
Addresses in these ranges are left out of the report completely — servers, IPAM and DNS alike. Meant for networks that
aren't part of your LAN, like Docker's, which repeat the same subnet on many hosts.
@@ -214,7 +214,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
)}
</div>
<div className="d-flex flex-wrap gap-1 mb-2">
{report.excludedRanges.length === 0 && <span className="text-secondary small">Nothing excluded.</span>}
{report.excludedRanges.length === 0 && <span className="text-secondary small">{t("Nothing excluded.")}</span>}
{report.excludedRanges.map((r) => (
<span key={r} className="badge bg-secondary-lt text-secondary d-inline-flex align-items-center">
<code className="bg-transparent p-0">{r}</code>
@@ -240,7 +240,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
onChange={(e) => setNewRange(e.target.value)}
/>
<button type="submit" className="btn btn-sm btn-primary" disabled={savingRanges || !newRange.trim()}>
Exclude
{t("Exclude")}
</button>
</form>
)}
@@ -311,16 +311,16 @@ export default function Consistency({ user }: { user: CurrentUser }) {
<div className="btn-list flex-nowrap">
{f.kind === "not_in_ipam" && f.ip && (
<button className="btn btn-sm btn-outline-primary" onClick={() => void addToIpam(f)} disabled={busyKey === f.key}>
Add to IPAM
{t("Add to IPAM")}
</button>
)}
{f.ip && (
<button className="btn btn-sm btn-outline-secondary" onClick={() => void excludeAround(f)} disabled={savingRanges} title="Leave a whole range out of the report">
Exclude range
<button className="btn btn-sm btn-outline-secondary" onClick={() => void excludeAround(f)} disabled={savingRanges} title={t("Leave a whole range out of the report")}>
{t("Exclude range")}
</button>
)}
<button className="btn btn-sm btn-outline-secondary" onClick={() => void ignore(f)} disabled={busyKey === f.key}>
Ignore
{t("Ignore")}
</button>
</div>
)}
@@ -341,7 +341,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
})
}
>
{expanded.has(kind) ? "Show fewer" : `Show all ${items.length}`}
{expanded.has(kind) ? t("Show fewer") : `Show all ${items.length}`}
</button>
</div>
)}
@@ -355,7 +355,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
<h3 className="card-title">Ignored ({report.ignored.length})</h3>
<div className="card-actions">
<button className="btn btn-link btn-sm p-0" onClick={() => setShowIgnored((s) => !s)}>
{showIgnored ? "Hide" : "Show"}
{showIgnored ? t("Hide") : t("Show")}
</button>
</div>
</div>
@@ -374,7 +374,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
</div>
{canEdit && (
<button className="btn btn-sm btn-outline-secondary" onClick={() => void restore(i.id)}>
Stop ignoring
{t("Stop ignoring")}
</button>
)}
</div>