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 type { WallGroup, WallTile } from "../api/client";
|
||||
import { formatDate, formatTime } from "../utils/date";
|
||||
import { formatRemaining } from "../utils/duration";
|
||||
import { groupMembers, pageOrOverview, ROTATE_CHOICES, stepPage, wallPages } from "../utils/wallPages";
|
||||
import { t } from "../i18n";
|
||||
|
||||
export const REFRESH_MS = 30_000;
|
||||
|
||||
@@ -226,7 +227,7 @@ export default function WallView({
|
||||
<div>
|
||||
{data.problems && (
|
||||
<>
|
||||
<h2 className="wall-heading">Needs attention</h2>
|
||||
<h2 className="wall-heading">{t("Needs attention")}</h2>
|
||||
{data.problems.length === 0 ? (
|
||||
<div className="wall-empty">Nothing right now.</div>
|
||||
) : (
|
||||
@@ -259,7 +260,7 @@ export default function WallView({
|
||||
<div>
|
||||
{data.integrations && (
|
||||
<>
|
||||
<h2 className="wall-heading">Integrations</h2>
|
||||
<h2 className="wall-heading">{t("Integrations")}</h2>
|
||||
{data.integrations.length === 0 ? (
|
||||
<div className="wall-empty">None connected.</div>
|
||||
) : (
|
||||
@@ -343,8 +344,8 @@ function AlertsPage({ data, now }: { data: WallData; now: Date }) {
|
||||
const alertCount = data.alerts ? data.alerts.critical + data.alerts.warning : problems.length;
|
||||
const shown = problems.slice(0, 12);
|
||||
return (
|
||||
<section className="wall-page" aria-label="Needs attention">
|
||||
<h2 className="wall-heading">Needs attention</h2>
|
||||
<section className="wall-page" aria-label={t("Needs attention")}>
|
||||
<h2 className="wall-heading">{t("Needs attention")}</h2>
|
||||
<ul className="wall-list wall-list-cols">
|
||||
{shown.map((a) => (
|
||||
<li key={a.id} className={a.severity === "critical" ? "wall-bad" : "wall-warn"}>
|
||||
|
||||
Reference in new issue
Block a user