Skip to content

CLI localization

The CLI is English by default. A small translation boundary exists so future contributors can localize user-facing strings without changing command logic.

Translations live in src/x_impersonation_guard/i18n.py:

t("first_run")
t("no_pending_candidates")

To add a language:

  1. Add a locale key to TRANSLATIONS.
  2. Keep English as the fallback source of truth.
  3. Add tests for any command output that uses the translated string.
  4. Avoid translating logs, config keys, JSON keys, or machine-readable output.

The initial scaffold includes Spanish examples only to demonstrate the pattern; full translation coverage is future work.