When running split2po on a XML file with short titles and paragraphs,
the XML tags enclosing the title and paragraph are included in the .po
file output. This confuses the other tools using the .po files. I
discovered this in a document using DNS, NFS and other three letter
acronyms as titles. Here is an example XML file:
<?xml version="1.0" encoding="ASCII"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []>
<book lang="en">
<bookinfo>
<title>T</title>
</bookinfo>
<chapter>
<title>T1</title>
<sect1>
<title>T12</title>
<para></para>
<para>P</para>
<para>P1</para>
<para>P12</para>
<para>P123</para>
</sect1>
<sect1>
<title>T123</title>
<para>P1234</para>
</sect1>
</chapter>
</book>
When using this file as both the original and the translation (it does
not matter, you can make two files with different content), the output
is not quite as I expected it:
% split2po test.xml test.xml
#, fuzzy
msgid ""
msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Content-Type: text/plain; charset=utf-8\n"
#: index.docbook:6
msgid "<title>T</title>"
msgstr "<title>T</title>"
#: index.docbook:9
msgid "<title>T1</title>"
msgstr "<title>T1</title>"
#: index.docbook:11
msgid "<title>T12</title>"
msgstr "<title>T12</title>"
#: index.docbook:12
msgid "<para></para>"
msgstr "<para></para>"
#: index.docbook:13
msgid "<para>P</para>"
msgstr "<para>P</para>"
#: index.docbook:14
msgid "<para>P1</para>"
msgstr "<para>P1</para>"
#: index.docbook:15
msgid "<para>P12</para>"
msgstr "<para>P12</para>"
#: index.docbook:16
msgid "P123"
msgstr "P123"
#: index.docbook:19
msgid "T123"
msgstr "T123"
#: index.docbook:20
msgid "P1234"
msgstr "P1234"
msgid "ROLES_OF_TRANSLATORS"
msgstr ""
msgid "CREDIT_FOR_TRANSLATORS"
msgstr ""
%
I did not expected the short titles and paragraphs to have the XML
tags as part of the text. In short, I expected "P", not
"<para>P</para>". But notice that paragraphs and titles with more
then 3 characters in the content, are handled as I expected.
Are my expectations wrong, or is this a bug?