jwm_tools-0.9 (was jwm_menu_create)

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#136 Post by technosaurus »

MochiMoppel wrote:
technosaurus wrote:we don't need to regenerate keybindings and trays every time we update the menu
I never understood why we do now. Though fixmenus should only update the menu, in reality it updates the whole configuration file .jwmrc. This leads to the necessity of include files as safe havens for customized settings. JWM needs only 1 configuration file, and splitting this file into many include files certainly may have advantages, but I'm not sure if they outweigh the disadvantages. I tried this once and found that the small content for each include file doesn't justify the separation.

Did you consider to let fixmenus generate the menu only? In other words: Reduce the content of /etc/xdg/templates/_root_.jwmrc to <RootMenu> and rename the template to something like _root_.jwmrc-menu? The generated menu can then be included in .jwmrc - as the one and only include file.
I moved all the stuff from jwmrc-tray / personal / themes into my .jwmrc , thereby removing many duplicate and unneeded settings. I was surprised how small and neat a full featured and now editable .jwmrc can be. After all having only 1 configuration file (+ 1 include) is less confusing for novices and closer to what the JWM manual describes.
I use a flat file with inline comments that is much easier to edit than XML, but it is still all in one file. The individual config tools just read / replace the appropriate lines. On the plus side it can be included in a shell script directly where XML would need to be parsed.

Yes menus will only generate their own xml, but now support an additional dynamic tag so technically it could be generated when the menu is hovered over. I did that with my 9menu version.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

Re: tooltip=Comment

#137 Post by technosaurus »

L18L wrote:
01micko wrote:what are you defaulting to in the tooltip? 'Comment=' ?
And, what is the main menu entry; 'Name=' or 'GenericName=' ?
technosaurus wrote:tooltip = Comment
label = Name (for localization support, some .desktop files have Name[lang], but not GenericName[])
Hopefully this will keep us from having to keep puppy-specific desktop files in woof-ce with the Comment= section added to the end of

Comment at the end of Name was really a quick and dirty work around.
Comment or its translation if available is much better of course.
[pseudo code]tooltip from Comment[LANG%.*] or Comment[LANG%_*] or Comment.[/pseudocode]

There is a patch of Rox-Filer made by mikeb that renders Comment[lang] as tooltip. http://murga-linux.com/puppy/viewtopic.php?t=98535

GenericName (and its translations) are being used in razor menu of Fatdog64 like Name (GenericName) e.g. Geany (Integrierte Entwicklungsumgebung) but that's another story.
How about label=Name[lang] and tooltip=GenericName[lang] + Comment[lang] (unless they are the same exact text) .... In other words , no tooltip would say "word processor - word processor"
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: tooltip=GenericName[lang] + Comment[lang]

#138 Post by L18L »

technosaurus wrote:How about label=Name[lang] and tooltip=GenericName[lang] + Comment[lang] (unless they are the same exact text) .... In other words , no tooltip would say "word processor - word processor"
appears simply perfect! :D

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

back to work on jwm tools

#139 Post by L18L »

technosaurus wrote:While I am away please feel free to request any features you'd like to see.
Just to let you know I am working on momanager to be used for translation of jwm_menu_create.

translation file is /usr/share/locale/myLANG/LC_MESSAGES/jwm_menu_create.

Code: Select all

<Menu label="'${_M_6:-Graphic}'" icon="paint48.png" height="16">
	'${GraphicGraphics}'
<Separator/>
German "translation":
my tmp/momanager/jwm_menu_create wrote:# created Son Nov 8 18:42:53 CET 2015 by /usr/sbin/t12s_msgfmt
# from only temporarily existing jwm_menu_create.po

_M_6="Grafik"
#Graphic

_M_7="Dokument"
#Document
works 8)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

Re: back to work on jwm tools

#140 Post by technosaurus »

