Langpacks e LiveCD in italiano

For efforts in internationalising Puppy and solving problems in this area
Message
Author
User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

Langpacks e LiveCD in italiano

#1 Post by xanad »

Traduzione di Puppy al 99.9%: aggiornamento 23/02/2016

- Puppy_T64-Media_1.8 856,5 MB
https://drive.google.com/open?id=0B4QTp ... 3FtQ2xfTGc
MD5: 1b4ce98d3627a17f8ed6e1786a65db5c

- Puppy_T64-Light_1.8 645,5 MB
https://drive.google.com/open?id=0B4QTp ... HVwRE1WRUE
MD5: 5cc7e99248ae384ae9121e3d29002170

Langpack fix https://drive.google.com/open?id=0B4QTp ... kxmTlhRVHM

Files extra:
- kernel: https://drive.google.com/open?id=0B4QTp ... XZoSkgxY0E 107,7 Mb
- devx: https://drive.google.com/open?id=0B4QTp ... F9SRm02Vlk 117,9 Mb
- Compatibilità 32bit: https://drive.google.com/open?id=0B4QTp ... VZiWjFwYVE 104,7 Mb
- Wine64: https://drive.google.com/open?id=0B4QTp ... HpQdHRHUHM (irfanView e VirtualDub incusi) 76,1 Mb

Aggiornamenti e patch direttamente dal menu/impostazioni.
-------
Langpacks disponibili per la lingua italiana ed è possibile scaricarli da questi link:
Langpacks available for the Italian language and can be downloaded from these links:

Langpack Quirky 7.0.4.1 32/64-bit i18n:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Patch italiano: 32-bit
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
** per installare Quirky su penna USB o SD (ma anche altre installazioni) scaricare ed installare Quirky-Installer_1.0.pet
http://murga-linux.com/puppy/viewtopic. ... 538#845538

Langpack Tahr 6.0.2 i18n:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Patch italiano:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing

Langpack Slacko 5.7.0 i18n:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Patch italiano:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing

Langpack Precise 5.7.1 i18n:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Patch italiano:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing

Langpack Slacko 5.9.3 i18n:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Patch italiano:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing

Langpack Slacko 5.9.1 64-bit i18n:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Patch italiano:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing

Disponibili le versioni dei LiveCD in italiano (boot in italiano - originale, no custom)
LiveCD versions available in Italian (Italian boot - original, no custom)
tahr-6.0.1_IT.iso[ (289 Mb) Update 07/03/2015
tahr-6.0.2_nopae_IT.iso[ (287 Mb) Update 01/04/2015
precise-5.7.1_IT.iso (206 Mb)
slacko-5.7.0_IT.iso (173 Mb)
slacko-5.9.3_IT.iso beta (249 Mb)
precise-5.7.1-retro_IT.iso (180 Mb) per PC con poche risorse
slacko-5.7.0-NOpae_IT.iso (181 Mb) per PC con poche risorse

Installazione di Puppy da Windows
Installing Puppy from Windows
Utile per pc senza lettore cd/dvd, per non modificare MBR con GRUB e per utenti alle prime armi....
Earnings for pc without cd/dvd player, does not modify the MBR with GRUB and for novice users ....
Precise_IT 571.exe
Slacko_IT_570.exe
Slacko_IT_593.exe
Precise_Retro_IT 571.exe
Slacko_NO-pae_IT_570.exe

Alcune modifiche:
Some adds:
Firefox 29.01 e Seamonkey 2.25 (fango)
Right-click e PuppyUnits (Don570)
LibreOffice 4.2.0 stable e Skype (xanad)
pMusic_tray (zigbert)
gparted_shell (L18L)

*** Aggiornare sempre con l'ultimo langpack disponibile ***

Puppy ora è differenziato da 2 versioni:
1) woof2 (Precise, Precise-Retro, Wary, Racy)
2) woof-CE (Slacko, FluxPup)
I primo passo è conoscere dove sono collocate le traduzioni:

Code: Select all

