Index: gtk/gtkaccellabel.c
===================================================================
--- gtk/gtkaccellabel.c	(revision 19523)
+++ gtk/gtkaccellabel.c	(working copy)
@@ -646,7 +646,7 @@
 	      
 	      strcpy (msg, "keyboard label|");
 	      g_strlcat (msg, tmp, 128);
-	      str = dgettext (GETTEXT_PACKAGE, msg);
+	      str = g_dgettext (GETTEXT_PACKAGE, msg);
 	      if (str == msg)
 		{
 		  g_string_append (gstring, tmp);
Index: gtk/gtkintl.h
===================================================================
--- gtk/gtkintl.h	(revision 19523)
+++ gtk/gtkintl.h	(working copy)
@@ -4,7 +4,7 @@
 #include <glib/gi18n-lib.h>
 
 #ifdef ENABLE_NLS
-#define P_(String) dgettext(GETTEXT_PACKAGE "-properties",String)
+#define P_(String) g_dgettext(GETTEXT_PACKAGE "-properties",String)
 #else 
 #define P_(String) (String)
 #endif
Index: gtk/gtkstock.c
===================================================================
--- gtk/gtkstock.c	(revision 19523)
+++ gtk/gtkstock.c	(working copy)
@@ -176,7 +176,7 @@
 	  if (translate != NULL && translate->func != NULL)
 	    item->label = (* translate->func) (item->label, translate->data);
 	  else
-	    item->label = dgettext (item->translation_domain, item->label);
+	    item->label = g_dgettext (item->translation_domain, item->label);
 	}
     }
 
@@ -456,7 +456,7 @@
 {
   gchar *domainname = data;
 
-  return (gchar *)g_strip_context (msgid, dgettext (domainname, msgid));
+  return (gchar *)g_strip_context (msgid, g_dgettext (domainname, msgid));
 }
 
 
Index: gtk/gtkimmulticontext.c
===================================================================
--- gtk/gtkimmulticontext.c	(revision 19523)
+++ gtk/gtkimmulticontext.c	(working copy)
@@ -543,7 +543,7 @@
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
 	      bind_textdomain_codeset (contexts[i]->domain, "UTF-8");
 #endif
-	      translated_name = dgettext (contexts[i]->domain, contexts[i]->context_name);
+	      translated_name = g_dgettext (contexts[i]->domain, contexts[i]->context_name);
 	    }
 	  else
 	    {
Index: gtk/gtkmain.c
===================================================================
--- gtk/gtkmain.c	(revision 19523)
+++ gtk/gtkmain.c	(working copy)
@@ -179,6 +179,7 @@
 static guint gtk_main_loop_level = 0;
 static gint pre_initialized = FALSE;
 static gint gtk_initialized = FALSE;
+static gint gettext_initialized = FALSE;
 static GList *current_events = NULL;
 
 static GSList *main_loops = NULL;      /* stack of currently executing main loops */
@@ -632,6 +633,10 @@
 static void
 gettext_initialization (void)
 {
+  if (gettext_initialized)
+    return;
+  gettext_initialized = TRUE;
+
 #ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR);
   bindtextdomain (GETTEXT_PACKAGE "-properties", GTK_LOCALEDIR);
@@ -639,6 +644,7 @@
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   bind_textdomain_codeset (GETTEXT_PACKAGE "-properties", "UTF-8");
 #    endif
+  g_i18n_init();
 #endif  
 }
 
Index: gtk/gtkactiongroup.c
===================================================================
--- gtk/gtkactiongroup.c	(revision 19523)
+++ gtk/gtkactiongroup.c	(working copy)
@@ -1280,7 +1280,7 @@
 {
   /* Pass through dgettext if and only if msgid is nonempty. */
   if (msgid && *msgid) 
-    return dgettext (domainname, msgid); 
+    return g_dgettext (domainname, msgid); 
   else
     return (gchar*) msgid;
 }
Index: gtk/gtkpapersize.c
===================================================================
--- gtk/gtkpapersize.c	(revision 19523)
+++ gtk/gtkpapersize.c	(working copy)
@@ -525,7 +525,7 @@
   g_assert (size->info != NULL);
 
   display_name = paper_names + size->info->display_name;
-  return g_strip_context (display_name, gettext (display_name));
+  return g_strip_context (display_name, g_gettext (display_name));
 }
 
 /**
Index: gtk/gtkbuilderparser.c
===================================================================
--- gtk/gtkbuilderparser.c	(revision 19523)
+++ gtk/gtkbuilderparser.c	(working copy)
@@ -751,13 +751,10 @@
 		   element_name);
 }
 
-/* This function is taken from gettext.h 
- * GNU gettext uses '\004' to separate context and msgid in .mo files.
- */
 static const char *
-dpgettext (const char *domain,
-           const char *msgctxt,
-           const char *msgid)
+_g_dpgettext (const char *domain,
+              const char *msgctxt,
+              const char *msgid)
 {
   size_t msgctxt_len = strlen (msgctxt) + 1;
   size_t msgid_len = strlen (msgid) + 1;
@@ -767,22 +764,10 @@
   msg_ctxt_id = g_alloca (msgctxt_len + msgid_len);
   
   memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
-  msg_ctxt_id[msgctxt_len - 1] = '\004';
+  msg_ctxt_id[msgctxt_len - 1] = '|';
   memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
 
-  translation = dgettext (domain, msg_ctxt_id);
-
-  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;
+  return g_dpgettext (domain, msg_ctxt_id, 0);
 }
 
 /* Called for close tags </foo> */
@@ -834,11 +819,11 @@
               const char *text;
 
               if (prop_info->context)
-                text = dpgettext (data->domain,
-                                  prop_info->context,
-                                  prop_info->text->str);
+                text = _g_dpgettext (data->domain,
+                                     prop_info->context,
+                                     prop_info->text->str);
               else
-                text = dgettext (data->domain, prop_info->text->str);
+                text = g_dgettext (data->domain, prop_info->text->str);
 
               prop_info->data = g_strdup (text);
               g_string_free (prop_info->text, TRUE);
Index: gtk/gtkprintoperation.c
===================================================================
--- gtk/gtkprintoperation.c	(revision 19523)
+++ gtk/gtkprintoperation.c	(working copy)
@@ -1518,7 +1518,7 @@
 
   if (string == NULL)
     string = g_strip_context (status_strs[status],
-			      gettext (status_strs[status]));
+			      g_gettext (status_strs[status]));
   
   if (priv->status == status &&
       strcmp (string, priv->status_string) == 0)
