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 155294 - Handle comments for translators in .glade files
Handle comments for translators in .glade files
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-13 12:08 UTC by Damon Chaplin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example .glade file with "comments" attributes. (4.05 KB, text/plain)
2004-10-13 12:13 UTC, Damon Chaplin
  Details
Support "comments" attribute on property and atkproperty tags in .glade files (1.04 KB, patch)
2004-10-13 14:58 UTC, Danilo Segan
committed Details | Review
Update testcase (2.04 KB, patch)
2004-10-13 15:59 UTC, Danilo Segan
committed Details | Review

Description Damon Chaplin 2004-10-13 12:08:46 UTC
Glade now supports comments for translators within the .glade files.
So it would be useful if intltool could copy these to the .po files.

See bug 154806 for the changes to the Glade DTD.
Basically I've just added a "comments" attribute to <property> and <atkproperty>
elements.

I'll attach an example .glade file in a sec.
Comment 1 Damon Chaplin 2004-10-13 12:13:15 UTC
Created attachment 32551 [details]
Example .glade file with "comments" attributes.
Comment 2 Danilo Segan 2004-10-13 14:58:00 UTC
Created attachment 32560 [details] [review]
Support "comments" attribute on property and atkproperty tags in .glade files

2004-10-13  Danilo Šegan  <dsegan@gmx.net>

	* intltool-extract.in.in (type_glade): Support "comments"
	attribute on property and atkproperty tags (fixes #155294).
Comment 3 Danilo Segan 2004-10-13 15:00:52 UTC
I add support for "comments" here. Note that it doesn't extract the first
comment from the above example .glade file, because tags with
"(window|label)[0-9]+" content are ignored with current intltool-extract (and we
have "label1" there).

It still passes the "make check", so there shouldn't be any regressions.
Comment 4 Rodney Dawes 2004-10-13 15:27:16 UTC
The patch looks good, but we probably want to change (window|label)[0-9]+ to
include dialog as well, since I think dialogs default to dialogN for the title.
Should we add a regression test for this new property as well?
Comment 5 Danilo Segan 2004-10-13 15:36:52 UTC
Yes, I think a test would be in order. Or perhaps modifying existing test case
to include a comment or two?
Comment 6 Rodney Dawes 2004-10-13 15:40:10 UTC
Yeah. Modifying an existing case would be fine. So long as we have a regression
test for it. :)
Comment 7 Danilo Segan 2004-10-13 15:59:41 UTC
Created attachment 32563 [details] [review]
Update testcase

Ok, a couple of comments.

2004-10-13  Danilo Šegan  <dsegan@gmx.net>

	* tests/cases/extract8.glade: Update Glade test.
	* tests/results/extract8.glade.h: Update test result.
Comment 8 Danilo Segan 2004-10-13 16:01:42 UTC
Btw, I ran both intltool-extract versions (with and without this change) on a
collection of ~370 Glade files I have from around my CVS Gnome checkout, and
there wasn't a single difference, meaning that we're probably safe on not
breaking anything.

Ok to commit both of these?
Comment 9 Rodney Dawes 2004-10-13 21:15:31 UTC
Looks good.
Comment 10 Danilo Segan 2004-10-14 10:43:36 UTC
Ok, I've committed these, and I also added "dialog[0-9]+" to ignored strings in
Glade file.