<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lectio.git/internal/i18n/gen_test.go, branch v0.46.0</title>
<subtitle>offline Catholic daily readings and liturgical calendar in Go, with CLI, TUI and web clients</subtitle>
<id>https://git.labunix.xyz/lectio.git/atom?h=v0.46.0</id>
<link rel='self' href='https://git.labunix.xyz/lectio.git/atom?h=v0.46.0'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/'/>
<updated>2026-07-28T17:03:15Z</updated>
<entry>
<title>i18n: make all UI chrome user-translatable via ui/&lt;code&gt;.ini</title>
<updated>2026-07-28T17:03:15Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-28T17:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=9100973576f87adcadaf6c8b331df7e729aeb117'/>
<id>urn:sha1:9100973576f87adcadaf6c8b331df7e729aeb117</id>
<content type='text'>
The interface chrome (version labels, TUI keybar/messages, CLI banner words,
web control labels, section-heading words) was English/Polish hardcoded in Go.
It is now data: the English and Polish tables ship as embedded lang/en.ini and
lang/pl.ini, and any language is user-overridable at &lt;config&gt;/ui/&lt;code&gt;.ini,
resolved per key with an English fallback. With ui_language = &lt;code&gt; plus a
names/&lt;code&gt;.ini, the WHOLE interface -- chrome, day names, saint names -- is
translatable without a rebuild.

- i18n.Get loads the embedded English baseline, overlays the embedded/user
  language file, caches per lang; field &lt;-&gt; INI-key mapping is by reflection
  (lang.go) so the tables and files stay in sync automatically. Edge-space
  values (e.g. "error: ") are double-quoted so the INI trim keeps them. The
  Go tables move to golden_test.go; TestGoldenMatchesEmbedded asserts the
  embedded files still parse back to them, and TestGenerateLangFiles
  regenerates them (LECTIO_GEN=1).
- config.UIDir(); wire i18n.SetUserDir in the CLI, TUI and web entry points.
- README/config: document ui/&lt;code&gt;.ini alongside names/&lt;code&gt;.ini.
</content>
</entry>
</feed>
