Skip to content

Commit c232895

Browse files
mmckyclaude
andcommitted
Seed the French edition: translation wiring (review/rebase workflows, .translate/config.yml)
Mirrors the fa target-repo setup (QuantEcon/lecture-python-programming.fa) with target-language: fr and tool-version pinned to 0.15.0. Content arrives via the translate init bulk bootstrap; sync wiring lands in the source repo. Part of the fr rollout tracked in QuantEcon/project-translation#3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 parents  commit c232895

5 files changed

Lines changed: 87 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Rebase Translation PRs
2+
#
3+
# Install this workflow in the TARGET (translated) repository.
4+
# When a translation-sync PR is merged, this workflow automatically
5+
# rebases other open translation-sync PRs against the updated main branch.
6+
#
7+
# This eliminates merge conflicts caused by multiple upstream PRs
8+
# modifying the same files. See: https://github.com/QuantEcon/action-translation/issues/63
9+
#
10+
# Place this file at: .github/workflows/rebase-translations.yml
11+
12+
name: Rebase Translation PRs
13+
14+
on:
15+
pull_request:
16+
types: [closed]
17+
18+
jobs:
19+
rebase:
20+
# Only run when a translation-sync PR is merged
21+
if: >
22+
github.event.pull_request.merged == true &&
23+
startsWith(github.event.pull_request.head.ref, 'translation-sync-')
24+
runs-on: ubuntu-latest
25+
26+
permissions:
27+
contents: write
28+
pull-requests: write
29+
30+
# Prevent concurrent rebases from overlapping
31+
concurrency:
32+
group: rebase-translations
33+
cancel-in-progress: false
34+
35+
steps:
36+
- name: Rebase open translation PRs
37+
uses: QuantEcon/action-translation@v0.15.0
38+
with:
39+
mode: rebase
40+
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Review Translations — Quality check on translation PRs
2+
# When a PR is opened/updated that carries the 'action-translation' label,
3+
# this workflow runs a quality review and posts a comment.
4+
name: Review Translations
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, labeled, reopened]
9+
10+
jobs:
11+
review:
12+
if: contains(github.event.pull_request.labels.*.name, 'action-translation')
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 2
19+
20+
- uses: QuantEcon/action-translation@v0.15.0
21+
with:
22+
mode: review
23+
source-repo: QuantEcon/lecture-python-programming
24+
source-language: en
25+
target-language: fr
26+
docs-folder: lectures
27+
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
28+
github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_build/
2+
__pycache__/
3+
.DS_Store
4+
dask-worker-space
5+
6+
.vscode/
7+
.ipynb_checkpoints/
8+
.virtual_documents/
9+
10+
lectures/mathfoo.py
11+
lectures/mod.py
12+
lectures/test.py

.translate/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source-language: en
2+
target-language: fr
3+
docs-folder: lectures
4+
tool-version: 0.15.0

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# lecture-python-programming.fr
2+
Lecture Python Programming (French - fr)

0 commit comments

Comments
 (0)