fix(web): authorities unknown-kind redirect, extract labelText util, EN-required test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 09:39:15 +02:00
parent 38673e52ba
commit 352d899fa5
4 changed files with 42 additions and 24 deletions
+12
View File
@@ -0,0 +1,12 @@
import type { components } from "../api/schema";
type LabelView = components["schemas"]["LabelView"];
export function labelText(labels: LabelView[], lang: string): string {
return (
labels.find((l) => l.lang === lang)?.label ??
labels.find((l) => l.lang === "en")?.label ??
labels[0]?.label ??
""
);
}