Skip to content

feat(catalogue): German type labels and variant presentation in QUESTION_TYPES (#161) - #168

Merged
jstet merged 1 commit into
mainfrom
feat/catalogue-presentation-de
Sep 27, 2026
Merged

jstet merged 1 commit into
mainfrom
feat/catalogue-presentation-de

Conversation

@jstet

@jstet jstet commented Sep 27, 2026

Copy link
Copy Markdown
Member

Closes #161. That issue is now narrowed to variant presentation and German labels; the bundle-size point no longer applies because qwac drops the package (CorrelAid/qwac#59).

German labels

Every question, structural, variant and composite type has a German label, stored as prefLabelDe.

  • In JSON-LD: prefLabelDe is a context term for skos:prefLabel with @language: "de", so the registry stays valid.
  • In the schema: it is required, so a new type can't be added without one.
en de
Select One / Multiple Einfachauswahl / Mehrfachauswahl
… with Other … mit „Sonstiges“
… (Long List) / (from file) … (lange Liste) / (aus Datei)
Text (Short Free Text) Text (kurze Freitextantwort)
Integer / Decimal/Float Ganzzahl / Dezimalzahl
Date / Time Datum / Uhrzeit
Range Schieberegler
Note (Display Text) Hinweis (Anzeigetext)
Grid / Matrix Group Matrix-Gruppe
Group (Begin / End) Gruppe (Beginn / Ende)

Metadata rows (start, …) keep their names: they come from a convention, not the registry.

QUESTION_TYPES

  • labels: { en, de } next to label, which is unchanged and English.
  • A variant's presentation from the registry: withOther, withLongList, appearanceString.

Both are additive. The schema's consumedBy legend gains a catalogue token for the fields QuestionTypes.ts reads.

For qwacback

GET /api/question-types (CorrelAid/qwacback#40) can serve both straight from the catalogue.

Checks

  • A new test checks that every registered type has a German label and every variant has presentation.
  • vitest: 1477 passed
  • pytest validation + codegen: 151 passed, 3 xfailed
  • npm run validate and the drift check pass

🤖 Generated with Claude Code

…ION_TYPES (#161)

Every question, structural, variant and composite type in the registry
has a German label now: `prefLabelDe`, a JSON-LD context term for
skos:prefLabel with @language "de", required by the schema so no type
lacks one. QUESTION_TYPES carries `labels: { en, de }` next to `label`,
and each variant its registry `presentation` (withOther, withLongList,
appearanceString), so a consumer no longer infers them from the type
name. The schema's consumedBy legend gains `catalogue` for the fields
QuestionTypes.ts reads.

qwacback serves these to qwac (CorrelAid/qwacback#40, CorrelAid/qwac#59).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jstet
jstet merged commit 1e3902a into main Sep 27, 2026
4 checks passed
@jstet
jstet deleted the feat/catalogue-presentation-de branch September 27, 2026 21:20
@jstet jstet mentioned this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Catalogue: export variant presentation and German labels

1 participant