jwm_tools-0.9 (was jwm_menu_create)

Window managers, icon programs, widgets, etc.
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#81 Post by musher0 »

Hello, technosaurus.

Sorry for mentioning there was an applications directory missing in the script and for coming up with a solution that did not display an expertise similar to yours.

I don't know who "otropogo" is, and what list you are referring to.

My previous message tried to be humoristic, nothing else should be read into it.

Let's leave it at that, and try to remain on congenial terms.

Respectfully yours.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#82 Post by DaveS »

Using Slacko Beta which has JWM Tools, I want to add an additional tray. Adding it to /etc/xdg/templates no longer works. How do I add it now with this new system please? If the fix has been posted, please point me at the post, thanks.
Spup Frugal HD and USB
Root forever!

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

#83 Post by technosaurus »

you _can_ add extras directly into the source for jwm_menu_create or the current prefered method to simply add it to /root/.jwmrc-tray

I have yet to come up with a simplified way to auto-generate fully customized trays via the JWMRC file

... possibly using something like:
TRAYCOMPONENT{0-99}="type:params"
and then
TRAY{0-99}="list of traycomponents by number"
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
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#84 Post by DaveS »

technosaurus wrote:the current prefered method to simply add it to /root/.jwmrc-tray
SH*T, now I get it, .jwmrc-tray can accept multiple tray specs using multiple tags:

Code: Select all

<tray>
tray one
</tray>
<tray>
tray two
</tray>

on and on
Thanks for the reply. Has this always been the case?
Spup Frugal HD and USB
Root forever!

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#85 Post by disciple »

Yes.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#86 Post by BarryK »

technosaurus,
Note that the fixmenus in Woof has some extra functionality, to support the 'menu_strings' SSS domain. See file:

http://bkhome.org/fossil/woof2.cgi/arti ... 6564d629e6

Note, putting that extra code in will not matter for puppies that don't have menu_strings, as it tests for existence of the file.
[url]https://bkhome.org/news/[/url]

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

#87 Post by technosaurus »

BarryK wrote:technosaurus,
Note that the fixmenus in Woof has some extra functionality, to support the 'menu_strings' SSS domain. See file:

http://bkhome.org/fossil/woof2.cgi/arti ... 6564d629e6

Note, putting that extra code in will not matter for puppies that don't have menu_strings, as it tests for existence of the file.
I think these are already translated in jwm_menu_create ... and many more (Thank others, I barely speak english, but am fluent in shell)
Attachments
jwm_trans.tar.gz
(2.21 KiB) Downloaded 450 times
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].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#88 Post by musher0 »

BarryK wrote:technosaurus,
Note that the fixmenus in Woof has some extra functionality, to support the 'menu_strings' SSS domain. See file:

http://bkhome.org/fossil/woof2.cgi/arti ... 6564d629e6

Note, putting that extra code in will not matter for puppies that don't have menu_strings, as it tests for existence of the file.
Thanks for this information, Mr. Kauler. Please forgive my inexperience in advance, but I'd like to ask, if I may:

Does this mean that if we put a language file translating the sub-titles of the jwm in
/usr/share/sss/menu_strings/menu_strings.$LANG

we can have a menu in our own language?

I ask because I find the default French translation provided for jwm_menu_create rather google-esque... (meaning robotic and sometimes senseless...) and would like to provide a more decent one.

As well, does this add-on concern only the titles and sub-titles of the menu or can we translate the description of the programs there too?
Or are the *.desktop files, by adding name[fr]=abcd and comment[fr]=efgh, etc. a better place to provide the translations of the programs themselves?

Many thanks in advance.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#89 Post by musher0 »

Is this normal or a bug? Should this additional install menu be appearing or not? Thanks in advance for your reply.
Attachments
strange-additional-install-menu-with-jwm-menu-create.jpg
(45.32 KiB) Downloaded 765 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#90 Post by technosaurus »

musher0 wrote:Is this normal or a bug? Should this additional install menu be appearing or not? Thanks in advance for your reply.
its normal if you have run jwm_install_menu_create, or installed an older version that included it by default. it is simply an experimental alternative to ppm for low resource machines and minimalists. you can remove it in the /root/.jwm directory (it is a hidden directory)
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].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#91 Post by musher0 »

Thanks for the explanation.

Regards,
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#92 Post by technosaurus »

the translation files for jwm_menu_create are here:
/usr/share/locale/<your_language>/LC_MESSAGES/jwm

If anyone would like to add/improve translations I will include them in a minor point release. (I am working on another project in C/gtk1 at the moment, so jwm tools are on the back burner unless I have a eureka moment on adding tray support in a comprehensive way)
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].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#93 Post by musher0 »

Hi, sc0ttman.

