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

Enrico Tröger enrico.troeger at xxxxx
Sun Sep 6 12:41:35 UTC 2009


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.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090906/0e55ed5e/attachment.pgp>


More information about the Devel mailing list