gnome-desktop-item-edit should change the Name= key

Bug #85216 reported by Patrick Hetu
38
Affects Status Importance Assigned to Milestone
alacarte (Baltix)
Invalid
Undecided
Unassigned
alacarte (Ubuntu)
Invalid
Undecided
Unassigned
gnome-panel (Ubuntu)
Fix Released
Low
Sebastien Bacher

Bug Description

Binary package hint: alacarte

For some application the name or the comment can't be change because even if
the .desktop file is modify and copy in .local/share/application/ , gnome-panel ignore
the modification because it use the .mo file instead of the modify entry in the .desktop file.

So if you modify the "name=" the .mo file is ignore and the modification done in alacarte is now show.

This is maybe out of this context but why translate what is already translate?

Tags: pet-bug
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. The editor could change the Name= property for the local copy

Changed in alacarte:
importance: Undecided → High
status: Unconfirmed → Confirmed
Revision history for this message
Jeff Vehrs (icemanv9) wrote :

It is a (way too) long standing bug for Dapper. It is very annoying for not being fixed. Isn't Dapper a Long Term Support?

Please squash this bug. Thank you.

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

Not critical for 7.04 release; removing milestone.

Revision history for this message
Travis Watkins (amaranth) wrote :

gnome-panel owns the gnome-desktop-item-edit binary that alacarte uses to edit things.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you describe an example to trigger the bug? What item do you try to rename and how?

Revision history for this message
Patrick Hetu (patrick-hetu) wrote :

The bug can be trigger in feisty with the gcalctool application for example:
Note: I do it with this language variable set: LANG="fr_CA.UTF-8"

 * right click the application menu and choose "edit menus" it open alacarte
 * choose the accessories menu and change the name of calculator for a other name
 * apply and quit in the accessories the caculator have not change is name

In the gcalctool package the fr.po file have those line:

#: ../gcalctool/gtk.c:1505 ../gcalctool.desktop.in.h:1
msgid "Calculator"
msgstr "Calculatrice"

so even if i modify the copy desktop file: .local/share/applications/gcalctool.desktop with alacarte
for my language like this:

Name[fr_CA]=zCalculatrice

gnome-desktop-item-edit still use the po file (.mo) and the name in the accessories menu is still "Calculatrice"
instead of "zCalculatrice"

so like you say gnome-desktop-item-edit could change the Name=Calculator entry in the .desktop file for
anything else and the modification will work

Revision history for this message
lilB (b-blackwood) wrote :

Cant change the menu, at all. This is really annoying.

Changed in alacarte:
status: New → Confirmed
Revision history for this message
Travis Watkins (amaranth) wrote :

Once again, this is a bug in gnome-panel, not alacarte.

Changed in alacarte:
status: Confirmed → Invalid
Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

After some investigation, it seems this bug is ubuntu specific and is a side effect of the 01_gettext-desktopfiles.patch in the glib package.

Because of this patch, if a gettext domain is given in a desktop file, the program gettext translation will be used instead of the translated string in the desktop file.

Indeed remove the "X-Ubuntu-Gettext-Domain=gcalctool" line in .local/share/applications/gcalctool.desktop and the entry will be properly translated.

To fix this, we could use the gettext translation only if no translation exists in the desktop entry file, but I don't know enough the purpose of the 01_gettext-desktopfiles.patch file to know if it is a good solution.

Sebastien, is this solution acceptable ?

BTW, what does this mentoring stuff works ?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Yann, right the gettext ubuntu change creates the issue. The desktop files have the upstream translations so your suggestion would not work correctly. Doing what the bug title suggest (change the Name= key) should work correctly. The mentoring lists easy tasks contributors can work on and where somebody is willing to review the work and upload

Changed in gnome-panel:
status: Confirmed → Triaged
Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

Sebastien, I modified gnome-panel so the Name key is changed. You will find a patch attached.
I did the same modification for the Comment key which suffers from the same problem.

However, I am not sure it's the best solution. If someone renames Name or Comment using a string which already has a gettext translation, the translation will be used instead of the user string.

Could you explain the reason for the 01_gettext-desktopfiles.patch and for the X-Ubuntu-Gettext-Domain fields ?
If upstream translations are in the desktop file, why would we need to use it ?

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

I found answers to these questions at https://wiki.ubuntu.com/LangpacksDesktopfiles

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

I suppose you already thought about that but why not try the desktop translation before the gettext one and strip all desktop translations from ubuntu packages (not a short-term solution of course).

It seems they are right now useless as gettext is already used.

Revision history for this message
Sebastien Bacher (seb128) wrote :

some applications ship translated desktop files without having the translations in gettext those who have no translations

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

Ok, so we would need to strip translation at build time only if gettext translations are not available, I suppose this would be too complex.

Concerning the patch I posted, are you satisfied with it or do you have some concern about it ?

Revision history for this message
Sebastien Bacher (seb128) wrote :

From a quick glance it looks correct, I'm busy with gutsy beta work at the moment though but I'll give it a try later this week and let you know, thank for the work on the issue

Changed in alacarte:
status: New → Invalid
Revision history for this message
Tyler Gillies (tjgillies) wrote :

last post was in september 2007. did this ever get resolved?

Revision history for this message
LKRaider (paul-eipper) wrote :

Still an issue in 8.04 Hardy Heron.

Revision history for this message
Albert Cervin (abbe-c) wrote :

Is this bug still an issue?

Revision history for this message
Kortex (the-kortex) wrote : Re: [Bug 85216] Re: gnome-desktop-item-edit should change the Name= key

Sorry, I don't know, I don't use Gnome anymore, I switched to KDE4.

Le samedi 13 septembre 2008 23:31:08 Albert Cervin, vous avez écrit :
> Is this bug still an issue?

Revision history for this message
LKRaider (paul-eipper) wrote :

Still an issue in 8.10 Intrepid Ibex.

Changed in gnome-panel:
assignee: nobody → seb128
importance: High → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug should be fixed in karmic now the desktop translations are used before gettext, closing it now

Changed in gnome-panel (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.