GNOME Bugzilla – Bug 631615
egg_set_desktop_file() does not return translated value from desktop file
Last modified: 2011-04-04 10:03:01 UTC
egg_set_desktop_file() says that it returns translated value from .desktop file, but it in fact does not: http://git.gnome.org/browse/libegg/tree/libegg/smclient/eggdesktopfile.c#n1442 This can lead to bugs like[1]. [1]: https://bugzilla.gnome.org/show_bug.cgi?id=631612
Created attachment 171904 [details] [review] Quick and dirty, but working hack to really return the localized Name from desktop files Just a quick POC, something like this should do the trick. Probably the same should happen in egg_desktop_file_get_name().
Isn't the issue that desktop_file->name is not localized? It should just be initialized with g_key_file_get_locale_string() instead of g_key_file_get_string()...
Gabor, could you respond to Vincent, please?
Ooops, sorry Vincent, I think I didn't noticed your comment. Yes, the problem is this, in the sense that the translation is present in the desktop file, but the function does not retrieve that value. I have no real deep knowledge of libegg, so the implementation details are not my strength here :). As egg_desktop_file_get_locale_string calls g_key_file_get_locale_string, I thought it may be what we need here, but calling it directly will be good too.
Fix as suggested in comment 2 pushed as commit e7433931d414bf523d800dead8e7df2fe4bd7644.