From c3b3b470800a5fb0169c38f257c4d56aba950b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Sat, 8 Oct 2005 11:45:50 +0000 Subject: [PATCH] Simplify and addapt to current messages. --- ChangeLog | 2 ++ scripts/find_unused_messages.sh | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c50a1fb79..5e7599bf2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,8 @@ $Source$ * read_dump.php: Remove unused code. * ldi_check.php, ldi_table.php: Remove unused code. * tbl_change.php: Remove references to ldi_*. + * scripts/find_unused_messages.sh: Simplify and addapt to current + messages. 2005-10-07 Marc Delisle * libraries/check_user_privileges.lib.php: bug #1313821, dbname containing a diff --git a/scripts/find_unused_messages.sh b/scripts/find_unused_messages.sh index a84f12d28..7c1ca71f0 100755 --- a/scripts/find_unused_messages.sh +++ b/scripts/find_unused_messages.sh @@ -4,12 +4,12 @@ phpfiles=`find . -type f -a -name '*.php' -a -not -path '*/lang/*'` -sed -n '/^\$str/ s/\$\([^ ]*\) .*/\1/p' lang/english-iso-8859-1.inc.php \ - | grep -v ^strTransformation_ \ +grep -o 'str[A-Z][a-zA-Z_]*' lang/english-iso-8859-1.inc.php \ + | grep -Ev '^str(Transformation_|ShowStatus)' \ | while read x do echo "Checking for $x" >&2 - if [ `grep -r "\\<$x\\>" $phpfiles | wc -l` -eq 0 ] + if [ `grep -r "\\<$x\\>" $phpfiles | wc -l` -eq 0 ] then echo $x fi