diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-05-12 17:31:50 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-05-12 17:31:50 +0200 |
| commit | 0dd14393d296d9a0915a978f83ac2057b7e4d711 (patch) | |
| tree | b721ce867c9b860ff54776aae59c350f149098fe /README.md | |
| parent | 3e09f3b6dc1484820658d07187096cda541fed46 (diff) | |
ki18n: add gettext CI check for missing translation keys
gettext now exits 1 when any key extracted from templates is absent from
a locale file. Added as a task and wired into the check task.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -15,14 +15,17 @@ ## ki18n -- [ ] Add gettext to CI - ### Setup 1. Call `ki18n.Init(localesFS)` at startup with a filesystem containing `<lang>/*.yml` translation files. Pass extra `ki18n.Locale` values to register additional languages. 2. Register `ki18n.LangMiddleware(...)` on your router, passing one or more strategies in priority order. -3. Run `go run github.com/martinlehoux/kagamigo/cmd/gettext -write` to generate translation files. +3. Run `go run github.com/martinlehoux/kagamigo/ki18n/cmd/gettext -write` to generate translation files. 4. Complete the generated files. +5. Add the check to CI — exits 1 if any translation key is missing from a locale file: + +```sh +go run github.com/martinlehoux/kagamigo/ki18n/cmd/gettext +``` ### Language detection strategies |
