Skip to content

Commit

Permalink
Merge translations from newer branch (#247)
Browse files Browse the repository at this point in the history
* Merge translations from newer branch

* Add pomerge to requirements.txt

* Exclude Language header field from git add
  • Loading branch information
rffontenelle authored Nov 25, 2024
1 parent a4bb92c commit e10e52a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ jobs:
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}

- name: Merge translations from newer branch
if: inputs.tx_project != 'python-newest' # python-newest doesn't have a newer branch
run: |
newer_branch=${PYDOC_VERSION%%.*}.$((${PYDOC_VERSION##*.}+1))
git clone --depth 1 --single-branch --branch $newer_branch https://github.com/python/python-docs-pt-br ${newer_branch}-dir
pomerge --from ./${newer_branch}-dir/**/*.po --to ./${{ env.LANGUAGE_DIR }}/**/*.po
rm -rf ./${newer_branch}-dir
- name: powrap
if: steps.pull.outcome == 'success'
run: |
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pomerge==0.1.4
potodo==0.21.3
powrap==1.0.2
sphinx-intl==2.3.0
Expand Down
2 changes: 1 addition & 1 deletion scripts/commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set -u
git status -s | grep '^ D ' | cut -d' ' -f3 | xargs -r git rm

# Add only updates that do not consist only of 'POT-Creation-Date' header change
git diff -I'^"POT-Creation-Date: ' --numstat *.po **/*.po | cut -f3 | xargs -r git add -v
git diff -I'^"POT-Creation-Date: ' -I'^"Language: pt_BR' --numstat *.po **/*.po | cut -f3 | xargs -r git add -v

# Add currently untracked PO files, and update other helper files
untracked_files=$(git ls-files -o --exclude-standard *.po **/*.po)
Expand Down

0 comments on commit e10e52a

Please sign in to comment.