all: @echo 'Usage:' @echo ' make pot create inteproxy.pot' @echo ' make merge merge a new inteproxy.pot with the *.po files' @echo ' make mo create the mo files' @echo ' make stat print statistics about the translation status' MO_DIR = ../share/locale DOMAIN = inteproxy pot: pygettext -o $(DOMAIN).pot ../inteproxy/*.py merge: for po in *.po; do \ lingua=`basename $$po .po`; \ mv $$lingua.po $$lingua.old.po; \ if msgmerge -o $$lingua.po $$lingua.old.po $(DOMAIN).pot; then\ rm $$lingua.old.po; \ else \ rm -f $$lingua.po; \ mv $$lingua.old.po $$lingua.po; \ fi \ done mo: for po in *.po; do\ lingua=`basename $$po .po`; \ install -d $(MO_DIR)/$$lingua/LC_MESSAGES/ ; \ echo -n $$po": "; \ msgfmt --statistics \ -o $(MO_DIR)/$$lingua/LC_MESSAGES/$(DOMAIN).mo $$po ;\ done stat: @for po in *.po; do\ echo -n $$po": "; \ msgfmt --statistics -o /dev/null $$po 2>&1 \ | sed -e 's/ \(messages*\|translations*\)//g' -e 's/\.$$//' ; \ done