Skip to content

ENH: add zh-cn translation sync workflow (Phase 0, Track A)#795

Merged
mmcky merged 1 commit into
mainfrom
add-sync-translations-zh-cn
Jul 18, 2026
Merged

ENH: add zh-cn translation sync workflow (Phase 0, Track A)#795
mmcky merged 1 commit into
mainfrom
add-sync-translations-zh-cn

Conversation

@mmcky

@mmcky mmcky commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Adds .github/workflows/sync-translations-zh-cn.yml, copying the proven lecture-python-programming pattern: on merged PRs touching lectures/, action-translation@v0 translates changed sections and opens a PR in QuantEcon/lecture-intro.zh-cn. Manual re-trigger via a \translate-resync issue comment.

Hold for sequencing — merge only after the target repo's onboarding lands (heading maps + .translate/ state bootstrap, per the connect-existing tutorial), so the first automated sync runs against a mapped, current baseline. Wiring order tracked in #782.

Secrets: ANTHROPIC_API_KEY and QUANTECON_SERVICES_PAT are available to this repo as org-level secrets (verified 2026-07-18).

Part of Phase 0 Track A (#782); program tracker QuantEcon/action-translation#74.

🤖 Generated with Claude Code

Copies the proven lecture-python-programming pattern: on merged PRs
touching lectures/, QuantEcon/action-translation@v0 translates changed
sections and opens a PR in QuantEcon/lecture-intro.zh-cn. Manual
re-trigger via a \translate-resync issue comment.

Pin follows the fr precedent (@v0 floats on the latest release,
currently v0.17.0). Part of the Phase 0 Track A wiring (#782).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 272ae6d
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6a5adb8c6ef85f000806a359
😎 Deploy Preview https://deploy-preview-795--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 18, 2026 01:57 Inactive
@mmcky
mmcky marked this pull request as ready for review July 18, 2026 05:40
Copilot AI review requested due to automatic review settings July 18, 2026 05:40
@mmcky
mmcky merged commit eea92c2 into main Jul 18, 2026
7 checks passed
@mmcky
mmcky deleted the add-sync-translations-zh-cn branch July 18, 2026 05:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds automation to keep the Simplified Chinese translation repo (QuantEcon/lecture-intro.zh-cn) in sync with English lecture changes by running QuantEcon/action-translation when lecture PRs are merged (and via a manual comment trigger).

Changes:

  • Introduces a new GitHub Actions workflow to run translation sync on merged PRs that touch lectures/.
  • Adds an issue_comment trigger intended to allow manual re-sync via \translate-resync.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +19
if: >
(github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '\translate-resync'))
with:
fetch-depth: 2

- uses: QuantEcon/action-translation@v0
Comment on lines +15 to +16
jobs:
sync:
Comment on lines +7 to +11
pull_request:
types: [closed]
paths:
- 'lectures/**/*.md'
- 'lectures/_toc.yml'
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.

2 participants