Le Thu, 17 Apr 2014 19:21:49 +0200,
Thomas Funk <t.f...@web.de> a écrit :

> Am 17.04.2014 09:55, schrieb Dominique Michel:
> > Le Sun, 13 Apr 2014 20:13:45 +0200,
> > Thomas Funk <t.f...@web.de> a écrit :
> > 
> >> Am 13.04.2014 17:31, schrieb Dominique Michel:
> >>> Hi,
> >>>
> >>> with fvwm-crystal, I get an issue with a localized xdg menu. If I
> >>> launch fvwm as a Xephyr session and use its default configuration
> >>> (no config file), I get a very simple menu where it is a Desktop
> >>> Menu. If I click on it, I get an applications menu with several
> >>> menus in it:
> >>>
> >>> Fvwm Applications
> >>> Suse Applications
> >>> Xfce Applications
> >>> Xfce Settings Manager
> >>>
> >>> which correspond to what I have in /etc/xdg/menus. The Fvwm
> >>> Applications menu is my localized menu. If I browse it, only parts
> >>> of it are localized, and other parts are not when the localization
> >>> exist in /usr/share/directories.
> >>>
> >>> I made the following function:
> >>>
> >>> DestroyMenu FvwmMenu
> >>> AddToMenu FvwmMenu
> >>> + DynamicPopupAction PipeRead 'fvwm-menu-desktop \
> >>>     --desktop fvwm-applications \
> >>>     --enable-mini-icons \
> >>>     --mini-icon-dir $[FVWM_USERDIR]/icons/fvwm-desktop'
> >>>
> >>
> >> Try this:
> >> DestroyMenu FvwmMenu
> >> AddToMenu FvwmMenu
> >> + DynamicPopupAction PipeRead 'fvwm-menu-desktop \
> >>     --desktop fvwm \
> >>     --type applications \
> >>     --enable-mini-icons \
> >>     --mini-icon-dir $[FVWM_USERDIR]/icons/fvwm-desktop'
> > 
> > I get: Warning: Arg --type is obsolete and ignored, but the menu
> > work fine. I only get the fvwm menu and the localization is coKey A
> > A $[Mod1] Menu FvwmMenurrect.
> 
> Uuups, my fault - not --type but --menu-type

That work without warning and I only get the fvwm menu with the correct
translations.

> > fvwm-menu-desktop version 2.3.1
> > 
> >> and
> >> $> fvwm-menu-desktop --get-menus all --verbose
> > 
> > That look OK to me. All is here:
> > Parameters for creating menu list:
> >  XDG_MENU_PREFIX:  ''
> >  --install-prefix: ''
> >  --desktop:        ''
> >  --menu-type:      ''
> > 
> > Start search ...
> >  found in /home/dom/.config/menus: []
> >  found in /etc/xdg/menus: ['fvwm-applications.menu',
> > 'yast-settings.menu', 'lxde-applications.menu',
> > 'xfce-applications.menu', 'ggz.menu', 'kde-4-applications.menu',
> > 'gnome-applications.menu', 'suse-applications.menu',
> > 'xfce-settings-manager.menu'] Menu list:
> > ['/etc/xdg/menus/fvwm-applications.menu',
> > '/etc/xdg/menus/yast-settings.menu',
> > '/etc/xdg/menus/lxde-applications.menu',
> > '/etc/xdg/menus/xfce-applications.menu', '/etc/xdg/menus/ggz.menu',
> > '/etc/xdg/menus/kde-4-applications.menu',
> > '/etc/xdg/menus/gnome-applications.menu',
> > '/etc/xdg/menus/suse-applications.menu',
> > '/etc/xdg/menus/xfce-settings-manager.menu']
> > 
> >  Previous used theme: gnome
> >  Current used theme: gnome
> > Create submenu 'FvwmFvwm Applications' from
> >  '/etc/xdg/menus/fvwm-applications.menu' Create submenu 'FvwmYast
> >  Settings' from '/etc/xdg/menus/yast-settings.menu' Menu is empty -
> >  won't be used! Create submenu 'FvwmLxde Applications' from
> >  '/etc/xdg/menus/lxde-applications.menu' Create submenu 'FvwmXfce
> >  Applications' from '/etc/xdg/menus/xfce-applications.menu' Create
> >  submenu 'FvwmGgz' from '/etc/xdg/menus/ggz.menu' Menu is empty -
> > won't be used! Create submenu 'FvwmKde 4 Applications' from
> >  '/etc/xdg/menus/kde-4-applications.menu' Create submenu 'FvwmGnome
> >  Applications' from '/etc/xdg/menus/gnome-applications.menu' Create
> >  submenu 'FvwmSuse Applications' from
> >  '/etc/xdg/menus/suse-applications.menu' Create submenu 'FvwmXfce
> >  Settings Manager' from
> >  '/etc/xdg/menus/xfce-settings-manager.menu' 
> > /etc/xdg/menus/fvwm-applications.menu /etc/xdg/menus/lxde-applications.menu 
> > /etc/xdg/menus/xfce-applications.menu 
> > /etc/xdg/menus/kde-4-applications.menu 
> > /etc/xdg/menus/gnome-applications.menu 
> > /etc/xdg/menus/suse-applications.menu 
> > /etc/xdg/menus/xfce-settings-manager.menu
> > 
> > Process took 36.1115701199 seconds
> > 
> 
> Looks good. Would it be possible to repeat that test with removed
> menus?

