git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6000 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-01-28 23:56:30 +00:00
parent 9b30b913a4
commit 7e39ffbe40

View File

@ -35,6 +35,7 @@ extract_number () {
number=0 number=0
echo $1 | grep $2 >/dev/null || return echo $1 | grep $2 >/dev/null || return
# It /is/ safe to use 'Z' as a delimiter here.
number=`echo $1 | sed "s/\([0-9]*\)[ ]*$2.*/Z\1/" | cut -d 'Z' -f 2` number=`echo $1 | sed "s/\([0-9]*\)[ ]*$2.*/Z\1/" | cut -d 'Z' -f 2`
} }
@ -45,9 +46,9 @@ extract_number () {
run_msgfmt () { run_msgfmt () {
test $# -eq 2 || error 'run_msgfmt expects 2 args' test $# -eq 2 || error 'run_msgfmt expects 2 args'
rm -f $gmofile rm -f $2
message=`$msgfmt --statistics -o $gmofile $1 2>&1 | grep "^[1-9]"` message=`$msgfmt --statistics -o $2 $1 2>&1 | grep "^[1-9]"`
#message=`make $gmofile 2>&1 | grep "^[1-9]"` #message=`make $2 2>&1 | grep "^[1-9]"`
extract_number "$message" translated extract_number "$message" translated
output='"msg_tr" => '$number output='"msg_tr" => '$number