Bug 50006 - unwanted tags included in extracted messages
Summary: unwanted tags included in extracted messages
Status: RESOLVED NOTABUG
Alias: None
Product: ITS Tool
Classification: Unclassified
Component: docbook (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shaun McCance
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-16 06:37 UTC by Kalev Lember
Modified: 2012-05-17 01:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Kalev Lember 2012-05-16 06:37:11 UTC
I recently converted ghex from gnome-doc-utils to yelp-tools + itstools, and noticed that this caused translation coverage drop to 74% for most languages.

Apparently itstool occasionally includes xml tags in extracted messages, for example <listitem>. This fragment:

<listitem>
<para><guilabel>Unsigned 8 bit</guilabel></para>
</listitem>

is extracted as:

#. (itstool) path: listitem/para
#: C/index.docbook:541
msgid "<guilabel>Unsigned 8 bit</guilabel>"

... but I'd expect to not get <guilabel> tags in the extracted message.
Comment 1 Shaun McCance 2012-05-16 07:09:19 UTC
itstool has a very strict definition of what elements become translation units, based entirely on the ITS data categories. If you want the guilabel element to be a translation unit, then use a local ITS rule. Something like this:

<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
  <its:withinTextRule withinText="no" selector="//para[count(node())=1]/guilabel"/>
</its:rules>
Comment 2 Kalev Lember 2012-05-17 01:18:39 UTC
Thanks Shaun, this custom rule certainly helped.

However, after adding 11 similar local ITS rules, the extracted messages still weren't back to what was produced by xml2po. Docbook is just wonky, I guess ... Anyway, I don't think it's worth breaking existing translations, so I've reverted GHex back to gnome-doc-utils for now, until we switch to Mallard documentation.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.