usr/share/locale/it/LC_MESSAGES/it
(tutti i files hanno una estensione '.mo'). Per modificare un file '.po' in '.mo' è necessario il programma poedit (anche per windows) scaricabile da qui:
https://www.copy.com/s/UeCl69sFtWvO/poedit-1.4.2-4.pet.
Poedit elabora il file '.po' (lingua originale) in un file '.mo' (traduzione). Per maggiori info su poedit : http://www.poedit.net/.
Per conoscere i files di puppy traducibili è necessaria l' ultima versione di Momanager :
http://www.murga-linux.com/puppy/viewto ... &start=172
E' disponibile una breve guida in italiano:
https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Per ulteriori dettagli (in lingua inglese):
http://bkhome.org/fossil/woof2.cgi/arti ... 4fefdcbb79
http://murga-linux.com/puppy/viewtopic.php?t=81259
http://murga-linux.com/puppy/viewtopic.php?t=84178
N.B.:
Mancano solo 2 files alla traduzione al 100%! I programmi non localizzati di default sono stati creati personalmente ex-novo:
http://murga-linux.com/puppy/viewtopic.php?t=95490
Dopo essere stati i primi a tradurre Puppy (non completando) nel 2009, finalmente nel 2014, Puppy abbaia in italiano. L'impresa non sarebbe mai riuscita senza l'aiuto di Vicmz e L18L http://www.murga-linux.com/puppy/viewtopic.php?t=83633 e del forum italiano http://www.italianpuppy.org/.
Last edited by xanad on Sun 15 May 2016, 08:17, edited 190 times in total.

User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#2 Post by ally »


User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#3 Post by xanad »

1000 thanks, Ally :D
In the future there will be updates.
Please, may also add:
slacko-5.7.0-NOPAE_IT.iso (198 Mb) https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
and All_Drivers https://drive.google.com/file/d/0Bz9e78 ... sp=sharing
Attachments
rts5139.tar.gz
(86.76 KiB) Downloaded 1044 times
Last edited by xanad on Mon 17 Aug 2015, 16:46, edited 1 time in total.
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#4 Post by ally »

all done, files going up now

:)

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#5 Post by xanad »

ally wrote:all done, files going up now
Thanks a lot again :wink:
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#6 Post by xanad »

Aggiornamento Langpacks in prima pagina -- Files htm di aiuto (prima parte)
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#7 Post by xanad »

Inserimento in prima pagina degli installer .exe da windows di precise 571 e slacko 570. Utile per pc senza lettore dvd e per utenti alle prime armi....esegue tutto in automatico con 3 click! Grub lascia intatto mbr ed evita fastidiosi e innumerevoli problemi di boot in caso di disinstallazione.
Il tutto, come sempre, in italiano.
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#8 Post by vicmz »

Ciao Xanad. :D
I link dal primo post sono dello stesso pachetto langpack_woofce_it, non c'è langpack_it. Anche nel forum italiano.
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#9 Post by xanad »

Grazie 1000, Vicmz!!! Corretto il link. Ora sono molti i files e continui aggiornamenti... un po' di confusione :shock:
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#10 Post by xanad »

Aggiornamento in prima pagina dei nuovi installer da widows per Precise571 e Slacko570
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#11 Post by xanad »

