[Koha-bugs] [Bug 12207] TTparser parses certain TT statements wrong
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed May 7 08:57:45 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12207
--- Comment #1 from paxed <pasi.kallinen at pttk.fi> ---
Created attachment 28005
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28005&action=edit
Fix TT parsing when TT statement contains ]
This piece of TT code:
[% SWITCH lang %]
[% CASE ['en', 'eng'] %]English
[% CASE ['fr', 'fre'] %]French
[% CASE ['it', 'ita'] %]Italian
...
[% CASE %][% lang %]
[% END %]
is parsed by the TTparser.pm wrong. In the po-files, it shows up as:
...
All the "CASE [ ... ]" codes are shown as "ERROR".
This happens if any TT statement contains a ']' in it - the TTParser
looks for anything that starts with [% and ends with ].
To test:
1) cd misc/translator/
2) perl translate update xx-YY
3) for x in po/xx-YY-*.po; do cp "$x" "${x/.po/.po.bak}"; done
4) apply patch
5) perl translate update xx-YY
6) for x in po/xx-YY-*.po; do diff -Nurd "$x" "${x/.po/.po.bak}"; done
the only changed lines should be those that apply to msgid's with
ERROR-parameters.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list