jwm_tools-0.9 (was jwm_menu_create)

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

#16 Post by technosaurus »

I haven't added any translations yet, but the infrastructure is now there and will automatically fall back to en_TEchnosaurus

... but I did add a new item for 0.2 (see the teaser pic)

I got sick of waiting & waiting .... every time I wanted to change categories or distro repo .... so just added the whole damn thing to a jwm rootmenu
amazingly it runs (only once) in ~2.5s and after that it is as instant as navigating the regular menu
it does ALL repos, whereas PPM takes over 30s for just one distro and ~5s just to switch categories
... sorry it doesn't increase your download speed though
Attachments
jwm_menu_create-0.2.pet
this one writes to ${HOME}/.jwmrc by default ... make a backup JIC
(35.88 KiB) Downloaded 803 times
pet_install.png
(95.31 KiB) Downloaded 1522 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].

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

jwm_menu_create

#17 Post by L18L »

Thanks for having added the LANGUAGE thing :)

line 179 of jwm_menu_create should be now:
Name=*|Name?${myLANG}?=*) NAME="${LINE#*=}"'' ;;
until a better storage for translations is created.

TPM (TechnosaurusPackageManager) is looking very interesting :D

That is how the translations of NAME are stored in lang_pack's now

[Desktop Entry]
Encoding=UTF-8
Name=Abiword wordprocessor
Name[ru]=Abiword тек

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

Re: jwm_menu_create

#18 Post by sc0ttman »

L18L wrote:TPM (TechnosaurusPackageManager) is looking very interesting :D
I was gonna call it the JW(PP)M ;)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
maxerro
Posts: 53
Joined: Sun 10 Oct 2010, 16:11

#19 Post by maxerro »

:D Borderline-genius-showoff... TS, while you're under the influence of cosmical wisdom-dust activity, you might try making a 15x faster JWM-menu-shaped Pmount replacement.

People who don't like multiple (or any) trays can play with the attached jwm_install_menu_create. Then run TS's jwm_menu_create v0.2 and activate the menu with middle mouse button (or change the script to respond to left button if you prefer).
Attachments
jwm_install_menu_create.tar.gz
use in combo with the scripts above
(1.48 KiB) Downloaded 801 times

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

pmount replacement

#20 Post by L18L »

maxerro wrote:Pmount replacement.
Try this one
ymount
:D

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

jwm_menu_create

#21 Post by L18L »

For anyone who wants to play with it (or improve it):

Code: Select all

	de*)	#this is a template, just remove any unnecessary translations
		jwm_Desktop="Desktop" 
		jwm_DesktopSettings="Desktop-Einstellungen" 
		jwm_DesktopCountry="Regionale Einstellungen" 
		jwm_DesktopApplets="Applets" 
		jwm_System="System" 
		jwm_SystemConfig="" 
		jwm_SystemMemory="Geräte" 
		jwm_SystemSchedule="Zeitplan" 
		jwm_Setup="Konfiguration" 
		jwm_SetupEntry="" 
		jwm_SetupWizard="Einrichtungshelfer" 
		jwm_SetupUtility="Installationswerkzeuge" 
		jwm_Utility="Werkzeuge" 
		jwm_UtilityUtilities="" 
		jwm_UtilityArchiving="Archivierung" 
		jwm_UtilityConsole="Konsole" 
		jwm_Filesystem="Dateisystem" 
		jwm_FilesystemManager="Verwaltung" 
		jwm_FilesystemMount="Laufwerkseinbinder" 
		jwm_FilesystemUtilities="Hilfsprogramme" 
		jwm_FilesystemFind="Finden" 
		jwm_Graphic="Grafik" 
		jwm_GraphicGraphics="Betrachter" 
		jwm_GraphicEdit="Bearbeitung" 
		jwm_GraphicUtility="Hilfsprogramme" 
		jwm_Document="Dokument" 
		jwm_DocumentCompose="Gestaltung" 
		jwm_DocumentText="Text" 
		jwm_DocumentUtilities="Hilfsprogramme" 
		jwm_Business="" 
		jwm_BusinessSheets="" 
		jwm_BusinessCalculator="Taschenrechner" 
		jwm_BusinessUtilities="" 
		jwm_Personal="Persönlich" 
		jwm_PersonalPlan="" 
		jwm_PersonalUtilities="" 
		jwm_Network="Netzwerk" 
		jwm_NetworkDialup="" 
		jwm_NetworkRemote="" 
		jwm_Internet="Internet" 
		jwm_InternetWWW="" 
		jwm_Multimedia="" 
		jwm_MultimediaMedia="" 
		jwm_MultimediaBurn="Brennersoftware" 
		jwm_Fun="Spaß" 
		jwm_Help="Hilfe" 
		jwm_Shutdown="Herunterfahren" 
		jwm_Exit="zur Kommandozeile" 
		jwm_Reboot="Computer neustarten" 
		jwm_Poweroff="Computer ausschalten" 
		jwm_RestartX="X-Server neustarten" 
		jwm_RestartJWM="JWM neustarten"
		;;

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

