/usr/share/pyshared/MoinMoin/i18n/Makefile is in python-moinmoin 1.9.3-1ubuntu2.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | POFILES = $(wildcard *.po)
UPDATEPOFILES = $(POFILES:.po=.po-update)
NOPFILES = $(POFILES:.po=.nop)
DOMAIN = MoinMoin
.SUFFIXES: .po .po-update .nop
-include POTFILES
POTFILES.in POTFILES:
@python tools/mk_POTFILES.py
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.MoinMoin\.po-update$$//'`; \
echo "$$lang:"; \
tools/wiki2po.py $${lang}; \
echo "msgmerge $$lang.$(DOMAIN).po $(DOMAIN).pot -o $$lang.$(DOMAIN).new.po"; \
if msgmerge $$lang.$(DOMAIN).po $(DOMAIN).pot -o $$lang.$(DOMAIN).new.po; then \
if cmp $$lang.$(DOMAIN).po $$lang.$(DOMAIN).new.po >/dev/null 2>&1; then \
rm -f $$lang.$(DOMAIN).new.po; \
else \
tools/po2wiki.py $$lang <$$lang.$(DOMAIN).new.po; \
rm -f $$lang.$(DOMAIN).new.po; \
fi; \
else \
echo "msgmerge for $$lang.$(DOMAIN).po failed!" 1>&2; \
rm -f $$lang.$(DOMAIN).new.po; \
fi
# remove "--no-location" if you want to have file names and line numbers
# that's bad for merging branches - this is why we don't use it
$(DOMAIN).pot-update: $(POTFILES) POTFILES.in
xgettext --default-domain=$(DOMAIN) --directory=.. \
--files-from=POTFILES.in \
--no-location \
--add-comments=TRANSLATORS:
@test ! -f $(DOMAIN).po || { \
if test -f $(DOMAIN).pot; then \
sed -e 's/^"POT-Creation-Date: .*\"$$//' < $(DOMAIN).pot > $(DOMAIN).1po && \
sed -e 's/^"POT-Creation-Date: .*"$$//' < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).pot && \
mv $(DOMAIN).po $(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(DOMAIN).pot; \
fi; \
}
$(DOMAIN).pot: $(POTFILES) POTFILES.in
$(MAKE) $(DOMAIN).pot-update
$(POFILES):
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.MoinMoin\.po$$//'`; \
tools/wiki2po.py $${lang}; \
echo msgmerge $${lang}.$(DOMAIN).po $(DOMAIN).pot -o $${lang}.$(DOMAIN).new.po; \
msgmerge $${lang}.$(DOMAIN).po $(DOMAIN).pot -o $${lang}.$(DOMAIN).new.po; \
tools/po2wiki.py $${lang} <$$lang.$(DOMAIN).new.po; \
rm -f $$lang.$(DOMAIN).new.po
$(NOPFILES):
update-po: clean
$(MAKE) $(DOMAIN).pot-update
$(MAKE) $(UPDATEPOFILES)
stats:
@files="$(POFILES)"; \
for i in $$files; do \
lang=`echo $$i | sed -e 's,.*/,,' -e 's/\.MoinMoin\.po$$//'`; \
echo -n "$$lang: "; \
msgfmt -o /dev/null --statistics $$i; \
done
clean:
rm -f POTFILES POTFILES.in
|