Skip to content

Add Kazakh and complete CLI locales - #758

Draft
igorcosta wants to merge 5 commits into
mainfrom
cto/cli-locales-kk-20261112
Draft

igorcosta wants to merge 5 commits into
mainfrom
cto/cli-locales-kk-20261112

Conversation

@igorcosta

@igorcosta igorcosta commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Draft. Do not merge until Matt Palmer has reviewed the translations and Igor has given the go.

Summary

  • Kazakh (kk, Cyrillic) added.
    • Detected from LANG/LC_* (kk_KZ, kk-KZ, kk-Cyrl-KZ).
    • Listed in /language, the setup wizard and the LLM language instruction ("Kazakh (Қазақ тілі)").
    • Documented in docs/config-reference.md.
  • pt-BR, es, ko, ja, ru, kk now have every key in en.json.
    • Missing on main against the old 1,068-key en.json: pt-br 430, es 645, ko 424, ja 424, ru 639, kk had no file.
    • Missing now against the new 1,556-key en.json: 0 for all six.
    • Outdated translations were also refreshed. The main one is the telemetry disclosure, which still said "anonymous". Russian strings that had been left as English copies are now translated.
  • 487 hardcoded English strings moved into en.json and translated. For example, the --help text, all 97 slash command descriptions, setup wizard leftovers, and the trace consent options. The strings still in English are listed by file in a REMAINING list, which Igor can share.
  • Behaviour:
    • Slash command descriptions resolve when read. Before, 25 command modules called t() at import time, before the locale was known, so /help was always English.
    • Sign-in, setup and login/logout/account paths now apply the display language before printing anything.
    • No change to telemetry, protocol or LLM tool strings.
  • New helpers:
    • tPlural picks the plural form from CLDR rules via Intl.PluralRules.
    • formatList joins lists with the locale's own conjunction via Intl.ListFormat.
    • src/i18n/cliHelp.ts localizes commander help through configureHelp.

Tests

  • tests/i18n/localeCompleteness.test.ts fails if a published locale:
    • is missing an en.json key or has an empty value,
    • has keys that are not in en.json (plural forms are allowed),
    • has mismatched {{placeholders}},
    • or if a registered slash command has no description key.
  • I checked the test catches problems by deleting a key and breaking a placeholder in ko.json; it failed both times.
  • localizedSurfaces.test.ts covers plurals, list joining, slash descriptions changing with the locale, and localized --help.
  • Detector and LLM locale tests are extended for kk.
  • The setupWizard disclosure test now resolves keys back to English text.

Verification

  • Pinned Bun 1.4.2 lint, typecheck and build pass on corrected head 7fe6d5b5b6eb88e92d41f68bd29f8d8f58f4c7dc.
  • Locale/setup checks:257 tests pass. The exact previously reported blueprintAnswer/autoresearchLedger suites also pass26 tests on this host; this does not establish the cause of the earlier machine-specific failures.
  • CI exposed a status-bar snapshot regression. Local red replay confirmed the English hint changed from ESC to Esc; CI also captured an incomplete redraw. Preserve the existing English hint and wait for the actual unchecked Project row and complete footer before capture. The snapshot is unchanged; the real built-terminal regression passes in10.86 seconds.
  • Previous-head complete proof 43196336185 passes the actual bun run proof command at 7fe6d5b5b6eb88e92d41f68bd29f8d8f58f4c7dc with pinned Bun 1.4.2 and two terminal workers: lint, typecheck, build, 14,018 unit tests and 561 terminal tests pass. Platform/existing skips: 68 unit and 7 terminal. Corrected-head regular CI43196328377 also passes all unit/terminal shards, Windows terminal checks and all three platform builds; terminal compatibility43196328065 is green.
  • Current CLI main, including Enforce deny-all tool scope for ACP teachers #756 and Release Autohand Code 0.9.11 #759, is now integrated at cd6722fcf8451b75f342b104d2e81b87ff637a63. The two new delegated-agent settings labels are translated in all six named catalogs. The real completeness checks were red for those keys and now pass; locale/setup checks pass 257 tests, and lint/typecheck/build pass. Combined full proof43204684105 passes the actual bun run proof at that exact head with pinned Bun1.4.2, Node24 and two terminal workers: lint, typecheck, build, 14,330 unit tests and573 terminal tests pass (69unit/7terminal existing-platform skips). Regular CI43204684171 and native terminal compatibility43204684250 also pass. All21 actual built-CLI root/MCP/login help invocations pass across seven locales from fresh homes, with localized usage headings and no raw keys/placeholders. The earlier proof above remains separately identified as previous-head7fe6d5b. Native review of the translations, including these two labels, and Igor's go remain required.

Runtime QA

  • For each of the 7 locales, the built dist/index.js was run with LANG set. Captured:
    • --help, mcp --help, login --help,
    • the non-TTY "not signed in" error,
    • an in-process render of /help, the workspace trust prompt, permission prompt labels, modal hints, setup wizard lines, device-auth lines, the trace consent notice and errors.
  • Result:
    • No raw i18n keys. The single checker hit per locale is the literal --set ui.theme=aurora example.
    • No leftover {{placeholders}}.
    • Hangul, Japanese and Cyrillic (including Kazakh letters) render.
    • The only English left on those surfaces is flags, value lists, sample commands and product names.
  • Not covered: the interactive Ink setup wizard and a live device-auth round trip. Neither can be driven headlessly here, so they were rendered from the same keys in-process instead.

Review notes

  • Translations were machine-assisted first drafts. Every locale needs a native-speaker pass. Kazakh needs it most, since it had no prior translation.
  • Terms flagged for review include: pseudonymous, handoff, peers, hosted, composer. Kazakh also uses Cyrillic rather than Latin script.
  • Still English (to do in a follow-up):
    • /settings and /experiments labels,
    • shell completion text,
    • skills, hooks, goal and team command output,
    • slash subcommand descriptions.

Editorial follow-up (13 November)

Applied Matt Palmer's reviewed terminology on top of the existing 0.9.11 integration: the three remaining Japanese provider labels use プロバイダー, and the Portuguese detected-agent description uses “Encontrado: {agents}” for a single agent or a list. The approved Kazakh Cyrillic and pseudonymous wording was already present.

Validation: five new regressions failed before the catalog changes; all 186 locale checks and focused ESLint pass afterward. The repository-wide proof passed ESLint and typecheck, then reached Vitest and was stopped at its explicit 120-second bound without an aggregate summary. Full proof, build/Tuistory and release clearance are not claimed.

Matt's approval covers terminology and the 44-row samples, not every machine-assisted translation. A Kazakh native spot check remains advisable. This PR stays draft; no merge or release is requested by this update.

igorcosta and others added 2 commits November 12, 2026 22:41
Add kk (detected from kk_KZ), fill every missing key for pt-br, es, ko,
ja and ru, and move hardcoded --help, slash command, setup wizard,
sign-in, workspace trust and trace consent strings into en.json.
Slash command descriptions now resolve at read time. Adds a completeness
test for the published locales.
Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
@igorcosta igorcosta added the full-proof Run the complete lint, unit, build, and terminal proof on GitHub label Nov 12, 2026
igorcosta and others added 3 commits November 12, 2026 23:54
Translate the two new delegated-agent settings keys in the six catalogs covered by the locale completeness contract. Preserve the pending native translation review.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-proof Run the complete lint, unit, build, and terminal proof on GitHub

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant