GNOME Bugzilla – Bug 143581
Can not add comments regarding XML attributes.
Last modified: 2004-12-22 21:47:04 UTC
Some xml.in files might contain something like <!-- This comment will appear if attributes can be commented about --> <tagnotmarked> _markedattribute="attribute value">content</tagnotmarked> Currently in my tests, the comment is not extracted because the tag is not marked.
Created attachment 28273 [details] [review] patch describing a desired test case - can someone implement this?
Here's a proposed patch.
Created attachment 28687 [details] [review] Support comments for translated XML attributes as well 2004-06-14 Danilo Šegan <dsegan@gmx.net> * intltool-extract.in.in (type_xml): Adjust re to allow for translating both content and attributes (i.e. <_t _name="ah">content</_t>). * intltool-extract.in.in (type_xml): Add support for comments before translatable attributes. * tests/cases/extract-comments.xml: Add testcases for comments around attributes. * tests/results/extract-comments.xml.h: Updated results. Fixes bug #143581.
Danilo, Your patch works for me. Thanks! Please close at will.
Nice to hear that David, thanks for checking it out. I'll close it when it gets committed to intltool CVS ;)
The patch works for me too. Can you clean up your ChangeLog entry to only mention intltool-extract.in.in once, and to have an empty line between each file's entry, and commit this I guess? With this patch and the GETTEXT_PACKAGE extraction patch, I think we can make another small release.
Dobey, I (try to) write my ChangeLog entries according to GNU Coding standards (look at node "Style of Change Logs"), and this one is particularly in agreement with the following: "Separate unrelated change log entries with blank lines. When two entries represent parts of the same change, so that they work together, then don't put blank lines between them. Then you can omit the file name and the asterisk when successive entries are in the same file." Perhaps the second part of the patch (allowing extracting both attributes and tag content at the same time) shouldn't be committed at all (it's not directly relevant here, though it helps in some cases, but do we really need it?). I'll be happy to make a patch without this, so if you feel that's better, just say so.
Nah. The code is fine. Seeing two entries for the same file, and the same function in that file, in a single ChangeLog block, confused me. Go ahead and commit it.
Comment on attachment 28687 [details] [review] Support comments for translated XML attributes as well Committed to CVS HEAD, along with a NEWS entry.
Marking as RESOLVED/FIXED.