1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/po/gen_translations_stats.sh
Petr Baudis 0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00

23 lines
615 B
Bash

#!/bin/bash
# This script prints translations statistics for .po files
# existing in the current directory
echo "Translations statistics"
echo "Date: `date`"
echo
for i in *.po; do
msgfmt --statistics -o /dev/null $i 2>&1 \
| sed 's/^\([0-9]\+ \)[^0-9]*\([0-9]\+ \)\?[^0-9]*\([0-9]\+ \)\?[^0-9]*$/\1\2\3/g' \
| awk '{ \
tot = $1 + $2 + $3; \
if (tot != 0) \
printf "%8.0f %8s %6.02f%% (%3d/%3d untranslated)\n",\
($1*100/tot)*100, "'"$i"'", $1*100/tot, $2+$3, tot}' ;
done | sort -b -k1,1nr -k2,2 | sed 's/^ *[0-9]*//'
echo
# $Id: gen_translations_stats.sh,v 1.6 2003/10/18 17:38:26 jonas Exp $ #