[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] Glade/GtkBuilder related bugs

From: Miguel Ángel
Subject: Re: [bug-gettext] Glade/GtkBuilder related bugs
Date: Sun, 27 Jan 2013 03:29:21 +0100

Hello to everyone.

Reading through HACKINGs of other GNU projects I have noticed one thing:
The first thing to do is create or modify an existing test case, so I
have done it. This is a new test case to test context extraction in
glade files. It is taken almost enterely from xgettext-glade-4. It is
worse than I thought at first place. In the (old) DTD
http://developer.gnome.org/libglade/unstable/libglade-dtd.html you can
read this:
<!-- context indicates that the value has a |-separated 
     context which must be stripped before use, look up
     in the GLib API documentation for details.-->
<!ATTLIST property
  translatable (yes|no) 'no'
  context (yes|no) 'no'
  comments CDATA #IMPLIED
  agent CDATA #IMPLIED >

But for GtkBuilder you can read at
http://developer.gnome.org/gtk3/3.4/GtkBuilder.html that attribute
"context" contains _the context_:
property = element property {
  attribute name { text },
  attribute translatable { "yes" | "no" } ?,
  attribute comments { text } ?,
  attribute context { text } ?,
  text ?

This means that my first patch was wrong, this were not Glade2 context
support. The attached patch fixes Glade context support and It is based
on xgettext.c, because Glade uses the same format as Glib macro
Q_(String) http://developer.gnome.org/glib/2.30/glib-I18N.html#Q-:CAPS
but maybe It could be extracted to a common function.

On the other hand, this means that context support in GtkBuilder is not
supported yet and need to be worked on.

I look forward to hearing from you :)

Attachment: xgettext-glade-5
Description: application/shellscript

Attachment: bug34506-2.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]