GNOME Bugzilla – Bug 595245
Docbook processing instruction (PI) should not be marked for translation
Last modified: 2020-03-03 18:36:46 UTC
Created attachment 143213 [details] Small sample source file I just started to use docbook processing instruction (PI) in our data sets. Running current xml2po on our data set shows that it picks up PI along with translatable string. On gnome-doc-devel-list, a few other people agreed on that "PIs should absolutely not be marked for translation." http://thread.gmane.org/gmane.comp.gnome.documentation.devel/459 to find out where, I dug a bit. I run xml2po on attached sample code with enabling a debug code at the top of XMLDocument::normalizeNode() in xml2po/__init__.py, I got: > > <norm> (element) [<norm>PI Test</norm>] > > <text> (text) [PI Test] > > <norm> (element) [<norm>Section Title</norm>] > > <text> (text) [Section Title] > > <norm> (element) [<norm>sample table</norm>] > > <text> (text) [sample table] > > <norm> (element) [<norm><?dbfo bgcolor="#000000" ?>Translatable String</norm>] > > <dbfo> (pi) [<?dbfo bgcolor="#000000" ?>] > > <text> (text) [Translatable String] it seems to me that normalized node with PI is judged "worthOutputting". Is it right to assume that XMLDocument::worthOutputting() is the place to modify and make it to return false if element has PI?
Created attachment 143214 [details] a pot file generated from the current xml2po on sample.xml
Note that the proposed patch in bug #597216 resolves this issue and adds a PI to regression tests.
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