feat(web): single-language content authoring (LabelEditor + localized_text at default lang)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 15:05:20 +02:00
parent 04e9c95c52
commit 9d0475e8ec
12 changed files with 49 additions and 82 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ export function AuthoritiesPage() {
const onCreate = (event: FormEvent) => {
event.preventDefault();
if (!labels.some((l) => l.lang === "en" && l.label)) {
if (!labels.some((l) => l.label)) {
setError(true);
return;
}
+1 -1
View File
@@ -25,7 +25,7 @@ test("lists authorities for the kind and creates one", async () => {
);
renderApp(tree(), { route: "/authorities/person" });
expect(await screen.findByText("Ada Lovelace")).toBeInTheDocument();
await userEvent.type(screen.getByLabelText(/label \(en\)/i), "Carl von Linné");
await userEvent.type(screen.getByLabelText(/^label$/i), "Carl von Linné");
await userEvent.click(screen.getByRole("button", { name: /create/i }));
await waitFor(() => expect((body as { kind: string })?.kind).toBe("person"));
expect((body as { labels: { label: string }[] }).labels[0].label).toBe("Carl von Linné");