Bug 12192: Template toolkit code in HTML attributes is picked up into po-files
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tue, 28 Apr 2015 21:24:27 +0000 (18:24 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 6 May 2015 13:40:14 +0000 (10:40 -0300)
commit5caa05104dfc30d70be5ea1b17d406b5392d59bc
treef5b5be2eac941cf7c4b4688614b5d0ab6a3f386d
parent6844d9e6b58d95ad1af4ee6d0eb2e7ba1ad50905
Bug 12192: Template toolkit code in HTML attributes is picked up into po-files

This patch gives a partial solution for this problem.
It ignores strings like "[% something %]", but not
"[% IF ( value )  %][% value %][% END %]"

We get 100+ strings less to translate

To test:
1) Update translation files for your preferred language
2) Apply the patch
3) Update again
4) Compare, you must find 100+ strings removed from
translation files

eg.
-msgid "[% SEARCH_RESULT.biblionumber |url %]"
-msgid "[% accepteddate | $KohaDates %]"
-msgid "[% amountoutstanding | format('%.2f') %]"
-msgid "[% authtypetext |html %]"
-msgid "[% barcode_llx |html %]"
-msgid "[% barcode_lly |html %]"
-msgid "[% biblio.quantity.length ? biblio.quantity : 1 %]"
-msgid "[% billingdate | $KohaDates %]"
-msgid "[% borname |html %]"
...

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified all strings removed from the po files were
pure TT.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
misc/translator/xgettext.pl