i18n vs. BonoboActivationFactory



Hi Michael,

I noticed a problem with the BONOBO_ACTIVATION_FACTORY macro. It doesn't
call bindtextdomain and friends within main, which prevents i18n for all
components created by the factory. Attached is a patch which fixes this,
but it's likely that it introduces problems, because of the required
PACKAGE and GNOMELOCALEDIR definitions.

Should I commit this patch or is there a better solution?

Regards,

   Jens

-- 
"Wer die Freiheit aufgibt, um Sicherheit zu gewinnen, wird am Ende beides
verlieren." -- Benjamin Franklin
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libbonobo/ChangeLog,v
retrieving revision 1.288
diff -u -p -r1.288 ChangeLog
--- ChangeLog	2002/02/01 06:04:14	1.288
+++ ChangeLog	2002/02/03 12:26:12
@@ -1,3 +1,8 @@
+2002-02-03  Jens Finke <jens triq net>
+
+	* bonobo/bonobo-generic-factory.h (BONOBO_ACTIVATION_FACTORY):
+	Initialise gettext support within macro. 
+
 2002-02-01  Tomasz Kłoczko  <kloczek pld org pl>
 
 	* monikers/Makefile.am: small fix for automake 1.5.
Index: bonobo/bonobo-generic-factory.h
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-generic-factory.h,v
retrieving revision 1.39
diff -u -p -r1.39 bonobo-generic-factory.h
--- bonobo/bonobo-generic-factory.h	2001/12/14 14:07:12	1.39
+++ bonobo/bonobo-generic-factory.h	2002/02/03 12:26:12
@@ -86,6 +86,10 @@ int                   bonobo_generic_fac
 #define BONOBO_ACTIVATION_FACTORY(oafiid, descr, version, callback, data)	\
 int main (int argc, char *argv [])						\
 {										\
+	bindtextdomain (PACKAGE, GNOMELOCALEDIR);                               \
+	bind_textdomain_codeset (PACKAGE, "UTF-8");                             \
+	textdomain (PACKAGE);                                                   \
+                                                                                \
 	BONOBO_FACTORY_INIT (descr, version, &argc, argv);			\
 									        \
 	return bonobo_generic_factory_main (oafiid, callback, data);		\


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