Reclassify Icon= in .desktop files as string, not localestring

Will Thompson wjt at endlessm.com
Wed Jun 26 10:20:02 UTC 2019


On Wed, 26 Jun 2019 at 11:08, Egmont Koblinger <egmont at gmail.com> wrote:

> The problem is not caused by the specification, the problem is caused
> by the way xgettext generates these files. The problem can be fixed
> solely within xgettext, without altering the spec. I don't really see
> it justified to remove the functionality from the spec (and
> accordingly, implementations that handle these files and display the
> icon towards users).
>

I re-read the spec and the spec actually is wrong. It says (emphasis mine):

Values of type localestring are *user displayable*, and are encoded in
> UTF-8.


Icon and other keys are defined to be of type localestring. By a literal
reading of this specification, xgettext's behaviour is correct. But the
spec is wrong: icon names are not user displayable.


> If the conclusion is to alter the spec then the following work needs to be
> done:
> 1. Change the spec
>

Here is a MR which defines a new iconstring type, adjusts all the icon keys
to use it, and adds a note that iconstrings should not be extracted by
human-readable string translation tools:
https://gitlab.freedesktop.org/xdg/xdg-specs/merge_requests/3


> 2. Change xgettext
>

I have already attached a patch to do this to
https://savannah.gnu.org/bugs/index.php?56543.


> 4. Change GNOME, KDE etc. not to recognize these localized entries
>

 Tools that just consume .desktop files do not need any changes: they can
continue to respect icon localizations if present.

– Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20190626/50544dad/attachment.html>


More information about the xdg mailing list