Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv24805
Modified Files:
html-build-upload.sh
Log Message:
Fix the percentage calculus when there are no strings left to translate :)
Fix the percentage calculus when there are no strings left to translate :)
Index: html-build-upload.sh
===================================================================
RCS file: /cvsroot/po4a/po4a/html-build-upload.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- html-build-upload.sh 2 Aug 2004 09:46:24 -0000 1.4
+++ html-build-upload.sh 2 Aug 2004 14:00:07 -0000 1.5
@@ -14,9 +14,12 @@
STATS=`msgfmt -o /dev/null --statistics po/pod/$1.po 2>&1`
YES=`echo $STATS | sed -n -e 's/^\([[:digit:]]*\).*$/\1/p'`
NO=`echo $STATS | sed -n -e
's/^\([[:digit:]]\+\)[^[:digit:]]\+\([[:digit:]]\+\).*$/\2/p'`
- O3=`echo $STATS | sed -n -e
's/^\([[:digit:]]\+\)[^[:digit:]]\+\([[:digit:]]\+\)[^[:digit:]]\+\([[:digit:]]\+\).*$/\3/p'`
- if [ $O3 ]; then
- NO=$(($NO + $O3))
+ if [ ! $NO ]; then
+ NO=0
+ O3=`echo $STATS | sed -n -e
's/^\([[:digit:]]\+\)[^[:digit:]]\+\([[:digit:]]\+\)[^[:digit:]]\+\([[:digit:]]\+\).*$/\3/p'`
+ if [ $O3 ]; then
+ NO=$(($NO + $O3))
+ fi
fi
TOTAL=$(($YES+$NO))
echo $((($YES*100)/$TOTAL))
Show replies by date