retitle 408387 menu: generates (useless) files outside of reach of 
XDG_DATA_DIRS or XDG_DATA_HOME
thanks

Eddy Petrișor wrote:
reopen 408387
thanks

Bill Allombert wrote:
On Wed, Jun 13, 2007 at 08:08:13PM +0300, Eddy Petrișor wrote:
Bill Allombert wrote:
On Tue, Jun 12, 2007 at 10:14:39AM +0300, Eddy Petrișor wrote:
bounty:/home/eddy# cat /var/lib/menu-xdg/desktop-directories/menu-xdg/debian-apps.directory
[Desktop Entry]
Type=Directory
Encoding=UTF-8
Name=Apps
Name[ro]=Aplicaţii
This seems good. The XDG menu is localised.
This was also the same before, but only the Romanian translation was
present, so I don't quite follow your logic here.

My point was that the job of update-menus stops at creating this file.
Since this file is properly localised the problem is not with
update-menus.

Is the file
~/.local/share/menu-xdg/desktop-directories/menu-xdg/debian-apps.directory
also properly localised ?

What is the language setting of GNOME on your system ?

Could you try another user on your system ?

The bad news is now I have 2.1.38 installed and still the menu is not localized.

The good news is that I have found how to make it work. It seems that GNOME doesn't look into the subdirectories of the ~/.local/share/desktop-directories directory to look for .directory files:

I did the following and now the Debian menu is entirely localized:


0 [EMAIL PROTECTED] ~/.local/share/desktop-directories $ for I in menu-xdg/* ; do echo "$I"; ln $I `basename $I` ; done

0 [EMAIL PROTECTED] ~/.local/share/desktop-directories $ ll
total 384
-rw-r--r-- 2 eddy eddy 1481 2008-03-12 15:34 debian-applications-data-management.directory
-rw-r--r-- 2 eddy eddy 1293 2008-03-12 15:34 debian-applications.directory
-rw-r--r-- 2 eddy eddy 1029 2008-03-12 15:34 debian-applications-editors.directory -rw-r--r-- 2 eddy eddy 1141 2008-03-12 15:34 debian-applications-emulators.directory -rw-r--r-- 2 eddy eddy 1486 2008-03-12 15:34 debian-applications-file-management.directory -rw-r--r-- 2 eddy eddy 1084 2008-03-12 15:34 debian-applications-graphics.directory -rw-r--r-- 2 eddy eddy 804 2008-03-12 15:34 debian-applications-net.directory -rw-r--r-- 2 eddy eddy 1375 2008-03-12 15:34 debian-applications-net-file-transfer.directory -rw-r--r-- 2 eddy eddy 1369 2008-03-12 15:34 debian-applications-network-communication.directory -rw-r--r-- 2 eddy eddy 1028 2008-03-12 15:34 debian-applications-network.directory -rw-r--r-- 2 eddy eddy 1379 2008-03-12 15:34 debian-applications-network-file-transfer.directory -rw-r--r-- 2 eddy eddy 1206 2008-03-12 15:34 debian-applications-network-monitoring.directory -rw-r--r-- 2 eddy eddy 1321 2008-03-12 15:34 debian-applications-network-web-browsing.directory -rw-r--r-- 2 eddy eddy 1090 2008-03-12 15:34 debian-applications-network-web-news.directory -rw-r--r-- 2 eddy eddy 982 2008-03-12 15:34 debian-applications-office.directory -rw-r--r-- 2 eddy eddy 1251 2008-03-12 15:34 debian-applications-programming.directory -rw-r--r-- 2 eddy eddy 1031 2008-03-12 15:34 debian-applications-science.directory -rw-r--r-- 2 eddy eddy 1260 2008-03-12 15:34 debian-applications-science-mathematics.directory -rw-r--r-- 2 eddy eddy 973 2008-03-12 15:34 debian-applications-shells.directory -rw-r--r-- 2 eddy eddy 916 2008-03-12 15:34 debian-applications-sound.directory -rw-r--r-- 2 eddy eddy 1425 2008-03-12 15:34 debian-applications-system-administration.directory -rw-r--r-- 2 eddy eddy 972 2008-03-12 15:34 debian-applications-system.directory -rw-r--r-- 2 eddy eddy 1091 2008-03-12 15:34 debian-applications-system-hardware.directory -rw-r--r-- 2 eddy eddy 1759 2008-03-12 15:34 debian-applications-system-language-environment.directory -rw-r--r-- 2 eddy eddy 1205 2008-03-12 15:34 debian-applications-system-monitoring.directory -rw-r--r-- 2 eddy eddy 1656 2008-03-12 15:34 debian-applications-system-package-management.directory -rw-r--r-- 2 eddy eddy 1093 2008-03-12 15:34 debian-applications-system-security.directory -rw-r--r-- 2 eddy eddy 1642 2008-03-12 15:34 debian-applications-terminal-emulators.directory -rw-r--r-- 2 eddy eddy 860 2008-03-12 15:34 debian-applications-text.directory -rw-r--r-- 2 eddy eddy 917 2008-03-12 15:34 debian-applications-tools.directory -rw-r--r-- 2 eddy eddy 916 2008-03-12 15:34 debian-applications-video.directory -rw-r--r-- 2 eddy eddy 1035 2008-03-12 15:34 debian-applications-viewers.directory
-rw-r--r-- 1 eddy eddy 1298 2007-10-10 01:53 Debian.directory
-rw-r--r-- 2 eddy eddy  967 2008-03-12 15:34 debian-games-action.directory
-rw-r--r-- 2 eddy eddy  966 2008-03-12 15:34 debian-games-blocks.directory
-rw-r--r-- 2 eddy eddy  904 2008-03-12 15:34 debian-games.directory
-rw-r--r-- 2 eddy eddy 1028 2008-03-12 15:34 debian-games-puzzles.directory
-rw-r--r-- 2 eddy eddy 1190 2008-03-12 15:34 debian-games-simulation.directory -rw-r--r-- 2 eddy eddy 1078 2008-03-12 15:34 debian-games-strategy.directory
-rw-r--r-- 2 eddy eddy  849 2008-03-12 15:34 debian-help.directory
-rw-r--r-- 2 eddy eddy  958 2008-03-12 15:34 debian-screen.directory
-rw-r--r-- 2 eddy eddy 1028 2008-03-12 15:34 debian-screen-locking.directory
drwxr-xr-x 2 eddy eddy 4096 2008-03-12 15:34 menu-xdg


Is this behaviour correct? Are subdirectories allowed in ~/.local/share/desktop-directories and does the standard say they should be recursively traversed in order to find more .directory files?

It appears[1] that the directories must NOT be recursively traversed to find .desktop or .directory entries:

$XDG_DATA_DIRS/applications/

This directory contains a .desktop file for each possible menu item. Each directory in the $XDG_DATA_DIRS search path should be used (i.e. desktop entries are collected from all of them, not just the first one that exists). When two desktop entries have the same name, the one appearing earlier in the path is used.

[..]

$XDG_DATA_DIRS/desktop-directories/

This directory contains directory entries which may be associated with folders in the menu layout. Each directory in the search path should be used. Only files ending in .directory are used; other files are ignored.

So, it isn't correct to assume that .directory files in subdirectories will be parsed since those subdirectories will be ignored, since, by default, those subdirs are NOT part of $XDG_DATA_DIRS or $XDG_DATA_HOME.

If not, menu should place its files directly under ~/.local/share/desktop-directories (I know this would be painful for automated cleanups when running update-menus).


[1] http://standards.freedesktop.org/menu-spec/latest/ar01s02.html
--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein



Reply via email to