Skip to content

Run powrap in ci.yml (#1) #17

Run powrap in ci.yml (#1)

Run powrap in ci.yml (#1) #17

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
env:
LANGUAGE: pt_BR
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: true
submodules: true
- name: Update submodule
run: |
git submodule update
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
**/requirements*.txt
- name: Install gettext
run: |
sudo apt update -y && sudo apt install gettext -y
- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -r requirements.txt -r peps/requirements.txt
- name: Patch build.py to add --gettext flag
run: |
git apply ../add-gettext-builder.diff
working-directory: peps
- name: Generate POT files
run: |
python build.py --gettext
working-directory: peps
- name: Add/Update message catalog files
run: |
sphinx-intl update -d ../locales -p build/ -l ${{ env.LANGUAGE }}
working-directory: peps
- name: powrap
run: |
powrap locales/${{ env.LANGUAGE }}/LC_MESSAGES/*.po
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Translation update"
file_pattern: .gitmodules locales/${{ env.LANGUAGE }}/LC_MESSAGES/*.po
add_options: '-A'