Page 1 of 1

Gettexting JWM Configuration Manager

Posted: Mon 12 Nov 2012, 01:41
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.

Re: Gettexting JWM Configuration Manager

Posted: Mon 12 Nov 2012, 13:10
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)

Re: Gettexting JWM Configuration Manager

Posted: Mon 12 Nov 2012, 18:01
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:

Posted: Mon 12 Nov 2012, 22:24
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.

Gettexting JWM Configuration Manager

Posted: Tue 13 Nov 2012, 10:15
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...

Re: Gettexting JWM Configuration Manager

Posted: Tue 13 Nov 2012, 13:12
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?)