Re: jwm_menu_create

#22 Post by technosaurus »

L18L wrote:Thanks for having added the LANGUAGE thing :)

line 179 of jwm_menu_create should be now:
Name=*|Name?${myLANG}?=*) NAME="${LINE#*=}"'' ;;
until a better storage for translations is created.

TPM (TechnosaurusPackageManager) is looking very interesting :D

That is how the translations of NAME are stored in lang_pack's
Good catch, now that I have a translation I can test it. :)

Before anyone starts translation of .desktop files, take a look in another distro... many have been manually cut down. I typically copy the full desktop files to the NLS package and cutdown the one in the main package.
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].

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

Re: jwm_menu_create

#23 Post by disciple »

technosaurus wrote:I typically copy the full desktop files to the NLS package and cutdown the one in the main package.
Brilliant! that would be a good feature for new2dir or whatever the current tool is :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

Re: jwm_menu_create

#24 Post by L18L »

technosaurus wrote:...take a look in another distro...
They seem to keep it TOP SECRET :lol: :lol: :lol:
http://forum.tinycorelinux.net/index.ph ... 69.15.html

---------

Please have a look at my idea.

Let everything stay English only and let sed to the translation.

Code: Select all

 [ "$myLANG" != "en" && "$myLANG" != "C" ] && sed -f translate_$myLANG ${HOME}/.jwmrc > /dev/shm/tr && cp /dev/shm/tr ${HOME}/.jwmrc
Tested succesfully
translate_de is:

Code: Select all

s/Asunder audio CD ripper/Asunder Audio\/CD-Ripper/g
That could be the way to translate everything (menu related and PPM related).
Attachments
translated_by_sed.png
just a mini example
(15.46 KiB) Downloaded 1747 times

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

#25 Post by technosaurus »

something like this:
(for the imaginary reverse alphabet english language)

Code: Select all

#!/bin/sh
for FILE in $@; do
[ -e ${FILE} ] && sed -i "
s/a/z/
s/b/y/
s/c/x/
" ${FILE} || echo $FILE not a file >/dev/stderr
done
brilliantly simple - I like it ... and it would work for any script/text file ... but beware of translating key words in scripts (file, echo etc...)
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:

#26 Post by technosaurus »

v 0.3 uploaded - see initial post
renamed to jwm_tools
improvements to install menu
german localization
bugfixes
added jwm_notify

usage:
jwm_notify "short msg" "long message" icon command_to_run timeout
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_menu_create

#27 Post by L18L »

technosaurus wrote:... but beware of translating key words in scripts (file, echo etc...)
Use some regex to generate the translation templates :?:
Simple example: Translate Help

<Program label="'${jwm_Help:-Help}'" icon="help24.png">exec defaulthtmlviewer file:///usr/share/doc/index.html</Program>

or just

<Program label="'${jwm_Help:-Help}'" icon="help24.png">exec defaulthtmlviewer file:///usr/share/doc/index.html</Program>

s/Help/Help/g
-----

There was no menu entry for jwm-tools
wary513 Xvesa

----
Used T(?)PM to install tetris successfully. Thank you very much :) .

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

Re: jwm_menu_create

#28 Post by technosaurus »

