It seems that Bug 6679 broke xgettext.pl To reproduce: 1. cd misc/translator 2. perl -cw xgettext.pl Errors: Use of ?PATTERN? without explicit operator is deprecated at xgettext.pl line 51. Number found where operator expected at xgettext.pl line 52, near "$t == C4::TmplTokenType::DIRECTIVE? 1" (Might be a runaway multi-line ?? string starting on line 51) (Missing operator before 1?) "my" variable $t masks earlier declaration in same scope at xgettext.pl line 54. Use of my $_ is experimental at xgettext.pl line 54. "my" variable $t masks earlier declaration in same statement at xgettext.pl line 55. Use of ?PATTERN? without explicit operator is deprecated at xgettext.pl line 55. "my" variable $t masks earlier declaration in same statement at xgettext.pl line 56. String found where operator expected at xgettext.pl line 57, near "''" (Missing semicolon on previous line?) syntax error at xgettext.pl line 52, near "$t == C4::TmplTokenType::DIRECTIVE? 1" syntax error at xgettext.pl line 57, near "''" Global symbol "$x" requires explicit package name at xgettext.pl line 58. syntax error at xgettext.pl line 58, near "} ) " Can't use global @_ in "my" at xgettext.pl line 64, near "= @_" Global symbol "$string" requires explicit package name at xgettext.pl line 66. Global symbol "$token" requires explicit package name at xgettext.pl line 66. Global symbol "$string" requires explicit package name at xgettext.pl line 67. Global symbol "$token" requires explicit package name at xgettext.pl line 69. syntax error at xgettext.pl line 71, near "}" xgettext.pl has too many errors.
Created attachment 47370 [details] [review] Bug 15687: Fix xgettext.pl syntax errors
the translate script is broken as well % ./translate update fr-FR
Julian, there are some other occurrences in xgettext.pl which certainly need to be fixed. I think that the easiest way is to revert the original patch. Upgrading to critical.
(In reply to Jonathan Druart from comment #3) > Julian, there are some other occurrences in xgettext.pl which certainly need > to be fixed. > > I think that the easiest way is to revert the original patch. With the patch, - perl -cw xgettext.pl is OK - ./translate update fr-FR works fine too Why do you think the revert is needed ?
s/needed/easiest/
Created attachment 47381 [details] [review] Bug 15687: Fix xgettext.pl syntax errors Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Julian Maurice from comment #4) > (In reply to Jonathan Druart from comment #3) > > Julian, there are some other occurrences in xgettext.pl which certainly need > > to be fixed. > > > > I think that the easiest way is to revert the original patch. > > With the patch, > - perl -cw xgettext.pl is OK > - ./translate update fr-FR works fine too > > Why do you think the revert is needed ? Indeed, sorry. Everything is fine with the patch applied.
Created attachment 47461 [details] [review] Bug 15687: Fix xgettext.pl syntax errors Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 47462 [details] [review] Bug 15687 [QA Followup] - Tidy sub to remove tab characters Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to Master - Should be in the May 2016 release. Thanks!
Patches pushed to 3.22.x, will be in 3.22.3
Patches pushed to 3.20.x, will be in 3.20.9.