name: CI
on: [push, pull_request]

jobs:
  linux:
    name: Static linting
    runs-on: ubuntu-latest

    steps:
    - name: Install prerequisites
      run: sudo apt-get update && sudo apt-get install gettext

    - name: Checkout
      uses: actions/checkout@v3

    - name: Lint
      run: |
        SHELLSCRIPT_ERROR=0
        for file in $(git ls-files '*.po'); do
          msgfmt "${file}" || SHELLSCRIPT_ERROR=1
        done
        exit "${SHELLSCRIPT_ERROR}"