L18L wrote:
technosaurus wrote:While I am away please feel free to request any features you'd like to see.
Just to let you know I am working on momanager to be used for translation of jwm_menu_create.

translation file is /usr/share/locale/myLANG/LC_MESSAGES/jwm_menu_create.

Code: Select all

<Menu label="'${_M_6:-Graphic}'" icon="paint48.png" height="16">
	'${GraphicGraphics}'
<Separator/>
German "translation":
my tmp/momanager/jwm_menu_create wrote:# created Son Nov 8 18:42:53 CET 2015 by /usr/sbin/t12s_msgfmt
# from only temporarily existing jwm_menu_create.po

_M_6="Grafik"
#Graphic

_M_7="Dokument"
#Document
works 8)
Leave me a link to your current work and I will try to keep it compatible or send a patch. I am going to be replacing some puppy terminology with appropriate standards from standards.freedesktop.org.

One new thing will be KDE, Enlightenment and Gnome categories with the option to integrate or separate them by user options and/or environment variables while respecting corresponding applicable OnlyShowIn= NotShowIn= settings.

The named files are going to be split out into functional categories menus, toolbars, theme, keybindings, iconpaths, program groups.

I am going to be designing an svg creator for the sole purpose of demonstrating themes on the fly so we don't have to jwm -restart to see if we like the changes.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

technosaurus' translation method in momanager

#141 Post by L18L »

technosaurus wrote:Leave me a link to your current work and I will try to keep it compatible or send a patch. I am going to be replacing some puppy terminology with appropriate standards from standards.freedesktop.org.
Purpose of my work is:
let translator use our translation tool momanager to translate jwm_create_menu.
They will see and translate just .po files as usual.
gettext tools msginit msgmerge and msguniq are used.
Translation file jwm had to be renamed to jwm_menu_create (or anything other than jwm).
Only translated items are to be stored in these translation files (the gettext way 8) ).

Biggest change is use of variable _M_n
e.g. _M_6 instead of jwm_GraphicGraphics
Hope you can live with this; or with _M_jwm_GraphicGraphics
as _M_ is needed to identify this translation METHOD at the moment in momanager (3 methods ATM):

Code: Select all

 # METHOD
 # note, gettext method does NOT need explicit 'gettext', see ex: /etc/grub.d/20_ppc_terminfo
 # thus grep gettext is not useful
 case ${SCRIPT##*.} in
  md) METHOD='mdview' ;;
   *) [ "`grep -m 1 '${_M_'   $SCRIPT`" ] && METHOD='t12s' || METHOD='gettext' ;;
 esac
I'll post a link here if/when it is all tested and working (new version of momanager).

Note @all,
technosaurus' translation method is older than momanager. 8)
EDIT
t12s method is in momanager but has never been really tested bacause no one seems to use it.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

jwm_tools-0.9

#142 Post by L18L »

You do not need to give manually numbers for the _M_ variables. It is done automatically.

Tested. It works. Just use ${_M_:-English message}
Attachments
jwm_menu_create.gz
ready for translation in attached momanager
(5.74 KiB) Downloaded 287 times
momanager.gz
All in one script
(36.68 KiB) Downloaded 283 times
moma.png
Note translation METHOD of TEXTDOMAIN jwm_menu_create
(40.35 KiB) Downloaded 378 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: back to work on jwm tools

#143 Post by L18L »

technosaurus wrote:Leave me a link to your current work and I will try to keep it compatible or send a patch. I am going to be replacing some puppy terminology with appropriate standards from standards.freedesktop.org.
Latest momanager can use one and the same TEXTDOMAIN for
gettext, our t12s and mdview files now.

Thus a .md help file would be nice.

... and a Happy New Year :D

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#144 Post by technosaurus »

I don't think we'll need to generate translations specifically for jwm if we simply add the appropriate translations to /usr/share/desktop-directories/*.directory ... Translations (same format as .desktop files)are currently missing from woof-ce, but this way other menu systems can benefit.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply