| Author |
Message |
vicmz

Joined: 15 Jan 2012 Posts: 645
|
Posted: 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.
| Description |
|
| Filesize |
17.79 KB |
| Viewed |
355 Time(s) |

|
| Description |
jwmconfig with gettext support testers needed
|

Download |
| Filename |
jwmconfig-20121111.pet |
| Filesize |
13.93 KB |
| Downloaded |
164 Time(s) |
_________________ OpenboxPlus 1.5.3|Puppy Linux en español|Wiki en español
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1798 Location: Burghaslach, Germany
|
Posted: 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
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
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1798 Location: Burghaslach, Germany
|
Posted: 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:
| Description |
remove .gz panel-buttons
|

Download |
| Filename |
panel-buttons.gz |
| Filesize |
12.54 KB |
| Downloaded |
170 Time(s) |
|
|
Back to top
|
|
 |
vicmz

Joined: 15 Jan 2012 Posts: 645
|
Posted: 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. 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
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1798 Location: Burghaslach, Germany
|
Posted: 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
-----
I will continue to improve...
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1798 Location: Burghaslach, Germany
|
Posted: 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?)
| Description |
old |
| Filesize |
10.81 KB |
| Viewed |
270 Time(s) |

|
| Description |
new design |
| Filesize |
8.9 KB |
| Viewed |
280 Time(s) |

|
| Description |
panel-buttons
|

Download |
| Filename |
panel-buttons.gz |
| Filesize |
12.56 KB |
| Downloaded |
169 Time(s) |
|
|
Back to top
|
|
 |
|