Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3c5ff132f3
Fetching contributors…

Cannot retrieve contributors at this time

executable file 47 lines (45 sloc) 1.296 kb
#!/bin/sh
#=====================================
# getUntranslated()
#-------------------------------------
function getUntranslated {
IFS="
"
for i in $(\
cat $1 | grep -v "#~" | grep -A1 -n "msgstr \"\"" | grep -E ^[0-9]+-$ \
);do
line=${i/-/}; line=$(expr $line - 1)
nlin="$nlin,$line"
echo $line
done
echo $nlin | sed -e s@^,@@ > /tmp/lines
}
#=====================================
# Main...
#-------------------------------------
printf "%-5s : %-7s : %-7s : %-6s- %s\n" \
"LC" "Removed" "Fuzzy's" "Missing" "LineNo/Status"
printf "%s\n" \
"--------------------------------------------------"
for i in $(find -maxdepth 1 -type d);do
if [ -d $i/LC_MESSAGES ];then
notYet=$(getUntranslated $i/LC_MESSAGES/kiwi.po | wc -l)
notYet=$(echo $notYet)
fuzzyCount=$(cat $i/LC_MESSAGES/kiwi.po | grep -v "#~" | grep fuzzy | wc -l)
fuzzyCount=$(echo $fuzzyCount)
removed=$(cat $i/LC_MESSAGES/kiwi.po | grep "#~ msgid" | wc -l)
removed=$(echo $removed)
locale=$(basename $i)
lines=$(cat /tmp/lines)
if ([ $locale = "en_US" ]) || ([ $locale = "en_GB" ]);then
notYet=0
fi
if [ $notYet -eq 0 ];then
lines="Fine"
elif [ $notYet -gt 10 ];then
lines="Not usable"
fi
printf "%-5s : %-7s : %-7s : %-6s - %s\n" \
"$locale" "$removed" "$fuzzyCount" "$notYet" "$lines"
fi
done
Jump to Line
Something went wrong with that request. Please try again.