X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=tools%2Fcheck_langs.sh;h=80d3f2e83b80c68ac09ddd29debaa47d24a81337;hp=8bf794a63e144437933183b08e1a1c857b02f473;hb=84578512f52e62bc994b944f88f1785c73b4d96a;hpb=cd1a2927226c734d96478e12bb768256fb64a06a diff --git a/tools/check_langs.sh b/tools/check_langs.sh old mode 100644 new mode 100755 index 8bf794a63e..80d3f2e83b --- a/tools/check_langs.sh +++ b/tools/check_langs.sh @@ -1,32 +1,45 @@ -#!/bin/bash - -if [ ! -d ./langs/ ]; then - echo "Script can only be started from IPCop Source base directory" - exit 1 -fi - -cat ./langs/en/cgi-bin/en.pl | grep \'.*\' | awk -F\' '{print $2}'| sort > /tmp/en_cgi-bin.$$ -cat ./langs/en/install/lang_en.c | grep TR_ | awk -F\ '{print $2}' > /tmp/en_install.$$ - -for i in ./langs/[a-z]*; do - if [ "$i" == "./langs/CVS" ] ; then continue; fi - language=`echo "$i" | awk -F/ '{ print $3 }'` - - echo "############################################################################" - echo "# Checking install/setup translations for language: ${language} #" - echo "############################################################################" - cat ./langs/${language}/install/lang_${language}.c | grep TR_ | awk -F\ '{print $2}' | \ - diff /tmp/en_install.$$ - | grep \< - - echo "############################################################################" - echo "# Checking cgi-bin translations for language: ${language} #" - echo "############################################################################" - cat ./langs/${language}/cgi-bin/${language}.pl | grep \'.*\' | awk -F\' '{print $2}' | sort | \ - diff /tmp/en_cgi-bin.$$ - | grep \< -done - -rm -f /tmp/en_cgi-bin.$$ -rm -f /tmp/en_install.$$ - -exit 0 - +#!/bin/bash +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2010 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + + +if [ ! -d ./langs/ ]; then + echo "Script can only be started from IPFire Source base directory" + exit 1 +fi + +cat ./langs/en/cgi-bin/en.pl | grep \'.*\' | awk -F\' '{print $2}'| sort > /tmp/en_cgi-bin.$$ + +for i in ./langs/*; do + [ -d "${i}" ] || continue + language=`echo "$i" | awk -F/ '{ print $3 }'` + [ "${language}" = "en" ] && continue + + echo "############################################################################" + echo "# Checking cgi-bin translations for language: ${language} #" + echo "############################################################################" + cat ./langs/${language}/cgi-bin/${language}.pl | grep \'.*\' | awk -F\' '{print $2}' | sort | \ + diff /tmp/en_cgi-bin.$$ - | grep \< +done + +rm -f /tmp/en_cgi-bin.$$ + +exit 0 +