feat(lang): resolve fallback language from config, not hardcoded #10
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/documentation
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type/refactor
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-core#10
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?
Problem
resolve_lang() currently falls back to hardcoded "en" when no locale
is found in ctx. This is a silent assumption that may not match the
operator's intent.
Background
Language resolution belongs in the wrapper/config layer, not in the
module. The module takes what ctx provides. A default fallback language
should come from config (e.g. fragjan.conf or the host project config),
not be hardcoded.
Current behaviour
os.getenv() calls were removed in the same cleanup pass (DAW/daw-modul-berhtjan-core#8).
Required changes
Context
Part of the broader i18n topic which needs a dedicated design pass.
This issue tracks the specific resolve_lang() gap only.
Acceptance criteria
Resolved as part of the 2.1 migration (v2.1.0).
lang.resolve_lang(ctx) no longer contains any hardcoded fallback
language. The resolution chain is now: ctx.user_locale ->
ctx.lang -> daw_error/v1 (no_language_resolvable). The host/adapter
resolves any default and puts it into ctx.lang before calling --
lang.lua itself invents nothing.
resolve_label() received the same treatment: a new default_lang
parameter (sourced from ctx.default_lang by callers), no hardcoded
'en', and no nondeterministic pairs() fallback either.