summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-01-07 21:03:56 +0000
committerDan Winship <danw@src.gnome.org>2003-01-07 21:03:56 +0000
commit0f32fbf40a4f009ffbe908f6351f5ac9c2f862b4 (patch)
tree063f3c8b1f9249e680b9cdd9d4e11a7fae21eda4
parentdb371e49b4a15331a020ae6c902c3d0fe57968ab (diff)
downloadevolution-data-server-0f32fbf40a4f009ffbe908f6351f5ac9c2f862b4.tar.gz
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
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-provider.h5
-rw-r--r--camel/camel-session.c13
3 files changed, 21 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index f1ff4814a..f9c2ce1c3 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2003-01-07 Dan Winship <danw@ximian.com>
+
+ * 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 <NotZed@Ximian.com>
* camel-store.c (store_sync): init local exception before doing
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
index 5579a8c3d..5e2bab2ad 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 750c34c18..c4634b45d 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;
}