Skip to content
Merged
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
65 changes: 0 additions & 65 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,68 +224,3 @@ jobs:
if: ${{ contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name) }}
run: |
git push


propagate_translations:
runs-on: ubuntu-latest
needs: [trigger, update]
permissions:
contents: read
strategy:
max-parallel: 4
fail-fast: false
matrix:
branch: ${{fromJson(needs.trigger.outputs.version_pairs)}}
language: ${{fromJson(needs.trigger.outputs.languages)}}

steps:
- name: Check out main
uses: actions/checkout@v5

- name: Check out branch ${{ matrix.branch.new }}
uses: actions/checkout@v5
with:
ref: ${{ matrix.branch.new }}
path: ${{ matrix.branch.new }}

- name: Check out branch ${{ matrix.branch.prev }}
uses: actions/checkout@v5
with:
ref: ${{ matrix.branch.prev }}
path: ${{ matrix.branch.prev }}

- name: Set up Python 3
uses: actions/setup-python@v5.6.0
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: |
requirements.txt

- name: Install Transifex CLI
working-directory: /usr/local/bin
run: |
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash -s -- v${{ env.TX_CLI_VERSION }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pomerge

- name: Merge ${{ matrix.language }} translations from ${{ matrix.branch.new }} into ${{ matrix.branch.prev }}
run: |
if test -d ${{ matrix.branch.prev }}/${{ matrix.language }}; then
shopt -s globstar
pomerge --from-files ${{ matrix.branch.new }}/${{ matrix.language }}/**/*.po --to-files ${{ matrix.branch.prev }}/${{ matrix.language }}/**/*.po
else
echo "Branch ${{ matrix.branch.prev }} has no lang code ${{ matrix.language }}."
fi

- name: Push ${{ matrix.language }} translations for Python ${{ matrix.branch.prev }} documentation to Transifex
if: ${{ github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true') }}
working-directory: ${{ matrix.branch.prev }}
run: |
tx push -t -l ${{ matrix.language }}
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}