]> 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 Nighswonger <chris.nighswonger@gmail.com>
Thu, 18 Aug 2011 10:53:48 +0000 (06:53 -0400)
commit267f32d7019b77b24374e9817fd8306b4c2a2164
tree568835874881341331b52a0cddcb02a0747ec19e
parente2b72a12ac5387dae3e95cae150658a068f59a45
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>
(cherry picked from commit a41100a44519373efafb5c9f3cdc5607657d651e)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
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]