[Github-comments] [geany-plugins] Add new "Lineoperations" plugin (#324)

Colomban Wendling notifications at xxxxx
Sat Jan 16 13:29:42 UTC 2016


> +
> +
> +void
> +lo_cleanup(void)
> +{
> +	if(main_menu_item) gtk_widget_destroy(main_menu_item);
> +}
> +
> +
> +G_MODULE_EXPORT
> +void geany_load_module(GeanyPlugin *plugin)
> +{
> +    plugin->info->name        = _("Line Operations");
> +    plugin->info->description = _("Line Operations provides a handful of functions that can be applied to a document such as, removing duplicate lines, removing empty lines, removing lines with only whitespace, and sorting lines.");
> +    plugin->info->version     = "0.1";
> +    plugin->info->author      = _("Sylvan Mostert <smostert.dev at gmail.com>");

To allow those strings actually be displayed translated, you should call `main_locale_init()` before filling the plugin info (well, before any call to `_()`).  See http://www.geany.org/manual/reference/howto.html#translatable_plugin_information

Note: `main_loacle_init()` only has to be called once per plugin run, so calling it here will be enough for the whole plugin, no need to call it again in `init()` or anything.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/324/files#r49931725
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160116/8b525912/attachment.html>


More information about the Github-comments mailing list