Bug 15687: Fix xgettext.pl syntax errors
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 28 Jan 2016 08:32:11 +0000 (09:32 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 3 Feb 2016 23:01:07 +0000 (23:01 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/translator/xgettext.pl

index 504dc9f..0b5e6d8 100755 (executable)
@@ -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 '' );
 }
 
 ###############################################################################