-
Notifications
You must be signed in to change notification settings - Fork 1
[DOCS] Add docs translation script #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…fastapi_fastkit/cli.py via click package update
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this 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 AI-powered translation capabilities for the FastAPI-fastkit documentation, enabling automated translation to multiple languages (Korean, Japanese, Chinese, Spanish, French, and German) using OpenAI and Anthropic APIs.
Key Changes:
- Implements automated documentation translation system with AI API support
- Adds i18n structure setup for multi-language documentation
- Updates CLI to use non-deprecated Click API (
Commandinstead ofBaseCommand)
Reviewed Changes
Copilot reviewed 35 out of 66 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/translate.py | Core translation script with AI API integration and GitHub PR automation |
| scripts/update_nav_translations.py | Utility to update navigation translations in mkdocs.yml |
| scripts/translation_config.json | Configuration file for translation settings and supported languages |
| scripts/setup-i18n-structure.sh | Shell script to migrate docs to language-specific directories |
| docs/en/contributing/translation-guide.md | Comprehensive guide for contributing translations |
| .github/workflows/translate-docs.yml | GitHub Actions workflow for automated translation |
| mkdocs.yml | i18n plugin configuration with navigation translations |
| pyproject.toml | Added translation and docs dependencies |
| src/fastapi_fastkit/cli.py | Updated to use Command instead of deprecated BaseCommand |
| tests/test_cli_operations/test_cli.py | Enhanced test assertions and debugging for runserver command |
| CONTRIBUTING.md | Added translation contribution guidelines |
| env.example | Template for translation API keys |
| docs/{lang}/css, docs/{lang}/js, docs/{lang}/img | Symbolic links to shared assets |
Comments suppressed due to low confidence (5)
pyproject.toml:1
- The version constraint '>=1.3.0' may reference a non-existent version of mkdocs-static-i18n. As of January 2025, the latest stable version was around 1.2.x. Verify this version exists or adjust to a known stable version like '>=1.2.0'.
pyproject.toml:1 - The version '>=2.8.1' appears to be ahead of the OpenAI Python library versions available as of January 2025 (latest was around 1.x). Verify this version exists or use a constraint like '>=1.0.0'.
pyproject.toml:1 - The version '>=0.74.0' may not exist for the anthropic library as of January 2025. Verify the actual available versions and adjust the constraint accordingly.
pyproject.toml:1 - The version '6.0.12.20250915' contains a datestamp (20250915 = September 15, 2025) that is in the future relative to the current date (November 2025 stated in context, but this still seems incorrect). Verify the actual version or use a more recent valid version number.
scripts/translate.py:1 - The
docs_dirdefault value referencessource_langbefore it's defined in the dataclass field order. This will raise aNameError. Movesource_langfield beforedocs_diror use a default_factory with proper field reference.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Requesting Merging
Description
Add AI translation script
Type of Change
Test Environment
local, M1 Mac
Major Changes
Screenshots (optional)
Etc
close #26
update src/fastapi_fastkit/cli.py : BaseCommand -> Command via deprecation.
reference : https://click.palletsprojects.com/en/stable/changes/#version-8-2-0