feat(i18n): Migrate translation workflow to Claude Code GitHub Actions#30692
feat(i18n): Migrate translation workflow to Claude Code GitHub Actions#30692crazywoola merged 23 commits intomainfrom
Conversation
- Replace Bing translate with Claude Code Action - Support three change scenarios: ADD, UPDATE, DELETE - Include lint:fix step for JSON key sorting - Update pnpm-lock.yaml after removing bing-translate-api Deleted: - web/scripts/auto-gen-i18n.js - .github/workflows/translate-i18n-base-on-english.yml Added: - .github/workflows/translate-i18n-claude.yml Modified: - web/package.json (removed i18n:gen, bing-translate-api) - web/i18n-config/README.md - web/pnpm-lock.yaml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @lyzno1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request overhauls the project's internationalization (i18n) pipeline by replacing the legacy Bing Translate integration with a more advanced and maintainable solution utilizing Claude Code GitHub Actions. The change aims to enhance translation quality and streamline the localization process through intelligent detection of content changes, automated translation, and comprehensive verification steps, providing a more robust and efficient system for managing multilingual content. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR replaces the Bing Translate-based i18n automation with Claude Code GitHub Actions for improved translation quality and workflow flexibility.
Key Changes
- Removed the legacy Bing Translate script and npm dependency
- Introduced a new Claude Code workflow with incremental and full sync modes
- Enhanced change detection to distinguish between ADD, UPDATE, and DELETE operations
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| web/scripts/auto-gen-i18n.js | Deleted legacy Bing Translate translation script |
| web/package.json | Removed i18n:gen script and bing-translate-api dependency |
| web/i18n-config/README.md | Updated documentation to reflect Claude Code workflow |
| .github/workflows/translate-i18n-claude.yml | New Claude Code workflow with three-phase sync approach |
| .github/workflows/translate-i18n-base-on-english.yml | Deleted old Bing Translate workflow |
Files not reviewed (1)
- web/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request successfully migrates the internationalization workflow from a custom Bing Translate script to a more maintainable Claude Code GitHub Action. The changes are well-contained, removing old scripts, dependencies, and updating documentation. The deletion of the old auto-gen-i18n.js script and its associated i18n:gen command and bing-translate-api dependency is clean. I have one suggestion for improving the documentation to ensure it fully aligns with the new workflow's capabilities as described in the PR summary.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Add PHASE 4: COMMIT AND CREATE PR instructions - Configure git user for commits - Add timeout_minutes parameter 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow Claude to use git and gh commands for PR creation: - Bash(git:*) - git operations - Bash(gh:*) - GitHub CLI for PR creation - Bash(pnpm:*) - package manager commands - Read,Write,Edit,Glob,Grep - file operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace custom GH_TOKEN env with official github_token input: - github_token is the official parameter per action.yml - Action automatically sets GITHUB_TOKEN and GH_TOKEN internally - Remove unnecessary use_oauth parameter 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pnpm is not pre-installed on GitHub ubuntu runners. Add pnpm/action-setup and setup-node before Claude Code action. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove --model claude-sonnet-4-5-20250929 as it's not a valid model identifier. Let Claude Code Action use its default model instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Temporary change to test workflow in PR CI. Will be reverted after testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update actions/checkout to v6 - Update actions/setup-node to v6 - Add test key to en-US/app.json to trigger workflow - Will be reverted after testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Revert "test(i18n): add pull_request trigger for CI testing" This reverts commits 7130bbe and 7051d96. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update actions/checkout from v4 to v6 - Update actions/setup-node from v4 to v6 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 228dc7d.
- Add PR event handling with correct base/head SHA references - Handle edge case when github.event.before is null/zero SHA - Replace `cd web && pnpm` with `pnpm --dir web` for allowedTools compatibility - Remove unnecessary Bash(cd:*) from allowedTools 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unsupported timeout_minutes parameter - Add tool restrictions: use Read/Edit instead of cat/bash scripts - Add efficiency rules: batch edits per language file - Instruct Claude to insert keys at beginning, let lint:fix sort - Split combined git commands to run one by one - Update allowedTools syntax for better matching - Increase max-turns to 150 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove pull_request trigger (was for testing) - Remove PR event handling code - Remove _test_ci_trigger test key from en-US/app.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add important rule: if zh-Hans or ja-JP files were also modified in the same push, skip UPDATE operations for those languages to preserve manual translations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of blindly skipping, apply smarter rules for manually modified files: - Missing keys: still ADD them (completeness required) - Existing translations: only update if completely wrong/unrelated - Keep manual translations if roughly correct (respect human work) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| When reviewing PRs that modify en-US i18n values (UPDATE scenarios), reviewers must ensure that translation sync CI has run successfully or that corresponding translations are updated in the same PR. |
Summary
Closes #30691
Replace the existing Bing Translate-based i18n workflow with Claude Code GitHub Actions for better translation quality and maintainability.
Changes
Deleted
web/scripts/auto-gen-i18n.js- Old Bing translate script.github/workflows/translate-i18n-base-on-english.yml- Old workflowAdded
.github/workflows/translate-i18n-claude.yml- New Claude Code workflowModified
web/package.json- Removedi18n:genscript andbing-translate-apidependencyweb/i18n-config/README.md- Updated documentationweb/pnpm-lock.yaml- Updated after removing dependencyFeatures
Three Change Scenarios Covered
+lines + i18n:check missing keys-and+lines-lines + i18n:check extra keysTrigger Methods
mainbranch with changes toweb/i18n/en-US/*.jsonworkflow_dispatchwith configurable:files: Specific files to translatelanguages: Specific target languagesmode:incremental(default) orfullThree-Phase Approach
lint:fix(for JSON key sorting) +i18n:checkTest Plan
fullmode to verify all keys sync🤖 Generated with Claude Code