L18L wrote:There was no menu entry for jwm-tools
wary513 Xvesa
There is no gui => I didn't make an entry, but since it is fairly quick it could be part of a wrapper for "Restart JWM"
It may also be a good idea for an option to update the .package files for the install menu.
I guess now that I have jwm_notify, they could get menu entries and a little dialog to say what is going on.
I haven't finished recoding the JWM configuration tools, but that is where jwm_notify is headed (it has some minimal dialog capabilities). Then maybe some other tools from zigbert, goingnuts, scottman and others for drive trays, desktop backgrounds, app-trays etc... till jwm's capabilities are exhausted.

need to look into pet-packages-woof ... assumed they were the ones that recently became common, but i'm getting broken links ATM

Ideally I would like to eventually be able to have a Puppy start out with only static uclibc busybox, Xvesa, jwm and terminal (+ a few helpers). Then one could build a distro/toolkit independent version and remaster. Debian + QT, Ubuntu + gtk, Slackware + wine, TinyCore + fltk, ... FOX?, tcl/tk?, ...

I may also try to port these to jwm's replacement as it matures:
http://uwm.sourceforge.net/
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
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#29 Post by 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
Name[fr]=BootManager - démarrage configurer
Name[fr]=Installer le navigateur - choisissez un navigateur
Name[fr]=Burniso2cd - graver un fichier ISO sur CD / DVD
Name[fr]=Lecteur CD / DVD Wizard
Name[fr]=Chooselocale - localisation des pays
Name[fr]=Clinet - CLI réseau
Name[fr]=Réglages Pays Countrywizard
Name[fr]=Deadbeef - Lecteur de musique
Name[fr]=Default-Programmes-Sélecteur
Name[fr]=Modèles Desksetup pour les icônes bureau
Name[fr]=Disque icônes du bureau gestionnaire
Name[fr]=Edit-ESF - ESF éditeur de fichier
Name[fr]=Elinks - navigateur web CLI
Name[fr]=ePDFView - PDF Viewer
Name[fr]=Ex - petit éditeur vi
Name[fr]=FFConvert-1.1 version de développement
Name[fr]=PcurlFtp - partage de fichiers
Name[fr]=Bûche - Firewall Monitor
Name[fr]=Firewall Genie
Name[fr]=Pare-feu - Plateau Applet
Name[fr]=Adobe Flash - Installer
Name[fr]=Adobe Flash Player
Name[fr]=Disquettes - Formatter
Name[fr]=FlSynclient - paramètres du pavé tactile
Name[fr]=Frugal-Installer - installer Puppy à la HD
Name[fr]=Gadmin-rsync - outil de sauvegarde
Name[fr]=Gaiksaurus - minuscules thésaurus rapide
Name[fr]=Galculator - calculatrice scientifique
Name[fr]=Gcolor2 - Color Chooser
Name[fr]=Utilisation GGdmap graphique de disque
Name[fr]=Geany - éditeur de texte
Name[fr]=Getez - facile Downloader
Name[fr]=Gexec - exécuter une commande
Name[fr]=gFnRename - renamer fichier batch
Name[fr]=Gfontsel - Font Viewer
Name[fr]=Client FTP
Name[fr]=hachages de fichier gHasher calculer
Name[fr]=GHunter
Name[fr]=Glurp - petits clients mpd
Name[fr]=Gmeasures - Convertisseur d\u0026#39;unités
Name[fr]=GParted - gestionnaire de partition
Name[fr]=GPeriodic - tableau périodique
Name[fr]=Gpicview - Image Viewer
Name[fr]=Gpptp VPN PPTP client
Name[fr]=Grub4dos - config bootloader
Name[fr]=Gstpw - gtk chrono
Name[fr]=Gtkam appareil gestionnaire
Name[fr]=GTK - thème chooser
Name[fr]=GTK LXSplit - File Splitter
Name[fr]=GTK-Splitter - File Splitter
Name[fr]=Google Translator
Name[fr]=Hardinfo - le matériel du système vue
Name[fr]=Htop - Process Viewer
Name[fr]=Icône - Theme Switcher
Name[fr]=ISO Master - Éditeur de fichier ISO
Name[fr]=JWM de configuration
Name[fr]=Theme Maker JWM
Name[fr]=Wallpaper-changeur
Name[fr]=Leafpad - éditeur de texte
Name[fr]=Linux-Firewall - pare-feu
Name[fr]=Linux-Firewall Wizard
Name[fr]=LightSword - Alarme et Timer
Name[fr]=LightSword - gestionnaire d\u0026#39;alarmes multiples
Name[fr]=Lxrandr - les paramètres d\u0026#39;affichage mis en
Name[fr]=Gestionnaire des tâches
Name[fr]=Macchanger - modifier votre adresse MAC
Name[fr]=MC - Gestionnaire de fichiers CLI
Name[fr]=Memtest - test de la RAM
Name[fr]=Maker entrée de menu
Name[fr]=éditeur de fichiers-sons mhWaveEdit
Name[fr]=Type MIME éditeur
Name[fr]=GPM joueur - CLI lecteur de musique
Name[fr]=Singe - webserver minuscules
Name[fr]=Souris / clavier Assistant
Name[fr]=MP - console de l\u0026#39;éditeur
Name[fr]=mtPaint - éditeur d\u0026#39;image
Name[fr]=MTR - traceroute
Name[fr]=Assistant Réseau
Name[fr]=Man - Linux Online manuelle
Name[fr]=Éditeur de texte NicoEdit
Name[fr]=NoBlankScreen
Name[fr]=NTFS-sauvegarde sauvegarde de la partition de Windows
Name[fr]=Opéra
Name[fr]=Opera Widget Installer
Name[fr]=Opera Widget directeur
Name[fr]=Osmo - organiseur personnel
Name[fr]=Parcellite - Clipboard Manager
Name[fr]=Tailles Partview partition de vue
Name[fr]=PawdioConverter - convertisseur audio
Name[fr]=Pbackup sauvegarde et de synchronisation
Name[fr]=Pburn CD / DVD / graveur Blu-ray
Name[fr]=Pccrypt - fichier de cryptage / suppression sécurisée
Name[fr]=pCD CD-audio player
Name[fr]=Pcdripper CD Ripper chanson
Name[fr]=pClock - minuterie multifonctions
Name[fr]=PCountdown - compte à rebours
Name[fr]=Sélecteur curseur Puppy
Name[fr]=Pdict - dictionnaire en ligne
Name[fr]=Pdisk - gestionnaire de partition
Name[fr]=Pdvdrsab - RIP / rétrécir / graver des DVD
Name[fr]=pEqualizer graphique Equalizer
Name[fr]=Personnalisez - Paramètres
Name[fr]=pfilesearch - File Finder avancés
Name[fr]=File Finder Pfind
Name[fr]=PGPRS - Connecter
Name[fr]=Configuration PGPRS
Name[fr]=Sélecteur de fichier Acrobat
Name[fr]=PMConky - Information sur le système de bureau
Name[fr]=Pmenu - éditeur de menu Puppy
Name[fr]=Pmirror - un répertoire de sauvegarde
Name[fr]=Pmount - monter / démonter des lecteurs
Name[fr]=Lecteur CD / ripper
Name[fr]=Pmusic lecteur audio
Name[fr]=Pnethood partages Samba
Name[fr]=Pnetlive - réseau de garder vivante
Name[fr]=PPLOG - site blog personnel
Name[fr]=Gestionnaire de processus pProcess
Name[fr]=Precord mp3, ogg, wav lecteur / enregistreur
Name[fr]=Prenom - renamer fichier batch, simple
Name[fr]=Assistant Ajout d\u0026#39;imprimante CUPS
Name[fr]=Pschedule tâche à temps
Name[fr]=Synchronisation psync Time Server
Name[fr]=Ptag éditeur audio tag de fichier
Name[fr]=Ptimer - chronomètre, réveil
Name[fr]=pTiming - système de minuterie événement
Name[fr]=PUDD - Disque copier / partition
Name[fr]=Pup-annonce-Blocker - bloquer les publicités en ligne
Name[fr]=PupApps - lanceur d\u0026#39;applications
Name[fr]=PupControl - panneau de contrôle
Name[fr]=PupDial - dialup modem
Name[fr]=Puppizard - Package Builder
Name[fr]=Event Manager Puppy
Name[fr]=Package Manager Puppy
Name[fr]=Puppy Package désinstallateur
Name[fr]=Puppy Universal Installer
Name[fr]=pupRadio / media pupTelly de streaming
Name[fr]=PupSaveConfig configuration de stockage personnel
Name[fr]=PupSaveConfig - Enregistrer les paramètres
Name[fr]=PupScan - informations d\u0026#39;interface
Name[fr]=Capture d\u0026#39;écran PupSnap
Name[fr]=PupTransmission - CLI torrent downloads
Name[fr]=Lanceur d\u0026#39;application PupTray
Name[fr]=pupX - définir les propriétés de X
Name[fr]=PureFTPd serveur FTP
Name[fr]=Pwput - uploader de fichier simple
Name[fr]=Pwsget - fichier sécurisé Downloader
Name[fr]=Remaster Puppy live-CD
Name[fr]=Renamcon - renamer fichier batch
Name[fr]=Redimensionner - stockage de fichiers personnels
Name[fr]=Retrovol - mélangeur audio
Name[fr]=éditeur d\u0026#39;image rgbpaint
Name[fr]=Escroquerie - CD Ripper
Name[fr]=Rover - Fichier du Finder
Name[fr]=Gestionnaire de fichiers ROX-Filer
Name[fr]=ROX Toolbar Icon Switcher
Name[fr]=Rxvt - émulateur de terminal
Name[fr]=Samba-TNG - part du réseau
Name[fr]=Outil de Scratchfile - partitions linux dans les fichiers
Name[fr]=Secure - ssh telnet
Name[fr]=Régler la date et l\u0026#39;heure
Name[fr]=Régler la taille de police mondiale
Name[fr]=Régler fuseau horaire
Name[fr]=SFS Converter
Name[fr]=SFS-charge sur la volée
Name[fr]=SimpleWALL établir le fond
Name[fr]=Startmount - disques autostart et applications
Name[fr]=Startups - gérer les services de démarrage
Name[fr]=Superscan - scanner réseau
Name[fr]=Multimédia Assistant Touches
Name[fr]=Swapfile - Directeur
Name[fr]=Informations sur le matériel SysInfoBox
Name[fr]=Termit - émulateur de terminal
Name[fr]=SGTT - Time Tracker
Name[fr]=Basculer bureau Rox
Name[fr]=Transmission - Client BitTorrent
Name[fr]=Frontend Trayfm Bac shell-fm
Name[fr]=Tray Manager
Name[fr]=TreeSize - Analyseur de l\u0026#39;utilisation du disque
Name[fr]=Uget - gestionnaire de téléchargement
Name[fr]=Émulateur de terminal urxvt
Name[fr]=Viewnior - Image Viewer
Name[fr]=VLC-gtk - simple interface de VLC
Name[fr]=Wacom Assistant
Name[fr]=WakePup - créer une disquette de démarrage
Name[fr]=Outil CPU Scaling Fréquence
Name[fr]=Les polices Windows
Name[fr]=Woofy - outil de remasteriser
Name[fr]=Xarchiver - Gestionnaire de fichiers zip
Name[fr]=Hotkey configuration
Name[fr]=Xcalc - calculatrice scientifique
Name[fr]=Xchat - client IRC
Name[fr]=Xclipboard
Name[fr]=Xconsole - moniteur de la console
Name[fr]=Xdelta - Directeur Différence
Name[fr]=Xfdiff coupe - comparer deux fichiers
Name[fr]=Scanner de virus XF-Prot
Name[fr]=Xlock - verrouillage de l\u0026#39;écran
Name[fr]=Configurer le verrouillage d\u0026#39;écran Xlock
Name[fr]=Assistant vidéo Xorg
Name[fr]=Xpad - Sticky Notes
Name[fr]=Xvesa vidéo Assistant
Name[fr]=You2pup - YouTube Downloader
Name[fr]=Zathura PDF Viewer
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

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

