=?ISO-8859-1?Q?=5BResent=5D=A0Code?= freeze break request for evolution



Hi.

I've been chasing a bug in evolution where translations stopped working
correctly after opening the plugin dialog. Finally tracked it down to a
couple plugins that were calling bindtextdomain() with the wrong
translation domain (it wasn't set because of a bug in Makefile.am).

The patch removes the calls to bindtextdomain() and friends from the
plugins since they should just be inheriting the translation domain from
main() anyway since they are distributed together with the application
and are dlopened by evolution itself.

Cheers
Kjartan


>From c3b26f97b8a34fd352a3c70ddc0bed1bf828fc5a Mon Sep 17 00:00:00 2001
From: Kjartan Maraas <kmaraas gnome org>
Date: Fri, 1 Apr 2011 15:28:43 +0200
Subject: [PATCH 1/1] Fix translations being boken by removing calls to bindtextdomain() from plugins.
 It shouldn't be needed for plugins that live in the evolution source tree anyway
 since they should just use the translation domain they inherit from main().


Signed-off-by: Kjartan Maraas <kmaraas gnome org>
---
 plugins/dbx-import/Makefile.am         |    2 --
 plugins/dbx-import/dbx-importer.c      |    8 --------
 plugins/pst-import/Makefile.am         |    2 --
 plugins/pst-import/pst-importer.c      |    8 --------
 plugins/tnef-attachments/Makefile.am   |    2 --
 plugins/tnef-attachments/tnef-plugin.c |    4 ----
 6 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/plugins/dbx-import/Makefile.am b/plugins/dbx-import/Makefile.am
index d380104..ecd4890 100644
--- a/plugins/dbx-import/Makefile.am
+++ b/plugins/dbx-import/Makefile.am
@@ -17,8 +17,6 @@ liborg_gnome_dbx_import_la_CPPFLAGS =			\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_builddir)				\
-	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
-	-DLOCALEDIR="\"$(LOCALEDIR)\""			\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_CFLAGS)				\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index f4dd050..294b466 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -811,13 +811,5 @@ org_gnome_evolution_readdbx_cancel (EImport *ei,
 gint
 e_plugin_lib_enable (EPlugin *ep, gint enable)
 {
-	if (enable) {
-		bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-		bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-		g_message ("DBX Plugin enabled");
-	} else {
-		g_message ("DBX Plugin disabled");
-	}
-
 	return 0;
 }
diff --git a/plugins/pst-import/Makefile.am b/plugins/pst-import/Makefile.am
index b4745b6..71b37a9 100644
--- a/plugins/pst-import/Makefile.am
+++ b/plugins/pst-import/Makefile.am
@@ -17,8 +17,6 @@ liborg_gnome_pst_import_la_CPPFLAGS =			\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_builddir)				\
-	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
-	-DLOCALEDIR="\"$(LOCALEDIR)\""			\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_CFLAGS)				\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index afd4767..603e739 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -1683,14 +1683,6 @@ org_credativ_evolution_readpst_cancel (EImport *ei, EImportTarget *target, EImpo
 gint
 e_plugin_lib_enable (EPlugin *ep, gint enable)
 {
-	if (enable) {
-		bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-		bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-		g_message ("pst Plugin enabled");
-	} else {
-		g_message ("pst Plugin disabled");
-	}
-
 	return 0;
 }
 
diff --git a/plugins/tnef-attachments/Makefile.am b/plugins/tnef-attachments/Makefile.am
index 4cc8a30..97240ce 100644
--- a/plugins/tnef-attachments/Makefile.am
+++ b/plugins/tnef-attachments/Makefile.am
@@ -16,8 +16,6 @@ liborg_gnome_tnef_attachments_la_CPPFLAGS =		\
 	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
-	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
-	-DLOCALEDIR="\"$(localedir)\""			\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_MAIL_CFLAGS)			\
 	$(TNEF_CFLAGS)
diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c
index 977189e..0f97512 100644
--- a/plugins/tnef-attachments/tnef-plugin.c
+++ b/plugins/tnef-attachments/tnef-plugin.c
@@ -216,10 +216,6 @@ e_plugin_lib_enable (EPlugin *ep, gint enable)
 	    return 0;
 
     loaded = TRUE;
-    if (enable) {
-	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-	    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-    }
 
     return 0;
 }
-- 
1.7.4.2



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