Koha/misc/translator
Jonathan Druart 35a88a5c44 Bug 12301: Remove warnings on translate scripts
Using perl v5.18, the following is warned on updating/installing
templates:
  Smartmatch is experimental at ./translate line 54.

Moreover, the following should exist with previous perl versions:

perlcritic xgettext
Subroutine prototypes used at line 29, column 1.  See page 194 of PBP.
(Severity: 5)
Subroutine prototypes used at line 44, column 1.  See page 194 of PBP.
(Severity: 5)
Subroutine prototypes used at line 60, column 1.  See page 194 of PBP.
(Severity: 5)
Subroutine prototypes used at line 72, column 1.  See page 194 of PBP.
(Severity: 5)
Subroutine prototypes used at line 89, column 1.  See page 194 of PBP.
(Severity: 5)
Variable declared in conditional statement at line 105, column 13.
Declare variables outside of the condition.  (Severity: 5)
Subroutine prototypes used at line 127, column 1.  See page 194 of PBP.
(Severity: 5)
Subroutine prototypes used at line 136, column 1.  See page 194 of PBP.
(Severity: 5)
Variable declared in conditional statement at line 190, column 7.
Declare variables outside of the condition.  (Severity: 5)
Subroutine prototypes used at line 237, column 1.  See page 194 of PBP.
(Severity: 5)
Bareword file handle opened at line 238, column 5.  See pages 202,204 of
PBP.  (Severity: 5)
Two-argument "open" used at line 238, column 5.  See page 207 of PBP.
(Severity: 5)
Subroutine prototypes used at line 277, column 1.  See page 194 of PBP.
(Severity: 5)
Subroutine prototypes used at line 311, column 1.  See page 194 of PBP.
(Severity: 5)
Bareword file handle opened at line 350, column 9.  See pages 202,204 of
PBP.  (Severity: 5)
Two-argument "open" used at line 350, column 9.  See page 207 of PBP.
(Severity: 5)
Bareword file handle opened at line 353, column 5.  See pages 202,204 of
PBP.  (Severity: 5)
Bareword file handle opened at line 359, column 5.  See pages 202,204 of
PBP.  (Severity: 5)
Two-argument "open" used at line 359, column 5.  See page 207 of PBP.
(Severity: 5)

perl -wc xgettext.pl
\1 better written as $1 at TmplTokenizer.pm line 474.
main::token_negligible_p() called too early to check prototype at
xgettext.pl line 52.
xgettext.pl syntax OK

Test plan:
Apply this patch and verify the warnings/errors does not appear anymore
and no regression is found on creating/updating/installing templates.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errros.
Tested with perl v5.18.2
No warnings, no problem detected on create/update/install i18n files

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-05-30 15:46:17 -03:00
..
po Translation updates for 3.16.00 final release 2014-05-22 14:35:05 +00:00
LangInstaller.pm Bug 11848: Make Koha::I18N easier to use 2014-05-05 04:30:02 +00:00
Makefile merging 2.2 branch with head. Sorry for not making it before, many many commits done here 2005-03-01 13:40:35 +00:00
text-extract.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
text-extract2.pl Bug 8384: Some Perl scripts do not compile 2012-07-10 10:50:58 +02:00
tmpl_process3.pl Bug 9216: make columns.def file translatable 2014-04-19 13:34:33 +00:00
TmplTokenizer.pm Bug 12301: Remove warnings on translate scripts 2014-05-30 15:46:17 -03:00
translate Bug 12301: Remove warnings on translate scripts 2014-05-30 15:46:17 -03:00
translator_doc.html Documents translator dependency on 'gettext' Linux tools and add it to debian.packages 2008-06-26 05:51:35 -05:00
translator_doc.txt Documents translator dependency on 'gettext' Linux tools and add it to debian.packages 2008-06-26 05:51:35 -05:00
VerboseWarnings.pm Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
xgettext.pl Bug 12301: Remove warnings on translate scripts 2014-05-30 15:46:17 -03:00