Bug 1455 - (int-91146) application names are not translated in the menu
(int-91146)
: application names are not translated in the menu
Status: RESOLVED FIXED
Product: Desktop platform
Application Menu
: 4.1.3 (5.2008.43-7)
: All Maemo
: Low normal (vote)
: 5.0-alpha
Assigned To: unassigned
: task-navigator-bugs
:
: easyfix
:
:
  Show dependency tree
 
Reported: 2007-05-18 22:43 UTC by Christian Persch (GNOME)
Modified: 2009-03-02 13:38 UTC (History)
3 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Christian Persch (GNOME) (reporter) 2007-05-18 22:43:11 UTC
This concerns maemo-af-desktop / hildon-desktop.

When you have an application that installs a .desktop which does its
translation with in-desktop strings (e.g. Name[de]=MeineApplikation) instead of
using the (btw totally undocumented) "X-Text-Domain" key, the application name
will show up untranslated in the menu.

If I'm not mistaken, the code for this for sardine now resides in
hildon-desktop/libhildondesktop/libhildonmenu.c, where we find this:

 item->name = g_key_file_get_string(
                 key_file,
                 DESKTOP_ENTRY_GROUP,
                 DESKTOP_ENTRY_NAME_FIELD,
                 NULL);

item->name is later put into the model column TREE_MODEL_NAME, and used as the
button's name in src//hn-others-button.c :
      /* Application */
      menu_item = hildon_thumb_menu_item_new_with_labels (
                (item_text_domain && *item_text_domain)?
                dgettext(item_text_domain, item_name):
                dgettext("maemo-af-desktop", item_name),
                NULL,
                /* work around strange behaviour of gettext for
                 * empty  strings
                 */
                (item_comment && *item_comment)?_(item_comment):"");

[BTW: where is item_text_domain ever bound? bindtextdomain is only called for
the default domain.]

So I think the solution would simply be to use g_key_file_get_locale_string to
get item->name. And also to not call dgettext ("maemo-af-desktop", - ) on my
string.
Comment 1 Eero Tamminen nokia 2007-08-10 16:05:37 UTC
In which release this happens?  I think it worked in N770.
Comment 2 Christian Persch (GNOME) (reporter) 2007-08-16 00:48:54 UTC
This is on the N800 with maemo 3.1.
Comment 3 Andre Klapper maemo.org 2008-07-01 17:47:35 UTC
No code changes for Diablo at the mentioned places, so most probably not fixed.
Christian, interested in coming up with a patch?
Comment 4 Christian Persch (GNOME) (reporter) 2008-08-06 16:03:39 UTC
(In reply to comment #3)
> No code changes for Diablo at the mentioned places, so most probably not fixed.
> Christian, interested in coming up with a patch?

I'm afraid I can't, since I don't have a full maemo development environment at
this time, nor the space and time to set one up.
Comment 5 Andre Klapper maemo.org 2009-02-09 12:52:13 UTC
According to Nokia 
"this is now fixed. Individual applications might still need fixed, but it is
responsibility of each individual application to handle this."

Please file a new bug if you run into a specific Maemo application still doing
this wrong in Fremantle (I know that's talking about the future because the
Fremantle beta is not out yet) and add a reference to this bug report.
Thanks.