Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 19 Sep 2014, 23:57
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Gettexting JWM Configuration Manager
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
vicmz


Joined: 15 Jan 2012
Posts: 1108

PostPosted: Sun 11 Nov 2012, 21:41    Post subject:  Gettexting JWM Configuration Manager
Subject description: unexpected bug
 

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.
capture32399.png
 Description   
 Filesize   17.79 KB
 Viewed   545 Time(s)

capture32399.png

jwmconfig-20121111.pet
Description  jwmconfig with gettext support
testers needed
pet

 Download 
Filename  jwmconfig-20121111.pet 
Filesize  13.93 KB 
Downloaded  358 Time(s) 

_________________
OB Precise 14.07.26 Woof-CE|Puppy Linux en español
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Mon 12 Nov 2012, 09:10    Post subject: Re: Gettexting JWM Configuration Manager
Subject description: panel-buttons
 

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 Smile

made Edit: Edit your existing Panel Buttons work:

- insert sourcing gettext.sh (for use of eval_gettext)
Code:
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)
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Mon 12 Nov 2012, 14:01    Post subject: Re: Gettexting JWM Configuration Manager
Subject description: panel-buttons
 

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:
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:
panel-buttons.gz
Description  remove .gz
panel-buttons
gz

 Download 
Filename  panel-buttons.gz 
Filesize  12.54 KB 
Downloaded  369 Time(s) 
Back to top
View user's profile Send private message 
vicmz


Joined: 15 Jan 2012
Posts: 1108

PostPosted: Mon 12 Nov 2012, 18:24    Post subject:  

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. Confused 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.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 13 Nov 2012, 06:15    Post subject: Gettexting JWM Configuration Manager
Subject description: panel-buttons
 

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 Cool

-----
I will continue to improve...
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 13 Nov 2012, 09:12    Post subject: Re: Gettexting JWM Configuration Manager
Subject description: panel-buttons
 

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?)
radiolist.png
 Description   old
 Filesize   10.81 KB
 Viewed   462 Time(s)

radiolist.png

radiolist-JWM.png
 Description   new design
 Filesize   8.9 KB
 Viewed   482 Time(s)

radiolist-JWM.png

panel-buttons.gz
Description  panel-buttons
gz

 Download 
Filename  panel-buttons.gz 
Filesize  12.56 KB 
Downloaded  369 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0658s ][ Queries: 13 (0.0116s) ][ GZIP on ]