feat: Implement auto-translation for README changes#9
Conversation
- Added `scripts/sync_translation.py` to sync English changes to Chinese README using OpenAI API. - Added `.github/workflows/translate.yml` to trigger translation on push to README.md. - The script detects new items and translates their descriptions while preserving formatting. - Uses `markdown-it-py` for parsing and `openai` for translation. Co-authored-by: pengqun <971005+pengqun@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Closing this for now rather than merging as-is. The goal is useful, but the current implementation is not safe enough for automated README_zh.md updates. In particular, it treats every markdown link as a sync candidate instead of only curated resource list items, so language-switch links, badges, TOC links, and other non-resource links can be inserted into the Chinese README. It also creates PRs with mock A safer replacement should be rebuilt with fixture tests around README/README_zh parsing, section-aware insertion, no-key/failure behavior, and markdown preservation before enabling automation. |
Implemented an automated workflow to sync changes from the English README to the Chinese version.
scripts/sync_translation.pythat parses both markdown files, identifies missing items in the Chinese version, and translates them using OpenAI's API..github/workflows/translate.ymlthat runs on pushes toREADME.md, executes the script, and creates a Pull Request with the translated changes.PR created automatically by Jules for task 15752758605819502052 started by @pengqun