locale specific for .desktop
Takao Fujiwara - Tokyo S/W Center
Takao.Fujiwara at Sun.COM
Wed Oct 17 06:43:24 PDT 2007
Can we update the Desktop Entry specification?
>>>>#1. Language specific launcher options.
How about a new "%l" since Exec line supports some field codes?
>>>>#2. .desktop could be shown on a locale only.
How about adding a new key OnlyShowInLang ?
>
> Takao Fujiwara - Tokyo S/W Center wrote:
>
>>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.
>>>>>
>>>>>E.g.
>>>>>Name=Document
>>>>>Exec=gnome-open file:/usr/share/doc/foo/C/index.html
>>>>>Exec[de]=gnome-open file:/usr/share/doc/foo/de/index.html
>>>>>Exec[fr]=gnome-open file:/usr/share/doc/foo/fr/index.html
>>>>>
>>>>>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
>>>>something like:
>>>>
>>>>Exec[de]=/usr/local/bin/foo
>>>>Exec[fr]=/usr/bin/baz
>>>>
>>>>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.
>>>>>
>>>>>E.g.
>>>>>Name[zh_CN]=Application Name
>>>>>Comment[zh_CN]=Application Comment
>>>>>Exec=/usr/bin/zh_CN-application
>>>>>
>>>>>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.
>>>>>
>>>>>E.g.
>>>>>Encoding=UTF-8
>>>>>Name=foo
>>>>>Comment=foo
>>>>>Icon=file:/home/foo/EUC encoding/foo.png
>>>>>
>>>>>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.
>>
>>fujiwara
>>
>>_______________________________________________
>>xdg mailing list
>>xdg at lists.freedesktop.org
>>http://lists.freedesktop.org/mailman/listinfo/xdg
>>
>
>
>
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
More information about the xdg
mailing list