From cd453acb04a6ccca20028f325d786980b570cad4 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 22 Dec 2004 07:36:46 +0000 Subject: include config.h. 2004-12-22 Not Zed * e-plugin.c: include config.h. 2004-12-17 Not Zed * e-popup.c (e_popup_add_items): add a translation domain to api. (e_popup_create_menu): translate the label using the supplied domain. (emph_popup_factory): pass domain to popup_add_items. * e-plugin.c (ep_construct): if we have a localedir set, then bindtextdomain so gettext can find it. svn path=/trunk/; revision=28175 --- e-util/e-plugin.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'e-util/e-plugin.c') diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index 0d74043b4d..d7320ab2cf 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -1,4 +1,8 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -113,8 +117,15 @@ ep_construct(EPlugin *ep, xmlNodePtr root) { xmlNodePtr node; int res = -1; + char *localedir; ep->domain = e_plugin_xml_prop(root, "domain"); + if (ep->domain + && (localedir = e_plugin_xml_prop(root, "localedir"))) { + bindtextdomain(ep->domain, localedir); + g_free(localedir); + } + ep->name = e_plugin_xml_prop_domain(root, "name", ep->domain); pd(printf("creating plugin '%s' '%s'\n", ep->name?ep->name:"un-named", ep->id)); -- cgit