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