GNOME Bugzilla – Bug 59596
Full names of processes not translated
Last modified: 2011-11-11 10:03:55 UTC
Testing with Procman 0.10.1 in Swedish. The full names (Galeon Web Browser, XMMS Media Player, etc) are not shown translated, even though they are translated in the po file.
hmm, I don't know enough about i18n to know why they aren't translated. The offending code is here: prettyname = g_strdup (table[i + 1]); where table[i+1] resides in defaulttable.h and looks like N_("Galeon Web Browser") Maybe you know how to properly do this, but I will try to ask around.
You will have to send these names through gettext () too when used, just marking them with N_() won't make them translated in the running app. I don't know if this is the problem, it's just something that I noticed with the code above. This is mentioned on http://www.gnu.org/manual/gettext/html_chapter/gettext_3.html#SEC18 Again, I could be very wrong, so don't take my word for granted. Thanks for looking into this!
Okay here is where the code resides. I'm not sure how to fix this and I also don't know how the really test to see if a fix works. Asking the i18n list for help. The strings are defined in defaulttable.h as in: "sawfish", N_("Sawfish Window Manager"), "sawfish.png", They are then added in the file prettytable.h in the function pretty_table_add_table as in: prettyname = g_strdup (table[i + 1]);
Does prettyname = g_strdup (_(table[i + 1])); work? As I said, if you use N_() you also need to pass the string through _() when you actually use it. I don't know if the above works, but you need to pass this through _() somewhere. Only using N_() is not sufficient.
I tried that, but I'm not sure if I'm testing correctly. Do I have to edit the po files or something like that? I try $LANG=es_ES procman to run under a different language. Is that correct?
You don't need to edit the po files. The messages are already present and translated in the sv.po file. To use Swedish, set LANG="sv_SE", but also LC_ALL="sv_SE". I believe the simplest way to test is simply to log out of GNOME and (if you use GDM) to select Swedish as the language and log in again.
Woohoo. Kjartan fixed this. Turns out the fix was just putting #include <config.h> at the top of the #includes list.