From 0399e4e3b7c91b308aaea4b6b61671f37b6a90b7 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 16 Nov 2012 03:01:34 +0000 Subject: added translation infrastructure svn path=/trunk/scripts/guiplugins/search-plugin/; revision=16553 --- po/Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 po/Makefile (limited to 'po/Makefile') diff --git a/po/Makefile b/po/Makefile new file mode 100644 index 0000000..a1b8093 --- /dev/null +++ b/po/Makefile @@ -0,0 +1,42 @@ + +PACKAGE_NAME = search plugin +PACKAGE_VERSION = 1.0 +TCLFILES = search-plugin.tcl + +# these are the supported languages, +ALL_LINGUAS = af az be bg ca cs de el en_ca en_gb es_es es_mx eu fr gd gu he hi hu it ja lt lv nl pa pt_br pt_pt ru sq sv tr vi zh_tw +POFILES = $(ALL_LINGUAS:=.po) +MSGFILES = $(ALL_LINGUAS:=.msg) + +TEMPLATE = template.pot +FILES = $(addprefix ../, $(TCLFILES)) + +# generate .msg files from the .po files +all: $(TEMPLATE) $(MSGFILES) + +# refresh .po files from the template +clean: + -rm -f -- $(TEMPLATE) + -rm -f -- $(MSGFILES) + -rm -f -- $(POFILES:=~) + +po: $(TEMPLATE) $(POFILES) + +$(TEMPLATE): $(FILES) + touch $(TEMPLATE) + xgettext --join-existing \ + --from-code=UTF-8 --language=Tcl --keyword=_ \ + --sort-by-file --output=$(TEMPLATE) \ + --package-name="$(PACKAGE_NAME)" \ + --package-version=$(PACKAGE_VERSION) \ + --copyright-holder='This file is put in the public domain' \ + --foreign-user \ + --msgid-bugs-address=http://bugs.puredata.info \ + $(FILES) + +$(POFILES): $(TEMPLATE) + touch $@ + msgmerge --sort-by-file -C /home/hans/code/pd-extended.git/po/$@ --update $@ $(TEMPLATE) + +%.msg: %.po + msgfmt --check --tcl --locale=$* -d . $< -- cgit v1.2.1