summaryrefslogtreecommitdiff
authormellen <mellen>2003-02-27 00:12:21 (UTC)
committer mellen <mellen>2003-02-27 00:12:21 (UTC)
commit01ef662a6bb0c4ac81d1314bea286d832e893bbe (patch) (side-by-side diff)
treea9d9542f0dbc5219ee15505037178a35e4cc5652
parent73c645c01998e8e2ca493713801bd07406880de8 (diff)
downloadopie-01ef662a6bb0c4ac81d1314bea286d832e893bbe.zip
opie-01ef662a6bb0c4ac81d1314bea286d832e893bbe.tar.gz
opie-01ef662a6bb0c4ac81d1314bea286d832e893bbe.tar.bz2
- Added option 'unfinished' to make the script only display ts-files with unfinished strings.
- Fixed a couple of typos.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xi18n/status.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/i18n/status.sh b/i18n/status.sh
index f7fa219..216523b 100755
--- a/i18n/status.sh
+++ b/i18n/status.sh
@@ -1,8 +1,11 @@
#!/bin/sh
lang=`basename ${1} 2>/dev/null | tr -d '/'`
+[ "x${2}x" = "xunfinishedx" ] && unfinishedonly=y
if [ "x${lang}x" = "xx" ]; then
- echo "Usage: `basename ${0}` XX"
- echo " with XX as a languagecode or \"all\" for all languagecodes."
+ echo "Usage: `basename ${0}` <XX> [unfinished]"
+ echo " with <XX> as a languagecode or \"all\" for all languagecodes."
+ echo " If you specify 'unfinished' after the languagecode,"
+ echo " only ts-files with unfinished strings will be shown."
exit 1
else
@@ -10,5 +13,5 @@ else
"all")
clear
- printf "\ni18n Statistics for ALL languagecode\n"
+ printf "\ni18n Statistics for ALL languagecodes\n"
lang="."
;;
@@ -19,5 +22,5 @@ else
*)
if [ ! -d "${lang}" ]; then
- echo "Specified languagecode not avaiable."
+ echo "Specified languagecode not available."
exit 1
fi
@@ -33,5 +36,7 @@ else
unfi=`grep -c 'type=\"unfinished\"' ${file}`
obso=`grep -c 'type=\"obsolete\"' ${file}`
- printf "%3s %3s %3s %s\n" "${strs}" "${unfi}" "${obso}" "${file}"
+ if [ ${unfi} -gt 0 -o "x${unfinishedonly}x" = "xx" ]; then
+ printf "%3s %3s %3s %s\n" "${strs}" "${unfi}" "${obso}" "${file}"
+ fi
done
;;