Skip to content

Add Chinese translation for docs and changelog generate imporve#34

Merged
OwenYou merged 6 commits intomainfrom
dev
Oct 21, 2025
Merged

Add Chinese translation for docs and changelog generate imporve#34
OwenYou merged 6 commits intomainfrom
dev

Conversation

@WheheoHu
Copy link
Collaborator

No description provided.

WheheoHu and others added 5 commits October 21, 2025 10:00
The language-switcher.html template and switcher.json were missing from
the previous commit because they were ignored by docs/.gitignore.

Changes:
- Remove _static/ and _templates/ from docs/.gitignore
- Add docs/_templates/language-switcher.html (custom navbar component)
- Add docs/_static/switcher.json (language switcher configuration)

This fixes the GitHub Actions build error:
"'language-switcher.html' not found"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@WheheoHu WheheoHu requested review from OwenYou and Copilot October 21, 2025 04:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Chinese (Simplified) translation support for the documentation and improves the changelog structure by migrating to a standardized markdown format.

Key changes:

  • Complete Chinese translation coverage for all documentation sections (user guide, quickstart, installation, API reference, contributing guide, and changelog)
  • Migration from ChangeLog.md to standardized CHANGELOG.md following Keep a Changelog format
  • Integration of Sphinx i18n/gettext infrastructure with language switcher UI component

Reviewed Changes

Copilot reviewed 21 out of 32 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Added i18n dependencies (myst-parser, sphinx-intl)
docs/locale/zh_CN/LC_MESSAGES/*.po Chinese translation catalogs for all documentation pages
docs/conf.py Configured Sphinx i18n settings and language switcher
docs/changelog.rst Refactored to include CHANGELOG.md via myst-parser
docs/contributing.rst Updated to document translation workflow and use uv commands
docs/Makefile Added i18n build targets (gettext, update-po, html-all, html-zh)
docs/_templates/language-switcher.html Language switcher dropdown component
docs/_static/switcher.json Language versions configuration
CHANGELOG.md New standardized changelog replacing ChangeLog.md
.github/workflows/docs.yml Updated to build all language versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Extended validation and error handling
- Additional utility functions for common workflows
.. include:: ../CHANGELOG.md
:parser: myst_parser.sphinx_
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected parser reference from 'myst_parser.sphinx_' to 'myst_parser.sphinx_parser'.

Suggested change
:parser: myst_parser.sphinx_
:parser: myst_parser.sphinx_parser

Copilot uses AI. Check for mistakes.
#: ../../../CHANGELOG.md:152
#, fuzzy
msgid "Changed"
msgstr "更新日志"
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The translation 'msgstr' for 'Changed' is incorrectly set to '更新日志' (which means 'Changelog'). The correct translation should be '变更' or '修改'. This error will cause the 'Changed' section header to display as 'Changelog' in Chinese.

Suggested change
msgstr "更新日志"
msgstr "变更"

Copilot uses AI. Check for mistakes.
@OwenYou OwenYou merged commit 327fe73 into main Oct 21, 2025
2 checks passed
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.

3 participants