2022-03-11 05:26:53 +00:00
|
|
|
name: localize
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [nightly]
|
2022-03-11 18:48:24 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'locale/**'
|
2022-03-11 05:26:53 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
localize:
|
|
|
|
name: Update Localization
|
2022-03-11 18:48:24 +00:00
|
|
|
if: ${{ github.event.pull_request.merged }}
|
2022-03-11 05:26:53 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install Python 3.9
|
|
|
|
uses: actions/setup-python@v3 # https://github.com/actions/setup-python
|
|
|
|
with:
|
|
|
|
python-version: '3.9'
|
|
|
|
|
|
|
|
- name: Set up Python 3.9 Dependencies
|
|
|
|
run: |
|
2022-03-11 18:48:24 +00:00
|
|
|
cd ./scripts
|
2022-03-11 05:26:53 +00:00
|
|
|
python -m pip install --upgrade pip setuptools
|
|
|
|
python -m pip install -r requirements.txt
|
|
|
|
|
|
|
|
- name: Set up xgettext
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -y && \
|
|
|
|
sudo apt-get --reinstall install -y \
|
|
|
|
gettext
|
|
|
|
|
|
|
|
- name: Update Strings
|
|
|
|
run: |
|
2022-03-11 18:48:24 +00:00
|
|
|
python ./scripts/_locale.py --extract --init --update
|
2022-03-11 05:26:53 +00:00
|
|
|
|
|
|
|
- name: GitHub Commit & Push # push changes back into nightly
|
|
|
|
uses: actions-js/push@v1.2
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: nightly
|
|
|
|
message: localization updated by localize workflow
|