Swedish interface: labels and short texts across every page
About 1,600 more headings, buttons, table columns, status words, placeholders and short messages are translated. Tables of words built when the app loads are now read when they are drawn, so they follow the language, and a test fails if text is translated at load time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
25183c0320
commit
6e39430a1f
173 files changed
+3922
-2245
No files matched your search
@@ -19,15 +19,15 @@ import { t } from "../i18n";
|
||||
function statusBadge(monitor: UptimeKumaMonitor) {
|
||||
switch (monitor.status) {
|
||||
case "up":
|
||||
return <span className="badge bg-green-lt text-green">Up</span>;
|
||||
return <span className="badge bg-green-lt text-green">{t("Up")}</span>;
|
||||
case "down":
|
||||
return <span className="badge bg-red-lt text-red">Down</span>;
|
||||
return <span className="badge bg-red-lt text-red">{t("Down")}</span>;
|
||||
case "pending":
|
||||
return <span className="badge bg-yellow-lt text-yellow">Pending</span>;
|
||||
return <span className="badge bg-yellow-lt text-yellow">{t("Pending")}</span>;
|
||||
case "maintenance":
|
||||
return <span className="badge bg-blue-lt text-blue">{t("Maintenance")}</span>;
|
||||
default:
|
||||
return <span className="badge bg-secondary-lt text-secondary">Unknown</span>;
|
||||
return <span className="badge bg-secondary-lt text-secondary">{t("Unknown")}</span>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ export default function UptimeKuma({ user: _user }: { user: CurrentUser }) {
|
||||
{integrations?.length === 0 ? (
|
||||
<div className="card">
|
||||
<div className="card-body text-secondary">
|
||||
No Uptime Kuma integration configured yet. <Link to="/integrations">Add one under Integrations</Link>.
|
||||
No Uptime Kuma integration configured yet. <Link to="/integrations">{t("Add one under Integrations")}</Link>.
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
@@ -153,7 +153,7 @@ export default function UptimeKuma({ user: _user }: { user: CurrentUser }) {
|
||||
{t("Export CSV")}
|
||||
</button>
|
||||
<button className="btn btn-sm btn-outline-secondary" onClick={() => selected && loadMonitors(selected.id)} disabled={loading}>
|
||||
{loading ? "Refreshing…" : "Refresh"}
|
||||
{loading ? t("Refreshing…") : t("Refresh")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -161,19 +161,19 @@ export default function UptimeKuma({ user: _user }: { user: CurrentUser }) {
|
||||
<table className="table table-vcenter card-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<SortableTh<UptimeKumaMonitor> label="Monitor" sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UptimeKumaMonitor> label={t("Monitor")} sortKeyName="name" 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"
|
||||
label={t("Response")}
|
||||
sortKeyName="responseTimeMs"
|
||||
activeKey={sortKey}
|
||||
direction={sortDir}
|
||||
onSort={requestSort}
|
||||
/>
|
||||
<SortableTh<UptimeKumaMonitor> label="Uptime 24h" sortKeyName="uptime24h" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UptimeKumaMonitor> label="Uptime 30d" sortKeyName="uptime30d" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UptimeKumaMonitor> label={t("Uptime 24h")} sortKeyName="uptime24h" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UptimeKumaMonitor> label={t("Uptime 30d")} sortKeyName="uptime30d" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -205,7 +205,7 @@ export default function UptimeKuma({ user: _user }: { user: CurrentUser }) {
|
||||
</tr>
|
||||
))}
|
||||
{sorted?.length === 0 && (
|
||||
<EmptyRow colSpan={7} title="No monitors" hint="Add monitors in Uptime Kuma and they appear here, with the server each one watches." filtered={tableSearch.active ? () => tableSearch.setQuery("") : undefined} />
|
||||
<EmptyRow colSpan={7} title={t("No monitors")} hint="Add monitors in Uptime Kuma and they appear here, with the server each one watches." filtered={tableSearch.active ? () => tableSearch.setQuery("") : undefined} />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in new issue
Block a user