From 01ef662a6bb0c4ac81d1314bea286d832e893bbe Mon Sep 17 00:00:00 2001 From: mellen Date: Thu, 27 Feb 2003 00:12:21 +0000 Subject: - Added option 'unfinished' to make the script only display ts-files with unfinished strings. - Fixed a couple of typos. --- diff --git a/i18n/status.sh b/i18n/status.sh index f7fa219..216523b 100755 --- a/i18n/status.sh +++ b/i18n/status.sh @@ -1,15 +1,18 @@ #!/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}` [unfinished]" + echo " with 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 case "${lang}" in "all") clear - printf "\ni18n Statistics for ALL languagecode\n" + printf "\ni18n Statistics for ALL languagecodes\n" lang="." ;; "unmaintained"|"xx"|"en") @@ -18,7 +21,7 @@ else ;; *) if [ ! -d "${lang}" ]; then - echo "Specified languagecode not avaiable." + echo "Specified languagecode not available." exit 1 fi clear @@ -32,7 +35,9 @@ else strs=`grep -c 'translation' ${file}` 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 ;; esac -- cgit v0.9.0.2