PPM Ziggy interface fixed

Forum member esmourguit reported that the Ziggy user interface of the Puppy Package Manager, does not fully translate to another language, also a couple of icons are missing.

The file is /usr/local/petget/ui_Ziggy, and it is fixed. Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/3df37e36e2

Also in this commit is a fix for /usr/sbin/quicksetup to load a console font when the locale is changed. This should fix a problem reported of wrong font after exiting from X.


Posted on 24 Feb 2012, 19:11


Comments:

Posted on 24 Feb 2012, 24:44 by rodin.s
PPM Ziggy
When I was translating Ziggy interface for the first time, I added gettext to any line, including categories names. But it didn't work that way because categories names are used in search directly. So I left categories without gettext. Even now in this new interface categories are not switched.


Posted on 25 Feb 2012, 11:13 by BarryK
Re Ziggy
Aargh! Yes, you are right.

Ok, I have fixed ui_Ziggy so that it now works with translated categories.



Posted on 9 Apr 2012, 21:52 by mavrothal
findnames.sh
In wary/racy 5.3 findname.sh line 56 has "getext" instead of "gettext" so the "Sorry, no matching package name" response is easy to miss ;)

Also is there any reason that PPM only search for packages that _start_ with the searching word?
What about if someone is looking for a (web) browser of a (video) player or something descriptive but not a pet name?


Posted on 10 Apr 2012, 8:25 by BarryK
Re PPM search
Also is there any reason that PPM only search for packages that _start_ with the searching word?

Only?

The help page in PPM explains that you can use wildcards, like this:

*input*

or even just

*input

Yes, that would be a good feature, to search also the description.



Posted on 10 Apr 2012, 8:30 by BarryK
re findnames.sh
mavrothal,
Thanks, fixed "getext" typo on PPM findnames.sh.



Posted on 10 Apr 2012, 14:17 by mavrothal
search description
Yes, that would be a good feature, to search also the description


Jemimah has changes that allows searches of both pet names and descriptions at the same time here:
http://www.murga-linux.com/puppy/viewtopic.php?p=618542#618542

And I had a patch for searching with max 2 native language terms, like "text edit" here:
http://www.murga-linux.com/puppy/viewtopic.php?p=618566#618566

You might want to take a look and consider them for future PPM updates.


Posted on 10 Apr 2012, 15:50 by L18L
search description i18n
mavrothal wrote:Yes, that would be a good feature, to search also the description

Localizing package descriptions is possible.
Though without momanager but very easy, see
dotpup/petget%20i18n

I have been translating just some package descriptions to demonstrate that it is possible.

But Spanish is translated completely, see
http://www.murga-linux.com/puppy/viewtopic.php?p=571845 please.





Posted on 11 Apr 2012, 7:36 by disciple
searches in petget
I don't know if it reflects the current state of woof, but I've tried a Slacko downloaded some time in the last few months, and it seems there is no way to either:
1. Search for packages in more than one repository at a time, or
2. Search for packages in all categories at once.
Am I missing something?

IMNSHO these are very important features, particularly the second. If you know what you want to install but don't know where to find it, it is torture having to click on each repository and each category, wait for it to load, and search in it separately.


Posted on 11 Apr 2012, 8:14 by BarryK
Re PPM improvements
This is very good thread, excellent suggestions for improving PPM. I intend to get stuck into this soon, but in case I don't, someone please gently remind me about this thread!

From today I am going on a week (7 days) holiday. Won't be doing much Puppy stuff.

Um, I had better announce this as a new post.



Posted on 11 Apr 2012, 15:25 by mavrothal
rearch everything
1. Search for packages in more than one repository at a time, or
2. Search for packages in all categories at once.


These 2 patches will do that, but I'm not sure if it is going to bring confusion or results result in non-working packages when incompatible repos are activated.
Here they are any way.

installpreview.sh.patch
--- a/usr/local//petget/installpreview.sh	2012-03-13 08:47:38.000000000 +0200

+++ b/usr/local/petget/installpreview.sh 2012-04-11 10:02:51.000000000 +0300
@@ -21,12 +21,21 @@
X1PID=$!

#ex: TREE1=abiword-1.2.4 (first field in database entry).
-DB_FILE=Packages-`cat /tmp/petget_filterversion` #ex: Packages-slackware-12.2-official
-
-rm -f /tmp/petget_missing_dbentries-* 2>/dev/null
-
-tPATTERN='^'"$TREE1"'|'
-DB_ENTRY="`grep "$tPATTERN" /root/.packages/$DB_FILE | head -n 1`"
+REPOS=`cat /tmp/petget_filterversion`
+for DBLINE in $REPOS
+ do
+ DB_FILE=Packages-"$DBLINE" #ex: Packages-slackware-12.2-official
+ echo $DB_FILE
+ rm -f /tmp/petget_missing_dbentries-* 2>/dev/null
+
+ tPATTERN='^'"$TREE1"'|'
+ DB_ENTRY_ORIG="`grep "$tPATTERN" /root/.packages/$DB_FILE | head -n 1`"
+ if [ "$DB_ENTRY_ORIG" != "" ] ; then
+ DB_ENTRY="$DB_ENTRY_ORIG"
+ echo "$DBLINE" > /tmp/petget_filterversion
+ break
+ fi
+ done
#line format: pkgname|nameonly|version|pkgrelease|category|size|path|fullfilename|dependencies|description|
#optionally on the end: compileddistro|compiledrelease|repo| (fields 11,12,13)




