Mehrsprachige Bedienung und versionierte Aufgabenvarianten einführen
Übersetzungskataloge, getrennte Sprachpräferenzen und einen versionierten Aufgabenpilot ergänzen. Historische Aufgaben und Bewertungen bleiben erhalten; äquivalente Ansichten teilen Nachweise. Lokal mit Race-Tests und PostgreSQL, Vet, Web-Build, Bank-Audits und Browser-Fixtures geprüft. Dieser Stand dient als Ausgangspunkt für die anschließend beauftragte Zusammenführung zur Muttersprache.
This commit is contained in:
@@ -63,6 +63,30 @@ Transferaufträge (`mode=transfer`) erlauben ein neues Wort, das als `candidate_
|
||||
|
||||
Die bisherigen Kurs-/Ausspracheendpunkte und historischen Antwortfelder bleiben nutzbar. Die neue Statistik entscheidet keine Kursabschlüsse und aktiviert kein Modellprofil. API und Web müssen für diese Änderung gemeinsam neu gebaut werden. Für reine Statistikvorschau ohne neue Auswahl `PRONUNCIATION_STRATEGY=recent` verwenden; das muss der neu gestarteten API übergeben werden.
|
||||
|
||||
## Erklärungssprachen und Variantenpilot
|
||||
|
||||
Im Bankbetrieb ist Deutsch weiterhin vollständig vorhanden. Die im A1-Kurs
|
||||
unabhängig wählbare Erklärungssprache Englisch aktiviert einen redaktionell
|
||||
geprüften Pilotbestand mit zwölf Vorstellungsaufgaben, zwei pro Lernbereich und
|
||||
allen fünf Darstellungen. Zwei Wortschatz- und eine kurze Schreibaufgabe sind
|
||||
fachliche Abwandlungen; neun Aufgaben sind äquivalente Übersetzungen. Details,
|
||||
Quellen und Befehle: [README](../README.md#aufgabenvarianten-erster-pilot).
|
||||
|
||||
Die Auswahl bleibt Go-/PostgreSQL-Logik ohne Modellaufruf. Der Auftrag friert die
|
||||
Erklärungssprache beim Einreihen ein, die Aufgabe ihre Sprachvariante, Revision,
|
||||
Kriterien und Lösung. Die Präferenz verändert keine alten Aufgaben/Bewertungen.
|
||||
Äquivalente Sprachansichten teilen die Nachweisidentität; Versuche bleiben
|
||||
getrennt. Wort-/Phonemwerte, Providerherkunft und Ausschlüsse bleiben erhalten.
|
||||
Ein Modell darf keine Varianten- oder Nachweisidentität setzen.
|
||||
|
||||
Für fehlende englische Module und neue A1-Tests gibt es einen ausdrücklichen
|
||||
Verfügbarkeitshinweis statt einer deutschen Ersatzaufgabe. Bereits angelegte
|
||||
deutsche Tests und ihre ursprünglichen Request-IDs bleiben fortsetzbar.
|
||||
Offene Antworten benötigen weiterhin ein aktiviertes Bewertungsprofil oder
|
||||
bleiben unbenotet. Der Variantenpilot aktiviert keine Profile und verändert
|
||||
keine Preise, Budgets oder Zugangsdaten. Der alternative KI-Modus und feste
|
||||
Aussprache-Ersatztexte sind kein vollständig übersetzter Aufgabenbestand.
|
||||
|
||||
## Standardbetrieb mit geprüftem Bestand
|
||||
|
||||
`COURSE_TASK_MODE=bank` ist der Standard; `ai` erhält den bisherigen KI-Generator. Die Compose-Dateien reichen den Wert an die API durch. Für den Bankbetrieb sind keine Modellschlüssel und kein LLM-Budget nötig. Ein eingerichtetes Bewertungsprofil kann offene Antworten optional bewerten; es wird nicht automatisch aktiviert. Der separate Aussprachebereich `next_exercise` ist von dieser Kursauswahl unabhängig.
|
||||
|
||||
+56
-1
@@ -31,4 +31,59 @@ Important boundaries:
|
||||
|
||||
## Multilingual Design
|
||||
|
||||
The MVP enables only `en-US`, but every exercise and profile stores `target_language` and `cefr_level`. New languages are added through `language_profiles`, seed exercises, Azure voice settings, and Flowise prompt variables.
|
||||
The current multilingual rollout is described in [README.md](../README.md#mehrsprachigkeit).
|
||||
The runtime description above documents the historical Flowise integration;
|
||||
current runtime uses the Go course bank and optional direct model APIs.
|
||||
|
||||
The React interface uses typed translation keys in `src/i18n/I18n.tsx` with
|
||||
German and English catalogs. Only static interface text is translated. Server
|
||||
content, learner answers, target texts and historical feedback are not passed
|
||||
through a blanket translator. Both course renderers, recording controls,
|
||||
conversation, administration, AI settings and diagnostics now use the same
|
||||
catalogs as authentication, navigation, dashboard and progress. Action and skill
|
||||
labels live in `src/i18n/labels.ts`, outside API clients. Local transient messages
|
||||
use `useLocalizedMessage` to retain keys and parameters across interface switches;
|
||||
API error strings and historical feedback remain original data.
|
||||
|
||||
The document language follows the selected interface language. Learning-language
|
||||
text retains its own `lang`/`dir` attributes; known curated task prompts retain
|
||||
German. Dates, counts and USD cost formatting use the selected UI locale without
|
||||
changing stored values. Switching the UI updates labels in place, preserving
|
||||
answers, unsaved form fields and active recording state. Current backend errors
|
||||
still need a future stable-code contract for full localization.
|
||||
|
||||
The API distinguishes the user's interface preference (`ui_language`) from the
|
||||
preferred explanation language (`instruction_language`) and the learner profile's
|
||||
`target_language`. Model input contracts still name the explanation language
|
||||
`ui_language` for compatibility, but receive `instruction_language` from the
|
||||
account. A UI-only PATCH preserves the active learning profile atomically.
|
||||
|
||||
Reviewed task variants now cover a twelve-task English-explanation pilot in the
|
||||
introductions module. `instruction`, a typed `stimulus` (target/source/context),
|
||||
option language/role and reference-answer language describe the new presentation.
|
||||
The original `prompt` remains for compatible clients and historical tasks.
|
||||
`variant_id`, `content_revision` and `canonical_task_id` are frozen in each assigned
|
||||
task. Curated German base entries remain unchanged. Module display labels can be
|
||||
derived from the reviewed variant package without modifying stored course packs.
|
||||
|
||||
Nine equivalent translations share their base canonical identity. Three adapted
|
||||
vocabulary/writing exercises use separate identities because same-language identity
|
||||
translations would disclose the answer. A frozen presentation uses the earliest
|
||||
existing assignment as its internal `evidence_task_id`; new equivalent variants
|
||||
reuse that identity for distinct-task counts and scripted pronunciation grouping.
|
||||
Historical snapshots and pronunciation records are not rewritten. Model outputs
|
||||
cannot declare these server-owned metadata fields.
|
||||
|
||||
`course_v2_jobs.instruction_language` captures the preference when enqueued,
|
||||
including idempotent request replays. Availability and inventory are scoped to
|
||||
target language, course version and explanation language. Unsupported bank variants
|
||||
raise an explicit error instead of falling back to a German reserve. Existing
|
||||
German exams remain resumable; new English exams are unavailable until the whole
|
||||
required bank coverage is reviewed. `course_variant_unavailable` is the first
|
||||
stable API error code translated by the frontend; other errors remain original.
|
||||
|
||||
Variant sources, build and audits are offline. Their own checksum-bound review and
|
||||
manifest are separate from the 840-entry baseline. Each additional language pair
|
||||
needs editorial review, including distractors, visible requirements and equivalence
|
||||
classification. New target languages also require complete course packs and
|
||||
verified speech capabilities; adding an interface catalog cannot enable them.
|
||||
|
||||
@@ -13,3 +13,48 @@ Core tables are created automatically by the Go API at startup:
|
||||
- `conversation_turns`
|
||||
|
||||
The MVP seeds `en-US` A1 lessons and exercises. Additional languages should be added by inserting a new `language_profiles` row and matching lessons/exercises.
|
||||
|
||||
## Language roles
|
||||
|
||||
- `learner_profiles.target_language`: language being learned; progress remains
|
||||
scoped by learner, target language and course version.
|
||||
- `users.ui_language`: interface preference; newly selected values are `de-DE`
|
||||
or `en-US` during the first rollout.
|
||||
- `users.instruction_language`: preferred explanation language. The additive
|
||||
startup migration copies the old `ui_language` only for rows without this
|
||||
field. New accounts default to `de-DE`; changing the interface never updates
|
||||
this field. Existing stored tasks and feedback keep their original language.
|
||||
|
||||
`PATCH /me/preferences` preserves omitted target language, level and daily goal.
|
||||
The profile update and interface preference are committed in one transaction.
|
||||
`GET /me` and auth responses expose both user language fields. The course also
|
||||
offers `PUT /course/instruction-language` for reviewed bank presentations; this changes no interface, target-language or learning-goal fields.
|
||||
|
||||
## Reviewed task presentations
|
||||
|
||||
`course_v2_bank_variants` stores immutable IDs, base-entry references, canonical
|
||||
identity, explanation language, revision, reviewed data and checksum. A partial
|
||||
unique index allows one active presentation per base entry/explanation language;
|
||||
retired rows remain for frozen assignments. `course_v2_tasks.variant_id` links new
|
||||
variant snapshots. Its assignment uniqueness includes the variant, allowing
|
||||
separate frozen language presentations. Original German bank entries and old
|
||||
assigned JSON remain unchanged.
|
||||
|
||||
New task JSON may include `instruction_language`, `instruction`, `stimulus`,
|
||||
`variant_id`, `content_revision`, `canonical_task_id`, option language/role and
|
||||
private reference-answer language. The compatible combined `prompt` remains.
|
||||
`Public(false)` still removes solutions and listening transcripts and always
|
||||
removes the internal `evidence_task_id`.
|
||||
|
||||
New equivalent presentations reuse the earliest matching owned assignment's
|
||||
`evidence_task_id` (or its ID for legacy snapshots). Graded attempts remain
|
||||
separate; distinct-task aggregation uses that identity. New scripted speech
|
||||
observations also use it for repetition grouping. Previously stored observations
|
||||
and historical attempt JSON are unchanged; this does not retrospectively dedupe
|
||||
all old exam copies. Adaptations have new canonical/evidence identities.
|
||||
|
||||
`course_v2_jobs.instruction_language` freezes the effective preference when the
|
||||
job is inserted. Startup fills this additive field once for older jobs; retries
|
||||
and request replays keep it. The pilot adds twelve English presentations, nine
|
||||
translations and three adaptations. Catalog inventory uses the selected
|
||||
explanation language, so the German total remains 840 and the pilot total is 12.
|
||||
|
||||
Reference in New Issue
Block a user