Gettexting JWM Configuration Manager

For efforts in internationalising Puppy and solving problems in this area
Post Reply
Message
Author
User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

Gettexting JWM Configuration Manager

#1 Post by vicmz »

For my first attempt at gettexting an app I chose JWM Configuration Manager because it is in the list of ever-English-only applications. I set all scripts with TEXTDOMAIN=jwmconfig so that Momanager can build a single .pot file for all of them. I succeeded, I was able to translate, but now I can't add panel buttons. I checked the panel-button script but I haven't got a clue of what I could've modified to get this bug. The attached .pet is not ready for use yet, it needs to be tested, to see what else there is to fix.
Attachments
capture32399.png
(17.79 KiB) Downloaded 706 times
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

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

Re: Gettexting JWM Configuration Manager

#2 Post by L18L »

vicmz wrote:...I checked the panel-button script but I haven't got a clue of what I could've modified to get this bug...
So did I :)

made Edit: Edit your existing Panel Buttons work:

- insert sourcing gettext.sh (for use of eval_gettext)

Code: Select all

ver="20121111"
. gettext.sh
change line 127 to:

<frame "`eval_gettext "Button \\\$num Information - edit as you wish"`">

This made Edit work.


Now look for other $ inside gettext and change them

twice the same:
Xdialog --title "$(gettext 'MESSAGE BOX')" \
--msgbox "$(gettext 'Position "$y"
has already been selected.
You must now start over.')" 10 41
-->
Xdialog --title "$(gettext 'MESSAGE BOX')" \
--msgbox "`eval_gettext "Position \\\$y
has already been selected.
You must now start over."`" 10 41
(this was not tested)

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

Re: Gettexting JWM Configuration Manager

#3 Post by L18L »

vicmz wrote:...I can't add panel buttons...
I have tested and made some changes

commented buttons are problematic
I have deleted them using Remove a panel button

Edit works
Add works
Move: changed, only if more than 1 exists

Code: Select all

if [ $z -gt 1 ]; then # added by L18L
 movMSG="$(gettext 'Moving complete.
	     You must restart jwm for
	     changes to take effect.')"
else 	     
 movMSG="$(gettext 'Nothing to move because just 1 button')"
fi
Xdialog --title "$(gettext 'MESSAGE BOX')" \
        --msgbox "$movMSG" 10 41
Attached script is also using eval_ngettext
--

No idea howto use Move:
Attachments
panel-buttons.gz
remove .gz
panel-buttons
(12.54 KiB) Downloaded 651 times

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

#4 Post by vicmz »

I've tested the script above. Unfortunately the bug remains, the add-panel-button interface doesn't launch. It seems this is a tough one. :? Thanks for the manual, BTW.

As I said, the gettexted .pet in the first post needs further test and improvement, so any help is welcome.

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

Gettexting JWM Configuration Manager

#5 Post by L18L »

vicmz wrote:...the add-panel-button interface doesn't launch...
Since I have translated I have reproduced this too.

Change from
if [ "$choice" = "Add" ]; then
to
if [ "$choice" = "$(gettext 'Add')" ]; then

... and all the other choices 8)

-----
I will continue to improve...

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

Re: Gettexting JWM Configuration Manager

#6 Post by L18L »

L18L wrote:...I will continue to improve...
RESTARTmsg=$(gettext 'You must restart jwm for
changes to take effect.')

Made this 1 variable which is used 5 times

Added panel button abiword (see screenshot)

Changed size of box
Changed captions (RADIOLIST BOX is not a title, is it?)
Attachments
radiolist.png
old
(10.81 KiB) Downloaded 754 times
radiolist-JWM.png
new design
(8.9 KiB) Downloaded 765 times
panel-buttons.gz
panel-buttons
(12.56 KiB) Downloaded 661 times

Post Reply