Files
ThothII/docs/adr/0046-separate-ui-locale-from-session-interaction-language.md
T
CodexandClaude Opus 5.5 8bd1f3e793
Publish documentation / publish (push) Successful in 29s
docs: retrofit domain docs to GLOSSARY.md and chronological ADRs
Align domain documentation with the mattpocock-skills v1.3.1 format.

- GLOSSARY.md (Italian) replaces CONTEXT.md and describes the implemented
  system (Phase F1–F8, Gate, Reviewer widget). The unimplemented 2026-08-23
  modular-workflow vocabulary (Workflow Kernel, Stage, Module outcome,
  Extension point, Question Admission, ...) is removed.
- docs/adr/ renumbered chronologically, in English, with status/date
  frontmatter. Retroactive decisions recovered from deleted specs and the
  Evidence ADRs deleted in a54d4769 are restored.
- docs/agents/domain.md regenerated; references updated across docs.

New ADRs:
  0001–0016  retroactive decisions, 2026-06-25 → 2026-08-20
  0017–0024  Evidence ADRs of 2026-08-24 (old 0001–0008, deleted in a54d4769)

Renumbered ADRs (old → new):
  0001 → 0025  postgres-metadata-catalog
  0002 → 0026  workspace-database-secret-references
  0003 → 0027  installation-local-database-bindings
  0004 → 0028  fastify-kysely-metadata-catalog
  0005 → 0029  hard-delete-catalog-tables-during-synchronization
  0006 → 0030  separate-physical-and-logical-relationships
  0007 → 0031  durable-authoritative-schema-synchronization
  0008 → 0032  allow-manual-catalog-metadata-cleanup
  0009 → 0033  use-one-sequential-description-generation-run
  0010 → 0034  allow-bounded-real-source-samples-for-description-generation
  0011 → 0035  gate-source-samples-with-a-sensitive-data-flag
  0012 → 0036  use-the-catalog-as-the-logical-relationship-authority
  0013 → 0037  use-one-installation-model-catalog-with-runtime-projections
  0014 → 0038  assess-sensitive-columns-locally-from-source-content
  0015 → 0039  use-progressive-sampling-for-sensitive-columns
  0016 → 0040  use-postgres-metadata-for-all-core-consumers
  0017 → 0041  separate-reference-vectors-from-runtime-memory
  0018 → 0042  use-postgres-for-memory-and-qdrant-for-retrieval
  0019 → 0043  author-evidence-in-app... → maintain-local-evidence-with-external-editors
  0020 → 0044  unify-administration-pages-and-use-namespaced-routes
  0021 → 0045  separate-shell-modes-and-replaceable-portal-adapter
  0022 → 0046  separate-ui-locale-from-session-interaction-language
  0023 → 0047  separate-delivery-operations-from-finalized-sessions

Commits and Gitea issues before this commit cite the old numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 22:23:25 +02:00

3.1 KiB

status, date
status date
accepted 2026-09-13

Separate UI locale from session interaction language

ThothII distinguishes three language concepts:

  • workspace.language remains the language of workspace-owned documents, descriptions and Evidence;
  • ui_locale controls deterministic ThothII chrome such as labels, form help, placeholders, errors, accessibility text and review-widget chrome;
  • interaction_language is persisted in a session and controls model-generated questions, explanations and reviewer proposals.

The initial locale catalog supports Italian and English and uses extensible BCP-47 language tags. Missing deterministic translations fall back to English. The selected UI locale supplies the default interaction language when a new session is created. A resumed session always uses its persisted interaction language; changing the host or full-shell UI locale must not silently rewrite an existing session or make its model output switch language mid-workflow.

The distinction is required because the current workspace contract already uses language for content and the PSD workspace is Italian. Reusing that field for a browser preference would make a visual choice mutate domain content semantics. The model receives the session interaction language through the session/Pi workflow context. SQL, identifiers, database values and other technical artifacts remain governed by their existing contracts and are not translated as UI strings.

In full, the local shell owns ui_locale and supplies it when starting a new session. In embedded, the host adapter is authoritative for ui_locale; ThothII applies host changes to deterministic UI immediately while preserving the interaction language of any active session.

We considered using only workspace.language, using only a global browser locale, and translating the model output after generation. The first conflates domain content with UI preference; the second cannot preserve a session's language or follow the host portal; and the third would be unsafe for structured reviewer decisions and would not control the model's reasoning or proposal language.

Considered Options

  • One mutable language field for workspace, UI and session was rejected because the fields have different owners and lifecycles.
  • Client-only translation of reviewer choices was rejected because choices can be generated by the model and must be requested in the intended language.
  • An English-only deterministic chrome was rejected because embedded and full installations must follow the selected host/user language.

Consequences

  • Session creation and the persisted manifest gain an explicit interaction-language value.
  • Legacy manifests without that value use the workspace language, pinned idempotently on first resume; the browser locale must not determine this compatibility value.
  • Resume must read that value from the manifest and must not accept a new locale as an override.
  • The workflow prompt contract and deterministic reviewer-widget builders need a locale-aware input.
  • Frontend strings need a catalog and stable keys; backend events should expose stable codes where the frontend is responsible for localization.