File tree Expand file tree Collapse file tree 2 files changed +78
-0
lines changed
Expand file tree Collapse file tree 2 files changed +78
-0
lines changed Original file line number Diff line number Diff line change 1+ name : 🌎 Pull translations
2+
3+ # TODO: uncomment this since when workflow is finalized
4+ # on:
5+ # schedule:
6+ # - cron: "5 1 * * *"
7+ # workflow_dispatch:
8+
9+ # TODO: remove following `on` config when workflow is finalized
10+ on :
11+ push :
12+ paths :
13+ - ' docker-app/qfieldcloud/locale/**'
14+ - ' .github/workflows/translations_pull.yml'
15+
16+ jobs :
17+ build :
18+ name : Pull translations
19+ runs-on : ubuntu-latest
20+
21+ env :
22+ TX_TOKEN : ${{ secrets.TX_TOKEN }}
23+
24+ steps :
25+ - name : Checkout code
26+ uses : actions/checkout@v4
27+
28+ - name : Install Transifex CLI
29+ run : |
30+ curl -OL https://github.com/transifex/cli/releases/download/v1.6.17/tx-linux-amd64.tar.gz
31+ tar -xvzf tx-linux-amd64.tar.gz
32+
33+ - name : Pull from Transifex
34+ run : ./tx pull -a --minimum-perc=50 --force
35+
36+ # temporary
37+ - name : Show pulled translation
38+ run : cat docker-app/qfieldcloud/locale/es/LC_MESSAGES/django.po
39+
40+ # TODO: uncomment this block when workflow is finalized
41+ # - name: Add and commit new translations
42+ # uses: EndBug/add-and-commit@v9
43+ # with:
44+ # message: Synchronize translations
45+ # author_name: Translation update 💬
46+ 47+ # add: '["docker-app/qfieldcloud/locale"]'
Original file line number Diff line number Diff line change 1+ name : 🌎 Update translations
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ paths :
8+ - ' docker-app/qfieldcloud/locale/**'
9+ - ' .github/workflows/translations_push.yml'
10+ jobs :
11+ build :
12+ name : Update translations
13+ runs-on : ubuntu-latest
14+
15+ env :
16+ TX_TOKEN : ${{ secrets.TX_TOKEN }}
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Install Transifex CLI
23+ run : |
24+ curl -OL https://github.com/transifex/cli/releases/download/v1.6.17/tx-linux-amd64.tar.gz
25+ tar -xvzf tx-linux-amd64.tar.gz
26+
27+ - name : Translate
28+ run : docker compose run --rm --user root app python manage.py makemessages -l es
29+
30+ - name : Push to Transifex
31+ run : ./tx push --source
You can’t perform that action at this time.
0 commit comments