GNOME Bugzilla – Bug 545478
placeholder tags
Last modified: 2020-03-03 18:35:09 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
Created attachment 115553 [details] [review] Suggested bugfix This patch also contains some additional remarks, some items to think on.
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.
Ping! - Did anybody read this bugreport?
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