Skip to content

Commit eea92c2

Browse files
mmckyclaude
andauthored
ENH: add zh-cn translation sync workflow (Phase 0, Track A) (#795)
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>
1 parent 48659c2 commit eea92c2

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Sync Translations — Simplified Chinese
2+
# On merged PR, translate changed lectures into the zh-cn target repo.
3+
# Comment \translate-resync on a merged PR to re-trigger sync.
4+
name: Sync Translations (Simplified Chinese)
5+
6+
on:
7+
pull_request:
8+
types: [closed]
9+
paths:
10+
- 'lectures/**/*.md'
11+
- 'lectures/_toc.yml'
12+
issue_comment:
13+
types: [created]
14+
15+
jobs:
16+
sync:
17+
if: >
18+
(github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
19+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '\translate-resync'))
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v7
24+
with:
25+
fetch-depth: 2
26+
27+
- uses: QuantEcon/action-translation@v0
28+
with:
29+
mode: sync
30+
target-repo: QuantEcon/lecture-intro.zh-cn
31+
target-language: zh-cn
32+
source-language: en
33+
docs-folder: lectures
34+
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
35+
github-token: ${{ secrets.QUANTECON_SERVICES_PAT }}

0 commit comments

Comments
 (0)