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

Will Thompson wjt at endlessm.com
Tue Jun 25 16:11:00 UTC 2019


On Tue, 25 Jun 2019 at 16:37, Bollinger, John C <John.Bollinger at stjude.org>
wrote:

>
>
> > We could change Gettext to stop considering the Icon key as
> translatable *without* changing the specification, but that would be a
> violation of the spec
>
>
>
> Would it?  The spec does not say that localestrings are translatable.  It
> says that they are _localizable_, in a specific technical sense that the
> spec lays out.  That is, different values can be provided for different
> locales by use of locale postfixes, and lookup by key is expected to take
> those into account in light of LC_MESSAGES when determining the value
> associated with the key.
>
>
>
> That most keys with localestring values are best localized by translating
> their values between human languages is a function of the significance of
> specific keys, not of the data type.
>

I'm sympathetic to this argument.

 > , and the Gettext maintainers don't want to commit to that violation;
> which is why Will is asking to fix the spec, in order to unblock the
> catch-22 situation with Gettext developers waiting for a change to the
> spec, and the spec maintainers waiting for a change in the localisation
> software.
>
>
>
> I claim that the Gettext maintainers are interpreting the spec wrongly.
> Evidently that misinterpretation is fairly common, hence the prevalence of
> “don’t translate this” comments on Icon keys, but on the other hand, the
> prevalence of such comments also conveys that it is widely understood that
> Icon keys should not be localized by translation (and, it follows, maybe
> not at all).
>

To be clear, I hadn't actually encountered resistance to making this change
in (x)gettext without changing the specification – I just anticipated that
one might. (I had some idea that someone had raised the idea and got this
rebuttal but I can't find any reference to it.) I think it might be a neat
solution to change the implementation, and just update the spec with your
argument here – code that reads .desktop files should treat Icon as
localizable, but translation tools may wish to ignore it.

I attached a patch on https://savannah.gnu.org/bugs/index.php?56543 to
implement this. Projects which want the previous behaviour would be able to
pass --keyword=Icon to xgettext.

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


More information about the xdg mailing list