After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 143581 - Can not add comments regarding XML attributes.
Can not add comments regarding XML attributes.
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks: 130998
 
 
Reported: 2004-06-02 14:15 UTC by David Bolter
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch describing a desired test case - can someone implement this? (1011 bytes, patch)
2004-06-02 14:17 UTC, David Bolter
none Details | Review
Support comments for translated XML attributes as well (2.68 KB, patch)
2004-06-14 12:13 UTC, Danilo Segan
committed Details | Review

Description David Bolter 2004-06-02 14:15:29 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.
Comment 1 David Bolter 2004-06-02 14:17:11 UTC
Created attachment 28273 [details] [review]
patch describing a desired test case - can someone implement this?
Comment 2 Danilo Segan 2004-06-14 12:11:30 UTC
Here's a proposed patch.
Comment 3 Danilo Segan 2004-06-14 12:13:28 UTC
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.
Comment 4 David Bolter 2004-06-15 13:11:33 UTC
Danilo,

Your patch works for me. Thanks! Please close at will.
Comment 5 Danilo Segan 2004-06-15 17:18:19 UTC
Nice to hear that David, thanks for checking it out.

I'll close it when it gets committed to intltool CVS ;)
Comment 6 Rodney Dawes 2004-08-22 16:38:03 UTC
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.
Comment 7 Danilo Segan 2004-08-22 16:59:32 UTC
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.
Comment 8 Rodney Dawes 2004-08-22 17:40:36 UTC
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 9 Danilo Segan 2004-08-22 18:51:19 UTC
Comment on attachment 28687 [details] [review]
Support comments for translated XML attributes as well

Committed to CVS HEAD, along with a NEWS entry.
Comment 10 Danilo Segan 2004-08-22 18:51:51 UTC
Marking as RESOLVED/FIXED.