fix(i18n): drop dot and dash separators from visible strings

Every bundle value that chained facts with " · " now reads as a phrase,
a comma list or a parenthesis, in all seven locales, and the em-dash
separators in the day, documents, correlation, sharing, environment,
vaccination and Apple Health import strings become sentences or clauses.

The day view's running list names the record first, with the dose in
the name and a life event's category as a chip, and puts a quiet day
count below: "Day 4, since 31 December" instead of a dot chain. Document
meta, location periods, vaccination rows and mood crosstab rows drop
their composed dots too.

A guard walks every bundle and fails on any " · " outside a reasoned
allowlist, and on an allowlist entry that no longer needs its place.
This commit is contained in:
Marc-André Bombeck committed 2026-10-09 13:37:14 +02:00
1 parent d8a3614120
commit 94542e7f2d
39 files changed
+1027 -881

No files matched your search

@@ -518,13 +518,13 @@ describe("buildProcedureChoices", () => {
{
encounterId: "enc-knee",
name: "Knee arthroscopy",
detail: "Knee (left) · 2025-10-02",
detail: "Knee (left), 2025-10-02",
},
{ encounterId: "enc-2", name: "Day clinic", detail: "2025-10-02" },
{
encounterId: "enc-3",
name: "Procedure or surgery",
detail: "Knee · 2025-10-02",
detail: "Knee, 2025-10-02",
},
]);
});
+2 -2
View File
@@ -198,8 +198,8 @@ export function DocumentCard({
</DayLinkStated>
) : (
date
)}{" "}
· {size}
)}
, {size}
</p>
{showFilename ? (
// Filename on its OWN muted line so it never clips the date/size
@@ -869,7 +869,7 @@ export function DocumentDetailSheet({
{doc.filename ?? title}
</p>
<p className="text-muted-foreground text-xs">
{t("documents.detail.previewUnavailable")} ·{" "}
{t("documents.detail.previewUnavailable")},{" "}
{formatBytes(doc.byteSize, locale)}
</p>
<DocumentDownloadButton
@@ -1185,8 +1185,15 @@ export function DocumentDetailSheet({
date: format.date(doc.createdAt),
size: formatBytes(doc.byteSize, locale),
})}
{doc.filename ? ` · ${doc.filename}` : ""}
</p>
{doc.filename ? (
<p
className="text-muted-foreground truncate text-xs"
title={doc.filename}
>
{doc.filename}
</p>
) : null}
{/* Where an imported document came from (#1038). Meta, so
muted like the line above; the id is what the person looks
@@ -80,7 +80,7 @@ function factHeadline(fact: ExtractedFactDto): string {
return (fact.data as ConditionFactData).label;
}
const data = fact.data as MedicationStatementFactData;
return data.dose ? `${data.name} · ${data.dose}` : data.name;
return data.dose ? `${data.name} ${data.dose}` : data.name;
}
/** The date the fact states, if any (YYYY-MM-DD). */
@@ -262,18 +262,16 @@ function FactRow({
</p>
<p className="text-muted-foreground text-xs">
{typeLabel}
{date ? ` · ${calendarDate(date)}` : ""}
{isObservation &&
(fact.data as ObservationFactData).referenceText ? (
<>
{" · "}
{t("documents.review.statedRange", {
range: (fact.data as ObservationFactData)
.referenceText as string,
})}
</>
) : null}
{date ? `, ${calendarDate(date)}` : ""}
</p>
{isObservation && (fact.data as ObservationFactData).referenceText ? (
<p className="text-muted-foreground text-xs break-words">
{t("documents.review.statedRange", {
range: (fact.data as ObservationFactData)
.referenceText as string,
})}
</p>
) : null}
{fact.provenance.anchored && fact.provenance.sourceText ? (
<p className="text-muted-foreground text-xs break-words italic">
“{fact.provenance.sourceText}”
+1 -1
View File
@@ -527,7 +527,7 @@ export function DocumentsView() {
label: `${
visit.practitioner?.name ??
encounterKindText(t, visit.kind as EncounterKind)
} · ${format.date(visit.occurredAt)}`,
}, ${format.date(visit.occurredAt)}`,
})),
[visits.data, t, format],
);
@@ -588,7 +588,7 @@ export function DocumentSourcePicker({
: null,
]
.filter(Boolean)
.join(" · ");
.join(", ");
return (
<li key={row.sourceId}>
<button
+1 -1
View File
@@ -546,7 +546,7 @@ export function buildProcedureChoices(
procedure.reason?.trim() ||
procedure.practitionerName?.trim() ||
labels.kindName,
detail: site ? `${site} · ${date}` : date,
detail: site ? `${site}, ${date}` : date,
};
});
}