Hi,
On Sun, Aug 12, 2007 at 04:22:29AM +0300, kaloian(a)doganov.org wrote:
There is another problem with po4a-translate and Xhtml module that
I've run into.
If the input document contains a group of adjacent comments, those
adjacent comments became integrated as one big comment, preceded by
newlines. The number of preceding newlines is equal to the number of
lines used by the group of comments.
Comments in a paragraph are grouped to be presented in the PO (it is
sometimes useful to see the comments in the PO).
Just an explanation why there are some empty lines and only one comment.
in
<!-- foo -->
<!-- bar -->
there are newline and spaces between the two comments.
The comments are extracted, and the newline and spaces are added to the
current paragraph (to be translated).
At the end of the paragraph, the cumulated text are presented in the PO
(with the cumulated comments).
Newlines and spaces at the beginning of the paragraph are extracted (i.e.
not translated), and printed in the output text.
In the example, as there are no translatable text, the comments are just
printed in the output text (without being present in the PO).
I understand that the empty lines and the concatenation of comments is not
very pretty (this can be even more strange when there are comments before,
in the middle and after a translatable paragraph), but is it really an
issue?
Appart from the problem described, here we can see how the last
comment of the group has survived the integration. It looks like it
is saved by the fact that there is no whitespace between the starting
sequence "<!--" and the actual text of the comment
("#include...").
If I put a single space between them, po4a-normalize integrates this
comment alongside with the others:
Comments introduced by <!--# are recognized as SSI stanza and are
extracted differently. (This support for SSI existed before the
introduction of the includessi option)
Best Regards,
--
Nekral