GNOME Bugzilla – Bug 115635
Glade should support message comments for translators and respect the translatable message attribute aswell
Last modified: 2004-12-22 21:47:04 UTC
Glade needs to support message comments; message-specific comments where a developer can provide additional information about a message to the translators. Gettext has had this nice feature for quite some time. If you put a comment like this in the code: /* This is the verb, not the noun */ g_printf (_("Profile")); it will be automatically extracted together with the message and written in the pot/po files as this: #. This is the verb, not the noun #: foo.c:42 msgid "Profile" msgstr "" It would be very useful to have a similar feature in glade, allowing a comment to be attributed to a message and having that extracted and attributed to the same message when extracted into the pot file.
Yes, I have thought about doing that myself. I don't think I'll be adding it to glade-2 now, though, I'm afraid. It may need an addition to the XML DTD as well.
Also, it should be possible to turn off translation of particular strings. See bug 56424. So I think each text field should have a '...' button next to it which opens a dialog with a bigger area for entering text as well as a field to enter translators comments and a checkbutton to turn off translation. Hopefully glade-3 will do something like this.
Excellent. Will you have a look at bug 97061 too?
*** Bug 98111 has been marked as a duplicate of this bug. ***
*** Bug 98940 has been marked as a duplicate of this bug. ***
*** Bug 56424 has been marked as a duplicate of this bug. ***
I really would like to see this implemented for Glade-2 series also. At least turning off translation for individual string is very very very much needed. Damon, if you are busy, could you even give some hints how to implement this?
It is pretty complicated, I'm afraid. If you grep for gb_widget_output_translatable_text() you can find all the translatable properties. You'd need to add an extra argument to that function to specify whether the property should be translated or not. This would either be saved to the XML when saving, or shown in a checkbox somewhere when showing the properties. You'd also need to add a gb_widget_input_translatable_text() which also handles the 'translate' option, whether from loading or from setting properties.
I've just done this for glade-2. You can now turn off translation, add a comment for translators, and flag that the string has a context prefix. And you get a nice big dialog to edit lots of text. It's in cvs now, but needs a little more testing. I don't think libglade needs any changes, as it supports the translatable and context flags, and doesn't need the comments. But intltool needs updating to copy the comments to the po file. And the Glade DTD needs updating, to add the comments attribute and possibly similar attributes for ATK properties if we want them there as well.
This is so cool. Thanks Damon. Haven't tested it, anyone have the time to do? Danilo?
I've added bug 154806 to libglade to patch the DTD and ignore "comments", and bug 155294 to intltool to copy the comments to the po files. So I'm closing this bug.
Thanks much, Damon.