linkchecker/po/Makefile
Chris Mayo 189cd35fdf Specify source encoding to xgettext
Default is ASCII.

xgettext: Non-ASCII string at ../linkcheck/htmlutil/srcsetparse.py:39.
          Please specify the source encoding through --from-code or through a comment
          as specified in http://www.python.org/peps/pep-0263.html.
2022-10-31 19:39:15 +00:00

34 lines
864 B
Makefile

XGETTEXT := xgettext
MSGFMT := msgfmt
MSGMERGE := msgmerge
POSOURCES = $(shell find ../linkcheck -name \*.py) \
$(shell python3 -c 'import argparse; print(argparse.__file__)')
PACKAGE = linkchecker
TEMPLATE = $(PACKAGE).pot
MYMAIL := bastian.kleineidam@web.de
BUGSURL = https://github.com/linkchecker/linkchecker
POFILES = $(wildcard *.po)
all: $(POFILES)
%.po: $(TEMPLATE)
$(MSGMERGE) -U --suffix=.bak $@ $<
template: $(TEMPLATE)
$(TEMPLATE): $(POSOURCES)
$(XGETTEXT) -w 80 --default-domain=$(PACKAGE) --language=Python \
--copyright-holder="Bastian Kleineidam <$(MYMAIL)>" \
--package-name=LinkChecker \
--from-code=UTF-8 \
--msgid-bugs-address=$(BUGSURL) -o $(TEMPLATE) \
--keyword=_n:1,2 $(POSOURCES)
check:
@for po in $(POFILES); do \
$(MSGFMT) -cv --statistics -o - $$po >/dev/null; \
done
clean:
rm -f *.bak
.PHONY: check clean