After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 545478 - placeholder tags
placeholder tags
Status: RESOLVED WONTFIX
Product: gnome-doc-utils
Classification: Deprecated
Component: xml2po
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: gnome-doc-utils maintainers
Danilo Segan
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2008-07-30 10:46 UTC by Ulf-D. Ehlert
Modified: 2020-03-03 18:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested bugfix (3.39 KB, patch)
2008-07-30 10:47 UTC, Ulf-D. Ehlert
none Details | Review

Description Ulf-D. Ehlert 2008-07-30 10:46:04 UTC
xml2po writes placeholder tags to the POT files,
e.g. it sometimes fails to handle phrases with quotes:

Applying xml2po to the following XML file...

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE formalpara PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
                         "http://www.docbook.org/xml/4.3/docbookx.dtd">
    <formalpara>
     <title>
      <phrase>Title phrase with <quote>quoted</quote> text</phrase>
     </title>
     <para>Blah blah</para>
    </formalpara>

... produces this output:

    #: foo.xml:6(quote)
    msgid "quoted"
    msgstr ""

    #: foo.xml:6(phrase)
    msgid "Title phrase with <placeholder-1/> text"
    msgstr ""

When I translate the above string and merge the source XML file
with a proper po file (using xml2po's "--po-file" option), in the
resulting XML file this placeholder tag will eventually be replaced
with "<quote>my translation</quote>".

However, a translator should never be bothered with the internal details
of the transforming program, he should never see any "placeholder" tags.
(Just imagine 10 placeholders...)

There is a workaround which *seems* to fix this issue:
    a) adding "quote" to the list of ignored tags, and/or
    b) adding "phrase" to the list of ultimate tags.

But this will not really fix the bug, since it does not change the
algorithm.  It is still possible to get placeholder tags in the POT files,
depending on the list of ignored and ultimate tags.

You might want to check (and test!) the following patch, which tries to
fix the algorithm.

Regards,
Ulf
Comment 1 Ulf-D. Ehlert 2008-07-30 10:47:20 UTC
Created attachment 115553 [details] [review]
Suggested bugfix

This patch also contains some additional remarks, some items to
think on.
Comment 2 Róman Joost 2008-10-22 19:07:36 UTC
It looks like there are to few people subscribed to the bugtracker here. The GIMP Manual (gimp-help-2/branches/xml2po-support) needs a patched version of xml2po to migrate the current content and continue using gettext/xml2po for it's translations.
Comment 3 Ulf-D. Ehlert 2008-11-11 11:57:30 UTC
Ping! - Did anybody read this bugreport?
Comment 4 André Klapper 2020-03-03 18:35:09 UTC
gnome-doc-utils has been superseded by yelp-xsl, yelp-tools, and itstool.

gnome-doc-utils will not see any further development, hence closing as WONTFIX.

See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/255