aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-01-08 05:03:56 +0800
committerDan Winship <danw@src.gnome.org>2003-01-08 05:03:56 +0800
commitd980a70afc7ee1977286dc9f73e8cdad6b902a9f (patch)
tree087bf589e2920bb22d3f62e6f9e024aec81c5426 /camel
parent24b6be3288062f3a32481dfb018a1b03684b1afa (diff)
downloadgsoc2013-evolution-d980a70afc7ee1977286dc9f73e8cdad6b902a9f.tar.gz
gsoc2013-evolution-d980a70afc7ee1977286dc9f73e8cdad6b902a9f.tar.zst
gsoc2013-evolution-d980a70afc7ee1977286dc9f73e8cdad6b902a9f.zip
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
Diffstat (limited to 'camel')
-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 f1ff4814a8..f9c2ce1c3f 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 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;
}