Skip to content

feat(mods): agent-facing text follows LICH_PROMPT_LANG (en, pt-BR) - #70

Merged
omartelo merged 2 commits into
mainfrom
prompt-language
Oct 10, 2026
Merged

omartelo merged 2 commits into
mainfrom
prompt-language

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

lich now has a prompt language setting (en, pt-BR) that is independent of its interface language, and exports it into every session as LICH_PROMPT_LANG (omartelo/lich#715, #723). Everything lich itself sends into a session already follows it. This PR makes the text the mods add for the agent follow it too.

  • hooks/prompt-text.js is one shared catalog: say(lang, key, vars) fills {name} slots, and promptLang(tag) maps the env value to a catalog language. An empty or unknown value falls back to English, the same as lich's prompt.Parse. Each hook reads $.env.get("LICH_PROMPT_LANG") itself, because the engine never follows $ across an import.
  • Translated: mod-control ask preamble; agent-cards backgrounded context, completed-result addendum, denies and TaskStop failure; edit-guard note; self-command skill/control notes, the /model//effort deny, and the queued notes.
  • Stay English: Successfully stopped task: …, which mirrors Claude Code's own TaskStop message and is pinned by a test; the opencode tool descriptions, which mirror lich's MCP tool descriptions (English in lich too); skills/theme; and toasts.
  • Literal in every locale, checked by tests: [lich], tool and command names, status enums, and the subagent/ prefix.

Tests: node --test tests/*.test.mjs 403/403 (new prompt-text.test.mjs covers key and slot parity, literals, fallback, the env read, and one pt-BR render per hook; no existing test touched). claude plugin test . 33/33.

The engine never follows $ across an import, so promptLang($) in
prompt-text.js kept every mod from loading (claude plugin test: 0/33).
promptLang now maps a plain LICH_PROMPT_LANG value to a catalog language
and each hook reads the env itself. Docs for agent-cards and self-command
name the language.
@omartelo
omartelo merged commit 30c164b into main Oct 10, 2026
3 checks passed
@omartelo
omartelo deleted the prompt-language branch October 10, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant