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

Enrico Tröger enrico.troeger at xxxxx
Sun Sep 6 13:49:03 UTC 2009

On Sun, 6 Sep 2009 17:34:41 +0400, Eugene wrote:

>В 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
>> >> 
>> >> 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 :-)

Ok, in the case that the plugin name is that different in the
translation, it might be weird. Not sure whether this should be
considered a bug in the translation or in Geany (as we are talking
about his).
The easiest thing would be to argument that the plugin name shouldn't
be translated as it is a name. On the hand, some plugin names are more
like descriptions than real, plain names and so translating them makes
sense. But this is just the easy was, not necessarily the correct
one :).


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/e17cf27d/attachment.pgp>

More information about the Devel mailing list