+ );
+}
diff --git a/web/src/i18n/en.json b/web/src/i18n/en.json
index 21f404a..eb1d289 100644
--- a/web/src/i18n/en.json
+++ b/web/src/i18n/en.json
@@ -7,6 +7,17 @@
"visibility": { "draft": "Draft", "internal": "Internal", "public": "Public" },
"form": { "selectPlaceholder": "— select —", "create": "Create object", "save": "Save", "cancel": "Cancel", "visibility": "Visibility", "draft": "Draft", "internal": "Internal", "required": "This field is required", "rejected": "The server rejected the changes — check required and referenced fields", "flexibleHeading": "Catalogue fields" },
"actions": { "edit": "Edit", "delete": "Delete", "confirmDelete": "Delete this object? This cannot be undone." },
+ "labels": { "en": "Label (EN)", "sv": "Label (SV)", "externalUri": "External URI (optional)" },
+ "vocab": {
+ "title": "Vocabularies", "newVocabulary": "New vocabulary", "key": "Key",
+ "create": "Create", "selectPrompt": "Select a vocabulary to manage its terms",
+ "terms": "Terms", "addTerm": "Add term", "empty": "No vocabularies yet",
+ "noTerms": "No terms yet", "loadError": "Could not load"
+ },
+ "authorities": {
+ "title": "Authorities", "person": "Person", "organisation": "Organisation", "place": "Place",
+ "new": "New", "create": "Create", "empty": "No authorities yet", "loadError": "Could not load"
+ },
"publish": {
"heading": "Visibility",
"advanceInternal": "Advance to internal",
diff --git a/web/src/i18n/sv.json b/web/src/i18n/sv.json
index 93e15b8..56e4f7e 100644
--- a/web/src/i18n/sv.json
+++ b/web/src/i18n/sv.json
@@ -7,6 +7,17 @@
"visibility": { "draft": "Utkast", "internal": "Intern", "public": "Publik" },
"form": { "selectPlaceholder": "— välj —", "create": "Skapa föremål", "save": "Spara", "cancel": "Avbryt", "visibility": "Synlighet", "draft": "Utkast", "internal": "Intern", "required": "Fältet är obligatoriskt", "rejected": "Servern avvisade ändringarna — kontrollera obligatoriska och refererade fält", "flexibleHeading": "Katalogfält" },
"actions": { "edit": "Redigera", "delete": "Ta bort", "confirmDelete": "Ta bort detta föremål? Detta kan inte ångras." },
+ "labels": { "en": "Etikett (EN)", "sv": "Etikett (SV)", "externalUri": "Extern URI (valfritt)" },
+ "vocab": {
+ "title": "Vokabulär", "newVocabulary": "Ny vokabulär", "key": "Nyckel",
+ "create": "Skapa", "selectPrompt": "Välj en vokabulär för att hantera dess termer",
+ "terms": "Termer", "addTerm": "Lägg till term", "empty": "Inga vokabulärer ännu",
+ "noTerms": "Inga termer ännu", "loadError": "Kunde inte ladda"
+ },
+ "authorities": {
+ "title": "Auktoriteter", "person": "Person", "organisation": "Organisation", "place": "Plats",
+ "new": "Ny", "create": "Skapa", "empty": "Inga auktoriteter ännu", "loadError": "Kunde inte ladda"
+ },
"publish": {
"heading": "Synlighet",
"advanceInternal": "Gör intern",
diff --git a/web/src/lib/labels.ts b/web/src/lib/labels.ts
new file mode 100644
index 0000000..6485cd5
--- /dev/null
+++ b/web/src/lib/labels.ts
@@ -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 ??
+ ""
+ );
+}
diff --git a/web/src/shell/app-shell.tsx b/web/src/shell/app-shell.tsx
index 2ff6c69..1ab6a0c 100644
--- a/web/src/shell/app-shell.tsx
+++ b/web/src/shell/app-shell.tsx
@@ -5,7 +5,7 @@ import { useLogout } from "../api/queries";
import { Button } from "@/components/ui/button";
import { LangSwitch } from "./lang-switch";
-const FUTURE = ["vocabularies", "authorities", "fields", "search"] as const;
+const DISABLED_NAV = ["fields", "search"] as const;
export function AppShell() {
const { t } = useTranslation();
@@ -30,7 +30,23 @@ export function AppShell() {
>
{t("nav.objects")}
- {FUTURE.map((key) => (
+