| Author |
Message |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Mon 13 Feb 2012, 14:04 Post subject:
internationalization of initrd messages at bootup Subject description: using t12s now |
|
# pwd
/initrd/mnt/dev_save/racy5225
# ls -l initrd.gz*
-rw-r--r-- 1 root root 3477530 2012-02-13 13:51 initrd.gz
-rw-r--r-- 1 root root 3475506 2012-02-09 12:00 initrd.gz.orig
#
What was added?
usr/share/locales/de/init (complete)
usr/share/locales/ru/init (just some automatically translated phrases)
# pwd
/initrd/mnt/dev_save/racy5225/puppy-init/usr/share/locales/ru
# cat init
#Pусский
_M_17="смогли"
_M_2="'${1}' проверки файловой системы, пожалуйста, подождите ..."
_M_22="Загрузка драйвера, необходимые для доступа к дискам"
_M_25="Загрузка '${PKEYS}' раскладку клавиатуры..."
_M_36="Загрузка драйвера, необходимые для доступа к дискам"
_M_37="Поиск Puppy файлы..."
_M_9="сделал"
#
Important: 1st line has to have name of language as a comment (ex: #Pусский), this is used in a menu.
What else was added?
LatGrkCyr-8x16.psfu.gz a font for LatinGreekCyrillic
Changes in script init:
- New boot parameter plang for language (ex: de or ru)
- If plang is not set then there is a menu for choosing from included languages.
- OUTPUT_CHARSET=UTF-8 is passed through to puppy.
This enables correct output also if utf8 is NOT activated.
Tested successfully with pizzasgood´s retrovol (C code)
and puppy will immediately start in the chosen language
_____________
edited
Other languages
Extract attachment and start
Translation file init will be in /usr/share/locales/<language>
__________________________
edited
update see 2 posts down please
| Description |
|

Download |
| Filename |
addition_to_initrd.tar.gz |
| Filesize |
33.02 KB |
| Downloaded |
148 Time(s) |
Last edited by L18L on Tue 14 Feb 2012, 09:08; edited 1 time in total
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Tue 14 Feb 2012, 07:54 Post subject:
internationalization of initrd messages at bootup Subject description: other Languages |
|
As there are some issues using the script t12s here is an altenative method for all who like to boot up in their own language (sorry: no Chinese, Japanese, Korean).
Arab and Hebrew use text editor yudit.
French: Deja fait par esmourguit
Just translate the following lines to your language.
1st line: your language in your language.
Let $.... unchanged
Post the translation here as file named
init.<your-language-code>
for inclusion in next initrd as
usr/share/locales/<your-language-code>/init
Thanks
#English
_M_10="${DROPOUT} not found. Dropping out to initial-ramdisk console..."
_M_1="0 none"
_M_11="Dropped to initramfs shell. Type 'exec switch' to continue booting Puppy."
_M_12="Dumping last lines of kernel log..."
_M_13="Dumping last lines of /tmp/bootinit.log..."
_M_14="ENTER key only to copy: "
_M_15="ENTER only to upgrade: "
_M_16="ERROR: Windows NTFS hibernated partition, cannot mount"
_M_17="failed"
_M_18="Folder $ONEFOLDER marked bad."
_M_19="from version $xOLDPVERSION"
_M_20="Hit the ENTER key only if it is okay to upgrade this file, or to not use it and boot up in RAM only type any other printable character."
_M_2="'${1}' filesystem check, please wait..."
_M_21="Increasing $PUPSAVEFILE by $KILOBIG Kbytes, please wait..."
_M_22="Loading drivers needed to access disk drives"
_M_23="Loading folder $ONEFOLDER from CD/DVD..."
_M_24="Loading personal file $PUPSAVEFILE ($PUPSAVEDEV)..."
_M_25="Loading '${PKEYS}' keyboard layout..."
_M_26="Loading the '${basepupsfs}' main file..."
_M_27="Mounting encrypted $PUPSAVEFILE..."
_M_28="NOTICE: As you type your password nothing will be displayed on the screen for absolute security. Just type it in then press ENTER key..."
_M_29="Overlaying preconfig files..."
_M_30="Overwritten old files have been moved to /tmp/versioncleanup/"
_M_31="Password: "
_M_32="pausing"
_M_33="Pausing for 60 seconds..."
_M_34="Performing a 'switch_root' to the layered filesystem..."
_M_35="RAM full"
_M_36="'save file' filesystem check, please wait..."
_M_37="Searching for Puppy files..."
_M_38="Setting up the layered filesystem..."
_M_39="SORRY, cannot check filesystem"
_M_3="After bootup please examine this directory (before shutdown) for anything that you might like to recover. Pausing 30 secs so you can read this msg..."
_M_40="SORRY, cannot resize $PUPSAVEFILE"
_M_41="...successfully mounted"
_M_42="The main Puppy file '${basepupsfs}' is being loaded off the optical disc."
_M_43="then on next boot it will load fast. Type any printable char not to copy it."
_M_44="This is a radical file cleanup for broken systems, could alter some settings."
_M_45="This is a simulated version upgrade, which performs a file cleanup."
_M_46="This save-file was last used with version $OLDDISTRO_VERSION of Puppy"
_M_47="Type a number to choose which personal file to use:"
_M_48="Version update, restoring 'official' files, please wait..."
_M_49="Very slow! Type ENTER key only to copy it to the same partition as the save-file"
_M_4="Backing off, not using save-file, booting in RAM only, PUPMODE=5..."
_M_50="(with a slow CPU this may take sometime, please be patient)"
_M_51="You are upgrading Puppy ${OLDstr} to ${NEWPVERSION}."
_M_5="'${basepupsfs}' now copying to hard drive (but only available next boot)..."
_M_6="Can't mount file, press ENTER key to try again, or any other char then ENTER for f.s. check then try again, or for developers type 'quit' to drop out to console: "
_M_7="...continuing with loading $PUPSAVEFILE..."
_M_8="copying to ram"
_M_9="done"
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Tue 14 Feb 2012, 09:07 Post subject:
internationalization of initrd messages at bootup Subject description: update |
|
Menu is populated now by
Arabic (just some automatically translated phrases)
and French (complete translation by toutou´s creator esmourguit)
Font LatArCyrHeb-16.psfu.gz is added which enables Arabic and Hebrew.
| Description |
|

Download |
| Filename |
addition2_to_initrd.tar.gz |
| Filesize |
39.18 KB |
| Downloaded |
147 Time(s) |
|
|
Back to top
|
|
 |
rodin.s
Joined: 22 Sep 2010 Posts: 326 Location: Ukraine
|
Posted: Tue 14 Feb 2012, 15:05 Post subject:
Russian translation |
|
I have made Russian translation. But it works only for three top lines. Some other file (/etc/rc.d/rc.sysinit) has to be translated for the rest.
But it's good that Russian font in console is loaded in initrd and all Russian messages in console displayed well. My unicode pet is not needed.
Edit: gettext doesn't work in /etc/rc.d/rc.sysinit.
Edit2: No. I was wrong. Gettext works in /etc/rc.d/rc.sysinit. And now all console boot messages are in Russian.
| Description |
Russian translation
|

Download |
| Filename |
init.gz |
| Filesize |
3.33 KB |
| Downloaded |
151 Time(s) |
| Description |
i18n with gettext of /etc/rc.d/rc.sysinit, pot file and ru.po and mo.
|

Download |
| Filename |
rc_sysinit.tar.gz |
| Filesize |
12.75 KB |
| Downloaded |
164 Time(s) |
Last edited by rodin.s on Wed 15 Feb 2012, 07:09; edited 1 time in total
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Tue 14 Feb 2012, 16:35 Post subject:
Re: Russian translation |
|
| rodin.s wrote: | I have made Russian translation. But it works only for three top lines. Some other file (/etc/rc.d/rc.sysinit) has to be translated for the rest.
But it's good that Russian font in console is loaded in initrd and all Russian messages in console displayed well. My unicode pet is not needed.
Edit: gettext doesn't work in /etc/rc.d/rc.sysinit. |
Thank you very much rodin.s,
Your way of distributing the translation file is very good. I like it,
English as comment and an empty line
| Code: | #Русский
#_M_10="${DROPOUT} not found. Dropping out to initial-ramdisk console..."
_M_10="${DROPOUT} не найден. Будет запущена консоль инит-рамдиска..."
#_M_1="0 none"
_M_1="0 нет"
|
Yes it are usually just the first (3 ?) lines from initrd.
I have found a folder puppy_rcd_i18n made by me
dated from July 2010
containing all scripts of rc.d gettexted
was never published
but if I remember correctly it was running in puppy4.3.1
Stuff for the next days....
-----
edited
Now I have seen your change: gettext is working
|
|
Back to top
|
|
 |
rodin.s
Joined: 22 Sep 2010 Posts: 326 Location: Ukraine
|
Posted: Wed 15 Feb 2012, 07:16 Post subject:
Russian translation |
|
I have found one small mistake in my translation (variable _M_8 was _M_7). init.gz is re-uploaded.
There is one strange but positive thing. When I boot pfix=ram and choose ru in initrd I got quicksetup in Russian while locale is set to en.
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Wed 15 Feb 2012, 09:22 Post subject:
Re: Russian translation Subject description: positive thing |
|
| rodin.s wrote: | | I have found one small mistake in my translation (variable _M_8 was _M_7). init.gz is re-uploaded. |
Thanks, I have updated my copy. Will be in next upload.
| rodin.s wrote: | | There is one strange but positive thing. When I boot pfix=ram and choose ru in initrd I got quicksetup in Russian while locale is set to en. |
The strange thing was intended
It is done by setting LANGUAGE
At the moment this is not set properly as I did not know another way: It was written into /pup_rw/etc/rc.d/PUPSTATE by init script and can be found in puppy in the file /etc/rd.d/PUPSTATE.
Bad consequence is: You cannot run a program in another language
| Code: | | LANGUAGE=de quicksetup | will stay in Russian for you
because quicksetup (and almost every other program is reading PUPSTATE and thus always stay Russian)
This is not good. I think people like me like to switch to another LANGUAGE sometimes.
fix:
| Code: | | # [ `grep -E '^LANGUAGE=' /etc/rc.d/PUPSTATE` ] && ( mv /etc/rc.d/PUPSTATE P; sed 's/^LANGUAGE=/\#LANGUAGE=/' P > /etc/rc.d/PUPSTATE; rm P ) |
This one-liner makes the LANGUAGE=.. command in PUPSTATE to be a comment so you can use a LANGUAGE other than the one you have been booting.
This one-liner should be inserted maybe in quicksetup?
Or is there another better way for booting language being passthrough´ed
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Wed 15 Feb 2012, 16:35 Post subject:
gettext at bootup Subject description: work or not work :?: |
|
| rodin.s wrote: | ...
Edit: gettext doesn't work in /etc/rc.d/rc.sysinit.
Edit2: No. I was wrong. Gettext works in /etc/rc.d/rc.sysinit. ... |
It did not work with me.
And now I remember why I did not not publish the before mentioned script from 2010: it did not work.
And now it is clear why not:
quote from http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
| Quote: | | Note: The variable LANGUAGE is ignored if the locale is set to ‘C’. In other words, you have to first enable localization, by setting LANG (or LC_ALL) to a value other than ‘C’, before you can use a language priority list through the LANGUAGE variable. |
At the time of running /etc/rc.d/rc.sysinit there is no locale set. That´s it!
When the desktop has been started there is a locale: LANG=en_US
and gettext prefers the LANGUAGE which was set as boot parameter or chosen in the menu.
I have made a version of rc.sysinit using t12s
tested succesfully in Russian and German.
The translation file was created from ru.po
Have fun
| Description |
/etc/rc.d/rc.sysinit ru and de
|

Download |
| Filename |
rc.sysinit-t12s.tar.gz |
| Filesize |
12.6 KB |
| Downloaded |
145 Time(s) |
|
|
Back to top
|
|
 |
rodin.s
Joined: 22 Sep 2010 Posts: 326 Location: Ukraine
|
Posted: Wed 15 Feb 2012, 17:50 Post subject:
rc.sysinit works |
|
Yes, rc.sysinit with t12s is working. But one phrase "next boot will be faster" from rc.update also should to be translated.
Gettexted rc.sysinit started to work for me after I added line: | Code: | | LANG=$(cat /etc/profile | grep '^LANG=' | cut -d '=' -f2 ) |
| Code: | # cat /etc/profile | grep '^LANG=' | cut -d '=' -f2
ru_UA.UTF-8 |
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6866 Location: Perth, Western Australia
|
Posted: Thu 16 Feb 2012, 06:02 Post subject:
|
|
L18L,
I like your little i18n test program!
I have put the two fonts that you have provided into the initrd in Woof.
After bootup:
One problem: running in the console, I start 'mp' and the border lines do not display properly.
...I wonder if there is a fix for this?
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Thu 16 Feb 2012, 09:35 Post subject:
mp in console |
|
Barry,
console is urxvt or CONTROL-ALT-F2 ?
I have played with both of them,
did not see immediately the border line problem
file named äöü
see picture in X
äöü is blinking
same file named aou does not blink
in console (sorry no photograph available)
file name in title bar is displayed inproperly (equiv. to blinking?)
I can input äöü but it displaed not immediately correctly.
| Description |
mp and UTF-8 |
| Filesize |
9.66 KB |
| Viewed |
359 Time(s) |

|
|
|
Back to top
|
|
 |
rodin.s
Joined: 22 Sep 2010 Posts: 326 Location: Ukraine
|
Posted: Thu 16 Feb 2012, 15:03 Post subject:
border lines |
|
Maybe Barry means border lines in menu when you press Ctrl-A. Maybe you could try two console fonts from my unicode pet ter-u16n.psf.gz and cyr-sun16.psfu.gz. Do not install the pet. Just unpack it and get fonts. In both of them border lines are back and both of them work for Russian and English. Not sure about other languages.
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Thu 16 Feb 2012, 17:02 Post subject:
console font |
|
After rodin.s´ hint I have repeated test in console
From my view there is nothing bad to report about border lines
No ! ctrl-a menu: left border is corrupt
Just cosmetic
But
- no öü
- no §
neither in mp nor in command line!
My conclusion:
The "new" consolefont is good just for displaying
but not for input.
Do Puppians really use console for things other than ASCII
|
|
Back to top
|
|
 |
rodin.s
Joined: 22 Sep 2010 Posts: 326 Location: Ukraine
|
Posted: Thu 16 Feb 2012, 18:12 Post subject:
border lines |
|
I took pictures of menu of mp with normal and new consolefonts.
| Description |
new |
| Filesize |
42.52 KB |
| Viewed |
201 Time(s) |

|
| Description |
normal |
| Filesize |
43.33 KB |
| Viewed |
208 Time(s) |

|
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6866 Location: Perth, Western Australia
|
Posted: Thu 16 Feb 2012, 20:30 Post subject:
|
|
Yes, I meant when running mp from commandline, no X running.
rodin.s, thanks, I'll check out your alternative console fonts.
Well, I have implemented internationalization of the initrd in Woof, and built Racy 5.2.2.6 to test it:
http://bkhome.org/blog/?viewDetailed=02691
Note though, I used L18L's original technique of simple sed expressions. The implementation is extremely simple, you can see the 'init' script online:
http://bkhome.org/fossil/woof2.cgi/artifact/ce14b27c841e5648fcd24bcb6072fd8fd83a47d6
The /locale/de/init translation file in the initrd is not online as it gets generated by 3builddistro in Woof, from this file:
http://bkhome.org/fossil/woof2.cgi/artifact/dae5c7f30c92868ca94d3485fe0cd7709a624016
...note, the comments in the [general] section are slightly wrong, the translation actually happens at every boot, and all other SSS domains are now using the same simple sed expressions technique.
A language-choice menu is not required in the initrd, as Woof now is able to edit the initrd.gz and insert file /PUPPYLANG -- except for case of booting off CD -- in that case, you are stuck with the English messages at early-bootup, but as soon as execution gets to rc.sysinit then translation will kick in.
Note also, keyboard layout gets set to match the language, unless set by pkeys boot param or file /PUPPYKEYMAP in initrd -- important in situation where have to enter a password for encrypted save-file.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
|