On Thu, 03 Sep 2009 12:10:21 +0400 Eugene Arshinov earshinov@gmail.com wrote:
The trouble: in plugin manager plugin name (and also its description) is not localized until plugin is activated. The cause (probably): main_locale_init(LOCALEDIR, GETTEXT_PACKAGE) is called only in plugin_init(), and plugin_set_info() is obviously called before that.
...
I see two ways to fix this problem. The first way is very ugly and limitating: just call main_locale_init() from plugin_set_info(), and recompile all plugins. The second way is to add new function to be implemented in plugins (say, "plugin_loaded") and call that before anything else (particularly, before plugin_set_info()).
So, the question is how to solve this problem.
I would prefer calling main_locale_init() from plugin_set_info(), but would that have much of a performance impact for the plugin manager dialog? I guess it's probably necessary though.
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.
Regards, Nick