6
#CATALOGS = $(addsuffix .po, LINGUAS)
8
MO_FILES = $(addsuffix .mo, $(LINGUAS))
7
MO_FILES = $(addsuffix .gmo, $(LINGUAS))
26
25
@echo " update-po - merge po files"
27
26
@echo " update-mo - regenerate mo files"
28
27
@echo " install - install mo files"
29
@echo " all - all of the above"
28
@echo " all - all of the above"
31
POTFILES = $(srcdir)/POTFILES.in \
32
$(shell cat $(srcdir)/POTFILES.in)
30
POTFILES = $(srcdir)/POTFILES \
31
$(shell cat $(srcdir)/POTFILES)
39
# FIXME: The parameter --from-code is only needed if your sources contain
40
# any 8 bit data (even in comments). UTF-8 is only a guess here, but it
41
# will at least accept any 8 bit data.
43
# The parameter "--language=perl" is not strictly needed because the
44
# source language of all our files will be auto-detected by xgettext
45
# by their filename extension. You should even avoid this parameter
46
# if you want to extract strings from multiple source languages.
47
38
$(TD).pot: $(POTFILES)
48
39
$(XGETTEXT) --output=$(srcdir)/$(TD).pox --from-code=utf-8 \
49
--add-comments=TRANSLATORS: --files-from=$(srcdir)/POTFILES.in \
40
--add-comments=TRANSLATORS: --files-from=$(srcdir)/POTFILES \
50
41
--copyright-holder="$(COPYRIGHT_HOLDER)" \
51
42
--msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \
52
43
--keyword --keyword='$$__' --keyword=__ --keyword=__x \
53
44
--keyword=__n:1,2 --keyword=__nx:1,2 --keyword=__xn:1,2 \
54
45
--keyword=__p:1c,2 --keyword=__np:1c,2,3 \
55
46
--keyword=__npx:1c,2,3 --keyword=N__ --keyword=N__n:1,2 \
56
--keyword=N__p:1c,2 --keyword=N__np:1c,2,3 --keyword=%__ \
47
--keyword=N__p:1c,2 --keyword=N__np:1c,2,3 --keyword=%__ && \
58
48
rm -f $@ && mv $(TD).pox $@
60
50
install: $(MO_FILES)
64
54
for lang in $$languages; do \
65
55
mkdir -p "$$targetdir/$$lang/LC_MESSAGES" || exit 1; \
66
56
dest="$$targetdir/$$lang/LC_MESSAGES/$(TD).mo"; \
68
58
echo "installing $$cat as $$dest"; \
69
59
cp -f $$cat $$dest && chmod 644 $$dest || exit 1; \