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

+11 -11
View File
@@ -14,7 +14,7 @@ import { t } from "../i18n";
const BY_DESIGN = /^(watchdog|deadmansswitch|deadmanssnitch|infoinhibitor)$/i;
function Badge({ p }: { p: PrometheusInfo }) {
if (!p.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
if (!p.enabled) return <span className="badge bg-secondary-lt text-secondary">{t("Off")}</span>;
if (!p.state) return <span className="badge bg-secondary-lt text-secondary">{t("Not read yet")}</span>;
if (!p.fresh) return <span className="badge bg-yellow-lt text-yellow">Can&rsquo;t be read</span>;
if (p.problems.some((x) => x.severity === "critical")) return <span className="badge bg-red-lt text-red">{t("Needs a look")}</span>;
@@ -53,19 +53,19 @@ function Card({ p }: { p: PrometheusInfo }) {
{[s.version ? `version ${s.version}` : null, targets === null ? "targets could not be read" : `${targets} target${targets === 1 ? "" : "s"}, ${down} down`, s.alerts === null ? "alerts could not be read" : `${firing.length} alert${firing.length === 1 ? "" : "s"} firing`].filter(Boolean).join(" · ")}
</div>
<h4>Targets by job</h4>
<h4>{t("Targets by job")}</h4>
{!s.jobs ? (
<div className="text-secondary mb-3">Prometheus did not answer about its targets.</div>
<div className="text-secondary mb-3">{t("Prometheus did not answer about its targets.")}</div>
) : s.jobs.length === 0 ? (
<div className="text-secondary mb-3">None.</div>
<div className="text-secondary mb-3">{t("None.")}</div>
) : (
<div className="table-responsive mb-3">
<table className="table table-vcenter table-sm">
<thead>
<tr>
<th>Job</th>
<th className="text-end">Up</th>
<th className="text-end">Down</th>
<th>{t("Job")}</th>
<th className="text-end">{t("Up")}</th>
<th className="text-end">{t("Down")}</th>
</tr>
</thead>
<tbody>
@@ -83,7 +83,7 @@ function Card({ p }: { p: PrometheusInfo }) {
{s.down && s.down.length > 0 && (
<>
<h4>Not answering</h4>
<h4>{t("Not answering")}</h4>
<ul className="mb-3">
{s.down.map((d) => (
<li key={`${d.job}-${d.instance}`}>
@@ -95,9 +95,9 @@ function Card({ p }: { p: PrometheusInfo }) {
</>
)}
<h4>Alerts firing</h4>
<h4>{t("Alerts firing")}</h4>
{!s.alerts ? (
<div className="text-secondary mb-3">Prometheus did not answer about its alerts.</div>
<div className="text-secondary mb-3">{t("Prometheus did not answer about its alerts.")}</div>
) : firing.length === 0 ? (
<div className="text-secondary mb-3">None{pending.length > 0 ? ` (${pending.length} pending)` : ""}.</div>
) : (
@@ -149,7 +149,7 @@ export default function Prometheus() {
{data && data.length === 0 && (
<div className="card">
<div className="card-body">
<EmptyState title="No Prometheus connected" hint="Add one under Integrations with its address (http://host:9090)." />
<EmptyState title={t("No Prometheus connected")} hint="Add one under Integrations with its address (http://host:9090)." />
</div>
</div>
)}