diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53c3def6..b1425d20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -148,3 +148,17 @@ jobs: - name: Run ${{ matrix.toxenv }} run: python -m tox -e ${{ matrix.toxenv }} + + translations: + name: Check Translations + runs-on: ubuntu-latest + + steps: + - name: Git clone + uses: actions/checkout@v2 + + - name: Install dependency + run: sudo apt install -y gettext + + - name: Compile translations + run: for po in po/*.po; do msgfmt -cv --statistics -o - ${po} >/dev/null; done diff --git a/doc/translations.md b/doc/translations.md index 36bab4ee..63234891 100644 --- a/doc/translations.md +++ b/doc/translations.md @@ -13,6 +13,10 @@ is equivalent to: ``linkchecker/po $ make`` +Translation progress and validity can be monitored with: + +``linkchecker/po $ make check`` + Man Page Translations --------------------- diff --git a/po/Makefile b/po/Makefile index 1a941310..1638c3d3 100644 --- a/po/Makefile +++ b/po/Makefile @@ -27,8 +27,13 @@ $(TEMPLATE): $(POSOURCES) --msgid-bugs-address=$(MYMAIL) -o $(TEMPLATE) \ --keyword=_n:1,2 $(POSOURCES) +check: + @for po in $(POFILES); do \ + $(MSGFMT) -cv --statistics -o - $$po >/dev/null; \ + done + clean: @for f in $(LANGUAGES); do rm -f $(LDIR)/$$f/$(LFILE); done rm -f *.mo *.bak -.PHONY: clean +.PHONY: check clean