2004-09-20 09:02:49 +00:00
|
|
|
XGETTEXT := xgettext
|
2004-09-05 21:23:37 +00:00
|
|
|
MSGFMT := msgfmt
|
2003-08-11 09:43:47 +00:00
|
|
|
MSGMERGE := msgmerge
|
2004-09-05 21:23:37 +00:00
|
|
|
POSOURCES = $(shell find ../linkcheck -name \*.py) \
|
2020-06-05 15:06:01 +00:00
|
|
|
../linkchecker $(shell python3 -c 'import argparse; print(argparse.__file__)')
|
2004-09-03 09:24:58 +00:00
|
|
|
LDIR = ../share/locale
|
2004-09-05 20:52:03 +00:00
|
|
|
PACKAGE = linkchecker
|
2004-09-05 21:30:09 +00:00
|
|
|
TEMPLATE = $(PACKAGE).pot
|
2013-02-27 18:35:44 +00:00
|
|
|
MYMAIL := bastian.kleineidam@web.de
|
2004-09-03 09:24:58 +00:00
|
|
|
LFILE = LC_MESSAGES/$(PACKAGE).mo
|
2002-03-20 15:40:16 +00:00
|
|
|
# defined language (add new languages here)
|
2005-03-12 00:43:17 +00:00
|
|
|
LANGUAGES = de fr es
|
2020-05-18 11:32:28 +00:00
|
|
|
MOFILES = $(wildcard *.mo)
|
2000-11-02 12:19:54 +00:00
|
|
|
|
2014-09-08 16:25:03 +00:00
|
|
|
all: $(MOFILES)
|
2005-03-04 20:28:54 +00:00
|
|
|
|
2014-09-08 16:25:03 +00:00
|
|
|
%.mo: %.po
|
|
|
|
|
$(MSGFMT) -c --statistics -o $@ $<
|
2003-12-19 13:33:13 +00:00
|
|
|
|
2004-09-05 21:30:09 +00:00
|
|
|
%.po: $(TEMPLATE)
|
|
|
|
|
$(MSGMERGE) -U --suffix=.bak $@ $<
|
2000-11-02 12:19:54 +00:00
|
|
|
|
2004-09-20 09:02:49 +00:00
|
|
|
template: $(TEMPLATE)
|
2004-09-05 21:30:09 +00:00
|
|
|
$(TEMPLATE): $(POSOURCES)
|
2005-01-11 11:42:09 +00:00
|
|
|
$(XGETTEXT) -w 80 --default-domain=$(PACKAGE) --language=Python \
|
2005-01-10 20:36:37 +00:00
|
|
|
--copyright-holder="Bastian Kleineidam <$(MYMAIL)>" \
|
|
|
|
|
--msgid-bugs-address=$(MYMAIL) -o $(TEMPLATE) \
|
2004-12-07 22:35:42 +00:00
|
|
|
--keyword=_n:1,2 $(POSOURCES)
|
2000-11-02 12:19:54 +00:00
|
|
|
|
|
|
|
|
clean:
|
2004-09-05 21:30:09 +00:00
|
|
|
@for f in $(LANGUAGES); do rm -f $(LDIR)/$$f/$(LFILE); done
|
2004-11-29 21:52:02 +00:00
|
|
|
rm -f *.mo *.bak
|
2001-11-30 11:56:51 +00:00
|
|
|
|
2014-09-08 16:25:03 +00:00
|
|
|
.PHONY: clean
|