From: Colin Watson Date: Tue, 17 Jan 2006 23:13:44 +0000 (+0000) Subject: helper for grabbing strings from debian/po directories in other trees X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=141105da768772f08d663320ae3e05df73940a27;p=bin.git helper for grabbing strings from debian/po directories in other trees --- diff --git a/grab-string b/grab-string new file mode 100755 index 0000000..d011637 --- /dev/null +++ b/grab-string @@ -0,0 +1,22 @@ +#! /bin/sh + +if [ $# -lt 2 ]; then + echo "Usage: $0 OLD-TREE STRING" >&2 + exit 1 +fi + +if ! [ -d debian/po-new ]; then + cp -a debian/po debian/po-new +fi + +for x in $1/debian/po/*.po; do + base=$(basename $x) + msgconv -t UTF-8 $x | \ + msgattrib --translated - | \ + msggrep -K -e "$2" - | \ + msgconv -t $(po-charset debian/po-new/$base) - | \ + msgcat --use-first debian/po-new/$base - | \ + sponge debian/po-new/$base +done + +exit 0