diff --git a/.github/workflows/check-translations.yml b/.github/workflows/check-translations.yml new file mode 100644 index 0000000..c25eed1 --- /dev/null +++ b/.github/workflows/check-translations.yml @@ -0,0 +1,24 @@ +name: Check translations + +on: + pull_request: + paths: + - "l10n/**" + push: + paths: + - "l10n/**" + schedule: + - cron: "0 2 * * SUN" + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.4.0 + + - name: Install dependencies + run: sudo apt -y update && sudo apt -y install gettext + + - name: Check translations + run: make check-translations diff --git a/Makefile b/Makefile index e523640..bacbac7 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,16 @@ translationfiles/%/pdfdraw.po: translationtool.phar pot l10n: translationtool.phar ./translationtool.phar convert-po-files +check-translations: l10n + @out=$$(git diff l10n); \ + if [ ! -z "$$out" ]; then \ + echo; \ + echo "Found unprocessed translations, need to update folder \"l10n\":"; \ + echo; \ + echo "$$out"; \ + exit 1; \ + fi + npm: package.json package-lock.json npm install