New Catalan translation, thanks to David Medina!
[clawsker.git] / po / Makefile
index db6a8562af8b0fd837185c6b77ec5e4c04fdf5bd..4bc6e0b2caceda463a0d9953a7bc4d2508fe442c 100644 (file)
@@ -1,6 +1,13 @@
 #
-# Clawsker po makefile
-# $Id$
+# Clawsker po Makefile
+# Copyright 2007-2015 Ricardo Mones <ricardo@mones.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# See COPYING file for license details.
 #
 
 NAME = clawsker
@@ -10,19 +17,25 @@ DATADIR = ${PREFIX}/share
 LOCALEDIR = ${DATADIR}/locale
 
 XG_ARGS = --keyword=_ --flag=_:1:pass-java-format -L Perl -w 80 --package-name=${NAME} --package-version=${VERSION} --msgid-bugs-address=ricardo@mones.org
-LINGUAS = es sr sr@latin fr
+LINGUAS = es sr sr@latin fr it id nl pt_BR sv nb de ca
 
 all: build
 
-update-pot:
-       xgettext ${XG_ARGS} -f ./POTFILES -d ${NAME} -o ./${NAME}.pot
+${NAME}.pot.0:
+       xgettext ${XG_ARGS} -f ./POTFILES -d ${NAME} -o ./${NAME}.pot.0
+
+# remove bogus entry win_title
+update-pot: ${NAME}.pot.0
+       head -17 ./${NAME}.pot.0 > ./${NAME}.pot
+       tail -$(shell expr $(shell wc -l < ./${NAME}.pot.0) - 22 ) ./${NAME}.pot.0 >> ./${NAME}.pot
+       rm -f ./${NAME}.pot.0
 
 %.pox: %.po
        msgmerge -o $@ --previous $< ${NAME}.pot 
 
 build:
        for po in ${LINGUAS}; \
-       do msgfmt -c -o t-$${po} $${po}.po && mv -f t-$${po} $${po}.mo; \
+       do msgfmt -v --statistics -c -o t-$${po} $${po}.po && mv -f t-$${po} $${po}.mo; \
        done