[Geany-devel] Localization of plugin names in plugin manager
Eugene Arshinov
earshinov at xxxxx
Sun Sep 6 13:34:41 UTC 2009
В Sun, 6 Sep 2009 14:41:35 +0200
Enrico Tröger <enrico.troeger at uvena.de> пишет:
> On Fri, 4 Sep 2009 12:06:56 +0100, Nick wrote:
>
> >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?
>
>
> I'm not sure all this is necessary.
> I spent quite some time on this issue when we started implementing the
> plugin manager dialog and this issue came up the first time. I didn't
> find an easy solution at the that time. Then I or we (don't remember
> exactly but we talked about it) decided that it is not such an
> important issue and just left it out. It's all about only the
> description and the author field of the plugins in the plugin manager
> dialog. I personally just don't care so much about these little
> information. And it all works once the plugin is loaded.
>
Great, I won't care of it then :-) Thanks for explanation.
Just to say, I discovered this issue when debugging modified addons
plugin. I wondered why it disappeared from the list after I activated
and deactivated it. After an hour of thinking and debugging I noticed
that its name was localized and it moved to the end of plugin list :-)
>
> Regards,
> Enrico
>
More information about the Devel
mailing list