Re: CVS-1-27 compile error explained

On Sun, 2005-30-01 at 11:43 -0500, Bill Moss wrote:
> The second patched fixed all compile problems. Looking at glib/gi18n.h, 
> I expected native language support to be turned on in NMApplet via GNU 
> gettext. I added
> LANG=de_DE.UTF-8
> export LANG
> to my bash_profile and rebooted. I see that the gconf messages in syslog 
> are in German but the popup messages produced by NMApplet are still in 
> English. The de.po file has these popup messages translated. What am I 
> missing.

The applet doesn't seem to be initializing gettext in
panel_applet/main.c.  The attached patch fixes this and is making
translations work for me.  

Bill, there's also an easier way to test this without rebooting:
$ LANG=de_DE ./panel_applet/NetworkManagerNotification

Index: panel-applet/main.c
RCS file: /cvs/gnome/NetworkManager/panel-applet/main.c,v
retrieving revision 1.4
diff -u -p -r1.4 main.c
--- panel-applet/main.c	21 Jan 2005 18:43:25 -0000	1.4
+++ panel-applet/main.c	5 Feb 2005 20:16:19 -0000
@@ -25,6 +25,7 @@
 #include <config.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <libgnomeui/libgnomeui.h>
 #include "NMWirelessApplet.h"
@@ -35,6 +36,10 @@ main (int argc, char *argv[])
 	NMWirelessApplet *nmwa;
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain(GETTEXT_PACKAGE);
 	gnome_program_init ("NMWirelessApplet", VERSION, LIBGNOMEUI_MODULE,
 			    argc, argv, 

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