Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-09-29 12:01:28

tortilla
Member
Registered: 2021-06-14
Posts: 32

.desktop: Localization for Exec command

Hi,

I would like to provide a localized version of the .txt file in the main menu editor. I have built my .desktop file for it like this:

[Desktop Entry]
Name[de]=restic menü Zusammenfassung
Name[en]=restic menu Abstract
GenericName[de]=Zusammenfassung und detaillierte Beschreibung
GenericName[en]= Abstract and detailed description
Exec=mousepad /home/username/Dokumente/Tools/Linux/restic/restic-ht-GUI/restic-Anleitung-kompakt.txt
Exec[de]=mousepad /home/username/Dokumente/Projekte/dewpoint/dp-examples/dp-examples-docs/dewpoint-manual-compactly_en.txt
Comment[en]=Important!!! Before starting, enter the backup file (repository) and the "backup-source". 
Terminal=false
Icon=/home/username/Dokumente/Tools/Icons/pi-plus-Logo.png
Type=Application
Path=
StartupNotify=false

Now I have the problem that in this version

Exec[de]=mousepad /home/username/Dokumente/Tools/Linux/restic/restic-ht-GUI/restic-Anleitung-kompakt.txt
Exec[en]=mousepad /home/username/Dokumente/Projekte/dewpoint/dp-examples/dp-examples-docs/dewpoint-manual-compactly_en.txt

this menu item is not displayed in the Alacarte menu editor - s. screenshot bottom. The menu item is only displayed if one of these two versions is used:

Exec[de]=mousepad /home/username/Dokumente/Tools/Linux/restic/restic-ht-GUI/restic-Anleitung-kompakt.txt
Exec=mousepad /home/username/Dokumente/Projekte/dewpoint/dp-examples/dp-examples-docs/dewpoint-manual-compactly_en.txt
Exec=mousepad /home/username/Dokumente/Tools/Linux/restic/restic-ht-GUI/restic-Anleitung-kompakt.txt
Exec[de]=mousepad /home/username/Dokumente/Projekte/dewpoint/dp-examples/dp-examples-docs/dewpoint-manual-compactly_en.txt

My questions are:

  • What is the cause for this?

  • Is it possible that the freedesktop specification does not allow to program localized exec commands?

Thank you!

= Screenshot =

Alacarte menu

Offline

#2 2022-09-29 12:18:36

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: .desktop: Localization for Exec command

From: https://specifications.freedesktop.org/ … lized-keys

Keys with type localestring may be postfixed by [LOCALE]

and

Exec	Program to execute, possibly with arguments.....                         string	NO	1

So the Exec key is not of type localestring so it cannot be localized.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-09-29 16:27:45

tortilla
Member
Registered: 2021-06-14
Posts: 32

Re: .desktop: Localization for Exec command

Thank you, ToZ!

OK, what I can think of for multilingual instructions is:

a) place several languages in one text document and open the document in Mousepad - this is only practical for 2-3 languages.
b) create a multilingual manpage "resticmenu".

Maybe someone has an idea how to generate localised versions of .txt files for editing in the main menu editor? Because editing the manpages is a bit awkward.

Last edited by tortilla (2022-09-30 03:44:34)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 528.87 KiB (Peak: 530.15 KiB) ]