GNOME Bugzilla – Bug 155294
Handle comments for translators in .glade files
Last modified: 2004-12-22 21:47:04 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.
Created attachment 32551 [details] Example .glade file with "comments" attributes.
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).
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.
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?
Yes, I think a test would be in order. Or perhaps modifying existing test case to include a comment or two?
Yeah. Modifying an existing case would be fine. So long as we have a regression test for it. :)
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.
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?
Looks good.
Ok, I've committed these, and I also added "dialog[0-9]+" to ignored strings in Glade file.