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
@@ -1,6 +1,7 @@
|
||||
import { useMemo, useState } from "react";
|
||||
import type { MaintenanceWindow } from "../api/client";
|
||||
import { formatDate, formatDateTime, formatTime } from "../utils/date";
|
||||
import { t } from "../i18n";
|
||||
|
||||
const HOUR = 3600_000;
|
||||
const DAY = 24 * HOUR;
|
||||
@@ -76,7 +77,7 @@ export default function MaintenanceTimeline({ windows, now }: { windows: Mainten
|
||||
<div className="card-header">
|
||||
<h3 className="card-title">Timeline</h3>
|
||||
<div className="card-actions">
|
||||
<div className="btn-group btn-group-sm" role="group" aria-label="Time range">
|
||||
<div className="btn-group btn-group-sm" role="group" aria-label={t("Time range")}>
|
||||
{RANGES.map((r) => (
|
||||
<button key={r.key} type="button" className={`btn btn-sm ${r.key === rangeKey ? "btn-primary" : "btn-outline-secondary"}`} aria-pressed={r.key === rangeKey} onClick={() => setRangeKey(r.key)}>
|
||||
{r.label}
|
||||
@@ -93,7 +94,7 @@ export default function MaintenanceTimeline({ windows, now }: { windows: Mainten
|
||||
<div className="timeline-scroll" aria-hidden="true">
|
||||
<div className="timeline">
|
||||
<div className="timeline-row timeline-axis">
|
||||
<div className="timeline-label text-secondary">From now</div>
|
||||
<div className="timeline-label text-secondary">{t("From now")}</div>
|
||||
<div className="timeline-track">
|
||||
{ticks.map((t) => (
|
||||
<span key={t} className="timeline-tick" style={{ left: `${pct(t)}%` }}>
|
||||
@@ -153,7 +154,7 @@ export default function MaintenanceTimeline({ windows, now }: { windows: Mainten
|
||||
<span>
|
||||
<span className="timeline-key timeline-bar-recurring" /> Recurring
|
||||
</span>
|
||||
<span>The same windows are listed in the tables below.</span>
|
||||
<span>{t("The same windows are listed in the tables below.")}</span>
|
||||
{further > 0 && <span>{further} further ahead than this range.</span>}
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user