summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-05-12 17:31:50 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-05-12 17:31:50 +0200
commit0dd14393d296d9a0915a978f83ac2057b7e4d711 (patch)
treeb721ce867c9b860ff54776aae59c350f149098fe /README.md
parent3e09f3b6dc1484820658d07187096cda541fed46 (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.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/README.md b/README.md
index 9e6cf5a..aa436a4 100644
--- a/README.md
+++ b/README.md
@@ -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