After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 59596 - Full names of processes not translated
Full names of processes not translated
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2001-08-27 04:17 UTC by Christian Rose
Modified: 2011-11-11 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Rose 2001-08-27 04:17:51 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.
Comment 1 Kevin Vandersloot 2001-08-28 02:03:07 UTC
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.
Comment 2 Christian Rose 2001-08-28 06:55:14 UTC
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!
Comment 3 Kevin Vandersloot 2001-09-19 01:12:01 UTC
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]);
Comment 4 Christian Rose 2001-09-19 01:21:28 UTC
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.
Comment 5 Kevin Vandersloot 2001-09-19 01:40:04 UTC
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? 
Comment 6 Christian Rose 2001-09-19 01:59:17 UTC
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.
Comment 7 Kevin Vandersloot 2001-09-20 13:05:19 UTC
Woohoo. Kjartan fixed this. Turns out the fix was just putting
#include <config.h> at the top of the #includes list.