Expand description
Adaptive Card i18n primitives: extract translatable strings from cards and
drive greentic-i18n-translator to produce per-locale bundles. Each
consumer keeps its own high-level orchestration on top of these primitives.
Structs§
- Extract
Config - Configuration for i18n extraction.
- Extracted
String - An extracted translatable string.
Constants§
- TRANSLATOR_
BIN_ ENV - Explicit path override for the translator binary.
- TRANSLATOR_
DEV_ BIN_ ENV - Dev override for the translator binary.
Functions§
- extract_
from_ directory - Extract translatable strings from all cards in a directory.
- extract_
from_ value - Extract strings from a JSON value recursively.
- is_
translator_ available - Whether a translator binary can be located.
- resolve_
translator - Locate the translator: env override (
GREENTIC_I18N_TRANSLATOR_BINthen_DEV_BIN) if the pointed file exists, otherwise searchPATH. - to_
json_ bundle - Convert extracted strings to a JSON bundle format.
- translate_
to_ language - Translate one language. Runs
<translator> translate --langs <lang> --en <abs en> [--glossary <abs>] --auth-mode autoin a unique temp cwd (git initso codex-cli trusts it). The translator writes<lang>.jsonnext to--en. ReturnsErron spawn failure or non-zero exit. - write_
bundle - Write extracted strings to a JSON file.
- write_
manifest - Write
_manifest.json(sorted, deduped locale array, always incl."en").