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 631612 - Program name appears untranslated in the window title and About dialog
Program name appears untranslated in the window title and About dialog
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 663480 (view as bug list)
Depends on: 631615
Blocks:
 
 
Reported: 2010-10-07 14:29 UTC by Gabor Kelemen
Modified: 2011-12-07 13:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove the buggy egg_set_desktop_file call (1.10 KB, patch)
2010-10-07 14:35 UTC, Gabor Kelemen
rejected Details | Review

Description Gabor Kelemen 2010-10-07 14:29:56 UTC
Originally reported here:
https://bugs.launchpad.net/ubuntu/+source/evince/+bug/656033

The "Document Viewer" window title shows untranslated in my Spanish desktop, albeit it's translated in Launchpad since 2006-03-18:

  https://translations.launchpad.net/ubuntu/lucid/+source/evince/+pots/evince/es/91/+translate

and the translation is included in the evince.mo file:

$ strings -eS /usr/share/locale-langpack/es/LC_MESSAGES/evince.mo | grep "Document Viewer\|Visor de documentos"
Document Viewer
Document Viewer
GNOME Document Viewer
Visor de documentos
Visor de documentos
Visor de documentos de GNOME
Visor de documentos de GNOME

The problem has been confirmed in Lucid and Maverick.

I attach an screenshot to illustrate the problem.

http://launchpadlibrarian.net/57204289/evince.png

The same happens in the About dialog box, and also on Fedora 13.


I managed to track down the problem, it's because of this part of shell/main.c:

#if defined(WITH_SMCLIENT) && defined(GDK_WINDOWING_X11)
	egg_set_desktop_file (GNOMEDATADIR "/applications/evince.desktop");
#else
	/* Manually set name and icon */
	g_set_application_name (_("Document Viewer"));
	gtk_window_set_default_icon_name ("evince");
#endif /* WITH_SMCLIENT && GDK_WINDOWING_X11 */

http://git.gnome.org/browse/evince/tree/shell/main.c#n306

The egg_set_desktop_file call does not return the translated value, even that the implementation says so. 

There are two possible solutions: either remove this call entirely, and rely on the direct g_set_application_name and gtk_window_set_default_icon_name calls, or fix the problem in libegg and after that update the copy in evince.
Comment 1 Gabor Kelemen 2010-10-07 14:35:11 UTC
Created attachment 171898 [details] [review]
Remove the buggy egg_set_desktop_file call

Patch for the first solution. I don't know if this is a good enough solution, but anyway...
Comment 2 Gabor Kelemen 2010-10-07 15:00:57 UTC
Bug against libegg: https://bugzilla.gnome.org/show_bug.cgi?id=631615
Comment 3 Christian Persch 2010-10-07 16:09:55 UTC
Comment on attachment 171898 [details] [review]
Remove the buggy egg_set_desktop_file call

This patch obviously isn't the right fix.
Comment 4 Christian Persch 2010-10-07 16:12:32 UTC
You could use gg_set_desktop_file_without_defaults() and then manually set the app name and default icon; although fixing the eggsmclient bug in libegg would be preferable.
Comment 5 Gabor Kelemen 2011-11-15 12:10:16 UTC
Status update: 
Bug #631615 was fixed some time ago in libegg, but evince still has not updated its copy of libegg/smclient/eggdesktopfile.c. Can we have that file pulled in? In my jhbuild, this fixed the problem.
Comment 6 Carlos Garcia Campos 2011-11-19 12:35:36 UTC
Fixed in git master, thanks for reporting.
Comment 7 Sebastien Bacher 2011-12-07 13:33:48 UTC
*** Bug 663480 has been marked as a duplicate of this bug. ***