It looks like it's a bug.
I started to do russian translation today and noticed that some strings do not appear translated whatever I do with them while others do. Further investigation showed that the only translated strings are those that reside in the main plugin file, where plugin entry points are defined.
I researched "addons" plugin and for it it's true, only strings from addons.c are translated.
Maybe some bug with PLUGIN_SET_TRANSLATABLE_INFO macro?
E-gards, Alexander
Am 05.10.2011 11:40, schrieb Alexander Petukhov:
It looks like it's a bug.
I started to do russian translation today and noticed that some strings do not appear translated whatever I do with them while others do. Further investigation showed that the only translated strings are those that reside in the main plugin file, where plugin entry points are defined.
I researched "addons" plugin and for it it's true, only strings from addons.c are translated.
Maybe some bug with PLUGIN_SET_TRANSLATABLE_INFO macro?
I was look after some issue yesterday which sounds a bit similar. I did commit a possible fix for GeanySendMail with svn r2230 but not 100% sure whether its the correct solution or whether it will work clean. Wanted to go on looking into it this evening CEST.
Cheers, Frank
with geanysendmail it's fine now, I checked recently, but there is only one source file in it, so it follows the behaviour I've described.
E-gards, Alexander
Am 05.10.2011 13:19, schrieb Alexander Petukhov:
with geanysendmail it's fine now, I checked recently, but there is only one source file in it, so it follows the behaviour I've described.
GeanyLaTeX should be effected too by multiple files. -> insert special characters submenu.
Cheers, Frank
Latex insert special chars submenu is fine, but the actual strings loading also happens in "geanylatex.c" in "create_sub_menu" function, while in "letters.c" strings as glib docs say are only "marked for translation" using "N_" macro, by the way I have no idea what does it mean )
E-gards, Alexander
Am 05.10.2011 15:07, schrieb Alexander Petukhov:
Latex insert special chars submenu is fine, but the actual strings loading also happens in "geanylatex.c" in "create_sub_menu" function, while in "letters.c" strings as glib docs say are only "marked for translation" using "N_" macro, by the way I have no idea what does it mean )
Ah ok. Right. Well. I hope I can digg a bit deeper later today.
Cheers, Frank
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.
E-gards, Alexander
On Wed, 05 Oct 2011 17:30:23 +0400 Alexander Petukhov devel@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.
Cheers, Frank
On Thu, 6 Oct 2011 18:19:25 +0200, Frank wrote:
On Wed, 05 Oct 2011 17:30:23 +0400 Alexander Petukhov devel@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.
Are more or even all plugins affected?
Regards, Enrico
06.10.2011 20:19, Frank Lanitz пишет:
On Wed, 05 Oct 2011 17:30:23 +0400 Alexander Petukhovdevel@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.
Cheers, Frank
Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
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
which one to use?
E-gards, Alexander
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 Petukhovdevel@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:
- include config.h everywhere it is nessesary
- 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.
Any volunteers? :)
Regards, Enrico
Le 06/10/2011 22:51, Enrico Tröger a écrit :
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 Petukhovdevel@apetukhov.ru wrote:
[...]
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:
- include config.h everywhere it is nessesary
- 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.
+1
Any volunteers? :)
Actually, though boring, it should be easy. Check POTFILES and see whether all files listed here correctly include config.h at the top. I can do this if needed.
Cheers, Colomban
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 Petukhovdevel@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:
- include config.h everywhere it is nessesary
- 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.
Cheers, Frank
07.10.2011 10:56, Frank Lanitz пишет:
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 Petukhovdevel@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:
- include config.h everywhere it is nessesary
- 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.
Cheers, Frank
Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
yep, config.h i.e. #define GETTEXT_PACKAGE have to be placed before #include <geanyplugin.h> otherwise it doesn't work. I just wanted to say that some plugins do not even include config.h, at least my one didn't :)
E-gards, Alexander
Am 07.10.2011 09:34, schrieb Alexander Petukhov:
yep, config.h i.e. #define GETTEXT_PACKAGE have to be placed before #include <geanyplugin.h> otherwise it doesn't work. I just wanted to say that some plugins do not even include config.h, at least my one didn't :)
Ah. OK. This lights up things a bit. Well, still 1 week left to finalize cleaning up ;)
Cheers Frank
07.10.2011 11:46, Frank Lanitz пишет:
Am 07.10.2011 09:34, schrieb Alexander Petukhov:
yep, config.h i.e. #define GETTEXT_PACKAGE have to be placed before #include<geanyplugin.h> otherwise it doesn't work. I just wanted to say that some plugins do not even include config.h, at least my one didn't :)
Ah. OK. This lights up things a bit. Well, still 1 week left to finalize cleaning up ;)
Cheers Frank _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Frank, sorry for embarrassing, can you do strings "refreeze", I've found untranslated strings in debugger, I now understand what is "mark for translation" ), I had such statically allocated strings but fixed it with last commit. There were no commits to "po" till string freeze, so it doesn't seem to break anything.
I planned to do translation and check other plugins for lack of config.h side by side then.
E-gards, Alexander
Am 07.10.2011 11:57, schrieb Alexander Petukhov:
07.10.2011 11:46, Frank Lanitz пишет:
Am 07.10.2011 09:34, schrieb Alexander Petukhov:
yep, config.h i.e. #define GETTEXT_PACKAGE have to be placed before #include<geanyplugin.h> otherwise it doesn't work. I just wanted to say that some plugins do not even include config.h, at least my one didn't :)
Ah. OK. This lights up things a bit. Well, still 1 week left to finalize cleaning up ;)
Cheers Frank _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Frank, sorry for embarrassing, can you do strings "refreeze", I've found untranslated strings in debugger, I now understand what is "mark for translation" ), I had such statically allocated strings but fixed it with last commit. There were no commits to "po" till string freeze, so it doesn't seem to break anything.
I planned to do translation and check other plugins for lack of config.h side by side then.
I will send out an update to ask everyone to do a make updatepo.
Cheers, Frank