summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-12-13 21:30:06 (UTC)
committer cniehaus <cniehaus>2002-12-13 21:30:06 (UTC)
commitd09bfeb9e60ec5bc86e0143029c08e431c733f60 (patch) (side-by-side diff)
tree65b959191e9d43e251f010999e7310a291aca44d
parent00dc21e103b2b36954b42bf90b08f4f6739814a3 (diff)
downloadopie-d09bfeb9e60ec5bc86e0143029c08e431c733f60.zip
opie-d09bfeb9e60ec5bc86e0143029c08e431c733f60.tar.gz
opie-d09bfeb9e60ec5bc86e0143029c08e431c733f60.tar.bz2
Thanks to Chri Fishbach now this script is a lot better. Thanks
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xi18n/status.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/i18n/status.sh b/i18n/status.sh
index 315f9dd..5cde18e 100755
--- a/i18n/status.sh
+++ b/i18n/status.sh
@@ -1,8 +1,15 @@
#/bin/sh
arg=$1
+if [ x${arg}x = xx ]
+then
+ arg=.
+fi
echo "number of strings: "
-grep translation $arg/*.ts | wc -l
+strs=`find $arg -name "*.ts" -exec cat {} \; | grep translation | wc -l`
+echo $strs
echo "unfinished: "
-grep translation $arg/*.ts | grep type=\"unfinished\" | wc -l
+unfi=`find $arg -name "*.ts" -exec cat {} \; | grep translation | grep type=\"unfinished\" | wc -l`
+echo $unfi `expr \( $strs - $unfi \) \* 100 / $strs`%
echo "obsolete: "
-grep translation $arg/*.ts | grep type=\"obsolete\" | wc -l
+obso=`find $arg -name "*.ts" -exec cat {} \; | grep translation | grep type=\"obsolete\" | wc -l`
+echo $obso `expr \( $strs - $obso \) \* 100 / $strs`%