#210820 Please change short title/paragraph behaviour

Package:
poxml
Source:
poxml
Description:
tools for translating DocBook XML files with Gettext
Submitter:
Petter Reinholdtsen
Date:
2010-05-30 10:21:07 UTC
Severity:
wishlist
#210820#5
Date:
2003-09-13 22:22:53 UTC
From:
To:
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?

#210820#10
Date:
2003-09-30 22:53:56 UTC
From:
To:
tag 210820 + patch
thanks

Hi,

here is a patch.  I also do not understand why short text should
be handled in a different manner.

Denis

#210820#17
Date:
2003-10-13 07:14:42 UTC
From:
To:
Hi.  A couple of issues have arisen recently regarding the behaviour of
split2po:

1) Short titles and paragraphs have XML tags included in the po-files:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=210820

2) Entities within attributes are moved outside the XML tags:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=213036

Since AFAICT you're the author of this app, I was wondering if you have
any comments.  Patches have been submitted to the debian BTS for both
issues, though I'm wondering if in fact either of these are behaviour by
design (particularly the short title/paragraph issue, which definitely
looks deliberate).

Thanks - Ben. :)

[ Please preserve the CC: xxx@bugs.debian.org - thanks ]

#210820#22
Date:
2003-10-13 07:59:39 UTC
From:
To:
The first one is intended behaviour and always been this way, I won't change it.

The second is a valid bug report, even though the patch is most likely too generic
in replacing all &, but on a monday morning I can't come up with a solution it would
break. Just a feeling :)

Greetings, Stephan

#210820#27
Date:
2003-10-13 08:34:42 UTC
From:
To:
Rightio, thanks for that.

I'll apply the patch for the second issue then in the debian packages,
at least until a better solution is found.  Do you mind if this is
committed to CVS as well?

b. :)

#210820#32
Date:
2003-10-13 08:46:38 UTC
From:
To:
severity 210820 wishlist
retitle 210820 Please change short title/paragraph behaviour
tags 210820 + wontfix
thanks

Hi.  Upstream has indicated that this is behaviour by design and that he
does not want it changed.  It does seem reasonable (since very short
strings may well appear in many places in different contexts, and
surrounding them with XML tags helps disambiguate them).  Therefore I
will not change this behaviour in the debian packages.

Ben. :)