Add translation .po file checks

This commit is contained in:
Chris Mayo 2021-11-22 19:30:33 +00:00
parent 0ff291d034
commit d99e600edd
3 changed files with 24 additions and 1 deletions

View file

@ -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

View file

@ -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
---------------------

View file

@ -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