X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/827b733fc1d1ffbaa3f64075e5ebb0b0ed332dd3..b1a8717ae8e07101cfae03b978d57b793884a3d9:/po/makefile diff --git a/po/makefile b/po/makefile index abe8ffef6..45e5b1e5a 100644 --- a/po/makefile +++ b/po/makefile @@ -41,14 +41,14 @@ $(POTFILES) : $(PO)/%.pot : rm -f $(PO)/POTFILES_$*.in $(MSGCOMM) --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@ -$(PO)/$(PACKAGE)-all.pot: $(POTFILES) +$(PACKAGE)-all.pot: $(POTFILES) $(MSGCOMM) --more-than=0 $(POTFILES) --output=$@ # Filter the complete translation with the domain specific file to produce # only the subtext needed for this domain # We cannot express the dependencies required for this directly with a pattern # rule, so we use the .d hack. -$(LANG_POFILES) : $(PO_DOMAINS)/%.po : $(PO)/$(PACKAGE)-all.pot +$(LANG_POFILES) : $(PO_DOMAINS)/%.po : $(PACKAGE)-all.pot printf "%s " "Generating $@" echo $@ : $(notdir $@) $(PO)/$(call GETDOMAIN,$*).pot > $(PO)/$(call GETDOMAIN,$*)_$(notdir $@).d $(MSGMERGE) $(notdir $@) $(PO)/$(call GETDOMAIN,$*).pot -o $@ @@ -59,10 +59,22 @@ $(MOFILES) : $(PO_DOMAINS)/%.mo : $(PO_DOMAINS)/%.po mkdir -p $(LOCALE)/$(notdir $*)/LC_MESSAGES/ cp $@ $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo -binary: $(POTFILES) $(PO)/$(PACKAGE)-all.pot $(MOFILES) +stats: + 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: +clean/local: update-po rm -f $(MOFILES) $(LANG_POFILES) $(PO)/*.d # Include the dependencies that are available