locale specific for .desktop
Takao Fujiwara - Tokyo S/W Center
Takao.Fujiwara at Sun.COM
Thu Oct 4 23:12:49 PDT 2007
Rodney Dawes wrote:
> On Thu, 2007-10-04 at 18:52 +0200, Sanel Zukan wrote:
>>>There are a number of locale specific problems for .desktop spec.
>>>#1. Language specific launcher options.
>>>I'ld like to switch the command options by languages.
>>>How about locale executions?
>>This proposal has it's place, but here is mine -1 for it :) IMHO this
>>opens a huge door for more abuse for Exec key, so anyone could place
>>which creates inconsistency. Already hearing people asking why their
>>German colleagues opens this but they are getting that.
>>Hm... just thinking, could some shell script resolve this ?
> The only viable reasons for this that I can see, are documentation, and
> document templates. The former is solved by integrating the
> documentation into the help system. The latter should be solved by the
> application opening an appropriate per-language template if necessary.
> AbiWord does this already for example.
Technically those can be done however I have the concerns.
1. I think it's difficult to integrate the product documents into help systems of other products, e.g. GNOME, KDE, because some of the applications have the packages combined with application binaries and documents.
2. It may cause a cost and process to add a wrapper script into the existent packages.
Should we implement the algorithm likes g_get_language_names() with a wrapper script by application?
Another idea is a new field code %l which represents the language of Name[$language] ?
>>>#2. .desktop could be shown on a locale only.
>>>I'ld like to show a locale specific application on the locale only in gnome-panel menus.
>>>How about removing C Name?
> Why would the C name need to be removed?
I mean this is one of the ideas to show the application menu item on a locale only.
>>Isn't this the same as above?
> The feature isn't. The implied suggested implementation is. The better
> solution for this would be an OnlyShowInLang, that is similar to
> OnlyShowIn for desktops.
Yes, I also think it's a good solution.
>>>#3. Filename encoding.
>>>I'ld like to keep Encoding=UTF-8 but the actual filepath could be several encodings.
>>>How about URI escape sequences?
>>AFAIK, Icon key contains system path, not URI path (wrong ?). On other hand if
>>you already using URI path (and application understainds it), at least for me,
>>escape sequences comes naturally :)
> Icon really should just be a name, and the icon should be looked up
> through the icon theme API. If one is going to put a URI in the file,
> and it points to something that is in a non-ascii encoding, it must be
> escaped, according to the RFC AFAIK. Doesn't the URI RFC require that
> the encoding be US-ASCII?
> Either way, if you specify an encoding, and then have data in another
> encoding, it's going to break, as there's no way for the implementation
> to know what encoding the alternate is.
Probably my example was not good.
I mean currently the Icon has the local filename in the existent .desktop files but it would breaks .desktop since the .desktop specifies Encoding=UTF-8 so my idea is to use the URL instead of the local filename for Icon=.
Can we change it?
E.g. gnome-desktop-item-edit on none UTF-8 locale but I'ld like to keep UTF-8 Name.
More information about the xdg