From eca6afb6629f1e85de2f278e2ab234678fad2b5a Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 28 Jan 2016 09:32:11 +0100 Subject: [PATCH] Bug 15687: Fix xgettext.pl syntax errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 70112cfb8103c9a760bf9b27e7ed8ecb8e5c9278) Signed-off-by: Julian Maurice (cherry picked from commit af24e8ee01877928335727bf04248b3c372ac574) Signed-off-by: Frédéric Demians --- misc/translator/xgettext.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl index 504dc9f389..0b5e6d83ad 100755 --- a/misc/translator/xgettext.pl +++ b/misc/translator/xgettext.pl @@ -48,14 +48,14 @@ sub token_negligible_p { my($x) = @_; my $t = $x->type; return !$extract_all_p && ( - $t == C4::TmplTokenType::TEXT? string_negligible_p( $x->string ): - $t == C4::TmplTokenType::DIRECTIVE? 1: - $t == C4::TmplTokenType::TEXT_PARAMETRIZED + $t == C4::TmplTokenType::TEXT() ? string_negligible_p( $x->string ) : + $t == C4::TmplTokenType::DIRECTIVE() ? 1 : + $t == C4::TmplTokenType::TEXT_PARAMETRIZED() && join( '', map { my $t = $_->type; - $t == C4::TmplTokenType::DIRECTIVE? - '1': $t == C4::TmplTokenType::TAG? - '': token_negligible_p( $_ )? - '': '1' } @{$x->children} ) eq '' ); + $t == C4::TmplTokenType::DIRECTIVE() ? + '1' : $t == C4::TmplTokenType::TAG() ? + '' : token_negligible_p( $_ ) ? + '' : '1' } @{$x->children} ) eq '' ); } ############################################################################### -- 2.39.5