diff --git a/.github/workflows/sync-translations-fa.yml b/.github/workflows/sync-translations-fa.yml index 4c8ee406..037d2ab7 100644 --- a/.github/workflows/sync-translations-fa.yml +++ b/.github/workflows/sync-translations-fa.yml @@ -1,5 +1,6 @@ # Sync Translations — Farsi # On merged PR, translate changed lectures into the Farsi target repo. +# Comment \translate-resync on a merged PR to re-trigger sync. name: Sync Translations (Farsi) on: @@ -8,10 +9,14 @@ on: paths: - 'lectures/**/*.md' - 'lectures/_toc.yml' + issue_comment: + types: [created] jobs: sync: - if: github.event.pull_request.merged == true + 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: @@ -19,7 +24,7 @@ jobs: with: fetch-depth: 2 - - uses: QuantEcon/action-translation@v0.11.2 + - uses: QuantEcon/action-translation@v0.12.0 with: mode: sync target-repo: QuantEcon/lecture-python-programming.fa diff --git a/.github/workflows/sync-translations-zh-cn.yml b/.github/workflows/sync-translations-zh-cn.yml index 16cf6b4f..1829f791 100644 --- a/.github/workflows/sync-translations-zh-cn.yml +++ b/.github/workflows/sync-translations-zh-cn.yml @@ -1,5 +1,6 @@ # Sync Translations — Simplified Chinese # On merged PR, translate changed lectures into the zh-cn target repo. +# Comment \translate-resync on a merged PR to re-trigger sync. name: Sync Translations (Simplified Chinese) on: @@ -8,10 +9,14 @@ on: paths: - 'lectures/**/*.md' - 'lectures/_toc.yml' + issue_comment: + types: [created] jobs: sync: - if: github.event.pull_request.merged == true + 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: @@ -19,7 +24,7 @@ jobs: with: fetch-depth: 2 - - uses: QuantEcon/action-translation@v0.11.2 + - uses: QuantEcon/action-translation@v0.12.0 with: mode: sync target-repo: QuantEcon/lecture-python-programming.zh-cn