Posted on 11 Apr 2012, 15:30 by patch2
mavrothal
The findnames.sh patch does not fit here but is basically this one
with
rm -f /tmp/petget_filterversion /tmp/filterpkgs.results

added on top


Posted on 11 Apr 2012, 19:15 by mavrothal
working versions
disciple
If you want to try a Lupu528.005 working version of the above look here

(and no,... my name is not patch2 ;-)


Posted on 14 Apr 2012, 2:53 by L18L
Re re PPM improvements
script /usr/local/petget/translatedescr.sh
new from scratch translates package descriptions in PPM

#translatedescr.sh
#2012 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html).

#translates package descriptions in INPUTFILE
#INPUTFILE is set in calling script

#called from filterpkgs.sh, INPUTFILE=/tmp/filterpkgs.results.post
#called from finduserinstalledpkgs.sh INPUTFILE=/tmp/installedpkgs.results

#ex:
#msgid "A GNU archiving program"
#msgstr "Ein GNU-Archivierungsprogramm"

TEXTDOMAIN=package_descr
export TEXTDOMAIN

if [ "`gettext \"no description available\"`" != "no description available" ];
then # only if this message was translated in TEXTDOMAIN
mv $INPUTFILE ${INPUTFILE}.tmp
while read LINE
do
pckgNAME="`echo -n "$LINE" | cut -f 1 -d '|'`"
pckgDESC="`echo -n "$LINE" | cut -f 2 -d '|'`" #ex:"A GNU archiving program"
[ "$pckgDESC" = "" ] && pckgDESC="`gettext \"no description available\"`"
pckgDESC_LANG="`gettext \"${pckgDESC}\"`" #ex:"Ein GNU-Archivierungsprogramm"
echo -e "${pckgNAME}|${pckgDESC_LANG}" >> $INPUTFILE
done < ${INPUTFILE}.tmp
rm -f ${INPUTFILE}.tmp
fi
#
#-----------------------------------------------------------------
# NOTE1, installpreview.sh needs just 5 lines (without #) added after
#DB_description="`echo -n "$DB_ENTRY" | cut -f 10 -d '|'`"
#if [ "LANG1" != "en" ]; then #translate package description
# export TEXTDOMAIN=package_descr
# DB_description="`gettext \"${DB_description}\"`"
# export TEXTDOMAIN=petget___installpreview.sh
#fi #package descriptions translated


continued in next post


Posted on 14 Apr 2012, 2:56 by L18L
PPM improvements 2


#We do not test existence of package_descr.mo file
#as it is just 1 access and gettext does test existence

# NOTE2, append next 4 lines (without #) to finduserinstalledpkgs.sh
#if [ "LANG1" != "en" ]; then #translate package descriptions
# INPUTFILE=/tmp/installedpkgs.results
# . /usr/local/petget/translatedescr.sh
#fi #package descriptions translated

# NOTE3, append next 4 lines (without #) to filterpkgs.sh
#if [ "LANG1" != "en" ]; then #translate package descriptions
# INPUTFILE=/tmp/filterpkgs.results.post
# . /usr/local/petget/translatedescr.sh
#fi #package descriptions translated
#----------------------------------------------------------- L18L --




Posted on 15 Apr 2012, 2:56 by mavrothal
ppm update
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=77564]Here[url] is an uptated pet and patch against Racy/Wary 5.3, with multi-repo, multi-term capabilities


Posted on 15 Apr 2012, 24:21 by L18L
translate package descriptions
coded and tested
see forum please
http://www.murga-linux.com/puppy/viewtopic.php?p=620266


Posted on 19 Apr 2012, 4:12 by mavrothal
0setup problem
looks like /usr/loacl/petget/0setup in Racy/Wary 5.3 has an extra "fi" at line 249/250


Posted on 19 Apr 2012, 7:58 by BarryK
Re 0setup problem
mavrothal,
I have just examined that entire block of code starting at:

#download docs on compatible-distro pkgs...

And the structure appears to be ok. No extra "fi".



Posted on 19 Apr 2012, 14:13 by mavrothal
Re 0setup problem
Correct.
Re-downloaded the iso and is fine.
Somehow was a duplication of the last skip step in mine :-?
(usb sticks can be messy...)


Posted on 29 Apr 2012, 8:07 by disciple
PPM reminder
> This is very good thread, excellent suggestions for improving PPM. I intend to get stuck into this soon, but in case I don't, someone please gently remind me about this thread!

Since on the 19th you were looking at the work the other guys did on this, should we assume that you don't need a reminder?



Posted on 1 May 2012, 20:50 by BarryK
Still need a PPM reminder
> This is very good thread, excellent suggestions for improving PPM. I intend to get stuck into this soon, but in case I don't, someone please gently remind me about this thread!

Since on the 19th you were looking at the work the other guys did on this, should we assume that you don't need a reminder?


Ah, they were just some spur-of-the-moment responses. The PPM will involve a bit more work, and I am still going full-bore on the ARM port, will get around to PPM and other stuff later, maybe another week away.