[Frugalware-darcs] fw-control-center: autogen.sh: import files from pootle

VMiklos vmiklos at frugalware.org
Thu Jun 28 21:25:18 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fw-control-center;a=darcs_commitdiff;h=20070628192236-e2957-4662cd4a5f0615a979b5854b095a9b4e606a584b.gz;

[autogen.sh: import files from pootle
VMiklos <vmiklos at frugalware.org>**20070628192236] {
hunk ./gnetconfig/autogen.sh 3
-cd `dirname $0`
-
-if [ "$1" == "--pot-only" ]; then
+gen_pot()
+{
hunk ./gnetconfig/autogen.sh 11
+	cd - >/dev/null
+}
+
+import_pootle()
+{
+	po_dir=~/darcs/translations/po
+	if [ -d $po_dir ]; then
+		: > po/LINGUAS
+		for i in $(/bin/ls $po_dir/fwcontrolcenter)
+		do
+			[ -e $po_dir/fwcontrolcenter/$i/gnetconfig.po ] || continue
+			cp $po_dir/fwcontrolcenter/$i/gnetconfig.po po/$i.po
+			if msgfmt -c --statistics -o po/$i.gmo po/$i.po; then
+				echo $i >> po/LINGUAS
+			else
+				echo "WARNING: po/$i.po will break your build!"
+			fi
+		done
+	else
+		echo "WARNING: no po files will be used"
+	fi
+}
+
+cd `dirname $0`
+
+if [ "$1" == "--pot-only" ]; then
+	gen_pot
hunk ./gnetconfig/autogen.sh 55
+import_pootle
+gen_pot
}


More information about the Frugalware-darcs mailing list