diff --git a/.github/workflows/sync-translations-fr.yml b/.github/workflows/sync-translations-fr.yml new file mode 100644 index 00000000..062ab664 --- /dev/null +++ b/.github/workflows/sync-translations-fr.yml @@ -0,0 +1,35 @@ +# Sync Translations — French +# On merged PR, translate changed lectures into the French target repo. +# Comment \translate-resync on a merged PR to re-trigger sync. +name: Sync Translations (French) + +on: + pull_request: + types: [closed] + paths: + - 'lectures/**/*.md' + - 'lectures/_toc.yml' + issue_comment: + types: [created] + +jobs: + sync: + if: > + (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '\translate-resync')) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 2 + + - uses: QuantEcon/action-translation@v0.16.0 + with: + mode: sync + target-repo: QuantEcon/lecture-python-programming.fr + target-language: fr + source-language: en + docs-folder: lectures + anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }} + github-token: ${{ secrets.QUANTECON_SERVICES_PAT }}