render: fix out scope, use resolve_label, remove hardcoded strings #5
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#5
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?
Findings
1.
outcreated at module leveldawio.new()is called at module level, not per function call.This prevents handle injection via
sys.new(opts)which is theintended mechanism for testability.
Fix: move
local out = dawio.new()inside each render function,or accept an optional
outparameter.2.
core.resolve_labelnot usedrender_formresolves labels manually:group.label.de or group.label.en or group_iddispatch.luausescore.resolve_labelfor this.render.luashould do the same -- requires addingrequire("daw.berhtjan_core")at the top level.3. Hardcoded German string
out:write("(keine Eintraege)")inrender_tableis hardcoded German.Must be resolved via
core.resolve_labelonce #2 is fixed.Acceptance Criteria
outcreated per function call or passed as parameterrequire("daw.berhtjan_core")added at top levelcore.resolve_labelused for all label resolutionPartially resolved as part of the 2.1 migration (v2.1.0).
Done:
(with the new default_lang parameter) -- no more manual
group.label.de or group.label.en fallback
Still open, not addressed by this migration:
in _check_sys()), not per function call or injectable via an
opts parameter -- the original testability concern in this issue
is unresolved. Our own tests work around this with the registry-
reset technique (see test/test_berhtjan-cli.lua), which confirms
the underlying limitation is still there.
literal.
Turns out this is bigger than originally scoped: '(keine
Eintraege)' isn't the only hardcoded UI string in this repo --
dispatch/display.lua has 'Available commands:' and 'Subcommands for
...:' hardcoded in English, inconsistently (some German, some
English, no i18n layer for any of it). This is a systematic gap,
not a single string to fix, and ties into #6 and a broader question
about how translations enter the system at all (daw_error/v1's
message field is explicitly non-localized too). Left open pending
that discussion rather than patching one string in isolation.
Session 2026-08-11 — 2.1 migration closeout
The v2.1.0 migration resolved the label-resolution part of this issue, but the issue remains open for the work that was explicitly left unfinished.
Done in v2.1.0
render_form()usescore.resolve_label(label, lang, default_lang)..de/.enlabel access and the silent group-id fallback were removed.daw_error/v1.Still in scope of this existing issue
outinstance. This must remove the need for registry/module reload tricks in tests solely to replaceio.stdin/io.stdout.Acceptance criteria remaining
fragjan code .remains green.Cross-reference: #6 owns the unresolved language-resource architecture used by the hardcoded-string part of this issue.