Internationalized shutdown

As I already posted, L18L has converted my script to support international languages. Actually, two scripts, /etc/rc.d/rc.shutdown and /usr/sbin/shutdownconfig.

I have tweaked the latter a little bit, found some typos, and put it into Woof. L18L, I greatly appreciate your help here -- I only did i18n conversion to a BaCon app before, so am unfamiliar with using gettext in shell scripts. I learnt a lot studying what you did.

The situation now in Woof is a bit lopsided. We have internationalization of the 'welcome1stboot' window (which pops up the first time that the desktop is started), and now at shutdown. However, the progress messages at bootup and the first-boot pre-X dialog windows are not internationalized.

Anyway, summarizing the current situation:

welcome1stboot
This is a compiled executable written in BaCon. Currently we have conversions for fr, de and ru. To find out how to add your language, see files /usr/sbin/welcome1stboot.pot and welcome1stboot.pupdev (these are in the devx).

shutdown
Currently we only have 'de' conversion, created by L18L. L18L has put instructions for creating other conversions in /usr/share/doc/nls/shutdownconfig.

I will be building Wary and Racy soon, from latest Woof, and I will be inviting everyone to contribute more language conversions.

I guess that I should be looking at converting those bootup scripts...


Posted on 26 Sep 2011, 18:42


Comments:

Posted on 26 Sep 2011, 18:51 by DaveS
pngoverlay
I I still get no joy with unmounting an SD card. My laptop has a built in SD card slot as do most now, and inserting a card is fine, puppy displays a desktop icon, and clicking the icon mounts the card and opens Rox, but clicking the little red X does not unmount it as it should. Instead, it just opens it in Rox again.
Right click unmount from menu works fine.
This is exactly the same behaviour in Slacko so I guess its a woof thing....
_________________



Posted on 27 Sep 2011, 4:33 by L18L
bootup scripts i18n
pre X
Languages are somewhat restricted, no Chinese,Japanese,Korean AFAIK.

bootup scripts: gettext not available there
I have been playing with this some time ago
replacing strings by sed (simple shell commands can do it too, I have learned from technosaurus)
not published but it was working. Give me time to find it please...
One thing I remember now was: changing text string done to Done will make it easier...

dialog:
http://bkhome.org/blog/?viewDetailed=02204
Will be interesting to see this pre X

That's all for now, I have not been at home today and now it is bed time here.

My regards







Posted on 27 Sep 2011, 6:13 by maveorg
excellent!
This is great L18L! ...and also nice from you, Barry, to include this in Wary/Racy.

Super, L18L, herzlichen Dank! (german)

mave




Posted on 27 Sep 2011, 7:11 by BarryK
Unmounting, close-box
DaveS,
I think that your report is the only one I have had of that problem.

Puppy uses a utlity 'getcurpos' that detects the mouse pointer position when you click on the close-box. If for example your SD card is sda1, then the script to look at is /root/.pup_event/sda1/AppRun -- in that you can see the call to getcurpos.

The info returned by getcurpos is compared with where Puppy thinks the drive icon is located on the screen, and that is read from file /root/Choices/ROX-Filer/PuppyPin.

So, why is getcurpos returning incorrect information in your case? Or, alternatively, are the coordinates in file PuppyPin incorrect?

Have you done anything unusual with your drive icons, unusual placement? Have you tried clicking nearby the close-box? Is your screen very unusual size, like very small resolution?



Posted on 27 Sep 2011, 7:15 by BarryK
Note, sda1
DaveS,
A note, if you want to view /root/.pup_event/sda1/AppRun in a text editor (or whatever), you have to right-click on the 'sda1' icon in ROX-Filer, then choose 'Look inside..." in the menu.



Posted on 27 Sep 2011, 7:17 by BarryK
Unicode
L18L,
Note that I never continued with that unicode experiment for dialog and Busybox. The current versions used in Wary/Racy are not unicode-enabled.



Posted on 27 Sep 2011, 14:24 by rodin.s
Russian shutdownconfig
I have made Russian translation for shutdownconfig and also have changed gettext in it a little.
http://murga-linux.com/puppy/viewtopic.php?p=567802#567802


Posted on 27 Sep 2011, 17:16 by BarryK
oops
rodin.s,
I don't want to mess you around, with extra work, but L18L's 'shutdownconfig' has a few typos, plus I improved a few things.

I didn't know that you were going to modify the script itself.

Here are my latest files out of Woof:
http://distro.ibiblio.org/quirky/test/zz_shutdownconfig-20110927BK.pet

Yes, I do like it that you changed the dialogs back to one line -- I think that it makes the script more readable.



Posted on 27 Sep 2011, 17:23 by BarryK
More than 3 errors
rodin.s,
I see that you mentioned finding 3 errors in L18L's script. I think that I found more than that. Plus, I made a few other modifications, nothing that affects language translation though I don't think.

Oh, one thing I forgot, just remembered, in my English text I had "noone" but that is not valid English, so I changed it to "no one". That will mess up the translation that L18L did for that string.



Posted on 28 Sep 2011, 4:08 by L18L
another missing triple backslash
Barry,
changing something in the original English requires new "translation" in each language. But that is really no problem, just a tiny bit of work.
msgmerge can merge new and old po and pot files and is marking found differences as "fuzzy" so one can make required changes very fast and delete the "fuzzy" line.

Now my bug:
shutdownconfig line 398
triple backslash before ${T_save} is missing
and this caused xgettext to not create the msgid.






Posted on 28 Sep 2011, 5:10 by rodin.s
triple backslash
...also line 61 about fido has missing \\\.
I have made Russian translation for shutdownconfig and put it in the forum topic.


Posted on 28 Sep 2011, 8:04 by BarryK
Re missing backslashes
L18L, rodin.s,
Thanks, I have put in both of those fixes.



Posted on 7 Oct 2011, 4:59 by L18L
a bit less lopsided
Successful started internationalization of bootup messages
http://www.murga-linux.com/puppy/viewtopic.php?t=72321



Posted on 9 Oct 2011, 4:34 by L18L
initrd messages
Renamed above thread to
internationalization of initrd messages at bootup .

The progress messages is another thing, there you have gettext available or maybe the (new) method used in initrd.




Posted on 9 Oct 2011, 7:19 by BarryK
Bootup messages
L18L,
I will take a look at what you have done soon. It is good to have internationalisation in initrd.

Regarding the later boot scripts, keyboard-layout etc., I am thinking of going over to the personalise-settings window that Slacko and Lucid use, that is, after X has started.

...which I think is already internationalised?



Posted on 9 Oct 2011, 19:38 by L18L
Re: Bootup messages
Barry,
yes, personalize-settings is internationalized.

But I am thinking of using boot param plang (or better: planguage because it is not depending on a locale) from beginning. Translations could be stored in main.sfs and/or view language packs as drivers, driver for human language, just a thought...