-
Notifications
You must be signed in to change notification settings - Fork 1k
Translated Stagehand docs into Chinese 🇨🇳 #1024
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
base: main
Are you sure you want to change the base?
Conversation
…41382851 [Locadex] Mintlify Documentation i18n Setup
|
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.
Greptile Summary
This PR adds comprehensive Chinese localization to the Stagehand documentation, creating a complete /zh
route structure that mirrors the English documentation. The changes include:
Core Infrastructure:
- Added
gt.config.json
configuration file for GeneralTranslation service with locale settings, experimental features, and URL pattern handling - Implemented
.github/workflows/translate.yml
GitHub workflow for automated translation on every commit to main - Updated
docs.json
to restructure navigation from a flat object to a languages array supporting both English (en
) and Chinese (zh
) locales - Added
LOCADEX_MINTLIFY.md
documentation explaining the internationalization setup
Translation Coverage:
The PR includes Chinese translations for the entire documentation structure (70+ files) covering:
- Getting started guides (
/zh/first-steps/
) - Core functionality documentation (
/zh/basics/
for act, extract, observe, agent) - Configuration guides (
/zh/configuration/
for browser, models, logging, observability, evals) - Best practices (
/zh/best-practices/
including caching, speed optimization, deployments, etc.) - Integration guides (
/zh/integrations/
for Vercel, LangChain, CrewAI, MCP) - API references (
/zh/references/
) - Shared components (
/zh/snippets/
)
Translation Approach:
The translations maintain technical accuracy by preserving all code examples, API calls, and technical identifiers in English while translating explanatory text, comments, and user-facing content to Chinese. Internal navigation links are properly localized with /zh/
prefixes, while external links remain unchanged. The translations use appropriate Chinese technical terminology and follow standard documentation localization practices.
Automation Setup:
The GitHub workflow integrates with GeneralTranslation service to automatically create pull requests with updated Chinese translations whenever the main branch is updated. This requires GT_PROJECT_ID
and GT_API_KEY
secrets to be configured in the repository settings.
Confidence score: 4/5
- This PR is generally safe to merge but requires careful setup of external dependencies
- Score reflects the comprehensive nature of translations and proper i18n structure, but lowered due to external service dependencies and a few technical issues in translated files
- Pay close attention to configuration files (gt.config.json), workflow permissions, and files with syntax errors in Python code comments
46 files reviewed, 23 comments
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Gt translate/main
Translated Stagehand docs into Chinese 🇨🇳
Almost all files in this PR are translated markdown files in the
/zh
route.Outside of these new translation files:
gt.config.json
which determines i18n settings. For example, whether/zh
is prefixed to the page url in the default language..github/workflows/translate.yml
) which will update translations on every commit to main.docs.json
to include localized sidebars under navigation and redirects.Next steps
Setting up continuous translation:
Troubleshooting
Failing to execute action:
Failing to create a PR: