Skip to content

feat: add --lang zh for Chinese CLI output#96

Open
xiaohui-zhangxh wants to merge 3 commits into
agent-ecosystem:mainfrom
xiaohui-zhangxh:feat/output-lang-zh
Open

feat: add --lang zh for Chinese CLI output#96
xiaohui-zhangxh wants to merge 3 commits into
agent-ecosystem:mainfrom
xiaohui-zhangxh:feat/output-lang-zh

Conversation

@xiaohui-zhangxh

Copy link
Copy Markdown

Summary

  • Add --lang zh / AFDOCS_LANG with an i18n catalog so check messages, scoring resolutions, and diagnostics can be emitted in Chinese (missing keys fall back to English)
  • Wire checks, resolutions, and diagnostics through t(), and update CLI docs plus unit tests
  • Fix prepare so Git installs build dist/, ensuring consumers get compiled output

Test plan

  • npm test (including test/unit/i18n/*) passes
  • afdocs check <url> --lang zh prints Chinese messages / resolutions / diagnostics
  • Default behavior (no --lang, or en) matches the previous English output
  • AFDOCS_LANG=zh and CLI --lang behave consistently
  • Installing from Git yields a usable package (dist/ present)

Made with Cursor

xiaohui-zhangxh and others added 3 commits July 22, 2026 14:54
Introduce an i18n catalog with en/zh strings and wire --lang / AFDOCS_LANG
through the CLI and runner so JSON messages, scoring resolutions, and
diagnostics can be emitted in Chinese with English fallback for missing keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
Consumers installing from GitHub need compiled dist/; keep husky only when .git exists.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop prepare-husky helper; developers can run husky locally.

Co-authored-by: Cursor <cursoragent@cursor.com>
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