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
+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.