#30 Post by technosaurus »

Optimization aside, it appears that Google translate skips capitalized words (as it should, grammatically it indicates a proper name) fortunately sed has a tolower function, but then there is a twist, usually the first word _is_ a proper name. Also the localized names follow name= alphabetically by locale, so doing the read while trick could help out.

Httpd may be able to fix some of those.... http -d .... there was a thread with a better method that zigbert started for pmusic lyrics.
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
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#31 Post by sc0ttman »

technosaurus wrote:Optimization aside, it appears that Google translate skips capitalized words (as it should, grammatically it indicates a proper name) fortunately sed has a tolower function, but then there is a twist, usually the first word _is_ a proper name. Also the localized names follow name= alphabetically by locale, so doing the read while trick could help out.

Httpd may be able to fix some of those.... http -d .... there was a thread with a better method that zigbert started for pmusic lyrics.
I was looking for a 'tolower' option :)

And you are correct, a lot of capitalized names should not be translated... To be honest, the first word of each entry should not be translated, most of the time...

And I know I should have posted it elsewhere, but my HD was/is dying on me, and I had to get it uploaded quick - I only had it in terminal, not saved (hence the needless bits/mistakes in there).. Sorry!
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#32 Post by sc0ttman »

also, I read users of netbooks (and smaller screens in general) complaining that sub-menus are a real pain the neck... I personally feel no need for them, but dont mind having them.. So I'm not voting either way..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#33 Post by sc0ttman »

