Skip to content

refactor panel architecture to context+trait pattern and introduce json based i18n#7

Merged
DokaDev merged 26 commits intomainfrom
refactor/for-i18n
Mar 7, 2026
Merged

refactor panel architecture to context+trait pattern and introduce json based i18n#7
DokaDev merged 26 commits intomainfrom
refactor/for-i18n

Conversation

@DokaDev
Copy link
Owner

@DokaDev DokaDev commented Mar 7, 2026

#2

Fairly substantial rework of the internal architecture, along with a proper i18n system.

The old command.go was doing far too much, so that's been split out into separate controllers for migrations, generate, studio and clipboard. panel logic new follows a context+trait composition approach under pkg/gui/context. All that duplicated modal code has been pulled into a shared BaseModal. Colour helpers got their own home in pkg/gui/style, and the core interfaces like IContext and IKeybindings now live in pkg/gui/types.

For i18n, translations are loaded from embedded JSON files and merged on top of the English defaults using mergo. It picks up the system locale automatically from LC_ALL, LC_MESSAGES or LANG, and anything missing just falls back to English, German's in there as the first non English language.

Cleaned up some odds and ends as well. Got rid of leftover test utilities and commented out keybindings, fixed a dodgy format argument in the generate failure log, and sorted out a couple of runtime panic risks.

  • Bumped to v0.3.0 rather than a patch because this introduces a new user-facing capability, not just a bugfix.

This was linked to issues Mar 7, 2026
Closed
@DokaDev DokaDev self-assigned this Mar 7, 2026
@DokaDev DokaDev added the enhancement New feature or request label Mar 7, 2026
@DokaDev DokaDev merged commit 1cb278a into main Mar 7, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n refactor

1 participant