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
@@ -108,7 +108,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
!(await confirmDialog({
|
||||
title: t("Silence everything?"),
|
||||
message: `This silences every alert about every server, integration and DNS provider for ${words}. Anything still wrong when it ends alerts then.`,
|
||||
confirmLabel: "Silence everything",
|
||||
confirmLabel: t("Silence everything"),
|
||||
danger: true,
|
||||
}))
|
||||
)
|
||||
@@ -130,7 +130,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
}
|
||||
|
||||
async function endAll() {
|
||||
if (!(await confirmDialog({ title: t("End all maintenance"), message: `End all ${windows?.length ?? 0} windows now? Alerts about them become active again.`, confirmLabel: "End all", danger: true }))) return;
|
||||
if (!(await confirmDialog({ title: t("End all maintenance"), message: `End all ${windows?.length ?? 0} windows now? Alerts about them become active again.`, confirmLabel: t("End all"), danger: true }))) return;
|
||||
setError(null);
|
||||
try {
|
||||
const res = await api.maintenance.endAll();
|
||||
@@ -160,7 +160,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
setTarget("");
|
||||
setReason("");
|
||||
const also = res.alsoSilenced?.length ?? 0;
|
||||
toast.success(also > 0 ? `Maintenance started, and on ${also} thing${also === 1 ? "" : "s"} that depend on it. Alerts for them are silenced until it ends.` : "Maintenance started. Alerts for it are silenced until it ends.");
|
||||
toast.success(also > 0 ? `Maintenance started, and on ${also} thing${also === 1 ? "" : "s"} that depend on it. Alerts for them are silenced until it ends.` : t("Maintenance started. Alerts for it are silenced until it ends."));
|
||||
load();
|
||||
announceChange();
|
||||
} catch (err) {
|
||||
@@ -202,7 +202,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
setError(null);
|
||||
try {
|
||||
await api.maintenance.end(w.id);
|
||||
toast.success(w.startedAt > new Date().toISOString() ? "Scheduled window cancelled." : "Maintenance ended. Alerts for it are active again.");
|
||||
toast.success(w.startedAt > new Date().toISOString() ? t("Scheduled window cancelled.") : t("Maintenance ended. Alerts for it are active again."));
|
||||
load();
|
||||
announceChange();
|
||||
} catch (err) {
|
||||
@@ -315,7 +315,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
</select>
|
||||
</div>
|
||||
<div className="col-md-3">
|
||||
<label className="form-label">For</label>
|
||||
<label className="form-label">{t("For")}</label>
|
||||
<select className="form-select" value={minutes} onChange={(e) => setMinutes(Number(e.target.value))}>
|
||||
{DURATIONS.map((d) => (
|
||||
<option key={d.minutes} value={d.minutes}>
|
||||
@@ -397,7 +397,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
</div>
|
||||
)}
|
||||
<div className="col-md-3">
|
||||
<label className="form-label">For</label>
|
||||
<label className="form-label">{t("For")}</label>
|
||||
<select className="form-select" value={kumaMinutes} onChange={(e) => setKumaMinutes(Number(e.target.value))}>
|
||||
{DURATIONS.map((d) => (
|
||||
<option key={d.minutes} value={d.minutes}>
|
||||
@@ -416,7 +416,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
<div className="card-body pt-0">
|
||||
<div className={`alert ${syncResult.started + syncResult.updated + syncResult.removed > 0 ? "alert-success" : "alert-info"} mb-0`}>
|
||||
{syncResult.maintenances.length === 0
|
||||
? "Uptime Kuma has no maintenance windows."
|
||||
? t("Uptime Kuma has no maintenance windows.")
|
||||
: `Read ${syncResult.maintenances.length} maintenance window${syncResult.maintenances.length === 1 ? "" : "s"} from Uptime Kuma: ${syncResult.started} added, ${syncResult.updated} changed, ${syncResult.removed} removed here.`}
|
||||
<ul className="mb-0 mt-2">
|
||||
{syncResult.maintenances.map((m) => (
|
||||
@@ -435,7 +435,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
<div className="text-secondary small">
|
||||
Covers {m.monitorCount} monitor{m.monitorCount === 1 ? "" : "s"} in Uptime Kuma ·{" "}
|
||||
{m.slots.length === 0
|
||||
? "Uptime Kuma gave no time slot"
|
||||
? t("Uptime Kuma gave no time slot")
|
||||
: m.slots.map((s) => `${formatDateTime(new Date(s.start))} – ${formatDateTime(new Date(s.end))}`).join("; ")}
|
||||
</div>
|
||||
</li>
|
||||
@@ -454,7 +454,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
{kumaResult.monitorsInMaintenance === 0 ? (
|
||||
<div className="alert alert-info mb-0">
|
||||
{kumaResult.monitorsChecked === 0
|
||||
? "Uptime Kuma answered, but reported no monitors at all."
|
||||
? t("Uptime Kuma answered, but reported no monitors at all.")
|
||||
: `Read ${kumaResult.monitorsChecked} monitor${kumaResult.monitorsChecked === 1 ? "" : "s"} from Uptime Kuma; none is in maintenance right now.`}{" "}
|
||||
Only a maintenance window that is active at this moment can be imported — one scheduled for later
|
||||
shows up here once it starts.
|
||||
@@ -576,7 +576,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
<table className="table table-vcenter card-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<th>{t("Address")}</th>
|
||||
<th>{t("Belongs to")}</th>
|
||||
<th className="w-1">{t("Actions")}</th>
|
||||
</tr>
|
||||
@@ -605,7 +605,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
{upcoming.length > 0 && (
|
||||
<div className="card mb-3">
|
||||
<div className="card-header">
|
||||
<h3 className="card-title">Scheduled</h3>
|
||||
<h3 className="card-title">{t("Scheduled")}</h3>
|
||||
<div className="card-actions">
|
||||
<ExportTableButton filename="maintenance-scheduled" />
|
||||
</div>
|
||||
@@ -616,7 +616,7 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
|
||||
<tr>
|
||||
<th>{t("Target")}</th>
|
||||
<th>{t("Reason")}</th>
|
||||
<th>Starts</th>
|
||||
<th>{t("Starts")}</th>
|
||||
<th>{t("Ends")}</th>
|
||||
{canEdit && <th className="w-1">{t("Actions")}</th>}
|
||||
</tr>
|
||||
|
||||
Reference in new issue
Block a user