You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gui: the window's words come from a catalogue, so a second language can arrive
D9 gives this window translations and keeps the command line English forever.
The text package has been the seam for that since 2026-08-10, and there was
nothing underneath it: every word was a constant, so the language was chosen
when the binary was compiled.
Each of the 75 entries is now a lookup with its English beside it as the
default, and a catalogue is embedded with go:embed. English is written once, in
the code, next to the reason it is worded that way - en.json is that same
English written out again by tools/gen-locale.py so a translator has a complete
file to copy, and a guard holds the two together.
Nothing about the window changed: all 25 stored screens render byte for byte as
they did, without regenerating a single reference.
The library is go-i18n rather than the toolkit's wrapper around go-i18n, and
that is measured rather than preferred. fyne.io/fyne/v2/lang writes a
"Translation failure" line for every message missing from the system language
even when handed a fallback - 33 lines from building one screen on a machine
set to pl-PL, with correct English on the screen throughout. go-i18n answers
with the default and says nothing: the same measurement gives zero. It is not a
new module either. The toolkit already requires it, so go.sum did not move.
Not here yet, on purpose: asking the machine which language it wants, and a
switch in the window. Screens are built once so that a run in flight and
everything typed into a form survive moving between tabs, so changing language
without a restart is its own piece of work.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments