Skip to content

Add French translation sync workflow#574

Closed
mmcky wants to merge 1 commit into
mainfrom
feat/sync-translations-fr
Closed

Add French translation sync workflow#574
mmcky wants to merge 1 commit into
mainfrom
feat/sync-translations-fr

Conversation

@mmcky

@mmcky mmcky commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Adds sync-translations-fr.yml, so merged PRs here also translate into the French edition. Without it, lecture-python-programming.fr never tracks English — it was seeded and would sit frozen from the next merge onward.

The file is a copy of sync-translations-zh-cn.yml with four changes — header comment, workflow name, target-repo, target-language — plus the action pin. Same triggers, same \translate-resync comment escape hatch, same secrets already used by the fa and zh-cn workflows.

Pinned to @v0.16.0, unlike its siblings

The fa and zh-cn sync workflows pin @v0.15.0, which defaults to claude-sonnet-4-6. This one pins @v0.16.0, released today, whose default is claude-sonnet-5.

That divergence is deliberate, not an oversight. French is the edition we've evaluated on Sonnet 5; fa and zh-cn haven'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 .fr with Sonnet 5 and open PRs there.

It will not apply French typography. action-translation v0.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, with scripts/typography/apply.mjs available 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

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.
Copilot AI review requested due to automatic review settings July 15, 2026 00:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.yml to sync translations into QuantEcon/lecture-python-programming.fr.
  • Pins QuantEcon/action-translation to v0.16.0 for the French sync workflow.

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'))
@github-actions

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request July 15, 2026 00:46 Inactive
@mmcky

mmcky commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #573, which came first (and is yours). My mistake — I checked the workflows on main, saw no sync-translations-fr.yml, and concluded French sync wasn't wired up without checking for an open PR that already did it.

The two files are byte-identical except the pin: #573 predates today's v0.16.0 release so it pins @v0.15.0 (default model claude-sonnet-4-6); mine pinned @v0.16.0 (claude-sonnet-5). #573 just needs that one-line bump.

Everything else worth carrying over is in #573's thread.

@mmcky mmcky closed this Jul 15, 2026
@mmcky mmcky deleted the feat/sync-translations-fr branch July 15, 2026 00:47
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