With only the fvwm menu:
fvwm-menu-desktop --get-menus all --verbose
Parameters for creating menu list:
 XDG_MENU_PREFIX:  ''
 --install-prefix: ''
 --desktop:        ''
 --menu-type:      ''

Start search ...
 found in /home/dom/.config/menus: []
 found in /etc/xdg/menus: ['fvwm-applications.menu']
 Menu list: ['/etc/xdg/menus/fvwm-applications.menu']

 Previous used theme: gnome
 Current used theme: gnome
/etc/xdg/menus/fvwm-applications.menu

Process took 31.5769798756 seconds

Without any menu:
fvwm-menu-desktop --get-menus all --verbose
Parameters for creating menu list:
 XDG_MENU_PREFIX:  ''
 --install-prefix: ''
 --desktop:        ''
 --menu-type:      ''

Start search ...
 found in /home/dom/.config/menus: []
 found in /etc/xdg/menus: []
 Menu list: []

.menu not available on this system. Exiting...

> 
> >> whether all menus on place?
> > 
> > Yes, that just that locale issue. It may come from the suse menu
> > that collide with my fvwm menu. The fvwm menu is using the
> > localisation from the files in /usr/share/desktop-directories, when
> > the suse menu was using files in /usr/share/locale. The suse menu
> > with that localization system just hang fvwm-menu-desktop, so I
> > removed those files. That made the suse menu to work with
> > fvwm-menu-desktop, but without localization.
> > 
> > What is very strange is that, when I get all the desktop menus,
> > only a feww strings are still in English when they should be
> > translated, and most translated string are working fine. When I
> > only get the fvwm menu, all translated strings are working.
> 
> The translation depends on the application and desktop files in 
> /usr/local/share/ or /usr/share/ as you know and if pyxdg found
> nothing in the application/desktop files the core string is printed. 
> 
> The SuSE developers are sometimes very lazy in that case and most of
> their desktop files are empty except the english one. Also their own 
> application files like yast ...

The Suse menu have its translation files in /usr/share/locale. I
removed them because they was hanging I don't remember what, maybe
fvwm-menu-desktop, maybe the application menu in another desktop.

That imply their files in /usr/share/desktop-directories only have
English.

> 
> Have you checked the menu files where still the English string is
> printed?
> 
> I bet they're empty ...

Yes.

Cheers,
Dominique


> 
> >>
> >>>
> >>> # XDG_MENU_PREFIX=fvwm fvwm-menu-desktop
> >>>
> >>> and it work fine. 
> >>
> >> Yes, because fvwm-menu-desktop is ignored. Correct:
> >> XDG_MENU_PREFIX=fvwm
> >>
> >>> It should be nice fvwm if fvwm-menu-desktop would be
> >>> able to use by default a fvwm-applications.menu if it exist and is
> >>> the only one in /etc/xdg/menus.
> >>>
> >>> I made another try, to issue 'SetEnv XDG_MENU_PREFIX fvwm' into
> >>> the fvwm console in crystal, and with it, it work when I launch
> >>> fvwm with Xephyr, that even if I move back the other menu files.
> >>>
> >>> So, to summarize, it should be nice fvwm if fvwm-menu-desktop
> >>> would be able to use by default a fvwm-applications.menu if it
> >>> exist and is the only one in /etc/xdg/menus. And without
> >>> XDG_MENU_PREFIX defined and its default fvwm configuration (no
> >>> fvwm config file at all), fvwm-menu-desktop localization seam to
> >>> be confused when it is several menus in /etc/xdg/menus with
> >>> different localizations or non localizations.
> >>
> >> Hmm ... perhaps. what pyxdg version do you using?
> > 
> > 0.25
> 
> -- Thomas --
> 

Reply via email to