Bug 514577

Summary: Localized Name, GenericName and Comment discrepancy between read locale and written locale
Product: [Applications] kmenuedit Reporter: Freedim <coocoolatte>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 6.5.4   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Freedim 2026-01-14 09:47:55 UTC
SUMMARY
Localized field discrepancy: the localized field that is read from the .desktop file (in my case, Name[fr_FR]) when opening kmenuedit is not the field that is subsequently written when clicking on "Save". kmenuedit writes the generic Name field instead. 

STEPS TO REPRODUCE
1. In kmenuedit GUI's settings menu, set the language to French (fr).
2. In Plasma's launcher, pick an application and open its .desktop file in a text editor.
3. Set `Name=generic_name` and `Name[fr_FR]=french_name`
4. In Plasma's launcher menu, right-click on the app's icon and select "Edit the application"
5. The name field shows "french_name". Modify it to "new_name" and save.
6. Open the .desktop file in the text editor.
7. In Plasma's launcher menu, right-click on the app's icon and select "Edit the application"

OBSERVED RESULT
In the file editor, there is `Name=new_name` and `Name[fr_FR]=french_name`.
In a Plasma desktop environment set to French, Plasma's launcher will still show 'french_name' under the icon, and right-clicking on the icon to open kmenuedit will still show the former, supposedly modified, value "french_name". Changing the app's name resulted in no visible change.

EXPECTED RESULT
The field of the .desktop file to which the value of the Name field is written is the same as the one from which the value was read to populate the GUIs (kmenuedit's GUI and Plasma's launcher menu, provided both are set to the same language).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kali Linux (up-to-date) (System locale: fr_FR)
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.20.0
Qt Version: 6.9.2

ADDITIONAL INFORMATION
Same issue with GenericName and Comment.

Since kmenuedit's language settings displays "French(fr)" whereas the field in my .desktop file was "Name[fr_FR]", I thought the discrepancy might come from there and I modified my .desktop file so that the field be named "Name[fr]". Then, when saving new values from kmenuedit, kmenuedit updates the .desktop file with:
- `Name`, `GenericName` and `Comment` fields updated with the values set in the GUI;
- fields `Name[fr]`, `GenericName[fr]` and `Comment[fr]` renamed to respectively `Name[fr_FR]`, `GenericName[fr_FR]` and `Comment[fr_FR]` (but their values remain untouched).
Comment 1 Freedim 2026-01-14 09:53:02 UTC
When only fields `Name`, `GenericName`, `Comment` are present and not any localized fields, everything works as intended as there is only one possible field to read and write for each value.
Comment 2 Akseli Lahtinen 2026-01-15 14:39:28 UTC
*** Bug 514576 has been marked as a duplicate of this bug. ***