Package: po4a
Version: 0.42-2
Severity: important
Tags: upstream

Hi,

When using po4a Xhtml module on a file that includes Internet Explorer
conditional comments, I noticed that, when these comments are
disseminated in what is considerated as a paragraph by the xml module,
po4a groups all of these comments at the top of the translated
paragraph.

As an example the following source:
<div>
<!--[if IE]>
This is displayed  by IE only.
<![endif]-->
This is displayed by any browsers.
<!--[if !IE]>-->
This is displayed by any non IE browsers
<!--<![endif]-->
</div>

submitted to po4a without translation files, is translated as:
<div>
<!--[if IE]>
This is displayed  by IE only.
<![endif]-->
<!--[if !IE]>-->
<!--<![endif]-->
This is displayed by any browsers.
This is displayed by any non IE browsers
</div>

which breaks the "benefit" of conditional comments.

It should instead output the exact same content as the source.

The reason why it is done this way can be found in the file
/usr/share/perl5/Locale/Po4a/Xml.pm
The treat_content function collects all comments embedded in a paragraph
separately from the non-comment content. Afterward, the translate_paragraph
function first push the comments, then the non-comment content.

Comments and non-comment content should be collected in the same array
to avoid the inapropriate reorganisation of the original document.

Thanks for trying to fix this issue


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.9-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages po4a depends on:
ii  gettext        0.18.2.1-1
ii  libsgmls-perl  1.03ii-32
ii  perl           5.14.2-21
ii  perl-modules   5.14.2-21
ii  sp             1.3.4-1.2.1-47.1+b1

Versions of packages po4a recommends:
ii  liblocale-gettext-perl  1.05-7+b1
ii  libterm-readkey-perl    2.30-4+b2
ii  libtext-wrapi18n-perl   0.06-7

po4a suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to