From d980a70afc7ee1977286dc9f73e8cdad6b902a9f Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 7 Jan 2003 21:03:56 +0000 Subject: add a "translation_domain" field. (NULL for all providers in the camel * camel-provider.h (CamelProvider): add a "translation_domain" field. (NULL for all providers in the camel source tree itself). * camel-session.c (register_provider): Translate provider strings in the correct domain svn path=/trunk/; revision=19265 --- camel/ChangeLog | 8 ++++++++ camel/camel-provider.h | 5 +++++ camel/camel-session.c | 13 ++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index f1ff4814a8..f9c2ce1c3f 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2003-01-07 Dan Winship + + * camel-provider.h (CamelProvider): add a "translation_domain" + field. (NULL for all providers in the camel source tree itself). + + * camel-session.c (register_provider): Translate provider strings + in the correct domain + 2003-01-06 Not Zed * camel-store.c (store_sync): init local exception before doing diff --git a/camel/camel-provider.h b/camel/camel-provider.h index 5579a8c3d7..5e2bab2ad4 100644 --- a/camel/camel-provider.h +++ b/camel/camel-provider.h @@ -176,6 +176,11 @@ typedef struct { GHashFunc url_hash; GCompareFunc url_equal; + + /* gettext translation domain (NULL for providers in the + * evolution source tree). + */ + char *translation_domain; } CamelProvider; GHashTable *camel_provider_init (void); diff --git a/camel/camel-session.c b/camel/camel-session.c index 750c34c18c..c4634b45dd 100644 --- a/camel/camel-session.c +++ b/camel/camel-session.c @@ -207,21 +207,24 @@ register_provider (CamelSession *session, CamelProvider *provider) } /* Translate all strings here */ - provider->name = _(provider->name); - provider->description = _(provider->description); + +#define P_(string) dgettext (provider->translation_domain, string) + + provider->name = P_(provider->name); + provider->description = P_(provider->description); conf = provider->extra_conf; if (conf) { for (i=0;conf[i].type != CAMEL_PROVIDER_CONF_END;i++) { if (conf[i].text) - conf[i].text = _(conf[i].text); + conf[i].text = P_(conf[i].text); } } l = provider->authtypes; while (l) { CamelServiceAuthType *auth = l->data; - auth->name = _(auth->name); - auth->description = _(auth->description); + auth->name = P_(auth->name); + auth->description = P_(auth->description); l = l->next; } -- cgit