BaCon - Bash-based Basic-to-C converter/compiler

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

welcome1stboot

#301 Post by L18L »

tweak the text widget dimensions to accomodate the non-English text, let me know about that too

Code: Select all

REM welcome window, first boot of Puppy.
REM (c) Copyright Barry Kauler 2011, bkhome.org
REM License GPL v3 (/usr/share/doc/legal)
REM 110412 first release.
REM 110413 tweak text widget dimensions and menu2.png to accomodate the non-English
Several changes had to be made

Image

Note, menu2.png is localized, location in po file.

Code: Select all

'image_tray=IMAGE("/usr/share/doc/menu2.png",150,90)
image_tray=IMAGE(INTL$("/usr/share/doc/menu2.png"),150,90)
ATTACH(mainwin,image_tray,10,325)
in de.po:

Code: Select all

#: welcome1stboot.bac.c:442
msgid "/usr/share/doc/menu2.png"
msgstr "/usr/share/doc/help/de/menu2.png"
This is the location used in quickset wary multilingual

complete welcome1boot-20110413 incl. German translation attached

Edit
Now I see at the image another change of dimensions is needed:

Code: Select all

'label_setup=MARK(INTL$("Setup your pup"),180,24)
label_setup=MARK(INTL$("Setup your pup"),280,24)
EDIT
Thanks for downloading...
please use next version 20110414 (3 posts down) :)
Last edited by L18L on Wed 13 Apr 2011, 20:11, edited 1 time in total.

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

getting smaller binaries

#302 Post by vovchik »

Dear Barry & Co.,

I do not always enjoy UPX'd binaries (I generally un-UPX them as a matter of habit), but I can see the logic in this in order to keep everything manageably small for Puppy. What I think would be great is an optimizing routine at compile/link time. I remember writing gtk apps, simple ones in C, and they were 4-6k! :) That is nice. If we could get that kind of binary terseness in Bacon, it would be fabulous, because the BaCon binaries would be the size of gtkdialog scripts but run very fast! The non-GTK BaCon progs are already pretty small, but some kind of optimization would also help there. I do not know whether it possible, but if it is, Peter will put his mind to it and pleasantly surprise us all!

With kind regards,
vovchik

PS. I recalled why UPX's binaries bothered me. You cannot see the dependencies with ldd!

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

dimensions for russian

#303 Post by rodin.s »