Aggiornamento langpacks in prima pagina. Risolto traduzione collegamenti presenti in /root/.config/rox.sourceforge.net/OpenWith/***
con la creazione di un file shell che ho chiamato delete.sh con permessi a+x (/root/Startup) che si auto-avvia ed auto-elimina dopo aver eseguito il comando richiesto:

per precise 571

Code: Select all

#!/bin/sh
mv /root/.config/rox.sourceforge.net/OpenWith/.inode_directory/Search\ with\ Pfind /root/.config/rox.sourceforge.net/OpenWith/.inode_directory/Cerca\ con\ Pfind ;
mv /root/.config/rox.sourceforge.net/OpenWith/.application_x-cd-image/Burn\ with\ Pburn /root/.config/rox.sourceforge.net/OpenWith/.application_x-cd-image/Masterizza\ con\ Pburn ;
rm /root/Startup/delete.sh
per slacko 570

Code: Select all

#!/bin/sh
mv /root/.config/rox.sourceforge.net/OpenWith/.inode_directory/Search\ with\ Pfind /root/.config/rox.sourceforge.net/OpenWith/.inode_directory/Cerca\ con\ Pfind ;
mv /root/.config/rox.sourceforge.net/OpenWith/.image_gif/Send-to\ Backgrounds /root/.config/rox.sourceforge.net/OpenWith/.image_gif/Copia\ in\ Backgrounds ;
mv /root/.config/rox.sourceforge.net/OpenWith/.image_jpeg/Send-to\ Backgrounds /root/.config/rox.sourceforge.net/OpenWith/.image_jpeg/Copia\ in\ Backgrounds ;
mv /root/.config/rox.sourceforge.net/OpenWith/.image_png/Send-to\ Backgrounds /root/.config/rox.sourceforge.net/OpenWith/.image_png/Copia\ in\ Backgrounds ;
rm /root/Startup/delete.sh
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#12 Post by xanad »

Aggiornamento in prima pagina langpack per Precise 5.7.1. Controllo ortografico e grammaticale eseguito. Pre-definitivo.
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#13 Post by xanad »

Aggiornamento in prima pagina langpack per Slacko 5.7.0. Controllo ortografico e grammaticale eseguito. Pre-definitivo.
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#14 Post by xanad »

Aggiornamento langpacks in prima pagina:
inseriti (no gettext):

woof2 (localizzati da fango):

deskshortcut.sh
didiwiki-gui
Pdisk
pdvdrsab
pmetatagger

woofCE:

mtpaint
menumanager (suggerimento da watchdog)
update menu
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#15 Post by xanad »

Aggiornamento langpacks in prima pagina. Rivisitati i menu di Precise 571 e Slacko 570 (inseriti alcuni suggerimenti di Watchdog ;) )
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#16 Post by xanad »

Ultimo e definitivo aggiornamento dei langpacks. :D
Inserito Networ Wizard composto da:
rc.network
ndiswrapperGUI.sh
wag-profiles.sh
net-setup.sh
Conclusa la fase di betatest ora inizia la fase di mantenimento.
Segnalate gli errori eventualmente trovati. ;)

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#17 Post by xanad »

Pdisk e Didiwiki localizzati con gettext
Pdisk and Didiwiki localized with gettext

pdisk:

Code: Select all

#!/bin/sh
#2007 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html)
#v3.97 BK bugfix.
#110205 use probedisk2.
#130203 change probedisk2 to probedisk.

ver="xxx"
export TEXTDOMAIN=Pdisk
export OUTPUT_CHARSET=UTF-8

if [ -f /usr/sbin/cfdisk -o -f /sbin/cfdisk ];then #v3.97
 BUTMANAGE="fdisk:20,cfdisk:21"
else
 BUTMANAGE="fdisk:20"
fi

ALLINFO="`probedisk 2>/dev/null | grep -v "optical|" | grep -v "/scd"`" #110205
ALLPARTS="`echo "$ALLINFO" | cut -f 1 -d "|" | cut -f 3 -d "/" | tr "\n" " "`"
ALLMNTD="`df | grep "/dev/" | cut -f 1 -d " " | grep -v "loop" | tr "\n" " "`"

butval=20
BUTPARTS=""
for EACHPART in $ALLPARTS
do
BUTPARTS="${BUTPARTS}$EACHPART:$butval,"
butval=`expr $butval + 1`
done
BUTPARTS="${BUTPARTS}$(gettext EXIT:)10"

xmessage -bg "#8080ff" -center -name "Pdisk" -title "Pdisk drive partition manager" -buttons $BUTPARTS "$(gettext 'Welcome, this program enables you to run either fdisk, or, if it is
installed, cfdisk. These are utility applications to examine and
modify disk drive partitions. This includes creating and erasing
partitions, so is not for the faint-of-heart!')

$(gettext 'Here are the disk drives that Puppy knows about:')
$ALLINFO

$(gettext 'If any drive is wrong or missing, exit this program and run the
\Mount/unmount drives\ program, that you will find in the \File
Managers\ menu. That tool will enable you to probe the hardware.')

$(gettext 'These partitions are curently mounted:')
$ALLMNTD
$(gettext '...you can view these but NOT change them.')

$(gettext 'To continue this program, click a drive button...')"

RETVAL=$?
if [ $RETVAL -lt 11 ];then
 exit
fi

EDITPART="`echo "$BUTPARTS" | tr "," "\n" | grep "$RETVAL" | cut -f 1 -d ":"`"

xmessage -bg "#80C080" -center -name "Pdisk" -title $(gettext "Pdisk drive partition manager") -buttons $BUTMANAGE,EXIT:10 $(gettext  "Chose the partition manager program that you want to use...")

RETVAL=$?
if [ $RETVAL -lt 11 ];then
 exit
fi

if [ $RETVAL -eq 21 ];then
 rxvt -bg "#C080ff" -e cfdisk /dev/$EDITPART
else
 rxvt -bg "#C080ff" -e fdisk /dev/$EDITPART
fi
didiwiki-gui

Code: Select all

#! /bin/sh

# this starts/stops DidiWiki server
# ASSUMES A USER NAMED spot HAS BEEN SETUP
# GuestToo - Feb 7, 2005. Hacked a bit by BK -- 2005,2006.
# Designed for use with Puppy Linux, www.puppylinux.com
#v411 dunno why, but no longer creates new pages, needs /root/spot/.didiwiki world-writable.

#v411 bug workaround, needs to be fixed properly sometime...

ver="412"
export TEXTDOMAIN=didiwiki-gui
export OUTPUT_CHARSET=UTF-8

mkdir -p /root/spot/.didiwiki
chmod 777 /root/spot/.didiwiki

DIDI="/root/spot/didiwiki"

if ! MSG=`which gxmessage`
then
 MSG='xmessage'
fi

if ! grep spot /etc/group
then
 $MSG -center -bg "#ffc0c0" -title  "DidiWiki" $(gettext 'No user /spot/')
 exit 1
fi

if [ ! -r $DIDI ];then
 DIDI=`which didiwiki`
fi

if [ ! -r $DIDI ];then
 $MSG -center -bg "#ffc0c0" -title  "DidiWiki" $(gettext 'DidiWiki program not found')
 exit 1
fi

#BK
PSSTATUS="`ps`"
if [ "`echo -n "$PSSTATUS" | grep 'didiwiki' | grep -v 'didiwiki\-gui'`" = "" ];then
 BUTTONS1="$(gettext Start:)21,$(gettext Cancel:)10"
 MSG1=$(gettext "Click Start button to start DidiWiki
server and launch browser.
Note that DidiWiki runs as user \"spot\"")
 DIDIGO="no"
else
 BUTTONS1="Start:21,Stop:22,Cancel:10"
 MSG1=$(gettext "DidiWiki server is already running, as user \"spot\".
Click Start button to open web browser and use DidiWiki,
or Stop button if you want to kill the server")
 DIDIGO="yes"
fi

$MSG -center -buttons "$BUTTONS1" -title "DidiWiki" "$MSG1"
case $? in

21)
RETVAL1=0
if [ "$DIDIGO" = "no" ];then
 su -c $DIDI - spot &
 #note, .didiwiki folder is created in /root/spot/.
 RETVAL1=$?
fi
if [ $RETVAL1 -eq 0 ];then
 ##hv3 seems to work fine...
 #if [ "`which hv3`" = "" ];then
 # defaultbrowser http://localhost:8000/
 #else
 # hv3 http://localhost:8000/
 #fi
 defaulthtmlviewer http://localhost:8000/
else
 $MSG -center -bg "#ffc0c0" -title  "DidiWiki" $(gettext 'ERROR: DidiWiki did NOT start')
fi
;;

22)
killall -3 didiwiki
sleep 1
killall -9 didiwiki
ps | grep didiwiki
if [ $? -eq 0 ];then
 $MSG -center -bg "#d0ffd0" -title  "DidiWiki" $(gettext 'DidiWiki is stopped')
else
 $MSG -center -bg "#ffc0c0" -title  "DidiWiki" $(gettext 'DidiWiki is still running')
fi
;;

*) exit ;;

esac

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#18 Post by xanad »

Soluzione di L18L al 'right-click'
L18L solution to 'right-click'

Code: Select all

#!/bin/sh
# /usr/sbin/fixroxOpenWith
# L18L July 2014 GPL
# make link text translatable
# based upon xanad's suggestion,
# see http://www.murga-linux.com/puppy/viewtopic.php?t=76368&start=123

export TEXTDOMAIN=fixroxOpenWith

cd /root/.config/rox.sourceforge.net/OpenWith

for DATA in "Pfind|.inode_directory|$(gettext 'Search with Pfind')" "pburn|.application_x-cd-image|$(gettext 'Burn with Pburn')" "Backgrounds|.image_gif|$(gettext 'Send-to Backgrounds')" "Backgrounds|.image_jpeg|$(gettext 'Send-to Backgrounds')" "Backgrounds|.image_png|$(gettext 'Send-to Backgrounds')"
do
 APP="`echo $DATA | cut -d'|' -f1`"
 DIR="`echo $DATA | cut -d'|' -f2`"
 LNK="`echo $DATA | cut -d'|' -f3`"
 oldLINK="`ls --full-time $DIR | grep $APP | cut -d' ' -f9- | cut -d'>' -f1 | rev | cut -c3- | rev`" #ex:Copia in Backgrounds
 [ "$oldLINK" != "$LNK" ] && mv "${DIR}/${oldLINK}" "${DIR}"/"${LNK}"
done

cd - >/dev/null
Last edited by xanad on Fri 18 Jul 2014, 11:33, edited 1 time in total.

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#19 Post by xanad »

Soluzione dimenticanza gettext in 'menumanager', mancano le stringhe all'inizio del file:
Resolution forgetfulness gettext parameters in 'menumanager', missing strings beginning of the file:

Code: Select all

export TEXTDOMAIN=menumanager
export OUTPUT_CHARSET=UTF-8
File OK:

Code: Select all

#!/bin/bash

# 131222 01micko, script to manage what .desktop files show in menu
# must be run as root

[ "$UID" = 0 ]|| exec sudo -A ${0} ${@}

export TEXTDOMAIN=menumanager
export OUTPUT_CHARSET=UTF-8

CWM=`cat /etc/windowmanager`
JWM_MENU_HEIGHT=
if [ "$CWM" = "jwm" ];then
  MENHEIGHT=16
  [ -f $HOME/.jwm/menuheights ] && . $HOME/.jwm/menuheights
  MENU=`grep "RootMenu label" /etc/xdg/templates/_root_.jwmrc|grep MENHEIGHT`
 [ "$MENU" ] && JWM_MENU_HEIGHT='<frame '$(gettext "Menu Heights")'>
      <hbox space-fill="true" space-expand="true">
        <text space-expand="false" space-fill="false"><label>" "</label></text>
        <text wrap="false" xalign="0" space-expand="true" space-fill="true"><label>'$(gettext "You can adjust the heights of the menus in pixels :")'	</label></text>
        <spinbutton range-min="16" range-max="48" range-step="8" editable="false" space-expand="false" space-fill="false">
		    <variable>NEWMENHEIGHT</variable>
		    <default>'$MENHEIGHT'</default>
		    <sensitive>true</sensitive>
		  </spinbutton> 
      </hbox>
    </frame>'
fi

tmp=${RANDOM}
export TMP0=/tmp/${tmp}0
export TMP1=/tmp/${tmp}1
export TMP2=/tmp/${tmp}2
export DIR=/usr/share/applications

# potential shown list(s)
grep -E "^Icon=" ${DIR}/* | awk -F: '{print $1}' > $TMP0

# enabled list
echo -n '' > $TMP1
while read fline
  do 
    grep -q -E "^NoDisplay=" $fline
    case $? in
      0)FALSE=`grep -E "^NoDisplay=" $fline | grep "false"`
      [ "$FALSE" ] && echo ${fline##*/} >> $TMP1
      ;;
      *)echo ${fline##*/} >> $TMP1
      ;;
     esac
  done < $TMP0

# disabled list
echo -n '' > $TMP2
while read tline
  do 
    grep -q -E "^NoDisplay=true" $tline
    [ "$?" -eq 0 ] && echo ${tline##*/} >> $TMP2
  done < $TMP0

func_msg(){
   gtkdialog-splash -timeout $5 -bg $6 -close $7 -text "$1 $2 $3 $4."
}
export -f func_msg

#loop used for multiple selections when holding ctrl when clicking
# move to disabled
move_right() {
   if [ "$YLIST" != "" ];then
     for Y in $YLIST
     do
      grep -q $Y $TMP2
      if [ $? != 0 ];then
       func_msg Removing "$Y" from menu. 1 orange box
       echo $Y >> $TMP2
        sed -i "/$Y/d" $TMP1
      fi
     done
   fi
   return
}
export -f move_right

# move to enabled
move_left() {
   if [ "$NLIST" != "" ];then
     for N in $NLIST
     do
      grep -q $N $TMP1
      if [ $? != 0 ];then
       func_msg enabling "$N" at startup. 1 green box
       echo $N >> $TMP1
       sed -i "/$N/d" $TMP2
      fi
     done
   fi
   return
}
export -f move_left

export menuManager='
<window title="'$(gettext "Menu Manager")'" icon-name="gtk-properties">
<vbox space-fill="true" space-expand="true">
  '"`/usr/lib/gtkdialog/xml_info fixed menu.svg 60 "$(gettext "This application controls what apps are set to show in the menu on your system.")"`"'
  <frame '$(gettext "Currently Menu Items")'>
      <vbox border-width="10" space-expand="false" space-fill="false">
        <text wrap="false" xalign="0" use-markup="true" space-expand="false" space-fill="false"><label>"'$(gettext "<b>Remove</b> an app from the menu by highlighting in the left pane and pressing <b>−</b>.")'"</label></text>
        <text wrap="false" xalign="0" use-markup="true" space-expand="false" space-fill="false"><label>"'$(gettext "<b>Add</b> an app to the menu by highlighting in the right pane and pressing <b>+</b>.")'"</label></text>
      </vbox>
     <hbox height-request="146" space-fill="true" space-expand="true">
       <hbox space-fill="true" space-expand="true">
         <tree selection-mode="3">
           <variable>YLIST</variable>
           <label>'$(gettext "Enabled Menu Items")'</label>
           <input>cat '"$TMP1"'</input>
         </tree>
       </hbox>
       <vbox homogeneous="true" space-fill="false" space-expand="false">
         <vbox space-fill="false" space-expand="false">
           <button border-width="3">
             '"`/usr/lib/gtkdialog/xml_button-icon remove`"'
             <action>move_right</action>
             <action>refresh:YLIST</action>
             <action>refresh:NLIST</action>
           </button>
           <button border-width="3">
             '"`/usr/lib/gtkdialog/xml_button-icon add`"'
             <action>move_left</action>
             <action>refresh:YLIST</action>
             <action>refresh:NLIST</action>
           </button>
         </vbox>
       </vbox>
     <tree selection-mode="3">
       <variable>NLIST</variable>
         <label>'$(gettext "Disabled Menu Items")'</label>
         <input>cat '"$TMP2"'</input>
     </tree>
   </hbox>
  </frame>
  '$JWM_MENU_HEIGHT'
 <hbox space-expand="false" space-fill="false">
    <button space-expand="false" space-fill="false">
      <label>'$(gettext "Cancel")'</label>
      '"`/usr/lib/gtkdialog/xml_button-icon cancel`"'
      <action>exit:Cancel</action>
    </button>
    <button space-expand="false" space-fill="false">
      <label>'$(gettext "Ok")'</label>
      '"`/usr/lib/gtkdialog/xml_button-icon ok`"'
      <action>exit:OK</action>
    </button>
  </hbox>
 </vbox>
</window>'

. /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
eval $(gtkdialog -p menuManager)

case $EXIT in
OK)
# add to enabled
while read line1; do
 [ -f ${DIR}/${line1} ] && \
 sed -i "s%NoDisplay=true%NoDisplay=false%" ${DIR}/${line1}
 done < $TMP1
# add to disabled
while read line2; do
 [ -f ${DIR}/${line2} ] && \
 grep -q "^NoDisplay=" ${DIR}/${line2}
  if [ "$?" -eq 0 ];then 
   sed -i "s%NoDisplay=false%NoDisplay=true%" ${DIR}/${line2}
  else
   echo "NoDisplay=true" >> ${DIR}/${line2}
  fi
 done < $TMP2
# menu heights
if [ "$NEWMENHEIGHT" != "$MENHEIGHT" ];then
  if [ "$NEWMENHEIGHT" = 16 ];then
    [ -f $HOME/.jwm/menuheights ] && rm $HOME/.jwm/menuheights
  else
    echo "MENHEIGHT=$NEWMENHEIGHT" > $HOME/.jwm/menuheights
  fi
fi
# fix menu
func_msg Please wait .. .   2 pink never &
pid=$!
fixmenus
ps -A | grep -q "jwm" && (jwm -reload || jwm -restart)
kill -9 $pid
rm $TMP0; rm $TMP1; rm $TMP2
sleep 1;;
*)rm $TMP0; rm $TMP1; rm $TMP2;;
esac

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#20 Post by xanad »

Inserimento in prima pagina del langpack italiano della versione sperimentale di Slacko 593 di 01micko.
Italian langpack for Slacko 593 beta version (01micko) in first page,

Post Reply