Hi!
I am currently evaluating po4a and I stumbled into some observations, which
someone here can possibly explain. I am running 0.28 on FreeBSD
1. Whatever po4a command I try, I always get 2 warnings, example:
#/usr/local/bin/po4a-gettextize -f sgml -m ./testproj.xml -p ./testproj.pot
Use of uninitialized value in hash element
at /usr/local/lib/perl5/site_perl/5.8.8/Locale/Po4a/Sgml.pm line 668.
po4a::sgml: Warning: nsgmls is missing or non-functional. Please make sure
that
nsgmls is present and does not produce any error (with the
-wno-valid option), and report a bug otherwise. Continuing...
2. My test files is a samll docbook test. I have attached it but I do not know
if the mailing list supports attachments. It consists of 2 .xml files:
testproj.xml which is including test_chapter.xml. If I look at the
result .pot File, I see:
# type: <imageobject></imageobject>
#: ./testproj.xml:41
msgid "<imagedata format=\"PNG\"
fileref=\"apicture.png\">>"
msgstr ""
The first question here is, why this should be translated. The second, more
important is, why this ends with a double "larger than". The source code was:
<mediaobject><imageobject><imagedata fileref="apicture.png"
format="PNG"/>
</imageobject></mediaobject>
3. Looking into the same line I notice, that the line number
#: ./testproj.xml:41
is also wrong. It should be
#: ./testproj.xml:45 ./test_chapter.xml:6
as this fragment was from test_chapter.xml
4. If I now translate, lets say
# type: <author></author>
#: testproj.xml:14
msgid "<firstname>J.T.</firstname>
<surname>Kirk</surname>"
msgstr "<firstname>J.T.</firstname> <surname
Kirk</surname>"
(note the missing greater than after surname), po4a-translate creates an
invalid xml file. This is off cource not po4a's fault, but the question here
is, if po4a could not make an xml validity check on each translated item and
print a warning, pointing to the wrongly translated string
Thanks for reading this
Heiner