Converting number of Excel column names no longer limited
[phpmyadmin/arisferyanto.git] / lang / translatecount.sh
blob908166eb63d5173239acb4941804d7e1e8a1ea25
1 #!/bin/sh
2 # $Id$
3 ##
4 # Shell script to produce counts of just how out of date the translations are!
5 ##
6 # Accepts optional parameters of a list of files to produce counts from
7 # Defaults to using all files
8 ##
9 # Written by Robin Johnson <robbat2 at users.sourceforge.net>
11 srcfilelist=${@}
12 destfilelist=""
13 translationmatch='//to translate'
14 suffixtoremove='.inc.php'
15 added=0
16 if [ -z "${srcfilelist}" ]; then
17 srcfilelist="*.inc.php"
18 added=1
19 fi;
20 for i in ${srcfilelist}; do
21 if [ ! -e ${i} ]; then
22 $i=`eval ${i}*php3`
24 if [ -e ${i} ]; then
25 destfilelist="${destfilelist} ${i}"
26 fi;
27 done;
28 destfilelist=`echo ${destfilelist} | xargs -n1 | egrep '.inc.php$'`
29 if [ ! -z "${destfilelist}" ]; then
30 grep -c -- "${translationmatch}" ${destfilelist} | sort -t':' -n +1 | sed -e "s/${suffixtoremove}//g" | xargs -n1 | egrep -v ':0$'
31 fi;