]> git.koha-community.org Git - koha.git/commit
Bug 6458 Template Toolkit files test case
authorFrédéric Demians <f.demians@tamil.fr>
Thu, 21 Jul 2011 08:18:29 +0000 (10:18 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 18 Aug 2011 09:11:50 +0000 (21:11 +1200)
commita41100a44519373efafb5c9f3cdc5607657d651e
tree8f22fbf93e341a37aecb41be49c1ef9171b1abc3
parent714c8b924ede922971086597e382364bf4d79312
Bug 6458 Template Toolkit files test case

This test validate Template Toolkit (TT) Koha files.

For the time being an unique validation is done: Test if TT files
contain TT directive within HTML tag. For example:

  <li[% IF

This kind of constuction MUST be avoided because it break Koha
translation process.

This patch transform also translation specific modules into C4 modules
in order to be able to use them in test case:

  C4::TTPaser
  C4::TmplToken
  C4::TmplTokenType

This patch is a Perl adaptation of a Haskell script from Frère Sébastien
Marie.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on testing:
- translate install de-DE - worked ok
- translate update de-DE > translate install de-DE - worked ok
- running the test xt/tt_valid.t - worked ok and pointed out lots of problems.
Found no problems.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/TTParser.pm [new file with mode: 0755]
C4/TmplToken.pm [new file with mode: 0644]
C4/TmplTokenType.pm [new file with mode: 0644]
misc/translator/TTParser.pm [deleted file]
misc/translator/TmplToken.pm [deleted file]
misc/translator/TmplTokenType.pm [deleted file]
misc/translator/TmplTokenizer.pm
misc/translator/tmpl_process3.pl
misc/translator/xgettext.pl
xt/tt_valid.t [new file with mode: 0755]