addons-server/locale/stats-po.sh

22 строки
625 B
Bash
Исходник Обычный вид История

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:"
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)
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