Skip to content

Commit 48f8eac

Browse files
Fixes to TX sample-workflow (#140)
* Fixes * Fix fix * Update transifex-pull.yml Co-authored-by: Rafael Fontenelle <[email protected]> * Quotes --------- Co-authored-by: Rafael Fontenelle <[email protected]>
1 parent 3e30fee commit 48f8eac

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

sample-workflows/transifex-pull.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
branches:
88
- '*'
99
workflow_dispatch:
10+
permissions:
11+
contents: write
1012

1113
jobs:
1214
update-translation:
@@ -32,14 +34,15 @@ jobs:
3234
with:
3335
ref: ${{ matrix.version }}
3436
fetch-depth: 0
35-
- run: curl https://raw.githubusercontent.com/python-docs-translations/transifex-automation/master/sample-workflows/transifex-util.py
36-
- run: ./manage_translation.py recreate_tx_config --language XX --project-slug python-newest --version 3.14
37+
- run: curl -O https://raw.githubusercontent.com/python-docs-translations/transifex-automations/master/sample-workflows/transifex-util.py
38+
- run: chmod +x transifex-util.py
39+
- run: ./transifex-util.py recreate_tx_config --language XX --project-slug python-newest --version 3.14
3740
env:
3841
TX_TOKEN: ${{ secrets.TX_TOKEN }}
39-
- run: ./manage_translation.py fetch --language XX --project-slug python-newest --version 3.13
42+
- run: ./transifex-util.py fetch --language XX --project-slug python-newest --version 3.14
4043
env:
4144
TX_TOKEN: ${{ secrets.TX_TOKEN }}
42-
- run: ./manage_translation.py delete_obsolete_files --language XX --project-slug python-newest --version 3.14
45+
- run: ./transifex-util.py delete_obsolete_files --language XX --project-slug python-newest --version 3.14
4346
- name: Set up Git
4447
run: |
4548
git config --local user.email [email protected]
@@ -48,7 +51,7 @@ jobs:
4851
run: |
4952
! git diff -I'^"POT-Creation-Date: ' \
5053
-I'^"Language-Team: ' \
51-
-I'^# ' -I'^"Last-Translator: ' \
54+
-I'^# ' -I'^"Last-Translator: ' \
5255
--exit-code \
5356
&& echo "SIGNIFICANT_CHANGES=1" >> $GITHUB_ENV || exit 0
5457
- run: git add .

sample-workflows/transifex-util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def fetch():
2525
sys.stderr.write("The Transifex client app is required.\n")
2626
exit(code)
2727
lang = LANGUAGE
28-
_call(f'tx pull -l {lang} --minimum-perc=1 --force --skip')
28+
_call(f'tx pull -l {lang} --force') # XXX Do we pull everything?
2929
for file in Path().rglob('*.po'):
3030
_call(f'msgcat --no-location -o {file} {file}')
3131

0 commit comments

Comments
 (0)