[Padre-dev] l10n & plugins
Jerome Quelin
jquelin at gmail.com
Sat Apr 25 03:37:45 PDT 2009
On 09/04/24 14:32 +0200, Jerome Quelin wrote:
> so, what do you think? if you agree with option 2, i would then:
> - introduce an official plugin_locale_dir() in plugin api
> - update _load_plugin() / _unload_plugin() of padre::pluginmanager to
> call addcataloglookuppathprefix() and addcatalog()
> - update padre::wx::main::relocale() to also call a new method
> padre::pluginmanager::relocale() which would in turn call relocale()
> defined by the plugin (if this method exists)
ok, after some thinking with alisas yesterday, i implemented the
solution.
the plugin api now has a new method plugin_locale_directory() where
plugin authors can specify where to find the new catalog. it defaults to
$sharedir/locale, so if you're using install_share from module::install
you don't have to bother about it.
then, plugin author need to create po files (and mo files) named after
the plugin plus the plugin. eg, german translation of Padre::Plugin::Vi
should be in a file named Vi-de.po (resp .mo)
and of course, use gettext in your plugin! :-)
note that i did not implement the relocale() call to plugin, since i
don't know if that's really useful by now. we'll see when the need
arise.
jérôme
--
jquelin at gmail.com
More information about the Padre-dev
mailing list