[Geany-devel] Localization of plugin names in plugin manager

Nick Treleaven nick.treleaven at xxxxx
Fri Sep 4 11:06:56 UTC 2009


On Thu, 03 Sep 2009 22:44:07 +0400
Eugene Arshinov <earshinov at gmail.com> wrote:

> > The other question is how to implement this with the PLUGIN_SET_INFO
> > macro so main_locale_init() is called correctly (and only when
> > necessary?) for all plugins.
> >   
> 
> Function plugin_set_info() is called exactly once after a plugin is 
> loaded. Function main_locale_init() should be called at least once (the 
> less calls the better) after a plugin is loaded, as far as I understand 
> what this call does (I had very little experience with gettext). So why 
> not just put a single call into PLUGIN_SET_INFO?
> 
> void plugin_set_info(PluginInfo* info) \
>     { \
>         main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); \

But does this work for Geany's core plugins? And it surely wouldn't
work for plugins with no translation setup (e.g. plugins just starting
to be developed).

I don't know much about gettext code, what happens after a plugin is
unloaded? It wouldn't be good if the translations remained in memory.
Is there a function to call to 'unload' them when a plugin is
unloaded?

(ATM it's not much of a problem because any plugins not enabled don't
have their translations loaded).

Regards,
Nick



More information about the Devel mailing list