Skip to content

Update crowdin/github-action action to v2.16.0 (#467) #396

Update crowdin/github-action action to v2.16.0 (#467)

Update crowdin/github-action action to v2.16.0 (#467) #396

Workflow file for this run

name: Update-l10n
on:
push:
branches: [master]
jobs:
update-l10n:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Python 🐍
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Restore pip cache πŸ’Ύ
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Babel 🌐
run: |
pip3 install -U pip
pip3 install Babel==2.9.0
- name: Update localization source file πŸ“„
run: |
pybabel extract bot.py pdf_bot/ -o locale/pdf_bot.pot
pybabel update -l locale -i locale/pdf_bot.pot -o locale/en_GB/LC_MESSAGES/pdf_bot.po
echo NUM_DIFFS=$(git diff --shortstat | egrep -o '[0-9]+ i' | egrep -o '[0-9]+') >> $GITHUB_ENV
- name: Create Pull Request πŸ†•
if: env.NUM_DIFFS > 1
uses: peter-evans/create-pull-request@v8
with:
commit-message: Update localization source file
branch: update/l10n-source-file
title: Update localization source file