Muttersprache koppeln und russischen A1-Kurs ergänzen

GUI und neue Erklärungen verwenden gemeinsam native_language. Deutsch und
Russisch sind die beiden Muttersprachen; Englisch bleibt die Lernsprache.
Kompatibilitätsfelder werden atomar gekoppelt, widersprüchliche Eingaben
abgewiesen und bestehende Profile sowie eingefrorene Inhalte erhalten.

Ergänzt vollständige russische GUI-Kataloge und 840 geprüfte Aufgabenansichten
in sieben Modulen einschließlich A1-Test, mit getrennten Sprachrollen für
Ausgangs- und Lernmaterial. Äquivalente Ansichten teilen ihre Nachweisidentität.
Stabile API-Fehlercodes, neue deterministische Hilfen und Trainingsbegründungen
berücksichtigen die Muttersprache. Dokumentiert das Sprachmodell in AGENTS.md.

Validierung: Go-Race-Suite mit eigener lokaler PostgreSQL-Testdatenbank, go vet,
Web-Build, Offline-Bank-/Variantenaudit, Diff-Prüfung sowie lokale Browser-Smokes
für Sprachen, Kurs, Administration, Aussprache und Aufnahme. Keine Live-Anbieter,
Produktionsprofile, Deployment-Schritte oder historischen Neubewertungen.
This commit is contained in:
Eugenius Naumenko
2026-11-07 17:02:17 +00:00
parent f3d42ee2b6
commit 16cceae28a
77 changed files with 46646 additions and 1969 deletions
+14 -21
View File
@@ -63,29 +63,22 @@ 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
## Muttersprache und Aufgabenvarianten
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).
Muttersprache bezeichnet gemeinsam Oberfläche und Erklärungen. Deutsch und Russisch
haben jeweils den vollständigen Bestand von 840 Englischaufgaben in sieben Modulen
und den internen A1-Test. Weitere Details: [README](../README.md#mehrsprachigkeit).
Die Sprachwahl löst keinen Modellaufruf aus und aktiviert keine Profile.
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.
Aufträge frieren die Muttersprache beim Einreihen ein. Aufgaben speichern Variante,
Revision, Kriterien und Lösung. Sprachwechsel verändern keine historischen Daten.
Äquivalente Übersetzungen teilen die Nachweisidentität; Versuche bleiben getrennt.
Ein Modell darf keine Varianten- oder Nachweisidentität setzen. Englische Lerntexte
und Azure-Messwerte bleiben unverändert. Fehlende Varianten führen zu einem
Verfügbarkeitshinweis, ohne deutschen Ersatz. Offene Antworten benötigen weiterhin
ein Bewertungsprofil oder bleiben unbenotet. Der alternative KI-Modus erhält die
Muttersprache über das kompatible Eingabefeld `ui_language`; seine fachliche
Live-Qualität ist durch Fixturetests nicht nachgewiesen.
## Standardbetrieb mit geprüftem Bestand
+30 -51
View File
@@ -31,59 +31,38 @@ Important boundaries:
## Multilingual Design
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.
There are exactly two roles: native language (interface and explanations together)
and target/learning language. Native catalogs are German and Russian; the complete
A1 learning course remains English. See [README](../README.md#mehrsprachigkeit).
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.
`users.native_language` is canonical. Legacy `ui_language` and
`instruction_language` fields are coupled aliases protected by a database check.
Registration and preferences reject conflicting aliases. Partial profile updates
preserve the active target, level and goal in one transaction. Migration derives
the initial native preference from supported legacy UI values, otherwise German.
Stored task snapshots, job locales, attempts, audio and feedback remain unchanged.
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.
Typed frontend catalogs cover all controls, formatting and Russian plural forms.
Transient messages retain translation keys; API errors expose stable codes.
Technical provider diagnostics stay original data. A native switch updates labels
without clearing answers, unsaved fields or an active recording.
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.
All 840 German base tasks have reviewed Russian presentations across seven modules
and six skills, including the twelve-question internal exam. Each presentation
separates instruction, stimulus role/language, option role/language and private
reference-answer language. English target media and answer IDs remain unchanged;
vocabulary meanings and short-writing source sentences are Russian. Combined
`prompt` is retained for compatibility. Module labels come from reviewed packages.
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.
Each Russian translation shares its base canonical identity. Frozen assignments
retain variant ID, revision and the earliest owned evidence identity. Distinct-task
counts and new scripted speech observations use the shared identity; attempts and
historical observations are not rewritten. Reviewed exam assignments also retain
these fields. Model outputs cannot declare server-owned evidence metadata.
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.
`course_v2_jobs.instruction_language` captures native language when enqueued;
retries/replays retain it. Existing English pilot variants are retired, not deleted
from databases. Missing packages fail explicitly rather than selecting German
reserves. Offline authored sources, checksum-bound review and audits accompany the
840 Russian translations. New target languages require separate complete course
packs and verified speech capabilities. No provider profile or budget is activated.
+15 -15
View File
@@ -16,19 +16,18 @@ The MVP seeds `en-US` A1 lessons and exercises. Additional languages should be a
## 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.
- `learner_profiles.target_language`: language being learned; evidence is scoped
by authenticated learner, target language and course version.
- `users.native_language`: shared GUI and explanation language (`de-DE`/`ru-RU`).
- `users.ui_language` and `users.instruction_language`: compatibility aliases,
constrained to equal `native_language`. No independent preferences remain.
`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.
`PATCH /me/preferences` accepts the canonical native field and preserves omitted
profile values atomically. Conflicting aliases fail before writes. Registration,
auth responses and `/me` expose the canonical field. The deprecated
`PUT /course/instruction-language` updates all aliases together. Initial migration
keeps supported old GUI values, otherwise selects German; task and attempt data
remain untouched. Repeated startup preserves the canonical preference.
## Reviewed task presentations
@@ -55,6 +54,7 @@ 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.
and request replays keep it. Both native languages provide 840 task presentations,
seven modules and the internal A1 exam. All Russian entries are translations with
shared base canonical IDs. Retired English pilot variants remain in existing
databases for frozen history but are no longer offered.