mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-20 09:01:39 -08:00
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
name: Locales
|
|
on: [push, pull_request]
|
|
jobs:
|
|
locale-check:
|
|
name: Locale check
|
|
runs-on: ubuntu-24.04
|
|
if: ${{ vars.APK_ONLY == '' }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Apt dependencies
|
|
uses: awalsh128/[email protected]
|
|
with:
|
|
packages: gettext
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install polib PyGithub
|
|
|
|
- name: Check that .po files are up to date
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
if [[ "${{github.ref}}" == 'refs/heads/master' ]] ; then
|
|
tools/check_po.py --manage-issues --github-repository "${{ github.repository }}" --github-token "${{ github.token }}"
|
|
elif [[ "${{github.base_ref}}" != "" ]] ; then
|
|
FILES=$(gh api repos/${{github.repository}}/pulls/${{github.event.pull_request.number}}/files | jq --raw-output '[.[].filename | select(. | startswith("locale/"))] | join(",")')
|
|
echo "Locale files changed by pull request: ${FILES}"
|
|
tools/check_po.py --fail-on "${FILES}"
|
|
else
|
|
tools/check_po.py
|
|
fi
|