Support old-style message contexts, too.

2007-07-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbuilderparser.c (pgettext): Support old-style
        message contexts, too.



svn path=/trunk/; revision=18405
This commit is contained in:
Matthias Clasen 2007-07-08 16:37:43 +00:00 committed by Matthias Clasen
parent 36fda88e84
commit 8f98233aff
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-07-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbuilderparser.c (pgettext): Support old-style
message contexts, too.
2007-07-08 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtk-builder-convert: Improve the way properties

View File

@ -865,12 +865,19 @@ dpgettext (const char *domain,
translation = dgettext (domain, msg_ctxt_id);
if (translation != msg_ctxt_id)
return translation;
if (translation == msg_ctxt_id)
{
/* try the old way of doing message contexts, too */
msg_ctxt_id[msgctxt_len - 1] = '|';
translation = dgettext (domain, msg_ctxt_id);
if (translation == msg_ctxt_id)
return msgid;
}
return translation;
}
/* Called for character data */
/* text is not nul-terminated */
static void