Skip to content

Commit

Permalink
Merge pull request #9187 from tk0miya/push_translations_automatically
Browse files Browse the repository at this point in the history
i18n: Sync translations on repo and transifex.com via GitHub Actions automatically
  • Loading branch information
tk0miya committed May 11, 2021
2 parents 71e7320 + 08c65d4 commit b0e2932
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/transifex.yml
@@ -0,0 +1,51 @@
name: Sync translations on repository and transifex.com

on:
schedule:
- cron: "0 0 * * SUN"
workflow_dispatch:

jobs:
push:
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: Push translations to transifex.com
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
4 changes: 0 additions & 4 deletions utils/release-checklist
Expand Up @@ -30,8 +30,6 @@ for first beta releases

* open "https://github.com/sphinx-doc/sphinx/actions?query=branch:master" and all tests has passed
* Run ``git fetch; git status`` and check nothing changed
* Run ``python setup.py extract_messages``
* Run ``(cd sphinx/locale; tx push -s)``
* ``python utils/bump_version.py X.Y.0b1``
* Check diff by ``git diff``
* ``git commit -am 'Bump to X.Y.0 beta1'``
Expand Down Expand Up @@ -83,8 +81,6 @@ for major releases

* open "https://github.com/sphinx-doc/sphinx/actions?query=branch:X.x" and all tests has passed
* Run ``git fetch; git status`` and check nothing changed
* Run ``(cd sphinx/locale; tx pull -a -f)``
* Run ``python setup.py compile_catalog``
* Run ``git add sphinx``
* Run ``git commit -am 'Update message catalogs'``
* ``python utils/bump_version.py X.Y.0``
Expand Down

0 comments on commit b0e2932

Please sign in to comment.