intltool-merge strips XML comments

Bug #1579528 reported by Felix Krull
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
intltool
New
Undecided
Unassigned

Bug Description

"intltool-merge --xml-style" strips any XML comments from the output file. There should, at the very least, be an option to preserve XML comments. This is with intltool 0.51.0 from Ubuntu 16.04.

I'm using intltool to translate an AppStream metadata file and these are recommended to have a copyright comment (https://blogs.gnome.org/hughsie/2013/10/01/copyright-in-appdata-files/). I have one in the template, but it doesn't make it to the output file because intltool-merge discards it.

Revision history for this message
Jehan (jehan-marmottard) wrote :

I would like to second this request by adding a bit more insight: without the copyright notice, `appstream-util validate-strict your.appdata.xml` fails with a warning. This is even one of the reasons why we cannot check our (GIMP's) appdata file with strict validation in our unit tests, and I am thinking maybe I should do some after-intltool-merge script which would add back the copyright comment (technically easy, but still ugly, hence annoying).

What would be very nice would be either a `--keep-comments` (or other naming, I don't care) option to not strip comments out, or a `--appdata-style` which would strip all comments except the copyright one (since this one is nearly part of the format).

Or ideally both (--appdata-style is nicer for our specific case, but I could imagine `--keep-comments` would be useful in future cases of other formats we don't think about).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.