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 115635 - Glade should support message comments for translators and respect the translatable message attribute aswell
Glade should support message comments for translators and respect the transla...
Status: RESOLVED FIXED
Product: glade-legacy
Classification: Deprecated
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Damon Chaplin
Damon Chaplin
: 56424 98111 98940 (view as bug list)
Depends on:
Blocks: 148417
 
 
Reported: 2003-06-20 21:50 UTC by Christian Rose
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Rose 2003-06-20 21:50:37 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.
Comment 1 Damon Chaplin 2003-10-21 11:56:11 UTC
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.
Comment 2 Damon Chaplin 2003-10-21 12:12:28 UTC
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.
Comment 3 Christian Rose 2003-10-22 11:27:04 UTC
Excellent. Will you have a look at bug 97061 too?
Comment 4 Damon Chaplin 2003-11-30 12:02:40 UTC
*** Bug 98111 has been marked as a duplicate of this bug. ***
Comment 5 Damon Chaplin 2003-11-30 12:03:41 UTC
*** Bug 98940 has been marked as a duplicate of this bug. ***
Comment 6 Damon Chaplin 2003-11-30 12:09:13 UTC
*** Bug 56424 has been marked as a duplicate of this bug. ***
Comment 7 Toni Willberg 2004-04-11 12:29:24 UTC
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?
Comment 8 Damon Chaplin 2004-04-11 14:29:02 UTC
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.
Comment 9 Damon Chaplin 2004-09-30 21:50:33 UTC
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.
Comment 10 Christian Rose 2004-09-30 22:33:12 UTC
This is so cool. Thanks Damon.
Haven't tested it, anyone have the time to do? Danilo?
Comment 11 Damon Chaplin 2004-10-13 12:26:17 UTC
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.
Comment 12 Christian Rose 2004-10-13 12:46:03 UTC
Thanks much, Damon.