-
Notifications
You must be signed in to change notification settings - Fork 56
46 lines (39 loc) Β· 1.29 KB
/
update-l10n.yml
File metadata and controls
46 lines (39 loc) Β· 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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