----- Original Message -----
From: "poy" <poy(a)123gen.com>
To: <po4a-devel(a)lists.alioth.debian.org>
Sent: Sunday, March 08, 2009 7:24 PM
Subject: Re: [Po4a-devel] XML: prevent some attributes from being translated
hi,
i have tried turning on the "foldattributes" option on our whole project,
and it seems the generated .pot file sometimes has weird numbering
regarding
po4a-id attributes.
it seems that the po4a-id number isn't always reset to 0; if a translation
has multiple foldable attributes, eg:
msgid "<span po4a-id=0>aaa</span> <span po4a-id=1>bbb</span>
<span
po4a-id=2>ccc</span>"
then on the next (totally unrelated, could even be in a separate file)
translation, the po4a-id counter stays at 2, so i will get something like:
msgid "blah <a po4a-id=2>blah</a> <span
po4a-id=3>blah</span> ..."
and etc.
as a result, by the end of the .pot file, i find things like:
msgid ""
"TLS can't be used because no certificate files set. You should set or "
"generate them properly in the <a po4a-id=78>Security certificates</a>
page."
oh, and translation of texts containing these wrongly-numbered ids doesn't
work.
here's a test-case:
<p>
abc <a href="correct_link.html" target="bla">link!</a> def
<a
href="link2.html">link2</a> x <span
style="">span1</span> b <a h=0>a3</a>
<span x=y>span2</span>bbbbbb
</p>
<p>
abcd <a xx=yy>sss</a>
</p>
the 1st paragraph is ok in the .pot file, but the 2nd appears as:
msgid "abcd <a po4a-id=5>sss</a>"
instead of:
msgid "abcd <a po4a-id=0>sss</a>"
hence the 2nd paragraph (and all subsequent translations that will contain a
po4a-id) is impossible to translate.
poy