wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/utils po2po


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/utils po2po
Date: Fri, 03 Sep 2004 05:22:02 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    04/09/03 09:16:47

Modified files:
        utils          : po2po 

Log message:
        allow po2po to run on several langs, all by default

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/utils/po2po.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: wesnoth/utils/po2po
diff -u wesnoth/utils/po2po:1.1 wesnoth/utils/po2po:1.2
--- wesnoth/utils/po2po:1.1     Fri Sep  3 01:00:36 2004
+++ wesnoth/utils/po2po Fri Sep  3 09:16:47 2004
@@ -3,21 +3,39 @@
 
 # copy relevant messages from SRCDOMAIN to DSTDOMAIN, for LANG
 
+if [ $# -lt 2 ]
+then
+    echo "Usage: $0 src-domain dst-domain [lang ...]"
+    exit 1
+fi
+
 SRCDOMAIN=$1
 DSTDOMAIN=$2
-LANG=$3
+shift
+shift
+
+if [ $# = 0 ]
+then
+    set -- `cat po/LINGUAS`
+fi
+
+tmp=`tempfile`
+for LANG in "$@"
+do
+    # merge the 2 files
+    msgcat --use-first -F po/$DSTDOMAIN/$LANG.po po/$SRCDOMAIN/$LANG.po >$tmp
+    mv po/$DSTDOMAIN/$LANG.po po/$DSTDOMAIN/$LANG.po.bak
+    mv $tmp po/$DSTDOMAIN/$LANG.po
+
+    # sync with DST pot
+    touch -d '1970-01-02' po/$DSTDOMAIN/$LANG.po
+    make -C po $DSTDOMAIN/$LANG.po
 
-# merge the 2 files
-msgcat --use-first -F po/$DSTDOMAIN/$LANG.po po/$SRCDOMAIN/$LANG.po >tmp
-mv po/$DSTDOMAIN/$LANG.po po/$DSTDOMAIN/$LANG.po.bak
-mv tmp po/$DSTDOMAIN/$LANG.po
-
-# sync with DST pot
-make -C po DOMAIN=$DSTDOMAIN $LANG.po
-
-# clear those obsolete strings added by SRC, but keep ours if any
-msgattrib --no-obsolete po/$DSTDOMAIN/$LANG.po >tmp
-msgcat --use-first -F tmp po/$DSTDOMAIN/$LANG.po.bak > po/$DSTDOMAIN/$LANG.po
+    # clear those obsolete strings added by SRC, but keep ours if any
+    msgattrib --no-obsolete po/$DSTDOMAIN/$LANG.po >$tmp
+    msgcat --use-first -F $tmp po/$DSTDOMAIN/$LANG.po.bak > 
po/$DSTDOMAIN/$LANG.po
 
-rm po/stamp-po 
-make -C po
+    rm po/stamp-po 
+    make -C po
+done
+rm $tmp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]