From patchwork Mon Jan 15 06:41:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 1606 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id 1727560342 for ; Sun, 14 Jan 2018 20:42:42 +0100 (CET) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 075403545; Sun, 14 Jan 2018 20:42:40 +0100 (CET) Received: from Devel.localdomain (p4FDF0C34.dip0.t-ipconnect.de [79.223.12.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 6809A448D for ; Sun, 14 Jan 2018 20:42:32 +0100 (CET) From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH 4/4] Cleaning the lang files: slighty tuned bash scripts Date: Sun, 14 Jan 2018 20:41:59 +0100 Message-Id: <20180114194159.2004-4-matthias.fischer@ipfire.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180114194159.2004-1-matthias.fischer@ipfire.org> References: <20180114194159.2004-1-matthias.fischer@ipfire.org> X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Patch 4: 'update-lang-cache': now produces some output in console, fixed a double slash. 'check_langs.sh': considers all languages in logging, starts with 'de'. Signed-off-by: Matthias Fischer --- src/scripts/update-lang-cache | 4 ++-- tools/check_langs.sh | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/scripts/update-lang-cache b/src/scripts/update-lang-cache index 971664ee2..17485a5dc 100644 --- a/src/scripts/update-lang-cache +++ b/src/scripts/update-lang-cache @@ -1,3 +1,3 @@ #!/bin/sh -perl -e "require '//var/ipfire/lang.pl'; &Lang::BuildCacheLang" - +echo "Rebuilding language cache..." +perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" diff --git a/tools/check_langs.sh b/tools/check_langs.sh index 80d3f2e83..82873f9a6 100755 --- a/tools/check_langs.sh +++ b/tools/check_langs.sh @@ -25,21 +25,19 @@ if [ ! -d ./langs/ ]; then exit 1 fi -cat ./langs/en/cgi-bin/en.pl | grep \'.*\' | awk -F\' '{print $2}'| sort > /tmp/en_cgi-bin.$$ +cat ./langs/de/cgi-bin/de.pl | grep \'.*\' | awk -F\' '{print $2}'| sort > /tmp/de_cgi-bin.$$ -for i in ./langs/*; do - [ -d "${i}" ] || continue +for i in ./langs/en ./langs/fr ./langs/es ./langs/it ./langs/nl ./langs/pl ./langs/ru ./langs/tr; do 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 \< + diff /tmp/de_cgi-bin.$$ - | grep \< done -rm -f /tmp/en_cgi-bin.$$ +rm -f /tmp/de_cgi-bin.$$ exit 0