? P
? goption.diff
? libbonobo-zip
? p
? doc/api/tmpl/libbonobo-unused.sgml
? po/stamp-it
Index: bonobo-activation/bonobo-activation-init.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo-activation/bonobo-activation-init.c,v
retrieving revision 1.67
diff -p -u -u -p -r1.67 bonobo-activation-init.c
--- bonobo-activation/bonobo-activation-init.c	7 Feb 2006 12:24:04 -0000	1.67
+++ bonobo-activation/bonobo-activation-init.c	19 Mar 2006 22:11:46 -0000
@@ -366,11 +366,35 @@ static const GOptionEntry bonobo_activat
         { NULL }
 };
 
+static void
+init_gettext (gboolean bind_codeset)
+{
+	static gboolean initialized = FALSE;
+#ifdef HAVE_BIND_TEXTDOMAIN_CODESET	
+	static gboolean codeset_bound = FALSE;
+#endif
+
+	if (!initialized)
+	{
+		bindtextdomain (GETTEXT_PACKAGE, BONOBO_ACTIVATION_LOCALEDIR);
+		initialized = TRUE;
+	}
+#ifdef HAVE_BIND_TEXTDOMAIN_CODESET	
+	if (bind_codeset && !codeset_bound)
+	{
+		bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+		codeset_bound = TRUE;
+	}
+#endif
+}
+
 GOptionGroup *
 bonobo_activation_get_goption_group (void)
 {
 	GOptionGroup *group;
 
+	init_gettext (TRUE);
+
 	group = g_option_group_new ("bonobo-activation",
 				    N_("Bonobo Activation"),
 				    N_("Show Bonobo Activation options"),
@@ -405,7 +429,7 @@ bonobo_activation_ior_fd_get (void)
 void
 bonobo_activation_preinit (gpointer app, gpointer mod_info)
 {
-        bindtextdomain (GETTEXT_PACKAGE, BONOBO_ACTIVATION_LOCALEDIR);
+	init_gettext (FALSE);
 }
 
 void
@@ -467,7 +491,7 @@ bonobo_activation_is_initialized (void)
 char *
 bonobo_activation_get_popt_table_name (void)
 {
-        bindtextdomain (PACKAGE, BONOBO_ACTIVATION_LOCALEDIR);
+	init_gettext (FALSE);
         return _("Bonobo activation options");
 }
 
