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:
1 parent
e7f23ba13f
commit
645816d5a8
168 files changed
+12142
-1422
No files matched your search
@@ -3,6 +3,7 @@ import { Link } from "react-router-dom";
|
||||
import { api, type HetznerForServer } from "../api/client";
|
||||
import TimeAgo from "./TimeAgo";
|
||||
import { ForecastText, StatusBadge, TrafficBar } from "../pages/Hetzner";
|
||||
import { t } from "../i18n";
|
||||
|
||||
/** On a server's page: the Hetzner Cloud server it is (matched by address, else by name), when there is one. Nothing is shown for a server that is not at Hetzner. */
|
||||
export default function HetznerServerCard({ serverId }: { serverId: number }) {
|
||||
@@ -41,7 +42,7 @@ export default function HetznerServerCard({ serverId }: { serverId: number }) {
|
||||
)}
|
||||
<div className="row g-3">
|
||||
<div className="col-6 col-lg-3">
|
||||
<div className="text-secondary small">Status</div>
|
||||
<div className="text-secondary small">{t("Status")}</div>
|
||||
<StatusBadge status={s.status} />
|
||||
{s.rescueEnabled && <span className="badge bg-yellow-lt text-yellow ms-1">rescue on</span>}
|
||||
</div>
|
||||
@@ -50,7 +51,7 @@ export default function HetznerServerCard({ serverId }: { serverId: number }) {
|
||||
{s.type ?? "—"} · {s.location ?? "?"}
|
||||
</div>
|
||||
<div className="col-6 col-lg-3">
|
||||
<div className="text-secondary small">Backups</div>
|
||||
<div className="text-secondary small">{t("Backups")}</div>
|
||||
{s.backupWindow ? (match.newestBackup ? <>newest <TimeAgo value={match.newestBackup} /></> : "on, none made yet") : "off"}
|
||||
{match.snapshots > 0 && <span className="text-secondary small"> · {match.snapshots} snapshot{match.snapshots === 1 ? "" : "s"}</span>}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user