fix(about): use distinct builtAtLabel key for the build-time row

The build-time row read its label from `t("builtAt", { time: "" }).trim()`
with a fallback to the gitSha key. The fallback was effectively dead
(the trim never produced an empty string) and the pattern silently
risked rendering two side-by-side "Build" columns when an
implementer dropped the trailing `{time}` placeholder. Replace with
a dedicated `settings.about.builtAtLabel` key across all six locales.
This commit is contained in:
Marc-André Bombeck committed 2026-05-17 13:02:07 +02:00
1 parent 3e0eed8284
commit 0ec7fc6fae
8 files changed
+18 -2

No files matched your search

+1
View File
@@ -1940,6 +1940,7 @@
"version": "App-Version",
"gitSha": "Build",
"builtAt": "Erstellt {time}",
"builtAtLabel": "Erstellt",
"license": "Lizenz",
"repository": "Quellcode",
"changelog": "Changelog",
+1
View File
@@ -1940,6 +1940,7 @@
"version": "App version",
"gitSha": "Build",
"builtAt": "Built {time}",
"builtAtLabel": "Built",
"license": "License",
"repository": "Source code",
"changelog": "Changelog",
+1
View File
@@ -1940,6 +1940,7 @@
"version": "App version",
"gitSha": "Build",
"builtAt": "Built {time}",
"builtAtLabel": "Built",
"license": "License",
"repository": "Source code",
"changelog": "Changelog",
+1
View File
@@ -1940,6 +1940,7 @@
"version": "App version",
"gitSha": "Build",
"builtAt": "Built {time}",
"builtAtLabel": "Built",
"license": "License",
"repository": "Source code",
"changelog": "Changelog",
+1
View File
@@ -1940,6 +1940,7 @@
"version": "App version",
"gitSha": "Build",
"builtAt": "Built {time}",
"builtAtLabel": "Built",
"license": "License",
"repository": "Source code",
"changelog": "Changelog",
+1
View File
@@ -1940,6 +1940,7 @@
"version": "App version",
"gitSha": "Build",
"builtAt": "Built {time}",
"builtAtLabel": "Built",
"license": "License",
"repository": "Source code",
"changelog": "Changelog",
@@ -99,6 +99,17 @@ describe("<AboutSection> — update badge", () => {
const html = render(<AboutSection />);
expect(html).toContain("Sources &amp; docs");
});
it("uses a dedicated 'Built' label for the build-time row rather than the gitSha fallback", () => {
const html = render(<AboutSection />);
// Distinct label keeps the dt copy separate from the "Build" gitSha
// header above it; the prior `t('builtAt', { time: '' }).trim()`
// pattern silently leaked the gitSha key as a fallback.
expect(html).toContain(">Built<");
// Only ONE column should ever read "Build" — the gitSha header.
const buildOccurrences = html.match(/>Build</g) ?? [];
expect(buildOccurrences.length).toBe(1);
});
});
describe("<UpdateBadge> — a11y contract", () => {
+1 -2
View File
@@ -260,8 +260,7 @@ export function AboutSection() {
{version.builtAt && (
<div className="flex items-baseline gap-2">
<dt className="text-muted-foreground text-xs tracking-wide uppercase">
{t("settings.about.builtAt", { time: "" }).trim() ||
t("settings.about.gitSha")}
{t("settings.about.builtAtLabel")}
</dt>
<dd className="text-muted-foreground">
{fmt.date(version.builtAt)}