cp $@ $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo
stats:
- for i in *.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
-
-binary: $(POTFILES) $(PO)/$(PACKAGE)-all.pot $(MOFILES)
+ for i in *.pot *.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
+
+binary: $(POTFILES) $(PACKAGE)-all.pot $(MOFILES)
+
+.PHONY: update-po
+update-po: $(PACKAGE)-all.pot
+ for lang in ${LINGUAS}; do\
+ echo "Updating $$lang.po"; \
+ $(MSGMERGE) $$lang.po $(PACKAGE)-all.pot -o $$lang.new.po; \
+ cmp $$lang.new.po $$lang.po || cp $$lang.new.po $$lang.po; \
+ rm -f $$lang.new.po; \
+ done
clean: clean/local
clean/local: