On 2013/7/3 Pierre Mazière wrote: > 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
Hello, It would not work, text within those conditional comments cannot be translated since it is rightfully considered as a comment. Comments are extracted because they are useful to give hints to translators. If they are not comments but provide some real contents, po4a will not know what to do. I won't try to fix it, sorry. Denis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org