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