Add a Swedish interface with a per-person language switch

A small translation system (the English text is its own key, so anything
without a Swedish entry stays English) and a Language switch in the user menu,
saved on the account (users.language) and following the browser when no choice
has been made. Swedish covers the menu, shared parts (search, tables, dialogs,
relative times), the sign-in page and the everyday pages: Dashboard, Alerts,
Servers, Updates, Maintenance, My work, Coming up, To do, Integrations and the
display settings. Server-written messages stay English for now.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-12 21:49:49 +01:00
1 parent e7f23ba13f
commit 645816d5a8
168 files changed
+12142 -1422

No files matched your search

+10 -9
View File
@@ -6,6 +6,7 @@ import { formatDateTime, is24HourFormat } from "../utils/date";
import { sortItems, type SortDirection } from "../hooks/useSortable";
import SortableTh from "./SortableTh";
import { downloadCsv } from "../utils/csv";
import { t } from "../i18n";
export const SCHEDULE_TYPE_LABELS: Record<string, string> = {
cron: "Cron jobs",
@@ -97,7 +98,7 @@ export default function ServerTaskTable({
{tasks.length > 0 && (
<div className="card-body py-2 d-flex justify-content-end">
<button className="btn btn-outline-secondary btn-sm" onClick={exportCsv}>
Export CSV
{t("Export CSV")}
</button>
</div>
)}
@@ -110,7 +111,7 @@ export default function ServerTaskTable({
<table className="table table-vcenter card-table mb-0">
<thead>
<tr>
<SortableTh<TaskRecord> label="Name" sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<TaskRecord> label={t("Name")} sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<TaskRecord>
label="Command"
sortKeyName="command"
@@ -126,20 +127,20 @@ export default function ServerTaskTable({
onSort={requestSort}
/>
<SortableTh<TaskRecord>
label="Next run"
label={t("Next run")}
sortKeyName="nextRunAt"
activeKey={sortKey}
direction={sortDir}
onSort={requestSort}
/>
<SortableTh<TaskRecord>
label="Status"
label={t("Status")}
sortKeyName="enabled"
activeKey={sortKey}
direction={sortDir}
onSort={requestSort}
/>
{canEditTasks && <th className="w-1">Actions</th>}
{canEditTasks && <th className="w-1">{t("Actions")}</th>}
</tr>
</thead>
<tbody>
@@ -173,9 +174,9 @@ export default function ServerTaskTable({
{task.isStale ? (
<span className="badge bg-red-lt text-red me-1">Missing</span>
) : task.enabled ? (
<span className="badge bg-green-lt text-green me-1">Enabled</span>
<span className="badge bg-green-lt text-green me-1">{t("Enabled")}</span>
) : (
<span className="badge bg-secondary-lt text-secondary me-1">Disabled</span>
<span className="badge bg-secondary-lt text-secondary me-1">{t("Disabled")}</span>
)}
{task.origin === "manual" && <span className="badge bg-blue-lt">Manual</span>}
</td>
@@ -184,10 +185,10 @@ export default function ServerTaskTable({
{task.origin === "manual" && (
<div className="btn-list flex-nowrap">
<button className="btn btn-sm" onClick={() => onEdit(task)}>
Edit
{t("Edit")}
</button>
<button className="btn btn-sm btn-outline-danger" onClick={() => onDelete(task)}>
Delete
{t("Delete")}
</button>
</div>
)}