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
+11
-11
@@ -16,9 +16,9 @@ const TONE_DOT: Record<ChangeEntry["tone"], string> = { good: "#2fb344", bad: "#
|
||||
const RANGES: { days: number; label: string }[] = [
|
||||
{ days: 1, label: "Last 24 hours" },
|
||||
{ days: 7, label: "Last 7 days" },
|
||||
{ days: 30, label: "Last 30 days" },
|
||||
{ days: 30, get label() { return t("Last 30 days"); } },
|
||||
{ days: 90, label: "Last 90 days" },
|
||||
{ days: 400, label: "Everything kept" },
|
||||
{ days: 400, get label() { return t("Everything kept"); } },
|
||||
];
|
||||
|
||||
const PAGE = 100;
|
||||
@@ -29,10 +29,10 @@ const PAGE = 100;
|
||||
*/
|
||||
const changeTabs = (view: "changes" | "audit") => (
|
||||
<ViewTabs
|
||||
label="Change log view"
|
||||
label={t("Change log view")}
|
||||
tabs={[
|
||||
{ to: "/changes", label: "Readable", active: view === "changes" },
|
||||
{ to: "/changes?view=audit", label: "Raw audit log", active: view === "audit" },
|
||||
{ to: "/changes", label: t("Readable"), active: view === "changes" },
|
||||
{ to: "/changes?view=audit", label: t("Raw audit log"), active: view === "audit" },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
@@ -158,8 +158,8 @@ function ReadableChanges({ tabs }: { tabs: ReactNode }) {
|
||||
|
||||
<div className="card mb-3">
|
||||
<div className="card-body d-flex flex-wrap gap-2 align-items-center">
|
||||
<input className="form-control w-auto flex-grow-1" style={{ maxWidth: "22rem" }} type="search" aria-label="Search the change log" placeholder="Search: a server, a person, a word…" value={text} onChange={(e) => setText(e.target.value)} />
|
||||
<select className="form-select w-auto" aria-label="Kind of change" value={kind} onChange={(e) => setParam("kind", e.target.value || null)}>
|
||||
<input className="form-control w-auto flex-grow-1" style={{ maxWidth: "22rem" }} type="search" aria-label={t("Search the change log")} placeholder={t("Search: a server, a person, a word…")} value={text} onChange={(e) => setText(e.target.value)} />
|
||||
<select className="form-select w-auto" aria-label={t("Kind of change")} value={kind} onChange={(e) => setParam("kind", e.target.value || null)}>
|
||||
<option value="">{t("All kinds")}</option>
|
||||
{kinds.map((k) => (
|
||||
<option key={k.id} value={k.id}>
|
||||
@@ -175,7 +175,7 @@ function ReadableChanges({ tabs }: { tabs: ReactNode }) {
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<select className="form-select w-auto" aria-label="How far back" value={days} onChange={(e) => setParam("days", e.target.value === "7" ? null : e.target.value)}>
|
||||
<select className="form-select w-auto" aria-label={t("How far back")} value={days} onChange={(e) => setParam("days", e.target.value === "7" ? null : e.target.value)}>
|
||||
{RANGES.map((r) => (
|
||||
<option key={r.days} value={r.days}>
|
||||
{r.label}
|
||||
@@ -193,10 +193,10 @@ function ReadableChanges({ tabs }: { tabs: ReactNode }) {
|
||||
filtered
|
||||
title={t("Nothing matches that")}
|
||||
hint={`Nothing in ${RANGES.find((r) => r.days === days)?.label.toLowerCase()} fits what is searched for. Try a wider range, or fewer filters.`}
|
||||
action={{ label: "Clear the search and filters", onClick: () => { setText(""); setParams(new URLSearchParams(), { replace: true }); } }}
|
||||
action={{ label: t("Clear the search and filters"), onClick: () => { setText(""); setParams(new URLSearchParams(), { replace: true }); } }}
|
||||
/>
|
||||
) : (
|
||||
<EmptyState title="Nothing has changed" hint={`No change was recorded in ${RANGES.find((r) => r.days === days)?.label.toLowerCase()}. Try a wider range.`} action={days < 400 ? { label: "Show everything kept", onClick: () => setParam("days", "400") } : undefined} />
|
||||
<EmptyState title={t("Nothing has changed")} hint={`No change was recorded in ${RANGES.find((r) => r.days === days)?.label.toLowerCase()}. Try a wider range.`} action={days < 400 ? { label: t("Show everything kept"), onClick: () => setParam("days", "400") } : undefined} />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
@@ -237,7 +237,7 @@ function ReadableChanges({ tabs }: { tabs: ReactNode }) {
|
||||
{more && (
|
||||
<div className="text-center mb-3">
|
||||
<button className="btn" onClick={() => void older()} disabled={loadingMore}>
|
||||
{loadingMore ? "Loading…" : "Show older"}
|
||||
{loadingMore ? t("Loading…") : t("Show older")}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user