Here is the patch attached. > Patch for #300891, against evolution-data-server gnome-2-10 branch. > > It adds several gettext stuffs which a translatable library should do: > > * initialization with bindtextdomain() and bind_textdomain_codeset() > * defines CAMEL_EXPLICIT_TRANSLATION_DOMAIN to use explicit translation > domain. > * sets translation_domain field in each provider's CamelProvider -- Changwoo Ryu <cwryu debian org>
Index: camel/ChangeLog =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v retrieving revision 1.2434.4.5 diff -u -p -r1.2434.4.5 ChangeLog --- camel/ChangeLog 14 Apr 2005 20:11:59 -0000 1.2434.4.5 +++ camel/ChangeLog 7 May 2005 21:17:13 -0000 @@ -1,3 +1,37 @@ +2005-05-08 Changwoo Ryu <cwryu debian org> + + ** See bug #300891 + + * Makefile.am (INCLUDES): define CAMEL_EXPLICIT_TRANSLATION_DOMAIN + and EVOLUTION_LOCALEDIR. + + * camel.c (camel_init): initialize gettext with bindtextdomain() + and bind_textdomain_codeset(). + + * providers/groupwise/Makefile.am (INCLUDES): + * providers/imap/Makefile.am (INCLUDES): + * providers/imap4/Makefile.am (INCLUDES): + * providers/imapp/Makefile.am (INCLUDES): + * providers/local/Makefile.am (INCLUDES): + * providers/nntp/Makefile.am (INCLUDES): + * providers/pop3/Makefile.am (INCLUDES): + * providers/sendmail/Makefile.am (INCLUDES): + * providers/smtp/Makefile.am (INCLUDES): + define CAMEL_EXPLICIT_TRANSLATION_DOMAIN. + + * providers/groupwise/camel-groupwise-provider.c + (camel_provider_module_init): + * providers/imapp/camel-imapp-provider.c (camel_imapp_module_init): + * providers/imap/camel-imap-provider.c (camel_provider_module_init): + * providers/imap4/camel-imap4-provider.c (camel_provider_module_init): + * providers/local/camel-local-provider.c (camel_provider_module_init): + * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): + * providers/pop3/camel-pop3-provider.c (camel_provider_module_init): + * providers/sendmail/camel-sendmail-provider.c + (camel_provider_module_init): + * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): + set translation_domain in CamelProvider struct. + 2005-04-07 Jeffrey Stedfast <fejj novell com> Fix for bug #273945 Index: camel/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/Makefile.am,v retrieving revision 1.208 diff -u -p -r1.208 Makefile.am --- camel/Makefile.am 25 Feb 2005 03:49:26 -0000 1.208 +++ camel/Makefile.am 7 May 2005 21:17:13 -0000 @@ -22,6 +22,8 @@ INCLUDES = -I.. -I$(srcdir)/.. \ -DCAMEL_LIBEXECDIR=\""$(camellibexecdir)"\" \ -DCAMEL_PROVIDERDIR=\""$(camel_providerdir)"\" \ -DG_LOG_DOMAIN=\"camel\" \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ + -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ $(CAMEL_CFLAGS) libcamel_provider_1_2_la_SOURCES = \ Index: camel/camel.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/camel.c,v retrieving revision 1.52 diff -u -p -r1.52 camel.c --- camel/camel.c 20 Dec 2004 09:00:06 -0000 1.52 +++ camel/camel.c 7 May 2005 21:17:13 -0000 @@ -37,6 +37,7 @@ #include "camel.h" #include "camel-certdb.h" +#include "camel-i18n.h" #include "camel-mime-utils.h" #include "camel-provider.h" #include "camel-debug.h" @@ -74,6 +75,9 @@ camel_init (const char *configdir, gbool if (initialised) return 0; + + bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); camel_debug_init(); Index: camel/providers/groupwise/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/Makefile.am,v retrieving revision 1.13 diff -u -p -r1.13 Makefile.am --- camel/providers/groupwise/Makefile.am 11 Jan 2005 07:49:58 -0000 1.13 +++ camel/providers/groupwise/Makefile.am 7 May 2005 21:17:13 -0000 @@ -12,6 +12,7 @@ INCLUDES = -I.. \ $(CAMEL_CFLAGS) \ $(GNOME_INCLUDEDIR) \ $(SOUP_CFLAGS) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-groupwise-provider\" libcamelgroupwise_la_SOURCES = \ Index: camel/providers/groupwise/camel-groupwise-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-provider.c,v retrieving revision 1.26.4.1 diff -u -p -r1.26.4.1 camel-groupwise-provider.c --- camel/providers/groupwise/camel-groupwise-provider.c 22 Apr 2005 17:49:00 -0000 1.26.4.1 +++ camel/providers/groupwise/camel-groupwise-provider.c 7 May 2005 21:17:13 -0000 @@ -134,6 +134,7 @@ camel_provider_module_init(void) groupwise_provider.url_equal = groupwise_url_equal; groupwise_provider.auto_detect = groupwise_auto_detect_cb; groupwise_provider.authtypes = g_list_prepend (groupwise_provider.authtypes, &camel_groupwise_password_authtype); + groupwise_provider.translation_domain = GETTEXT_PACKAGE; if (use_imap) groupwise_provider.object_types[CAMEL_PROVIDER_STORE] = imap_provider->object_types [CAMEL_PROVIDER_STORE]; Index: camel/providers/imap/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap/Makefile.am,v retrieving revision 1.31 diff -u -p -r1.31 Makefile.am --- camel/providers/imap/Makefile.am 2 Dec 2004 08:03:30 -0000 1.31 +++ camel/providers/imap/Makefile.am 7 May 2005 21:17:13 -0000 @@ -12,6 +12,7 @@ INCLUDES = -I.. \ $(CAMEL_CFLAGS) \ $(GNOME_INCLUDEDIR) \ $(GTK_INCLUDEDIR) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-imap-provider\" libcamelimap_la_SOURCES = \ Index: camel/providers/imap/camel-imap-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap/camel-imap-provider.c,v retrieving revision 1.32 diff -u -p -r1.32 camel-imap-provider.c --- camel/providers/imap/camel-imap-provider.c 6 Dec 2004 07:43:07 -0000 1.32 +++ camel/providers/imap/camel-imap-provider.c 7 May 2005 21:17:13 -0000 @@ -110,6 +110,7 @@ camel_provider_module_init(void) imap_provider.url_equal = imap_url_equal; imap_provider.authtypes = camel_sasl_authtype_list (FALSE); imap_provider.authtypes = g_list_prepend (imap_provider.authtypes, &camel_imap_password_authtype); + imap_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&imap_provider); } Index: camel/providers/imap4/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap4/Makefile.am,v retrieving revision 1.10 diff -u -p -r1.10 Makefile.am --- camel/providers/imap4/Makefile.am 14 Dec 2004 20:16:25 -0000 1.10 +++ camel/providers/imap4/Makefile.am 7 May 2005 21:17:13 -0000 @@ -12,6 +12,7 @@ INCLUDES = \ $(CAMEL_CFLAGS) \ $(GNOME_INCLUDEDIR) \ $(GTK_INCLUDEDIR) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-imap4-provider\" libcamelimap4_la_SOURCES = \ Index: camel/providers/imap4/camel-imap4-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap4/camel-imap4-provider.c,v retrieving revision 1.9 diff -u -p -r1.9 camel-imap4-provider.c --- camel/providers/imap4/camel-imap4-provider.c 1 Feb 2005 21:02:28 -0000 1.9 +++ camel/providers/imap4/camel-imap4-provider.c 7 May 2005 21:17:13 -0000 @@ -153,6 +153,7 @@ camel_provider_module_init (void) imap4_provider.url_equal = imap4_url_equal; imap4_provider.authtypes = camel_sasl_authtype_list (FALSE); imap4_provider.authtypes = g_list_prepend (imap4_provider.authtypes, &camel_imap4_password_authtype); + imap4_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register (&imap4_provider); } Index: camel/providers/imapp/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/imapp/Makefile.am,v retrieving revision 1.3 diff -u -p -r1.3 Makefile.am --- camel/providers/imapp/Makefile.am 2 Dec 2004 08:03:30 -0000 1.3 +++ camel/providers/imapp/Makefile.am 7 May 2005 21:17:13 -0000 @@ -12,6 +12,7 @@ INCLUDES = -I.. \ $(CAMEL_CFLAGS) \ $(GNOME_INCLUDEDIR) \ $(GTK_INCLUDEDIR) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-imapp-provider\" libcamelimapp_la_SOURCES = \ Index: camel/providers/imapp/camel-imapp-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/imapp/camel-imapp-provider.c,v retrieving revision 1.5 diff -u -p -r1.5 camel-imapp-provider.c --- camel/providers/imapp/camel-imapp-provider.c 20 Sep 2004 05:59:54 -0000 1.5 +++ camel/providers/imapp/camel-imapp-provider.c 7 May 2005 21:17:13 -0000 @@ -85,6 +85,7 @@ camel_imapp_module_init(void) imapp_provider.authtypes = g_list_prepend(imapp_provider.authtypes, camel_sasl_authtype_list(FALSE)); imapp_provider.authtypes = g_list_prepend(imapp_provider.authtypes, &camel_imapp_password_authtype); + imapp_provider.translation_domain = GETTEXT_PACKAGE; /* blah ... could just use it in object setup? */ /* TEMPORARY */ Index: camel/providers/local/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/Makefile.am,v retrieving revision 1.17 diff -u -p -r1.17 Makefile.am --- camel/providers/local/Makefile.am 2 Dec 2004 08:03:30 -0000 1.17 +++ camel/providers/local/Makefile.am 7 May 2005 21:17:13 -0000 @@ -8,6 +8,7 @@ INCLUDES = \ -I$(top_srcdir)/intl \ -I$(top_srcdir) \ $(CAMEL_CFLAGS) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-local-provider\" libcamellocal_la_SOURCES = \ Index: camel/providers/local/camel-local-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/local/camel-local-provider.c,v retrieving revision 1.30.14.1 diff -u -p -r1.30.14.1 camel-local-provider.c --- camel/providers/local/camel-local-provider.c 13 Apr 2005 03:42:13 -0000 1.30.14.1 +++ camel/providers/local/camel-local-provider.c 7 May 2005 21:17:13 -0000 @@ -209,6 +209,7 @@ void camel_provider_module_init(void) mh_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mh_store_get_type (); mh_provider.url_hash = local_url_hash; mh_provider.url_equal = local_url_equal; + mh_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&mh_provider); if (!(path = getenv ("MAIL"))) @@ -217,12 +218,14 @@ void camel_provider_module_init(void) mbox_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mbox_store_get_type (); mbox_provider.url_hash = local_url_hash; mbox_provider.url_equal = local_url_equal; + mbox_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&mbox_provider); spool_conf_entries[0].value = path; /* default path - same as mbox */ spool_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type (); spool_provider.url_hash = local_url_hash; spool_provider.url_equal = local_url_equal; + spool_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&spool_provider); path = getenv("MAILDIR"); @@ -230,5 +233,6 @@ void camel_provider_module_init(void) maildir_provider.object_types[CAMEL_PROVIDER_STORE] = camel_maildir_store_get_type (); maildir_provider.url_hash = local_url_hash; maildir_provider.url_equal = local_url_equal; + maildir_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&maildir_provider); } Index: camel/providers/nntp/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/nntp/Makefile.am,v retrieving revision 1.30 diff -u -p -r1.30 Makefile.am --- camel/providers/nntp/Makefile.am 2 Dec 2004 08:03:30 -0000 1.30 +++ camel/providers/nntp/Makefile.am 7 May 2005 21:17:13 -0000 @@ -12,6 +12,7 @@ INCLUDES = -I../.. \ $(CAMEL_CFLAGS) \ $(GNOME_INCLUDEDIR) \ $(GTK_INCLUDEDIR) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-nntp-provider\" libcamelnntp_la_SOURCES = \ Index: camel/providers/nntp/camel-nntp-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/nntp/camel-nntp-provider.c,v retrieving revision 1.24 diff -u -p -r1.24 camel-nntp-provider.c --- camel/providers/nntp/camel-nntp-provider.c 20 Sep 2004 05:59:54 -0000 1.24 +++ camel/providers/nntp/camel-nntp-provider.c 7 May 2005 21:17:13 -0000 @@ -86,6 +86,7 @@ camel_provider_module_init(void) news_provider.url_hash = nntp_url_hash; news_provider.url_equal = nntp_url_equal; news_provider.authtypes = g_list_append (NULL, &camel_nntp_password_authtype); + news_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&news_provider); } Index: camel/providers/pop3/camel-pop3-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/pop3/camel-pop3-provider.c,v retrieving revision 1.32 diff -u -p -r1.32 camel-pop3-provider.c --- camel/providers/pop3/camel-pop3-provider.c 20 Sep 2004 05:59:54 -0000 1.32 +++ camel/providers/pop3/camel-pop3-provider.c 7 May 2005 21:17:13 -0000 @@ -104,6 +104,7 @@ camel_provider_module_init(void) pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, auth); pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, &camel_pop3_apop_authtype); pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, &camel_pop3_password_authtype); + pop3_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&pop3_provider); } Index: camel/providers/sendmail/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/sendmail/Makefile.am,v retrieving revision 1.15 diff -u -p -r1.15 Makefile.am --- camel/providers/sendmail/Makefile.am 2 Dec 2004 08:03:30 -0000 1.15 +++ camel/providers/sendmail/Makefile.am 7 May 2005 21:17:13 -0000 @@ -12,6 +12,7 @@ INCLUDES = \ $(CAMEL_CFLAGS) \ $(GNOME_INCLUDEDIR) \ $(GTK_INCLUDEDIR) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-sendmail-provider\" libcamelsendmail_la_SOURCES = \ Index: camel/providers/sendmail/camel-sendmail-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/sendmail/camel-sendmail-provider.c,v retrieving revision 1.19 diff -u -p -r1.19 camel-sendmail-provider.c --- camel/providers/sendmail/camel-sendmail-provider.c 20 Sep 2004 05:59:54 -0000 1.19 +++ camel/providers/sendmail/camel-sendmail-provider.c 7 May 2005 21:17:13 -0000 @@ -55,7 +55,8 @@ camel_provider_module_init(void) sendmail_provider.url_hash = camel_url_hash; sendmail_provider.url_equal = camel_url_equal; - + sendmail_provider.translation_domain = GETTEXT_PACKAGE; + camel_provider_register(&sendmail_provider); } Index: camel/providers/smtp/Makefile.am =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/smtp/Makefile.am,v retrieving revision 1.20 diff -u -p -r1.20 Makefile.am --- camel/providers/smtp/Makefile.am 2 Dec 2004 08:03:30 -0000 1.20 +++ camel/providers/smtp/Makefile.am 7 May 2005 21:17:13 -0000 @@ -8,6 +8,7 @@ INCLUDES = \ -I$(top_srcdir)/intl \ -I$(top_srcdir)/camel \ $(CAMEL_CFLAGS) \ + -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\" \ -DG_LOG_DOMAIN=\"camel-smtp-provider\" libcamelsmtp_la_SOURCES = \ Index: camel/providers/smtp/camel-smtp-provider.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/camel/providers/smtp/camel-smtp-provider.c,v retrieving revision 1.31 diff -u -p -r1.31 camel-smtp-provider.c --- camel/providers/smtp/camel-smtp-provider.c 20 Sep 2004 05:59:54 -0000 1.31 +++ camel/providers/smtp/camel-smtp-provider.c 7 May 2005 21:17:13 -0000 @@ -57,6 +57,7 @@ camel_provider_module_init(void) smtp_provider.authtypes = g_list_append (smtp_provider.authtypes, camel_sasl_authtype ("POPB4SMTP")); smtp_provider.url_hash = camel_url_hash; smtp_provider.url_equal = camel_url_equal; + smtp_provider.translation_domain = GETTEXT_PACKAGE; camel_provider_register(&smtp_provider); }
Attachment:
signature.asc
Description: This is a digitally signed message part