[Koha-devel] [bug 6458]: need some help for a parsing problem in 'misc/translator/TTParser.pm'
Paul Poulain
paul.poulain at biblibre.com
Tue Jul 19 11:38:28 CEST 2011
Le 19/07/2011 11:10, Frère Sébastien Marie a écrit :
> So what to do ?
> 1. works on TTParser.pm, in order to include case for DIRECTIVE in tag element ? (lot of work for rare occurences)
> 2. works 'tmpl_process3.pl' for change the rewriting style of element (not using the parsed hash, using regexp for example) ? (not a strong method, and need some works too)
> 3. discard the use of Template DIRECTIVE in tag element ? (adding a test case for report incorrect use of template *in* tag element, or a check in TTParser reporting "unallowed template form")
> 4. discard the use of Template DIRECTIVE in tag element which contains translated string ? (same before, but more complex to implement)
>
> Personnally, I prefer the 3 (or 4) choice... but what is your opinion about this ?
Not a direct answer to your question, but we agreed, a long time ago,
not to have template loops/if inside a html tag.
So, the template should not be
<tr[% IF ( overdue ) %] class="overdue"[% END %]>
but
[% IF ( overdue ) %]
<tr class="overdue" >
[% ELSE %]
<tr>
[% END %]
that does not break the translator and is *much* easy to read.
ah, and I just fixed http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6412 that is exactly related to this problem ;-)
(and not specific to translator)
--
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
Tel : (33) 4 91 81 35 08
More information about the Koha-devel
mailing list