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

+5 -4
View File
@@ -6,6 +6,7 @@ import { readableError } from "../utils/errors";
import { toast } from "../utils/toast";
import TimeAgo from "./TimeAgo";
import { BlockSkeleton } from "./Skeleton";
import { t } from "../i18n";
interface Loaded {
integration: IntegrationSummary;
@@ -113,12 +114,12 @@ export default function RunPlaybook({ serverName, defaultLimit }: { serverName:
}
}
if (failed) return <div className="text-secondary">Couldn't load the integrations.</div>;
if (failed) return <div className="text-secondary">{t("Couldn't load the integrations.")}</div>;
if (loaded === null) return <BlockSkeleton lines={3} />;
if (loaded.length === 0) {
return (
<div className="text-secondary">
There is no Semaphore connected. Add one under <Link to="/integrations">Integrations</Link> to run playbooks from here.
There is no Semaphore connected. Add one under <Link to="/integrations">{t("Integrations")}</Link> to run playbooks from here.
</div>
);
}
@@ -127,7 +128,7 @@ export default function RunPlaybook({ serverName, defaultLimit }: { serverName:
<div>
{loaded.some((l) => l.failed) && <div className="text-secondary small mb-2">Couldn't read the templates of {loaded.filter((l) => l.failed).map((l) => l.integration.name).join(", ")}.</div>}
{options.length === 0 ? (
<div className="text-secondary">No templates found in Semaphore.</div>
<div className="text-secondary">{t("No templates found in Semaphore.")}</div>
) : (
<>
<div className="mb-3">
@@ -135,7 +136,7 @@ export default function RunPlaybook({ serverName, defaultLimit }: { serverName:
Template
</label>
<select id="run-template" className="form-select" value={choice} onChange={(e) => setChoice(e.target.value)}>
<option value="">Choose a template…</option>
<option value="">{t("Choose a template…")}</option>
{options.map((o) => (
<option key={o.key} value={o.key}>
{o.label}