Expand description
ssh-cli internationalization system (Rules Rust multi-idioma).
Provides bilingual Language with Message as the single source of
human UI strings. Locale detection / BCP47 negotiation lives in crate::locale.
§Design (agent-first one-shot)
- MVP locales: neutral
en+pt-BR(100% key parity via exhaustivematch). - Not Fluent FTL at runtime: size-sensitive CLI; compiler-enforced enum
translations are the embedded equivalent of
i18n-embedfor two locales. - JSON / agent wire: stable English field names and technical
crate::errors::SshCliErrorDisplay(not locale-dependent). - Human UX (success/status/cancel lines): always via
Message/t. - Optional top-20 locales: Cargo features
i18n-*(stubs until translations land).
§Precedence (see crate::locale)
- CLI
--lang→ 2. persisted XDGlang(locale set) → sys_locale→ 4.Language::English.
SSH_CLI_LANG is historical only — not read as a product store.
Enums§
- Language
- Languages supported by the internationalization system.
- Message
- All system UI messages.
- Text
Direction - Text direction for terminal rendering (LTR MVP; RTL reserved for
i18n-rtl).
Functions§
- current_
language - Returns the currently configured language.
- initialize_
language - Initializes i18n by resolving locale (5-layer precedence) and publishing
once to the global
crate::localeOnceLock. - t
- Returns the message string in the current global language.