Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-05-09 12:06:24 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-05-09 12:20:41 +0300
commit08c65d4de277d27fa3acc7068784a661bf6c68b3 (patch)
treecbbe422dec305855f658b2252ee07e479f5183f8 /.github
parenteffedafabe722a0032f8d1c0b744b7a98be4e26c (diff)
i18n: Pull translations via GitHub Actions automatically
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/transifex.yml30
1 files changed, 28 insertions, 2 deletions
diff --git a/.github/workflows/transifex.yml b/.github/workflows/transifex.yml
index 7fe54ff9a..3efae8ff2 100644
--- a/.github/workflows/transifex.yml
+++ b/.github/workflows/transifex.yml
@@ -1,4 +1,4 @@
-name: Push translations to transifex.com
+name: Sync translations on repository and transifex.com
on:
schedule:
@@ -6,7 +6,7 @@ on:
workflow_dispatch:
jobs:
- build:
+ push:
runs-on: ubuntu-latest
steps:
@@ -23,3 +23,29 @@ jobs:
run: cd sphinx/locale && tx push -s --no-interactive --parallel
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
+
+ pull:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ ref: 4.x
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ - name: Install dependencies
+ run: pip install -U babel jinja2 transifex-client
+ - name: Extract translations from source code
+ run: python setup.py extract_messages
+ - name: Pull translations to transifex.com
+ run: cd sphinx/locale && tx pull -a -f --no-interactive --parallel
+ env:
+ TX_TOKEN: ${{ secrets.TX_TOKEN }}
+ - name: Compile message catalogs
+ run: python setup.py compile_catalog
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v3
+ with:
+ commit-message: 'Update message catalogs'
+ branch: bot/pull-translations
+ title: Update message catalogs