If it's ok with everyone, and in particular with technosaurus, I'll see what I can do to clean up and improve the French translation you initially asked Google... >;-< to provide. This is sort of an honour thing for me, since I translate EN->FR for a living... I'd hate to see my dear Puppy become the laugh of Francophones worlwide because of a google-esque menu.

To give you some context, this is one of the things professional translators do to have fun: we gather 'round a computer and send sentences to Google for translation. Unmistakably, we come out of these little sessions with our ribs hurting because we laughed so much. Google translations are usually way off, that's why they're so funny.

To come back to the subject at hand : I have the Toutou FAT version installed so I'll try to use argolance's translations as much as possible -- with his permission, of course.

Can I PM you for explanations on the script you provided? The translation itself shouldn't be difficult, but I want to make sure I understand where to place everything so it works.

BFN and thanks in advance.

musher0

[quote="sc0ttman"]I should probably post this elsewhere, but anyway...

This little script will get google translations your .desktop files, based on the english "Name=" .. It should then put the new translation into the correct .desktop file, if no transltion was already found for your chosen language..

A folder /usr/share/applications/[lang] is created, look in there for all the translations...

I ran it a few times, for de, fr, es .. Seems to work OK for me, but I havent tested the 2nd loop, which actually adds them back in to the original .desktop files.. Running it now.. not the fastest script ever!

Code: Select all

