Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: bmarkus on August 21, 2010, 04:13:00 PM
-
As TC users are all around the world localozation is important. I see the fear that it will increase size when small footprint is one of the key differentiators of TC/MC. Fortunately the other key differentiator is the modularity.
Localization requires many thing. Tools to easy setup and change language, font, keyboard, availability of translated applications, moving to UTF-8, etc. For sure it is a long process. The good thing is that most of it can be done parallel to base development on extension level.
Moving ncurses out of the base is one of the crucial initial steps. I will submit the UTF-8 (wide) version of ncurses. I think to establish a small ad hoc team (task force) would be useful to start working on.
Feedbacks are welcome :)
-
Perhaps a meta-extension (similar to compiletc) for localization could be useful?
-
I suppose a script to create a locale-archive would be useful. That way it has to be done only once, and doesn't contain bloat unnecessary to the user.
There is no stable FLTK with utf-8, but everything else should be possible.
-
It's always good if the core gets smaller. If that also makes UTF-8 support easier, great!
I don't like ncurses anyway.
-
Said script posted:
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/getlocale.tcz.info
Title: getlocale.tcz
Description: Script to build customized locale support
Version: 1.0
Author: Curaga
Original-site: http://tinycorelinux.com
Copying-policy: GPLv3
Size: 4k
Extension_by: Curaga
Comments: To avoid having one huge locale support extension, this
script builds a customized one according to your
selections.
-
If you load this in the console, the script is called
getlocale.sh.
-
The new extension will be called mylocale.tcz.
Change-log:
Current: 2010/08/22 Original
-
Hello Bélà,
moving ncurses out of base sounds like a good idea. The only program in the base that depends on ncurses is /usr/bin/tset, which itself is not executed from any other program of the base. Once the decision has been made, on what to with it (remove or replace), there's only one thing left to do before ncurses can be moved out: write a script that peeks into the extensions if they link against ncurses, and add a line to a .dep file, if they do so. Both requirements can be taken care of on a rather short timeframe, probably even during the current rc phase of 3.1.
Greetings,
SvOlli
-
The transition is done already ;)
-
moving ncurses out of base sounds like a good idea. The only program in the base that depends on ncurses is /usr/bin/tset, which itself is not executed from any other program of the base
Already removed for 3.1rc2, and libncurses.so* and tset is already in the recently posted ncurses.tcz.
-
@curaga
Thank you for the script!
Maybe you want to change line 66 to avoid double entries in onboot.lst :
[ -z `grep mylocale.tcz ${TCEDIR}/onboot.lst` ] && echo "mylocale.tcz" >> ${TCEDIR}/onboot.lst
-
@curaga
Thank you for the script!
Maybe you want to change line 66 to avoid double entries in onboot.lst :
[ -z `grep mylocale.tcz ${TCEDIR}/onboot.lst` ] && echo "mylocale.tcz" >> ${TCEDIR}/onboot.lst
Updated to check for that.
-
Hello. I'm Japanese. Please excuse my weakly English.
I make Japanese versions of Tiny Core Linux.
And I redistribute it for some Japanese user.
[^thehatsrule^: removed, remaster?]
I need to remaster tinycore.gz for several reasons.
Most of USB stick is formatted by VFAT.
It must be mounted with "codepage=932,iocharset=utf8" options to display Japanese character.
a) need Japanese NLS module for kernel.
b) need to change mount options in rebuildfstab.
I can't implement this with localized extensions.
And I need to change usbinstall script to change kernel boot options.
APPEND initrd=/boot/$ROOTFS.gz quiet waitusb=5:"$TARGETUUID" tce="$TARGETUUID" lang=ja_JP.utf8 kmap=jp106 tz=Asia/Tokyo noutc showapps
In tc-config, execute hwclock command before loading extensions.
Therefore it can't adjust clock after loading extensions.
I think remastering is smart method rather than localized extensions.
But I don't deny localized extensions.
Thank you.
-
In tc-config, execute hwclock command before loading extensions.
Therefore it can't adjust clock after loading extensions.
I don't think that is an aspect particular to localization, same is the case if hwclock is desired to be synced through net which may require drivers/firmware.
There are several threads in the forum referring to this subject.
-
@curaga
I am pleasantly surprised about the speed in which proposals are adopted and implemented.
Thank you for the script!
@all
Just an idea for improvement
71 echo "Reboot with lang=xx_YY to start using this."
could avoid confusion
and create confusion: if UTF-8 is chosen that has to be lang=xx_YY.UTF-8
My proposal:
As you have been happily living without locales and the demand is UTF-8, cut the old braids (ISOs)
grep 'UTF-8/' < SUPPORTED | cut -d '/' -f 1 > SUPPORTED2.utf8
number of locales decreases from 415 to 148,
we don`t need to copy bloated stuff, do we? Let TC stay tiny in extensions, too.
If every locale is UTF-8 only, we can can totally omit the term 'UTF-8' in getlocales.sh dialog and in bootcode lang.
Just use it!
Less is more (usability)
Discussion?
ps: The dialog looks very nice in Aterm, even nicer if long terms like 'de_AT@euro/ISO-8859-15' would fit into the frame. After proposed cut everything will be fitting.
-
@curaga
I am pleasantly surprised about the speed in which proposals are adopted and implemented.
Thank you for the script!
I was bored ;) You're welcome.
@all
Just an idea for improvement
71 echo "Reboot with lang=xx_YY to start using this."
could avoid confusion
and create confusion: if UTF-8 is chosen that has to be lang=xx_YY.UTF-8
Since there are various encodings for each locale, plus possible @euro, I doubt saying the utf-8 bit would help much.
My proposal:
As you have been happily living without locales and the demand is UTF-8, cut the old braids (ISOs)
grep 'UTF-8/' < SUPPORTED | cut -d '/' -f 1 > SUPPORTED2.utf8
number of locales decreases from 415 to 148,
we don`t need to copy bloated stuff, do we? Let TC stay tiny in extensions, too.
If every locale is UTF-8 only, we can can totally omit the term 'UTF-8' in getlocales.sh dialog and in bootcode lang.
Just use it!
I don't think cutting on the selection would be that useful. The extension would not drop in size at all, since squashfs rounds up to the blocksize (4k). Users may want any supported locale.
Also, any utf-8 locale creates a much bigger locale-archive than the corresponding ISO-encoded one.
Less is more (usability)
Discussion?
ps: The dialog looks very nice in Aterm, even nicer if long terms like 'de_AT@euro/ISO-8859-15' would fit into the frame. After proposed cut everything will be fitting.
The three numbers (0 0 10) correspond to height, width, and items to show. If you wish to tune the middle number, post what number looks good.
It's in characters, so 22 would be a minimum.
-
The three numbers (0 0 10) correspond to height, width, and items to show. If you wish to tune the middle number, post what number looks good.
42
will satisfy any potential user from Estonia
'et_EE.ISO-8859-15/ISO-8859-15' :o
-
Script updated. Also added an example lang= param (the last processed one) to the help text at the end.
-
AT curaga:
getlocale script used in tc3.1rc2, see attached screenshot.
Screenshot shows geany running in German and another in bmarkus´ language.
I found out that reboot is not required, if lang is set in bootcode or set in terminal.
A "Quick-Locale-Switcher" may follow soon or later.
May I propose something that you could do when you are bored again? ;)
Add the already installed locales to the top of the list. ;D
That would have helped me to avoid a failure, to forget that one chosen locale will not be added but will remain as the only locale, my fault not your´s.
Thank you again and have a nice day.
-
Hungarian text looks OK on the screenshot!
-
True, many ways to achieve anything here ;). But to have it working everywhere, it's simpler to use the bootcode and reboot (there is often confusion when a var set in a shell doesn't affect the environment).
Add the already installed locales to the top of the list.
Wouldn't be that easy to do; what would be the benefit? Selecting them again will not install two sets, not selecting them will not remove them.
That would have helped me to avoid a failure, to forget that one chosen locale will not be added but will remain as the only locale, my fault not your´s.
Sorry?
Any selected locales will be added to those already installed:
$ locale -a
C
POSIX
$ sudo getlocale.sh # select one locale, aa_DJ
$ locale -a
C
POSIX
aa_DJ
aa_DJ.iso88591
$ sudo getlocale.sh # select one locale, af_ZA
$ locale -a
C
POSIX
aa_DJ
aa_DJ.iso88591
af_ZA
af_ZA.iso88591
$ sudo getlocale.sh # Select af_ZA again
$ locale -a
C
POSIX
aa_DJ
aa_DJ.iso88591
af_ZA
af_ZA.iso88591
edit:
Of course the adding behavior above is only in the same session.
A reboot and a mounted extension would not add to the installed ones.
-
Quote
Add the already installed locales to the top of the list.
Wouldn't be that easy to do; what would be the benefit? Selecting them again will not install two sets, not selecting them will not remove them.
Sorry, I wanted to say: the installed locales marked as selected
and was thinking that unselecting one of them would remove it from the archive after reboot.
What now?
No way for unselecting?
then the headline in the dialog should contain something like "choose locale(s) to add"
Or make unselecting possible?
-
No way to remove just some that I know of. It's a remove-everything affair.
-
treied
localedef --delete-from-archive
?
-
Heh :D That's not in the man page.
Anyway, this was not intended as a full-on gui around localedef, only a list to choose which are wanted.
-
ru_RU.UTF-8 & microcore
There is no still Russian fonts :(
I have "? ? ? ? ?" intead of cyrilic letters.
P.S. With ru_RU I had the same situation
-
ru_RU.UTF-8 & microcore
I'm assuming you're talking about the console. Get the console-cyrillic fonts archive (http://ftp.de.debian.org/debian/pool/main/c/console-cyrillic/console-cyrillic_0.9.orig.tar.gz (http://ftp.de.debian.org/debian/pool/main/c/console-cyrillic/console-cyrillic_0.9.orig.tar.gz)), grab one of the psf fonts from the archive, and then run sudo loadfont < /path/to/font.psf. If it works, put that command into bootlocal.sh (without sudo).
-
That's right, fonts are separate from the locale support.
-
mylocale.tcz doen't work on my system, as normal user I cannot access to /tmp/tcloop/mylocale and /usr/lib/locale.. doesn't exists.
Regenerating mylocale manually (mksquashfs...) as normal user gives good results.
-
Thanks, found the bug. Please delete mylocale.tcz, update getlocale.tcz, and re-generate mylocale.tcz.
-
Testing hu_HU.UTF-8 on TC 3.1rc4 GTK2 based applications like LXDE, PCMANFM, filezilla, gnumeric, etc. work fine. MC in LXTERMINAL also displays correct Hungarian text.
However aterm doesn't seems to be UTF-8 friendly, see MC on the attached screenshots.
-
aterm gives the same mess on Lubuntu 10.04 so it is not TC specific :P