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

+16 -15
View File
@@ -5,6 +5,7 @@ import { PageSkeleton } from "../../components/Skeleton";
import { readableError } from "../../utils/errors";
import { toast } from "../../utils/toast";
import ExportTableButton from "../../components/ExportTableButton";
import { t } from "../../i18n";
const DEFAULTS: SignInSettingsData = { roleFromGroups: false, groupsClaim: "groups", adminGroups: [], operatorGroups: [], otherwise: "viewer" };
const NO_PICTURES: ProfilePictureSettings = { gravatar: false, identityProvider: false };
@@ -87,16 +88,16 @@ export default function SignInSettings() {
return (
<>
<div className="d-flex align-items-center justify-content-between mb-3">
<h3 className="mb-0">Sign-in</h3>
<h3 className="mb-0">{t("Sign-in")}</h3>
<button className="btn btn-primary" onClick={save} disabled={busy !== null || !dirty || noAdmin}>
{busy === "save" ? "Saving…" : "Save"}
{busy === "save" ? t("Saving…") : t("Save")}
</button>
</div>
<ErrorNotice error={error} />
<div className="card mb-3">
<div className="card-header">
<h3 className="card-title">Roles from groups</h3>
<h3 className="card-title">{t("Roles from groups")}</h3>
</div>
<div className="card-body">
<p className="text-secondary">
@@ -106,7 +107,7 @@ export default function SignInSettings() {
</p>
<label className="form-check mb-3">
<input type="checkbox" className="form-check-input" checked={enabled} onChange={(e) => setEnabled(e.target.checked)} />
<span className="form-check-label">Set roles from groups at each sign-in</span>
<span className="form-check-label">{t("Set roles from groups at each sign-in")}</span>
</label>
<div className="row g-3">
<div className="col-md-4">
@@ -117,20 +118,20 @@ export default function SignInSettings() {
</div>
<div className="col-md-4">
<label className="form-label" htmlFor="si-admin">
Admin groups
{t("Admin groups")}
</label>
<textarea id="si-admin" className="form-control" rows={3} placeholder={"homelab-admins"} value={adminText} onChange={(e) => setAdminText(e.target.value)} />
<div className="form-hint">One per line, or separated by commas. Case doesn't matter.</div>
<div className="form-hint">{t("One per line, or separated by commas. Case doesn't matter.")}</div>
</div>
<div className="col-md-4">
<label className="form-label" htmlFor="si-operator">
Operator groups
{t("Operator groups")}
</label>
<textarea id="si-operator" className="form-control" rows={3} placeholder={"homelab-ops"} value={operatorText} onChange={(e) => setOperatorText(e.target.value)} />
</div>
<div className="col-md-6">
<label className="form-label" htmlFor="si-otherwise">
Someone in none of those groups
{t("Someone in none of those groups")}
</label>
<select id="si-otherwise" className="form-select" value={otherwise} onChange={(e) => setOtherwise(e.target.value as "viewer" | "keep")}>
<option value="viewer">becomes a viewer</option>
@@ -145,7 +146,7 @@ export default function SignInSettings() {
</div>
<div className="card-footer d-flex flex-wrap align-items-center gap-2">
<button className="btn btn-outline-secondary" onClick={check} disabled={busy !== null}>
{busy === "check" ? "Checking…" : "Check against the groups people had last time"}
{busy === "check" ? t("Checking…") : t("Check against the groups people had last time")}
</button>
<span className="text-secondary small">Changes nothing — it shows what each person would be.</span>
</div>
@@ -153,7 +154,7 @@ export default function SignInSettings() {
<div className="card mb-3">
<div className="card-header">
<h3 className="card-title">Profile pictures</h3>
<h3 className="card-title">{t("Profile pictures")}</h3>
</div>
<div className="card-body">
<p className="text-secondary">
@@ -186,7 +187,7 @@ export default function SignInSettings() {
{preview && (
<div className="card">
<div className="card-header">
<h3 className="card-title">What these rules would do</h3>
<h3 className="card-title">{t("What these rules would do")}</h3>
<div className="card-actions">
<ExportTableButton filename="role-preview" />
</div>
@@ -200,10 +201,10 @@ export default function SignInSettings() {
<table className="table table-vcenter card-table">
<thead>
<tr>
<th>Person</th>
<th>Groups at last sign-in</th>
<th>Now</th>
<th>Would be</th>
<th>{t("Person")}</th>
<th>{t("Groups at last sign-in")}</th>
<th>{t("Now")}</th>
<th>{t("Would be")}</th>
</tr>
</thead>
<tbody>