[evolution-mapi] Bug #615678 - i18n not working



commit 126a311bd6820bc7256c8f64bbbb373708f5633b
Author: Mario Carrion <mario carrion mx>
Date:   Tue Apr 27 12:13:37 2010 +0200

    Bug #615678 - i18n not working

 .../exchange-mapi-account-listener.c               |    2 +-
 .../exchange-mapi-account-settings.c               |    2 +-
 .../exchange-mapi-account-setup.c                  |    2 +-
 src/addressbook/e-book-backend-mapi-gal.c          |    2 +-
 src/calendar/e-cal-backend-mapi.c                  |    2 +-
 src/camel/Makefile.am                              |    1 +
 src/camel/camel-mapi-notifications.c               |    2 +-
 src/camel/camel-mapi-provider.c                    |    7 ++++++-
 src/camel/camel-mapi-store.c                       |    2 +-
 src/camel/camel-mapi-store.h                       |    2 +-
 src/camel/camel-mapi-transport.c                   |    2 +-
 src/camel/camel-mapi-utils.c                       |    6 +++++-
 12 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/src/account-setup-eplugin/exchange-mapi-account-listener.c b/src/account-setup-eplugin/exchange-mapi-account-listener.c
index bf5a93b..f2fe738 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-listener.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-listener.c
@@ -28,7 +28,7 @@
 #include "exchange-mapi-account-listener.h"
 #include "exchange-mapi-account-setup.h"
 #include <string.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 #include <camel/camel.h>
 #include <libedataserverui/e-passwords.h>
 #include <libedataserver/e-account.h>
diff --git a/src/account-setup-eplugin/exchange-mapi-account-settings.c b/src/account-setup-eplugin/exchange-mapi-account-settings.c
index d09536f..4a04299 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-settings.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-settings.c
@@ -25,7 +25,7 @@
 #include <config.h>
 #endif
 
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 
 #include <libedataserver/e-xml-hash-utils.h>
diff --git a/src/account-setup-eplugin/exchange-mapi-account-setup.c b/src/account-setup-eplugin/exchange-mapi-account-setup.c
index ded848e..a67449d 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-setup.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-setup.c
@@ -28,7 +28,7 @@
 
 #include <string.h>
 #include <unistd.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #include <gtk/gtk.h>
 #include <libedataserver/e-xml-hash-utils.h>
diff --git a/src/addressbook/e-book-backend-mapi-gal.c b/src/addressbook/e-book-backend-mapi-gal.c
index d967f79..045c8ea 100644
--- a/src/addressbook/e-book-backend-mapi-gal.c
+++ b/src/addressbook/e-book-backend-mapi-gal.c
@@ -7,7 +7,7 @@
 #include <string.h>
 #include <glib.h>
 #include <glib/gstdio.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #include <sys/time.h>
 
diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
index 729a93c..8efc47e 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -25,7 +25,7 @@
 #include <config.h>
 #endif
 
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 #include <gio/gio.h>
 
 #include "e-cal-backend-mapi.h"
diff --git a/src/camel/Makefile.am b/src/camel/Makefile.am
index eb1f108..fc7d125 100644
--- a/src/camel/Makefile.am
+++ b/src/camel/Makefile.am
@@ -10,6 +10,7 @@ AM_CPPFLAGS = -I.. 				\
 	$(CAMEL_CFLAGS)				\
 	$(LIBECAL_CFLAGS)			\
         $(LIBMAPI_CFLAGS)                       \
+	-DEXCHANGE_MAPI_LOCALEDIR=\"$(localedir)\" \
 	-DG_LOG_DOMAIN=\"camel-mapi-provider\"
 
 libcamelmapi_la_SOURCES = 			\
diff --git a/src/camel/camel-mapi-notifications.c b/src/camel/camel-mapi-notifications.c
index 2ef3f37..b57f33b 100644
--- a/src/camel/camel-mapi-notifications.c
+++ b/src/camel/camel-mapi-notifications.c
@@ -31,7 +31,7 @@
 #include <errno.h>
 
 #include <glib.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 #include <glib/gstdio.h>
 #include <gio/gio.h>
 
diff --git a/src/camel/camel-mapi-provider.c b/src/camel/camel-mapi-provider.c
index 3388b90..dc26788 100644
--- a/src/camel/camel-mapi-provider.c
+++ b/src/camel/camel-mapi-provider.c
@@ -27,7 +27,7 @@
 
 #include <sys/types.h>
 #include <string.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #include <gmodule.h>
 
@@ -101,6 +101,7 @@ void
 camel_provider_module_init(void)
 {
 	mapi_provider.name = "Exchange MAPI";
+	mapi_provider.translation_domain = (gchar *) GETTEXT_PACKAGE;
 	mapi_provider.auto_detect = mapi_auto_detect_cb;
 	mapi_provider.authtypes = g_list_prepend (mapi_provider.authtypes, &camel_mapi_password_authtype);
 	mapi_provider.url_hash = mapi_url_hash;
@@ -108,6 +109,10 @@ camel_provider_module_init(void)
 	mapi_provider.license = "LGPL";
 	mapi_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mapi_store_get_type();
 	mapi_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = camel_mapi_transport_get_type();
+
+	bindtextdomain (GETTEXT_PACKAGE, EXCHANGE_MAPI_LOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+
 	camel_provider_register (&mapi_provider);
 }
 
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index a308218..199af49 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -30,7 +30,7 @@
 #include <ctype.h>
 #include <errno.h>
 
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 #include <glib/gstdio.h>
 
 #include "camel-mapi-store.h"
diff --git a/src/camel/camel-mapi-store.h b/src/camel/camel-mapi-store.h
index fa25992..c701c78 100644
--- a/src/camel/camel-mapi-store.h
+++ b/src/camel/camel-mapi-store.h
@@ -24,7 +24,7 @@
 #ifndef CAMEL_MAPI_STORE_H
 #define CAMEL_MAPI_STORE_H
 
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #include <camel/camel.h>
 
diff --git a/src/camel/camel-mapi-transport.c b/src/camel/camel-mapi-transport.c
index c84190d..827a833 100644
--- a/src/camel/camel-mapi-transport.c
+++ b/src/camel/camel-mapi-transport.c
@@ -27,7 +27,7 @@
 
 #include <string.h>
 
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #include <libmapi/libmapi.h>
 #include <gen_ndr/exchange.h>
diff --git a/src/camel/camel-mapi-utils.c b/src/camel/camel-mapi-utils.c
index 1ef05fd..660063c 100644
--- a/src/camel/camel-mapi-utils.c
+++ b/src/camel/camel-mapi-utils.c
@@ -23,11 +23,15 @@
 
 /* -- Generate MIME to ITEM -- */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
 
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #include <libmapi/libmapi.h>
 #include <gen_ndr/exchange.h>



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