site  contact  subhomenews

Internationalized shutdown

September 26, 2011 — BarryK
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...

Comments

pngoverlay
Username: DaveS
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.... _________________

bootup scripts i18n
Username: L18L
"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/archive/blog2/201104/dialog-11-20110302-busybox-1184.html 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

excellent!
Username: maveorg
"This is great L18L! ...and also nice from you, Barry, to include this in Wary/Racy. Super, L18L, herzlichen Dank! (german) mave

Unmounting, close-box
Username: BarryK
"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?

Note, sda1
Username: BarryK
"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.

Unicode
Username: BarryK
"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.

Russian shutdownconfig
Username: rodin.s
"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

oops
Username: BarryK
"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.

More than 3 errors
Username: BarryK
"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.

another missing triple backslash
Username: L18L
"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.

triple backslash
Username: rodin.s
"...also line 61 about fido has missing \. I have made Russian translation for shutdownconfig and put it in the forum topic.

Re missing backslashes
Username: BarryK
"L18L, rodin.s, Thanks, I have put in both of those fixes.

a bit less lopsided
Username: L18L
"Successful started internationalization of bootup messages http://www.murga-linux.com/puppy/viewtopic.php?t=72321

initrd messages
Username: L18L
"Renamed above thread to internationalization of [b]initrd messages[/b] at bootup . The progress messages is another thing, there you have gettext available or maybe the (new) method used in initrd.

Bootup messages
Username: BarryK
"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?

Re: Bootup messages
Username: L18L
"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...


Tags: woof