#!/bin/sh
LOC=ru
DIR="/usr/share/applications/${LOC}"
[ -d ${DIR} ] || mkdir "${DIR}"
for file in /usr/share/applications/*; do
	[ -f $file ] && name=$(cat "$file" | grep '^Name=')
	name1=${name#*[}
	name1=${name1%]*}
	name1=${name1/Puppy /XPUP}
	sleep "4.${RANDOM}"
	name_loc=`wget -qO- "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=${name1#*=}&langpair=en|${LOC}" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/'`
	name_loc=${name_loc/XPUP/Puppy }
	echo "Name[${LOC}]=${name_loc/ \\u003d /=}" > $DIR/$(basename $file)
done 

for file in /usr/share/applications/*; do
	en_name=`$(cat $file) | grep "Name\[$LOC\]"`
	if [ "$en_name" = "" ];then
		name_loc="`cat $DIR/$(basename $file)`"
		[ "$name_loc" != "" ] && echo "$name_loc" >> "$file"
	fi
done
For example, heres the French output ..probably half nonsense and more sanitation is required (see 'd\u0026#39;') :

Code: Select all

Name[fr]=Accès-Finder
Name[fr]=Alsamixer - mélangeur audio
Name[fr]=Assistant son ALSA
Name[fr]=Asunder - CD Ripper
Name[fr]=Émulateur de terminal aterm
Name[fr]=Xautoconnect au réseau sans fil
Name[fr]=Chiot accélérateur de téléchargement
Name[fr]=BashBurn - Graver un CD / DVD
Name[fr]=BashPodder - Podcast gestionnaire
Name[fr]=Bluefish Editor
(...)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#94 Post by technosaurus »

to get all of the desktop files Name= parameter

grep "Name=" /usr/share/applications/* |sed "s/=/\[fr\]=/" >translatable_file

that can be used for adding them back (via separate script)

if anyone else would like to do that for other languages just replace fr with your 2 letter language code

fyi, I have mentioned this before, but just so you know up front. Many of these desktop files originally had proper translations, but were stripped out to save size; however many packagers will still put the full version of the desktop file in the corresponding NLS package (that's what I typically do) ... anyhow, installing an NLS package afterwards may clobber your translations with the "official" ones if you do them in the desktop files directly - that would be frustrating as hell, which is why I suggest using a separate file
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].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#95 Post by musher0 »

For now, here is a "jwm" fr_CA file, the one that goes in /usr/share/locale/fr_CA.utf8/LC_MESSAGES/.

This could also go in

/usr/share/locale/fr_CA/LC_MESSAGES/jwm, if one is not using utf8. Or in

/usr/share/locale/fr/LC_MESSAGES/jwm, if our Francophone friends from Europe find it suitable. There are subtle differences in the way Francophones from different countries label menus and sub-menus -- and obviously, individuals.

I have used an "adjective" form at times for sub-menus, to keep the width of the menu from spreading.

So here it is. Constructive criticisms -- that aim to improve things -- are welcome.

Code: Select all

jwm_Desktop="Bureau"
jwm_DesktopSettings="Paramètres..."
jwm_DesktopCountry="...régionaux"
jwm_DesktopApplets="Applets"
jwm_System="Système"
jwm_SystemConfig="Configuration"
jwm_SystemMemory="Mémoire"
jwm_SystemSchedule="Chronos"
jwm_Setup="Paramètres"
jwm_SetupEntry="...système"
jwm_SetupWizard="Assistants"
jwm_SetupUtility="Utilitaires"
jwm_Utility="Utilitaires"
jwm_UtilityUtilities="...généraux"
jwm_UtilityArchiving="Copies de réserve"
jwm_UtilityConsole="Terminaux"
jwm_Filesystem="Fichiers"
jwm_FilesystemManager="Gestionnaires"
jwm_FilesystemMount="Monteurs"
jwm_FilesystemUtilities="Utilitaires"
jwm_FilesystemFind="Recherches"
jwm_Graphic="Graphisme"
jwm_GraphicGraphics="Visionneurs"
jwm_GraphicEdit="Éditeurs"
jwm_GraphicUtility="Utilitaires"
jwm_Calculate="Calculs"
jwm_Document="Documents"
jwm_DocumentCompose="Composition"
jwm_DocumentText="Éditeurs"
jwm_DocumentUtilities="Utilitaires"
jwm_Business="Affaires"
jwm_BusinessSheets="Tableurs"
jwm_BusinessCalculator="Calculatrices"
jwm_BusinessUtilities="Utilitaires"
jwm_Personal="Personnel"
jwm_PersonalPlan="Organiseurs"
jwm_PersonalUtilities="Chronos"
jwm_Network="Réseau"
jwm_NetworkDialup="...téléphonique"
jwm_NetworkRemote="Cable /SF"
jwm_Internet="Internet"
jwm_InternetWWW="WWW"
jwm_Multimedia="Multimédia"
jwm_MultimediaMedia="Médias"
jwm_MultimediaBurn="Gravure"
jwm_Fun="Jeux"
jwm_Help="Aide"
jwm_Shutdown="SESSION"
jwm_Exit="Sortie à la console"
jwm_Reboot="Redémarrer l'ordi"
jwm_Poweroff="Arrêter l'ordi"
jwm_RestartX="Relancer le serveur X"
jwm_RestartJWM="Redémarrer JWM"
I perused argolance's *.desktop designations in his "Toutou - FAT- RELOADED" as well as his jwm menu and program names, and it seems that the French team has been using workarounds -- not naming the program per se but substituting to it a very short description of what it does. So, the longer translation will have to wait a couple of days.

BFN
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#96 Post by 01micko »

musher0 wrote:For now, here is a "jwm" fr_CA file, the one that goes in /usr/share/locale/fr_CA.utf8/LC_MESSAGES/.

This could also go in

/usr/share/locale/fr_CA/LC_MESSAGES/jwm, if one is not using utf8. Or in

/usr/share/locale/fr/LC_MESSAGES/jwm, if our Francophone friends from Europe find it suitable. There are subtle differences in the way Francophones from different countries label menus and sub-menus -- and obviously, individuals.

I have used an "adjective" form at times for sub-menus, to keep the width of the menu from spreading.

So here it is. Constructive criticisms -- that aim to improve things -- are welcome.

I perused argolance's *.desktop designations in his "Toutou - FAT- RELOADED" as well as his jwm menu and program names, and it seems that the French team has been using workarounds -- not naming the program per se but substituting to it a very short description of what it does. So, the longer translation will have to wait a couple of days.

BFN
Well for now would any native French users say Musher0's translation effort beats techno's google effort? If so I'll put it in Slacko.

TIA
Puppy Linux Blog - contact me for access

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

#97 Post by technosaurus »

It seems ok to a non-native speaker, but is it necessary to have "SESSION" in all caps? ..or is that based on a distro/puplet specific shutdown script?
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/

jwm_param_gui

#98 Post by L18L »

tested and fixed:
- SUBMENU
- DRIVES
added
- LANGUAGE

screenshot see
http://murga-linux.com/puppy/viewtopic. ... &start=403

----------------------
edited
buggy
use version 0.7.3 (4 posts down) please.
Attachments
jwm_param_gui.gz
rename to jwm_param_gui
(3.39 KiB) Downloaded 650 times
Last edited by L18L on Sun 19 Feb 2012, 10:18, edited 1 time in total.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#99 Post by BarryK »

technosaurus wrote:
BarryK wrote:technosaurus,
Note that the fixmenus in Woof has some extra functionality, to support the 'menu_strings' SSS domain. See file:

http://bkhome.org/fossil/woof2.cgi/arti ... 6564d629e6

Note, putting that extra code in will not matter for puppies that don't have menu_strings, as it tests for existence of the file.
I think these are already translated in jwm_menu_create ... and many more (Thank others, I barely speak english, but am fluent in shell)
Ok.

For the record, that link to Fossil repo is out of date, the fixmenus file has changed considerably:

http://bkhome.org/fossil/woof2.cgi/arti ... aa4298e9dc
[url]https://bkhome.org/news/[/url]

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

#100 Post by technosaurus »

I'll probably do a new minor point release this week with some xlations, but I want to do a little experiment first ... export LANG=C after the translation variables are loaded to see if 1. Translations stick with proper characters and such, and 2. Test speed difference

If anyone has more bug/translation fixes ...
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