Skip to content

FEAT-26: feat(i18n): take language beyond a one-sentence prompt hint #1957

Description

@gfargo

Category: distribution
Gap: language is implemented entirely by getLanguageContext (src/lib/langchain/utils/languageContext.ts), which returns the single sentence "Write the {task} in {language}." Only four handlers consume it (commit, changelog, recap, review) — amend does not, despite writing a commit message. All CLI chrome, --help text, error messages, TUI labels, footer hints, help overlay, idle tips, and surfaceStates.ts empty-state copy are hardcoded English.
Why it matters: The config key advertises localization the product doesn't have. A non-English team gets Spanish commit messages inside an entirely English UI, and gets English again the moment they run amend. Either deepen it or scope the key honestly.
Sketch: Two separable issues. (1) Consistency (S): thread getLanguageContext through src/commands/amend/handler.ts and any other generating handler, and add a test asserting every generation handler consumes it. (2) UI locale (M): introduce src/lib/i18n/ with a flat message catalog, migrate the highest-value strings first (surfaceStates.ts, inkKeymap.ts footer hints, help overlay sections, aiErrors.ts), keep English as the fallback, and add a lint rule against new inline user-facing literals in those files.
Already-there leverage: Empty-state and error copy is already centralized (surfaceStates.ts, aiErrors.ts, idleTips.ts, forgeNouns.ts) — the hard consolidation work is done, which is what makes catalog extraction tractable at all.
Effort notes / risks: Part 1 is S and should ship immediately as a standalone parity fix. Part 2 is M and will collide with every render snapshot test; it also affects fixed-width TUI layout, since translated strings are longer — layout.ts width budgeting assumes English lengths.


Extracted from a repo audit performed 2026-07 (the audit doc it came from was proposed via an unmerged docs PR).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions