Add French translation sync workflow#574
Conversation
Merged PRs now translate changed lectures into lecture-python-programming.fr. Without this the French edition never tracks English — it was seeded and would sit frozen from the next merge onward. Copy of sync-translations-zh-cn.yml with the header, name, target-repo and target-language changed, plus the action pin. Pinned to @v0.16.0 (default model claude-sonnet-5) rather than the @v0.15.0 (claude-sonnet-4-6) its siblings use. Deliberate: French is the edition evaluated on Sonnet 5; fa and zh-cn have not been, and silently changing their model is not this PR's business. The repo runs two action versions until someone decides to move them. Requires QuantEcon/lecture-python-programming.fr#1 (the seed) to merge first.
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to keep the French translation repository in sync by automatically translating lecture changes when PRs are merged (plus an \translate-resync comment-based re-run mechanism).
Changes:
- Introduces
.github/workflows/sync-translations-fr.ymlto sync translations intoQuantEcon/lecture-python-programming.fr. - Pins
QuantEcon/action-translationtov0.16.0for the French sync workflow.
| if: > | ||
| (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || | ||
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '\translate-resync')) |
|
Closing as a duplicate of #573, which came first (and is yours). My mistake — I checked the workflows on The two files are byte-identical except the pin: #573 predates today's v0.16.0 release so it pins Everything else worth carrying over is in #573's thread. |
Adds
sync-translations-fr.yml, so merged PRs here also translate into the French edition. Without it,lecture-python-programming.frnever tracks English — it was seeded and would sit frozen from the next merge onward.The file is a copy of
sync-translations-zh-cn.ymlwith four changes — header comment, workflow name,target-repo,target-language— plus the action pin. Same triggers, same\translate-resynccomment escape hatch, same secrets already used by thefaandzh-cnworkflows.Pinned to @v0.16.0, unlike its siblings
The
faandzh-cnsync workflows pin@v0.15.0, which defaults toclaude-sonnet-4-6. This one pins@v0.16.0, released today, whose default isclaude-sonnet-5.That divergence is deliberate, not an oversight. French is the edition we've evaluated on Sonnet 5;
faandzh-cnhaven't been, and silently changing the model for two established editions isn't something this PR should do. The trade-off is that the repo temporarily runs two action versions — worth knowing when debugging, and worth revisiting once someone decides to move the other editions.Merge order
QuantEcon/lecture-python-programming.fr#1(the seed) should merge first. It adds the 26 translated lectures. If sync goes live against an empty target, the first merged PR here would try to sync into a repo with no lectures to update.What French sync will and won't do
It will translate changed lectures into
.frwith Sonnet 5 and open PRs there.It will not apply French typography.
action-translationv0.16.0 ships a deterministic pass for the non-breaking space French requires before; : ! ?, but it's wired into the CLI seed path only — not sync. The seeded French corpus is currently typography-correct; synced sections will not be, so the corpus will drift toward mixed typography until that's resolved. Tracked in QuantEcon/action-translation#81, withscripts/typography/apply.mjsavailable as a stopgap.Worth being precise about the severity: the defect is invisible. Both Sonnet 5 and Opus 4.8 already write
Bonjour !— they just emit an ordinary space where French wants U+00A0, which renders identically and only matters when a line wraps. Synced French will read correctly; it will be typographically imperfect.🤖 Generated with Claude Code