From 0ec7fc6faeffd692d35d115b3730ad1a6db98b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 17 May 2026 13:02:07 +0200 Subject: [PATCH] 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. --- messages/de.json | 1 + messages/en.json | 1 + messages/es.json | 1 + messages/fr.json | 1 + messages/it.json | 1 + messages/pl.json | 1 + .../__tests__/about-section-update-badge.test.tsx | 11 +++++++++++ src/components/settings/about-section.tsx | 3 +-- 8 files changed, 18 insertions(+), 2 deletions(-) diff --git a/messages/de.json b/messages/de.json index 7e07ce291..ae8624367 100644 --- a/messages/de.json +++ b/messages/de.json @@ -1940,6 +1940,7 @@ "version": "App-Version", "gitSha": "Build", "builtAt": "Erstellt {time}", + "builtAtLabel": "Erstellt", "license": "Lizenz", "repository": "Quellcode", "changelog": "Changelog", diff --git a/messages/en.json b/messages/en.json index d1d71ffb8..f8b50f4b5 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1940,6 +1940,7 @@ "version": "App version", "gitSha": "Build", "builtAt": "Built {time}", + "builtAtLabel": "Built", "license": "License", "repository": "Source code", "changelog": "Changelog", diff --git a/messages/es.json b/messages/es.json index e2d1f7cc1..2dfe5f649 100644 --- a/messages/es.json +++ b/messages/es.json @@ -1940,6 +1940,7 @@ "version": "App version", "gitSha": "Build", "builtAt": "Built {time}", + "builtAtLabel": "Built", "license": "License", "repository": "Source code", "changelog": "Changelog", diff --git a/messages/fr.json b/messages/fr.json index 8973ac0b4..3c1e38816 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -1940,6 +1940,7 @@ "version": "App version", "gitSha": "Build", "builtAt": "Built {time}", + "builtAtLabel": "Built", "license": "License", "repository": "Source code", "changelog": "Changelog", diff --git a/messages/it.json b/messages/it.json index 98df87416..905610faf 100644 --- a/messages/it.json +++ b/messages/it.json @@ -1940,6 +1940,7 @@ "version": "App version", "gitSha": "Build", "builtAt": "Built {time}", + "builtAtLabel": "Built", "license": "License", "repository": "Source code", "changelog": "Changelog", diff --git a/messages/pl.json b/messages/pl.json index db35bcb93..1c782065a 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -1940,6 +1940,7 @@ "version": "App version", "gitSha": "Build", "builtAt": "Built {time}", + "builtAtLabel": "Built", "license": "License", "repository": "Source code", "changelog": "Changelog", diff --git a/src/components/settings/__tests__/about-section-update-badge.test.tsx b/src/components/settings/__tests__/about-section-update-badge.test.tsx index b9cc3520e..d798afa94 100644 --- a/src/components/settings/__tests__/about-section-update-badge.test.tsx +++ b/src/components/settings/__tests__/about-section-update-badge.test.tsx @@ -99,6 +99,17 @@ describe(" — update badge", () => { const html = render(); expect(html).toContain("Sources & docs"); }); + + it("uses a dedicated 'Built' label for the build-time row rather than the gitSha fallback", () => { + const html = render(); + // 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 — a11y contract", () => { diff --git a/src/components/settings/about-section.tsx b/src/components/settings/about-section.tsx index 25de2ec98..124ebeb88 100644 --- a/src/components/settings/about-section.tsx +++ b/src/components/settings/about-section.tsx @@ -260,8 +260,7 @@ export function AboutSection() { {version.builtAt && (
- {t("settings.about.builtAt", { time: "" }).trim() || - t("settings.about.gitSha")} + {t("settings.about.builtAtLabel")}
{fmt.date(version.builtAt)}