EDIT: translations for french, german, russian and spanish here: http://www.murga-linux.com/puppy/viewto ... 135#555135
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

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

jwm_tools

#34 Post by L18L »

technosaurus wrote:something like this:
(for the imaginary reverse alphabet english language)

Code: Select all

#!/bin/sh
for FILE in $@; do
[ -e ${FILE} ] && sed -i "
s/a/z/
s/b/y/
s/c/x/
" ${FILE} || echo $FILE not a file >/dev/stderr
done
brilliantly simple - I like it ... and it would work for any script/text file ... but beware of translating key words in scripts (file, echo etc...)
Success in translating the original .jwmrc by simply adding double quotes and omitting keywords (there was just "false in acomment")
wary513

jwm_menu_create_translate_template:

Code: Select all

#!/bin/sh
# translation at end of jwm_menu_create
OUT="jwm_menu_create_tr"
echo -n > $OUT

cat /root/.jwmrc | grep label= | cut -d '"' -f2 > /dev/shm/jwm_menu_translate
keywords="false "
while read LINE ; do
 [[ "$keywords" =~ "$LINE" ]] || echo "s#"${LINE}#"${LINE}#g" >> $OUT
done <  /dev/shm/jwm_menu_translate

# copy $OUT to $OUT_myLANG
# translate $OUT_myLANG
# sed -f jwm_menu_create_tr_de /root/.jwmrc > /dev/shm/.jwmrc_de
# cp /dev/shm/.jwmrc_de  /root/.jwmrc
# jwm -restart
Attached a little gui for switching language of menu
technosaurus wrote:Ideally I would like to eventually be able to have a Puppy start out with only static uclibc busybox, Xvesa, jwm and terminal (+ a few helpers).
FIne, Xvesa is important for my VIA mini-ITX box :D
Attachments
jwm_languageswitcher.tar.gz
(995 Bytes) Downloaded 692 times

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

#35 Post by technosaurus »

v 0.4 is released with more translations and a bugfix that fixes broken keybindings. See initial post for .pet.

Would it be easier on everyone (read developers) if I return jwm_menu_create going to stdout instead of creating the jwmrc file directly? I could always include a wrapper script(s) for the general user.

This is a little template for my next jwm tool (jwm_image_view), I still need to write the script to go with it, but it will be similar to jwm_notify

Code: Select all

<Tray  autohide="false" insert="right" halign="center" y="1" border="0">
<TrayButton popup="Previous" label="<" ></TrayButton>
<TrayButton popup="Next" label=">" ></TrayButton>
<TrayButton popup="Smaller" label="-" ></TrayButton>
<TrayButton popup="Larger" label="+" ></TrayButton>
<TrayButton popup="Maximize" label="[]" ></TrayButton>
<TrayButton popup="Close" label="X"></TrayButton>
</Tray>

<Tray  autohide="false" insert="right" halign="center" y="28"  border="0" height="192" >
<TrayButton popup="$MESSAGE_HERE" icon="/usr/share/backgrounds/default.jpg"></TrayButton>
</Tray>
Attachments
jwm_image_view.png
(40.23 KiB) Downloaded 1247 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].

Post Reply