Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge translations from newer branch #247

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading