define and consolidate language resolution across DAW modules #6
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type
bug
type
config
type
deployment
type
docs
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/daw-modul-berhtjan-cli#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Define how language resolution works across DAW modules and programs.
Current State
berhtjan-corehasresolve_lang(ctx)andresolve_label(label, lang).Usage is inconsistent -- some places call
resolve_label, others access.de/.endirectly. The rules for fallback order and howlangisdetermined from context are not formally defined.
Questions to Answer
langset and who owns it?{ en = ..., de = ... }or string?)resolve_labellive in core or common?Acceptance Criteria
resolve_label(no direct.de/.en)Additional finding: prompt.lua confirm()
The
confirm()function shows a hardcoded prompt string:out:write_raw(message .. " [j/n]: ")The
[j/n]suffix is language-specific and must be resolvedvia the language system once DAW/daw-modul-berhtjan-cli#6 is resolved.
Also:
prompt.luahas the sameoutmodule-level and missingresolve_labelissues as render.lua -- covered by DAW/daw-modul-berhtjan-cli#5.Partially resolved as part of the 2.1 migration (v2.1.0).
Done:
lang.lua's resolve_lang(ctx) -- ctx.user_locale -> ctx.lang ->
daw_error/v1 (no silent 'en' default anymore)
label text -- verified no direct .de/.en table access remains
anywhere in daw-modul-berhtjan-core or daw-modul-berhtjan-cli
invented by core or cli
Still open:
lang.lua's code comments and the migration docs, not a
referenceable standard
(the label format is an open key set, so technically yes, but
never stated as a decision)
system at all, including for daw_error/v1 messages and
daw-modul-berhtjan-cli's own hardcoded UI strings (see #5) -- is
unresolved and needs a dedicated discussion before this issue can
close.
Session 2026-08-11 — language work after v2.1.0
The language-resolution mechanics are implemented in v2.1.0, but the broader language-resource problem is intentionally left for a dedicated follow-up session.
Decisions already implemented
resolve_lang(ctx)owns language resolution:ctx.user_locale->ctx.lang->daw_error/v1; there is no hardcoded language fallback.resolve_label(label, lang, default_lang)is the single label-resolution path.default_langis supplied from above via context; berhtjan-core and berhtjan-cli do not fetch configuration from the host program.Remaining work in this existing issue
daw_error/v1errors while preserving the error object's language-neutral machine identity (source,code,data,cause).This work is cross-repository by nature: the eventual model must remain usable by core, CLI and future adapters (web/API/etc.) without modules reaching back into a host program for configuration.
Session 2026-08-12 -- daw_i18n/v1 contract created
The broader language-resource question left open in the previous
session (comment #7309: "how multilingual resources enter the running
system") has been worked through architecturally and resulted in a new
contract:
format for translatable text. UUID resource identity, mandatory
complete canonical English definition, optional partial
translations, named placeholders with set-equality across
languages, source_hash for staleness detection. Discovery, language
selection, fallback policy, and grammar (plural/gender/case) are
explicitly out of scope for v1.
While designing it, a related gap surfaced in daw_error/v1 and
daw_event/v1:
sourceonly identified a cell's type, not aconcrete running instance (e.g. two concurrent module_worker cells
were indistinguishable). Both contracts were updated accordingly:
sourceclarified: stable cell name/type (as used in mainjanhello.from), not instance identity.
cell_id(optional) added: concrete producing/responding cellinstance. Generation/persistence/lifecycle deliberately out of
scope -- tracked separately, see DAW/daw-contracts#4.
resource_id(optional) added: links to a daw_i18n/v1 resource.Must not appear without
message.objects).
All four contracts remain
status: draft.This issue's own scope
Not resolved here, still open:
whether/how berhtjan-core's existing
resolve_lang/resolve_labellabel model relates to daw_i18n/v1, and whether berhtjan-cli's own
hardcoded UI strings (#5) become daw_i18n/v1 resources -- is now
tracked in DAW/daw-modul-berhtjan-core#12 and
DAW/daw-modul-berhtjan-cli#11.
effectively superseded by daw_i18n/v1 itself now being that
reference for the error/event/resource side of things; whether this
issue's original acceptance criteria are still meaningful as written
should be reassessed against #11/#12's outcome.
Related follow-up issues
Team decision 2026-08-12 — language and i18n architecture
The architecture discussion started by this issue has resulted in a general DAW i18n model rather than a Berhtjan-specific translation mechanism.
Decisions
daw_i18n/v1JSON contract.resource_idvalues.coderemains the independent machine-readable semantic classification for errors/events.daw_i18n/v1.source_hash.daw_error/v1anddaw_event/v1can reference i18n resources throughresource_id.daw_event/v1may remain purely structured without human-readable text.daw_event_response/v1remains a structured response and does not gain i18n fields.Runtime identity clarification
During the same review,
sourcewas clarified as the stable cell name/type rather than the identity of a concrete cell instance.Optional
cell_idnow identifies the concrete cell instance in:daw_error/v1daw_event/v1daw_event_response/v1Cell identity generation, persistence, restoration, and lifecycle are intentionally outside these runtime contracts.
Follow-up issues
DAW/daw-lua-common#46— adopt updateddaw_error/v1DAW/daw-lua-net#10— adopt updateddaw_error/v1DAW/daw-modul-berhtjan-core#12— adoptdaw_i18n/v1and updateddaw_error/v1DAW/daw-modul-berhtjan-cli#11— adoptdaw_i18n/v1for CLI-owned UI stringsDAW/daw-contracts#4— define persistent cell identity and lifecycleDAW/daw-contracts#5— clarify compatibility wording vs. contract status modelThe contracts remain
draft. They are currently being integrated to test whether the architecture works in practice. Promotion tobeta/stableis reserved for actual productive use by a host program.This issue should remain open until the Berhtjan-specific implementation work has been completed and verified.