Skip to content

Commit e10e52a

Browse files
authored
Merge translations from newer branch (#247)
* Merge translations from newer branch * Add pomerge to requirements.txt * Exclude Language header field from git add
1 parent a4bb92c commit e10e52a

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/sync.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ jobs:
9898
env:
9999
TX_TOKEN: ${{ secrets.TX_TOKEN }}
100100

101+
- name: Merge translations from newer branch
102+
if: inputs.tx_project != 'python-newest' # python-newest doesn't have a newer branch
103+
run: |
104+
newer_branch=${PYDOC_VERSION%%.*}.$((${PYDOC_VERSION##*.}+1))
105+
git clone --depth 1 --single-branch --branch $newer_branch https://github.com/python/python-docs-pt-br ${newer_branch}-dir
106+
pomerge --from ./${newer_branch}-dir/**/*.po --to ./${{ env.LANGUAGE_DIR }}/**/*.po
107+
rm -rf ./${newer_branch}-dir
108+
101109
- name: powrap
102110
if: steps.pull.outcome == 'success'
103111
run: |

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pomerge==0.1.4
12
potodo==0.21.3
23
powrap==1.0.2
34
sphinx-intl==2.3.0

scripts/commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set -u
2020
git status -s | grep '^ D ' | cut -d' ' -f3 | xargs -r git rm
2121

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

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy