This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
2005-05-04 14:57:48 +02:00
|
|
|
POFILES=$(wildcard *.po)
|
|
|
|
MOFILES=$(POFILES:.po=.mo)
|
2007-03-12 16:55:00 +01:00
|
|
|
PYFILES=$(shell find -L ../authentic -name '*.py' -or -name '*.ptl')
|
2005-05-04 14:57:48 +02:00
|
|
|
|
|
|
|
all: $(MOFILES)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
for file in $(MOFILES); do \
|
|
|
|
lang=`echo $$file | sed 's/\.mo//'`; \
|
|
|
|
install -d $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/; \
|
|
|
|
install -m 0644 $$file $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/authentic.mo; \
|
|
|
|
done
|
|
|
|
|
|
|
|
authentic.pot: $(PYFILES)
|
|
|
|
@echo "Rebuilding the pot file"
|
|
|
|
rm -f authentic.pot tmp.*.pot
|
|
|
|
cnt=0;
|
|
|
|
for file in $(PYFILES); do \
|
|
|
|
cnt=$$(expr $$cnt + 1); \
|
|
|
|
bn=$$cnt.`basename $$file`; \
|
|
|
|
xgettext --keyword=N_ -c -L Python -o tmp.$$bn.pot $$file; \
|
|
|
|
done
|
|
|
|
msgcat tmp.*.pot > authentic.pot
|
|
|
|
rm tmp.*.pot
|
|
|
|
|
|
|
|
%.mo: %.po
|
|
|
|
msgfmt -o $@ $<
|
|
|
|
|
|
|
|
%.po: authentic.pot
|
|
|
|
@echo -n "Merging authentic.pot and $@"
|
2011-05-06 16:31:58 +02:00
|
|
|
@msgmerge $@ authentic.pot -o $@.new
|
2005-05-04 14:57:48 +02:00
|
|
|
@if [ "`diff $@ $@.new | grep '[<>]' | wc -l`" -ne 2 ]; then \
|
|
|
|
mv -f $@.new $@; \
|
|
|
|
else \
|
|
|
|
rm -f $@.new; \
|
|
|
|
fi
|
|
|
|
@msgfmt --statistics $@
|
|
|
|
|