git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/pmueller/ipfire-2.x.git] / tools / check_langs.sh
1 #!/bin/bash
2
3 if [ ! -d ./langs/ ]; then
4 echo "Script can only be started from IPCop Source base directory"
5 exit 1
6 fi
7
8 cat ./langs/en/cgi-bin/en.pl | grep \'.*\' | awk -F\' '{print $2}'| sort > /tmp/en_cgi-bin.$$
9 cat ./langs/en/install/lang_en.c | grep TR_ | awk -F\ '{print $2}' > /tmp/en_install.$$
10
11 for i in ./langs/[a-z]*; do
12 if [ "$i" == "./langs/CVS" ] ; then continue; fi
13 language=`echo "$i" | awk -F/ '{ print $3 }'`
14
15 echo "############################################################################"
16 echo "# Checking install/setup translations for language: ${language} #"
17 echo "############################################################################"
18 cat ./langs/${language}/install/lang_${language}.c | grep TR_ | awk -F\ '{print $2}' | \
19 diff /tmp/en_install.$$ - | grep \<
20
21 echo "############################################################################"
22 echo "# Checking cgi-bin translations for language: ${language} #"
23 echo "############################################################################"
24 cat ./langs/${language}/cgi-bin/${language}.pl | grep \'.*\' | awk -F\' '{print $2}' | sort | \
25 diff /tmp/en_cgi-bin.$$ - | grep \<
26 done
27
28 rm -f /tmp/en_cgi-bin.$$
29 rm -f /tmp/en_install.$$
30
31 exit 0
32