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

+4 -4
View File
@@ -87,9 +87,9 @@ export default function AuditLogView() {
<thead>
<tr>
<SortableTh<AuditLogEntry> label={t("When")} sortKeyName="createdAt" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<AuditLogEntry> label="Actor" sortKeyName="actorLabel" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<AuditLogEntry> label="Category" sortKeyName="category" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<AuditLogEntry> label="Action" sortKeyName="action" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<AuditLogEntry> label={t("Actor")} sortKeyName="actorLabel" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<AuditLogEntry> label={t("Category")} sortKeyName="category" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<AuditLogEntry> label={t("Action")} sortKeyName="action" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<AuditLogEntry> label={t("Target")} sortKeyName="targetType" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<th>{t("Details")}</th>
</tr>
@@ -111,7 +111,7 @@ export default function AuditLogView() {
))}
{entries === null && <LoadingRow colSpan={6} />}
{sorted?.length === 0 && (
<EmptyRow colSpan={6} title="Nothing recorded yet" hint="Changes people make in the app, sign-ins and the app's own housekeeping are written here as they happen." filtered={tableSearch.active ? () => tableSearch.setQuery("") : undefined} />
<EmptyRow colSpan={6} title={t("Nothing recorded yet")} hint="Changes people make in the app, sign-ins and the app's own housekeeping are written here as they happen." filtered={tableSearch.active ? () => tableSearch.setQuery("") : undefined} />
)}
</tbody>
</table>
+13 -13
View File
@@ -22,7 +22,7 @@ function NodeSelect({ id, label, nodes, value, onChange }: { id: string; label:
{label}
</label>
<select id={id} className="form-select" value={value} onChange={(e) => onChange(e.target.value)}>
<option value="">— choose —</option>
<option value="">{t("— choose —")}</option>
{(["server", "integration", "device", "internet"] as const).map((type) => {
const group = nodes.filter((n) => n.type === type);
return group.length === 0 ? null : (
@@ -142,7 +142,7 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
{offered && (offered.suggestions.length > 0 || offered.dismissed.length > 0) && (
<div className="card mb-3">
<div className="card-header">
<h3 className="card-title">Suggested</h3>
<h3 className="card-title">{t("Suggested")}</h3>
{canEdit && offered.suggestions.length > 1 && (
<div className="card-actions">
<button type="button" className="btn btn-sm btn-primary" disabled={busy} onClick={() => void addOffered(offered.suggestions.map((s) => s.key))}>
@@ -163,10 +163,10 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
{canEdit && (
<>
<button type="button" className="btn btn-sm btn-primary" disabled={busy} onClick={() => void addOffered([s.key])}>
Add
{t("Add")}
</button>
<button type="button" className="btn btn-sm" onClick={() => void hideOffered([s.key])}>
Not that
{t("Not that")}
</button>
</>
)}
@@ -174,12 +174,12 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
))}
</ul>
) : (
<div className="card-body text-secondary">Nothing more to suggest.</div>
<div className="card-body text-secondary">{t("Nothing more to suggest.")}</div>
)}
{offered.dismissed.length > 0 && (
<div className="card-footer small">
<button type="button" className="btn btn-link btn-sm p-0" onClick={() => setShowHidden((v) => !v)}>
{showHidden ? "Hide" : "Show"} the {offered.dismissed.length} you said no to
{showHidden ? t("Hide") : t("Show")} the {offered.dismissed.length} you said no to
</button>
{showHidden && (
<>
@@ -192,7 +192,7 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
</ul>
{canEdit && (
<button type="button" className="btn btn-sm" onClick={() => void restoreOffered()}>
Offer them again
{t("Offer them again")}
</button>
)}
</>
@@ -205,7 +205,7 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
{canEdit && (
<form className="card mb-3" onSubmit={add}>
<div className="card-header">
<h3 className="card-title">Add a dependency</h3>
<h3 className="card-title">{t("Add a dependency")}</h3>
</div>
<div className="card-body row g-3 align-items-end">
<div className="col-md-5">
@@ -216,19 +216,19 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
</div>
<div className="col-md-2">
<button type="submit" className="btn btn-primary w-100" disabled={busy || !from || !to}>
{busy ? "Saving…" : "Add"}
{busy ? "Saving…" : t("Add")}
</button>
</div>
</div>
<div className="card-footer text-secondary small">
<strong>Internet</strong> can be picked as what something needs — a cloud service, a VPS, the router. Nothing here watches the internet, so it never counts as down and holds no alert back; it is there so the map shows what relies on it, and so &ldquo;what depends on Internet?&rdquo; has an answer.
<strong>{t("Internet")}</strong> can be picked as what something needs — a cloud service, a VPS, the router. Nothing here watches the internet, so it never counts as down and holds no alert back; it is there so the map shows what relies on it, and so &ldquo;what depends on Internet?&rdquo; has an answer.
</div>
</form>
)}
<div className="card mb-3">
<div className="card-header">
<h3 className="card-title">Written here</h3>
<h3 className="card-title">{t("Written here")}</h3>
</div>
<div className="table-responsive">
<table className="table table-vcenter card-table">
@@ -265,7 +265,7 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
</tr>
))}
{data && data.dependencies.length === 0 && (
<EmptyRow colSpan={canEdit ? 3 : 2} title="Nothing depends on anything yet" hint="Say what needs what — Gitea needs the server it is installed on — and when that one is down, the other's alert is held back under it instead of adding to the noise." />
<EmptyRow colSpan={canEdit ? 3 : 2} title={t("Nothing depends on anything yet")} hint="Say what needs what — Gitea needs the server it is installed on — and when that one is down, the other's alert is held back under it instead of adding to the noise." />
)}
</tbody>
</table>
@@ -275,7 +275,7 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
{data && data.runsOn.length > 0 && (
<div className="card">
<div className="card-header">
<h3 className="card-title">Set elsewhere</h3>
<h3 className="card-title">{t("Set elsewhere")}</h3>
</div>
<div className="card-body text-secondary small pb-0">
A server&rsquo;s &ldquo;runs on&rdquo; is set on the server itself, or worked out from the Proxmox node it is a guest of. What a network device or a server is &ldquo;connected through&rdquo; is what its UniFi controller says (a server is matched by its IP address). They count here too.
+15 -15
View File
@@ -67,7 +67,7 @@ export default function DiagLogView() {
}
async function handleClear() {
if (!(await confirmDialog({ title: "Clear diagnostic log", message: "Clear the entire diagnostic log? This cannot be undone.", confirmLabel: "Clear log", danger: true }))) return;
if (!(await confirmDialog({ title: t("Clear diagnostic log"), message: "Clear the entire diagnostic log? This cannot be undone.", confirmLabel: t("Clear log"), danger: true }))) return;
setClearing(true);
try {
await api.diagLog.clear();
@@ -100,7 +100,7 @@ export default function DiagLogView() {
Every call this app makes to a DNS provider or integration — the last 500 calls are kept. Use this to troubleshoot connectivity issues.
</div>
<button className="btn btn-outline-danger ms-auto" onClick={handleClear} disabled={clearing || total === 0}>
{clearing ? "Clearing…" : "Clear log"}
{clearing ? "Clearing…" : t("Clear log")}
</button>
</div>
<ErrorNotice error={error} />
@@ -111,7 +111,7 @@ export default function DiagLogView() {
<div className="col-md-3">
<label className="form-label">{t("Source")}</label>
<select className="form-select" value={filterSource} onChange={(e) => setFilterSource(e.target.value)}>
<option value="">All sources</option>
<option value="">{t("All sources")}</option>
{Object.entries(SOURCE_LABELS).map(([value, label]) => (
<option key={value} value={value}>
{label}
@@ -120,16 +120,16 @@ export default function DiagLogView() {
</select>
</div>
<div className="col-md-3">
<label className="form-label">Result</label>
<label className="form-label">{t("Result")}</label>
<select className="form-select" value={filterOk} onChange={(e) => setFilterOk(e.target.value)}>
<option value="">All results</option>
<option value="false">Errors only</option>
<option value="true">Success only</option>
<option value="">{t("All results")}</option>
<option value="false">{t("Errors only")}</option>
<option value="true">{t("Success only")}</option>
</select>
</div>
<div className="col-md-6 d-flex justify-content-end gap-2">
<button className="btn btn-outline-secondary" onClick={() => load(page)} disabled={loading}>
{loading ? "Refreshing…" : "Refresh"}
{loading ? t("Refreshing…") : t("Refresh")}
</button>
<button className="btn btn-outline-secondary" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
{t("Export CSV")}
@@ -150,18 +150,18 @@ export default function DiagLogView() {
<table className="table table-vcenter card-table">
<thead>
<tr>
<SortableTh<DiagLogEntry> label="Time" sortKeyName="createdAt" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DiagLogEntry> label={t("Time")} sortKeyName="createdAt" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DiagLogEntry> label={t("Source")} sortKeyName="source" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DiagLogEntry> label="Operation" sortKeyName="operation" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DiagLogEntry> label="Result" sortKeyName="ok" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DiagLogEntry> label={t("Operation")} sortKeyName="operation" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DiagLogEntry> label={t("Result")} sortKeyName="ok" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DiagLogEntry>
label="Latency"
label={t("Latency")}
sortKeyName="latencyMs"
activeKey={sortKey}
direction={sortDir}
onSort={requestSort}
/>
<th>Error</th>
<th>{t("Error")}</th>
</tr>
</thead>
<tbody>
@@ -176,7 +176,7 @@ export default function DiagLogView() {
{e.ok ? (
<span className="badge bg-green-lt text-green">{t("OK")}</span>
) : (
<span className="badge bg-red-lt text-red">Error</span>
<span className="badge bg-red-lt text-red">{t("Error")}</span>
)}
</td>
<td className={`text-secondary ${e.latencyMs > 2000 ? "text-yellow" : ""}`}>{e.latencyMs}ms</td>
@@ -187,7 +187,7 @@ export default function DiagLogView() {
))}
{entries === null && <LoadingRow colSpan={6} />}
{sorted?.length === 0 && (
<EmptyRow colSpan={6} {...(filterSource || filterOk ? { filtered: () => { setFilterSource(""); setFilterOk(""); } } : { title: "No diagnostic entries yet", hint: "Every call the app makes to an integration or a DNS provider is logged here, with how long it took and whether it worked." })} />
<EmptyRow colSpan={6} {...(filterSource || filterOk ? { filtered: () => { setFilterSource(""); setFilterOk(""); } } : { title: t("No diagnostic entries yet"), hint: t("Every call the app makes to an integration or a DNS provider is logged here, with how long it took and whether it worked.") })} />
)}
</tbody>
</table>
+13 -13
View File
@@ -24,7 +24,7 @@ function statusBadge(d: DomainRecord) {
case "ok":
return <span className="badge bg-green-lt text-green">{d.daysLeft} d left</span>;
default:
return <span className="badge bg-secondary-lt text-secondary">Unknown</span>;
return <span className="badge bg-secondary-lt text-secondary">{t("Unknown")}</span>;
}
}
@@ -95,7 +95,7 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
}
async function remove(d: DomainRecord) {
if (!(await confirmDialog({ title: "Stop tracking domain", message: `Stop tracking ${d.name}?`, confirmLabel: "Stop tracking", danger: true }))) return;
if (!(await confirmDialog({ title: t("Stop tracking domain"), message: `Stop tracking ${d.name}?`, confirmLabel: t("Stop tracking"), danger: true }))) return;
setError(null);
try {
await api.domains.remove(d.id);
@@ -126,10 +126,10 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
return (
<>
<div className="d-flex align-items-center mb-3">
<h3 className="mb-0">Domain names</h3>
<h3 className="mb-0">{t("Domain names")}</h3>
{canEdit && (
<button className="btn btn-outline-secondary ms-auto" onClick={refreshAll} disabled={refreshingAll}>
{refreshingAll ? "Checking…" : "Check all now"}
{refreshingAll ? t("Checking…") : t("Check all now")}
</button>
)}
</div>
@@ -144,7 +144,7 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
<form onSubmit={add} className="card mb-3">
<div className="card-body row g-2 align-items-end">
<div className="col-md-6">
<label className="form-label">Track another domain</label>
<label className="form-label">{t("Track another domain")}</label>
<input
className="form-control"
required
@@ -155,7 +155,7 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
</div>
<div className="col-md-3">
<button type="submit" className="btn btn-primary" disabled={adding || !name.trim()}>
{adding ? "Looking it up…" : "Add domain"}
{adding ? t("Looking it up…") : t("Add domain")}
</button>
</div>
</div>
@@ -164,7 +164,7 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
<div className="card mb-3">
<div className="card-header">
<h3 className="card-title">Registrations</h3>
<h3 className="card-title">{t("Registrations")}</h3>
<SearchBox value={tableSearch.query} onChange={tableSearch.setQuery} className="ms-3" />
<div className="card-actions">
<button className="btn btn-sm btn-outline-secondary" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
@@ -176,10 +176,10 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
<table className="table table-vcenter card-table">
<thead>
<tr>
<SortableTh<DomainRecord> label="Domain" sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DomainRecord> label="Expires" sortKeyName="expiresAt" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DomainRecord> label="Registrar" sortKeyName="registrar" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DomainRecord> label="Last checked" sortKeyName="lastCheckedAt" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DomainRecord> label={t("Domain")} sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DomainRecord> label={t("Expires")} sortKeyName="expiresAt" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DomainRecord> label={t("Registrar")} sortKeyName="registrar" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<DomainRecord> label={t("Last checked")} sortKeyName="lastCheckedAt" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
{canEdit && <th className="w-1">{t("Actions")}</th>}
</tr>
</thead>
@@ -217,7 +217,7 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
<td>
<div className="btn-list flex-nowrap">
<button className="btn btn-sm btn-outline-secondary" onClick={() => check(d)} disabled={checkingId === d.id}>
{checkingId === d.id ? "Checking…" : "Check now"}
{checkingId === d.id ? t("Checking…") : t("Check now")}
</button>
{d.origin === "manual" && (
<button className="btn btn-sm btn-outline-danger" onClick={() => remove(d)}>
@@ -230,7 +230,7 @@ export default function DomainsView({ user }: { user: CurrentUser }) {
</tr>
))}
{data && data.domains.length === 0 && (
<EmptyRow colSpan={canEdit ? 5 : 4} title="No domains tracked yet" hint={canEdit ? "Domains for your DNS zones appear after the next daily check, or when you press “Check all now”. You can also add one by hand above." : "Domains for your DNS zones appear after the next daily check."} />
<EmptyRow colSpan={canEdit ? 5 : 4} title={t("No domains tracked yet")} hint={canEdit ? "Domains for your DNS zones appear after the next daily check, or when you press “Check all now”. You can also add one by hand above." : "Domains for your DNS zones appear after the next daily check."} />
)}
</tbody>
</table>
+10 -10
View File
@@ -26,7 +26,7 @@ function friendlyUserAgent(ua: string | null): string {
? "Linux"
: "unknown OS";
const browser = /Edg\//.test(ua)
? "Edge"
? t("Edge")
: /Chrome\//.test(ua)
? "Chrome"
: /Firefox\//.test(ua)
@@ -62,7 +62,7 @@ export default function SessionsView() {
const confirmMsg = isSelf
? `This is your current session — revoking it will sign you out immediately. Continue?`
: `Revoke ${label}'s session? They'll be signed out immediately.`;
if (!(await confirmDialog({ title: isSelf ? "Sign out of this session" : "End session", message: confirmMsg, confirmLabel: isSelf ? "Sign me out" : "Revoke session", danger: true }))) return;
if (!(await confirmDialog({ title: isSelf ? t("Sign out of this session") : t("End session"), message: confirmMsg, confirmLabel: isSelf ? t("Sign me out") : t("Revoke session"), danger: true }))) return;
setError(null);
setRevokingId(s.id);
try {
@@ -117,19 +117,19 @@ export default function SessionsView() {
<thead>
<tr>
<SortableTh<SessionSummary> label={t("Name")} sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<SessionSummary> label="Email" sortKeyName="email" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<SessionSummary> label="Role" sortKeyName="role" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<SessionSummary> label={t("Email")} sortKeyName="email" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<SessionSummary> label={t("Role")} sortKeyName="role" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<SessionSummary> label="IP" sortKeyName="ip" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<th>Device</th>
<th>{t("Device")}</th>
<SortableTh<SessionSummary>
label="Last active"
label={t("Last active")}
sortKeyName="lastAccess"
activeKey={sortKey}
direction={sortDir}
onSort={requestSort}
/>
<SortableTh<SessionSummary>
label="Expires"
label={t("Expires")}
sortKeyName="expiresAt"
activeKey={sortKey}
direction={sortDir}
@@ -143,7 +143,7 @@ export default function SessionsView() {
<tr key={s.id}>
<td>
{s.name ?? "—"}
{s.id === currentSessionId && <span className="badge bg-blue-lt text-blue ms-2">This device</span>}
{s.id === currentSessionId && <span className="badge bg-blue-lt text-blue ms-2">{t("This device")}</span>}
</td>
<td>{s.email ?? "—"}</td>
<td>{s.role ?? <span className="text-secondary">unknown user</span>}</td>
@@ -157,14 +157,14 @@ export default function SessionsView() {
onClick={() => revoke(s)}
disabled={revokingId === s.id}
>
{revokingId === s.id ? "Revoking…" : "Revoke"}
{revokingId === s.id ? t("Revoking…") : t("Revoke")}
</button>
</td>
</tr>
))}
{sessions === null && <LoadingRow colSpan={8} />}
{sorted?.length === 0 && (
<EmptyRow colSpan={8} title="No active sessions" hint="Everyone who is signed in appears here, with where from and until when." filtered={tableSearch.active ? () => tableSearch.setQuery("") : undefined} />
<EmptyRow colSpan={8} title={t("No active sessions")} hint="Everyone who is signed in appears here, with where from and until when." filtered={tableSearch.active ? () => tableSearch.setQuery("") : undefined} />
)}
</tbody>
</table>