calling do_update allows one to refresh the .po files without pulling
in new submodule updates, that is useful when external contributors
send in a translations update by sending the whole .po file via mail,
with a possible older git commit as base. This way one can refresh
line numbers and new messages while keeping the updated state they
send.
Doing the order via explicit `$(MAKE) target` invocations seems
simpler and less error prone too.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
install -d ${PBSLOCALEDIR}
install -m 0644 ${PBS_LANG_FILES} ${PBSLOCALEDIR}
install -d ${PBSLOCALEDIR}
install -m 0644 ${PBS_LANG_FILES} ${PBSLOCALEDIR}
pmg-lang-%.js: %.po
./po2js.pl -t pmg -v "${VERSION}-${PKGREL}" -o pmg-lang-$*.js $?
pmg-lang-%.js: %.po
./po2js.pl -t pmg -v "${VERSION}-${PKGREL}" -o pmg-lang-$*.js $?
./jsgettext.pl -p "$(1) $(shell cd $(2);git rev-parse HEAD)" -o $(1).pot $(2)
endef
./jsgettext.pl -p "$(1) $(shell cd $(2);git rev-parse HEAD)" -o $(1).pot $(2)
endef
-.PHONY: update update_pot
+.PHONY: update update_pot do_update
- git submodule foreach 'git pull --ff-only origin master'
$(call potupdate,proxmox-widget-toolkit,proxmox-widget-toolkit/)
$(call potupdate,pve-manager,pve-manager/www/manager6/)
$(call potupdate,proxmox-mailgateway,pmg-gui/js/)
$(call potupdate,proxmox-backup,proxmox-backup/www/)
$(call potupdate,proxmox-widget-toolkit,proxmox-widget-toolkit/)
$(call potupdate,pve-manager,pve-manager/www/manager6/)
$(call potupdate,proxmox-mailgateway,pmg-gui/js/)
$(call potupdate,proxmox-backup,proxmox-backup/www/)
-update: | update_pot messages.pot
+do_update:
+ $(MAKE) update_pot
+ $(MAKE) messages.pot
for i in $(LINGUAS); do echo -n "$$i: "; msgmerge -s -v $$i.po messages.pot >$$i.po.tmp && mv $$i.po.tmp $$i.po; done;
for i in $(LINGUAS); do echo -n "$$i: "; msgmerge -s -v $$i.po messages.pot >$$i.po.tmp && mv $$i.po.tmp $$i.po; done;
+update:
+ git submodule foreach 'git pull --ff-only origin master'
+ $(MAKE) do_update
+
stats:
@for i in $(LINGUAS); do echo -n "$$i: "; msgfmt --statistics -o /dev/null $$i.po; done
stats:
@for i in $(LINGUAS); do echo -n "$$i: "; msgfmt --statistics -o /dev/null $$i.po; done