[Geany-devel] geany-plugins: Bug in translation

Frank Lanitz frank at xxxxx
Fri Oct 7 06:56:47 UTC 2011

Am 06.10.2011 22:51, schrieb Enrico Tröger:
> On Fri, 07 Oct 2011 00:44:58 +0400, Alexander wrote:
>> 06.10.2011 20:19, Frank Lanitz пишет:
>>> On Wed, 05 Oct 2011 17:30:23 +0400
>>> Alexander Petukhov<devel at apetukhov.ru>  wrote:
>>>> just wanted to add more info:
>>>> to easily see the effect try addons plugin and it's context menu
>>>> "Open URI" and "Copy URI" menu items.
>>>> Until some svn update, IIRC translations of my debugger and possibly
>>>> other plugins were more
>>>> complete, from some point I noticed that some strings become
>>>> untranslated but then I decided
>>>> that it was a bug in my plugin, and didn't pay much attention to it.
>>> It looks a bit like its related to position of including of
>>> geanyplugin.h. I guess I've fixed it for geany VC but needs some
>>> further investigation.
>>> [...]
>> as I discovered the point is that you have to include config.h in
>> every file that contains translatable strings, actually #define 
>> GETTEXT_PACKAGE "geany-plugins" is the only line that is needed from
>> it. Previosuly it worked without it somehow.
>> if GETTEXT_PACKAGE is not defined, textdomain(NULL) returns NULL, i.e. 
>> there is no textdomain set, with GETTEXT_PACKAGE it returns "messages" 
>> while I expected to see "geany-plugins" here.
>> I tried to understand how i18n is realized in Geany but I couldn't
>> find any textdomain call in Geany sources.
>> 2Enrico: every plugin that do not include config.h in a file with 
>> strings seems to be untranslated now. As I mentioned above it worked 
>> without it earlier so I suppose other plugins can also miss this
>> include and therefore be untranslated but I didn't check.
>> So two ways so far:
>> 1. include config.h everywhere it is nessesary
>> 2. look up what has been broken till 0.20
> Ah, thanks for investigation.
> Then this is probably caused by the change to not automatically include
> config.h in geany.h which happened some months ago (this was a change
> in Geany where it was wrong before). Plugins just "used" that wrong
> behaviour and now it shows how they are broken. So we probably need to
> review each plugin again for this issue.

Not sure whether this is the only reasons as at my hacking session
yesterday I recognized some plugins of mine which do in include config.h
but didn't work. I was able to fix at least the symptomes by moving
#include <geanyplugin.h> around so its being included on last position.


More information about the Devel mailing list