L18L's version wasn't good enough for russian. So my dimensions are (Barry's version):
line - dimensions
41 - 664,514
83 - 84,16
86 - 568,165
88 - 250,24
101 - 430,16
107 - 280,24
124 - 280.24
140 - 84,16
143 - 570,489
Attachments
welcome1stboot_ru.png
screenshot
(73.93 KiB) Downloaded 877 times
ru.po.gz
russian po-file
(2.88 KiB) Downloaded 728 times
welcome1stboot.bac.gz
dimensions changed for russian
(2.61 KiB) Downloaded 723 times

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

welcome1stboot

#304 Post by L18L »

label_ic_body : 3 lines in en, ru but 4 lines in de
label_help_body: 3 lines in en, de but 4 lines in ru

New: each has 4 lines (see REM in .bac)

Image
Image

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

welcome1stboot

#305 Post by rodin.s »

L18L, your script is almost OK, but I had to change some parameters:
line 44 - 664,534 - making whole window a little wider
line 92 - 568,165 - word 'Connect' a bit to the right
line 112 - 430,16 - line was cut off in the end
line 121 - 220,24 - 'Сохранение

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#306 Post by BarryK »

L18L and rodin.s,
Thanks very much.

Note however, your dimensions are a bit messed up, as you are not using the very latest BaCon and HUG. That is, my PETs dated 20110414.

This means that the lines with "xalign" and "yalign" PROPERTY are being ignored. -- or so it seems.

Anyway, I am taking your latest source code and fixing it.
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#307 Post by BarryK »

Oh, you also need the latest hug_imports.bac, which is also in my latest PET.

rodin.s, would you kindly post the 'menu2.png' for Russian? The English one is /usr/share/doc/menu2.png.

I have got it working nicely, correctly laid out for en, de and ru. If anyone else wants to create a country translation, probably this thread is not the best place to do it. I'll announce it on my blog and people can respond there.

I don't want to tweak the dimensions anymore. Any future translations, they can edit the text to fit.

Thanks guys for the help.
[url]https://bkhome.org/news/[/url]

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

menu2.png for russian

#308 Post by rodin.s »

Here's menu2.png for russian.
Attachments
Sav_session.png
"Saving session" in Russian should be like this.
(2.44 KiB) Downloaded 1975 times
menu2.png
(4.68 KiB) Downloaded 1965 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#309 Post by BarryK »

rodin.s,
Thanks for the menu2.png, I have put it into Woof.

The latest welcome1stboot.bac (that I used for the fr translation) has not been posted here. It has a couple of slightly longer label widgets.

This is what your ru translation looks like now:
Attachments
welcome1stboot-ru.png
(24.09 KiB) Downloaded 853 times
[url]https://bkhome.org/news/[/url]

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

welcome1stboot

#310 Post by rodin.s »

Looks good.

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

multiple tabs with bacon?

#311 Post by lstandish »

Wow, this bacon stuff is cool!

I need to rewrite my snap2 backup utility (GUI frontend to rsync), since it is gtkdialog-based and gtkdialog is no longer supported in Debian Linux. I am looking at bacon/hug for that.

To help port snap2 from gtkdialog to bacon, I would really like to see the source code for a bacon app that uses multiple tabs. I think this is possible using the "notebook" widget.

Does anyone know of a bacon-coded app (with source code available) that uses multiple tabs?

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

sfsget

#312 Post by L18L »

Too tired to write, so here an excerpt of README

Code: Select all

Suggestions how to improve the code are very welcome
   for example I could not make any use of CALLBACKX
   or how to let the message "please wait, probing..." display immediately

CHANGES:

- font can be changed in translation.
  So I am hoping we avoid difficulties with longer texts.

- destination
  Partitions are displayed in 2 columns if more than 5 partitions exist
  Partitions smaller than 17 MB, I use them just for grub, are disabled.

- shinobar's sfs_load (on-the-fly) launched if installed
Sorry, no picture (would not be much different from original)

Edited 2011-05-05
Thanks for downloading
New version see next post

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

sfsget

#313 Post by L18L »

next version 1.02

no more yaf-splash
the simple solution was using SYNC

destination dialog
seems to have some blank lines of text. But in other translations which need longer text there are no blank lines. I have used the new PROPERTY.

Image

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

BaCon - Bash-based basic to C converter/compiler

#314 Post by L18L »

Vovchiks's gxlat now available converted to BaCon and internationalized using GNU/gettext , see
http://www.murga-linux.com/puppy/viewto ... 9&start=31

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

welcome1stboot_ru

#315 Post by rodin.s »

I have found some mistakes in welcome1stboot_ru translation. So here's corrected version.
Attachments
welcome1stboot.tar.gz
(3.64 KiB) Downloaded 640 times

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

Russian locale for proxy-setup

#316 Post by rodin.s »

I have found out today that proxy-setup can be translated and have made .po file for Russian.
Attachments
proxy-setup_ru.po.gz
Russian for proxy-setup
(1.24 KiB) Downloaded 526 times

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

Re: Russian locale for proxy-setup

#317 Post by L18L »

Hi rodin.s
you wrote:I have found out today that proxy-setup can be translated and have made .po file for Russian.
Barry is waiting for you to email the po file to him, see http://murga-linux.com/puppy/viewtopic. ... &start=275.

Did you find gxlat too ?

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

proxy-setup

#318 Post by rodin.s »

I've left the message on Barry's blog. I'll look at gxlat.

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#319 Post by GatorDog »

.
Puppy 525
BaCon and HUG in 525 devx
_______________________
From Barry's proxy_setup program I'm trying the xalign property.
REM param 0.0 means left-align label, 0.5 centre-align, 1.0 right-align...
PROPERTY(label_1, "xalign", 1.0)
But getting this error:
ERROR: could not parse line 9 in file 'xalign_test.bac'!
Sample program;

Code: Select all

REM use shared /usr/lib/hug.so instead of including hug.bac...
INCLUDE "/usr/share/BaCon/hug_imports.bac"
INIT

mainwin = WINDOW("xalign testing", 400, 300)

label_1 = MARK("Label 1:", 200, 25)
REM param 0.0 means left-align label, 0.5 centre-align, 1.0 right-align...
PROPERTY(label_1, "xalign", 1.0)
ATTACH(mainwin, label_1, 5, 10)

ok_btn = BUTTON("OK", 65, 25)
ATTACH(mainwin, ok_btn, 240, 260)

CALLBACK(ok_btn, QUIT)

DISPLAY
Are the BaCon/HUG in 525 devx outdated? Or am I just missing something?

rod

.

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

Bacon

#320 Post by L18L »

GatorDog wrote:....
Are the BaCon/HUG in 525 devx outdated? Or am I just missing something?
...
Yes and yes.
1 - I am in wary now and have compiled your example successfully.
2 - The programm does not do anything.
IIRC I had downloaded bacon, runtime and dev from
http://bkhome.org/blog/?viewDetailed=02207

Code: Select all

# bacon -v
BaCon version 1.0 build 22 beta - (c) Peter van Eerten - GPL v3.
# 
HTH
edit
switching to 525 now

Another edit
Now in 525 without devx, pets installed: your result reproduced....wait a moment

Oh no, sorry I cannot help.

@all
Has anyone compiled a bacon source in Puppy 525
:?: :?: :?:

Post Reply