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
@@ -14,6 +14,7 @@ import { useTableSearch } from "../hooks/useTableSearch";
|
||||
import DetailDrawer, { ObjectDetails } from "../components/DetailDrawer";
|
||||
import { useRowDetail } from "../hooks/useRowDetail";
|
||||
import { EmptyRow } from "../components/EmptyState";
|
||||
import { t } from "../i18n";
|
||||
|
||||
function statusBadge(monitor: UptimeKumaMonitor) {
|
||||
switch (monitor.status) {
|
||||
@@ -24,7 +25,7 @@ function statusBadge(monitor: UptimeKumaMonitor) {
|
||||
case "pending":
|
||||
return <span className="badge bg-yellow-lt text-yellow">Pending</span>;
|
||||
case "maintenance":
|
||||
return <span className="badge bg-blue-lt text-blue">Maintenance</span>;
|
||||
return <span className="badge bg-blue-lt text-blue">{t("Maintenance")}</span>;
|
||||
default:
|
||||
return <span className="badge bg-secondary-lt text-secondary">Unknown</span>;
|
||||
}
|
||||
@@ -149,7 +150,7 @@ export default function UptimeKuma({ user: _user }: { user: CurrentUser }) {
|
||||
<SearchBox value={tableSearch.query} onChange={tableSearch.setQuery} className="ms-3" />
|
||||
<div className="card-actions">
|
||||
<button className="btn btn-sm btn-outline-secondary" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
|
||||
Export CSV
|
||||
{t("Export CSV")}
|
||||
</button>
|
||||
<button className="btn btn-sm btn-outline-secondary" onClick={() => selected && loadMonitors(selected.id)} disabled={loading}>
|
||||
{loading ? "Refreshing…" : "Refresh"}
|
||||
@@ -161,9 +162,9 @@ export default function UptimeKuma({ user: _user }: { user: CurrentUser }) {
|
||||
<thead>
|
||||
<tr>
|
||||
<SortableTh<UptimeKumaMonitor> label="Monitor" sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UptimeKumaMonitor> label="Target" sortKeyName="target" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<th>Server</th>
|
||||
<SortableTh<UptimeKumaMonitor> label="Status" sortKeyName="status" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UptimeKumaMonitor> label={t("Target")} sortKeyName="target" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<th>{t("Server")}</th>
|
||||
<SortableTh<UptimeKumaMonitor> label={t("Status")} sortKeyName="status" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UptimeKumaMonitor>
|
||||
label="Response"
|
||||
sortKeyName="responseTimeMs"
|
||||
|
||||
Reference in new issue
Block a user