2014-09-10 21:09:46 +04:00
|
|
|
#! /usr/bin/env bash
|
2013-07-23 02:41:51 +04:00
|
|
|
|
|
|
|
# syntax:
|
|
|
|
# stats-po.sh
|
|
|
|
|
|
|
|
echo "Printing number of untranslated strings found in locales:"
|
|
|
|
|
2015-11-12 22:27:42 +03:00
|
|
|
for lang in $(find $1 -type f -name "django.po" | sort); do
|
2014-09-10 21:09:46 +04:00
|
|
|
dir=$(dirname $lang)
|
|
|
|
stem=$(basename $lang .po)
|
2015-11-12 22:27:42 +03:00
|
|
|
js="$dir/djangojs.po"
|
2014-09-10 21:09:46 +04:00
|
|
|
count=$(msgattrib $lang --untranslated --no-obsolete --no-fuzzy | grep -c 'msgid ')
|
|
|
|
if [ $count -gt 0 ]; then
|
|
|
|
count=$(($count-1))
|
|
|
|
fi
|
|
|
|
count2=$(msgattrib $js --untranslated --no-obsolete --no-fuzzy | grep -c 'msgid ')
|
|
|
|
if [ $count2 -gt 0 ]; then
|
|
|
|
count2=$(($count2-1))
|
|
|
|
fi
|
2013-07-23 02:41:51 +04:00
|
|
|
echo -e "$(dirname $dir)\t\tmain=$count\tjs=$count2"
|
|
|
|
done
|