WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: getlocale.sh  (Read 4921 times)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
getlocale.sh
« on: November 05, 2015, 04:27:58 PM »
How does getlocale exactly work. I startet the script and activated the 3 locale which im interested in, ie.

Code: [Select]
de_DE.UTF-8
de_DE/ISO-8859-1
de_DE@euro/ISO-8859-15

In extlinux i set
Code: [Select]
lang=de_DE
Now, i see, not for all extensions there are also locales.tcz. But for those, which exist, shouldn't it work automatically? Is it presumed to put the locales.tcz in the bootlist? Or, for those ondemand in /tce/ondemand/ ?

I rebooted several times, but not one program with an existing locale is shown up in german ... (??)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: getlocale.sh
« Reply #1 on: November 05, 2015, 04:45:42 PM »
Correct. A  *-locale.tcz  will be loaded automatically if present in  /etc/sysconfig/tcedir/optional  and if the  lang=  boot code was used (or if $LANG was set another way).
Code: [Select]
if [ "$LANG" != "C" ]; then
LOCALEEXT="${1%.tcz}-locale.tcz"
[ -f "$LOCALEEXT" ] && install "$LOCALEEXT"
fi

It depends on the extension if German translation is actually provided though.
I know it works for Xfe.
Download a copy and keep it handy: Core book ;)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: getlocale.sh
« Reply #2 on: November 05, 2015, 05:13:47 PM »
Thanks for the explanation; the script you provided, should i put it in /sda1/opt (where .filelist and .xfilelist sit) or start it from within bootlocal.sh ?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: getlocale.sh
« Reply #3 on: November 05, 2015, 05:25:05 PM »
No. That's already part of tce-load.

Which extensions did you test and did you download their respective *-locale.tcz?
Download a copy and keep it handy: Core book ;)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: getlocale.sh
« Reply #4 on: November 05, 2015, 06:09:14 PM »
It continues to not work for me: To be completely coherent, i changed getlocale.sh and chose only one option (de_DE/ISO-8859-1) and set lang=de_DE in the bootcode.

I tried the existing locales for:
XFE
Viewnior
lxrandr
vlc
nano

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: getlocale.sh
« Reply #5 on: November 06, 2015, 06:47:35 AM »
To check it's working, type "locale". There should be no errors.
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: getlocale.sh
« Reply #6 on: November 06, 2015, 07:25:16 AM »
That's what i get:

Code: [Select]
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de
LC_CTYPE="de"
LC_NUMERIC="de"
LC_TIME="de"
LC_COLLATE="de"
LC_MONETARY="de"
LC_MESSAGES="de"
LC_PAPER="de"
LC_NAME="de"
LC_ADDRESS="de"
LC_TELEPHONE="de"
LC_MEASUREMENT="de"
LC_IDENTIFICATION="de"
LC_ALL=

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: getlocale.sh
« Reply #7 on: November 06, 2015, 07:41:48 AM »
Then something is wrong. "locale -a" will list valid options, "de" is not a valid one.
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: getlocale.sh
« Reply #8 on: November 06, 2015, 03:28:12 PM »
Then something is wrong. "locale -a" will list valid options, "de" is not a valid one.

I restarted getlocale.sh, chose de_DE, de_DE.UTF-8, de_DE@euro, set lang=de_DE@euro in the bootcodes, but the result remains the same.

May be, there is some config file which is not covered by my backup setup? What does getlocale.sh exactly do?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: getlocale.sh
« Reply #9 on: November 06, 2015, 04:18:37 PM »
getlocale.sh generates the locale archive extension, containing those locales you chose. The bootcode then activates one of them.

If locale claims it is "de", then you have two lang= bootcodes, with one being wrong perhaps?
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: getlocale.sh
« Reply #10 on: November 06, 2015, 04:27:56 PM »
This is my extlinux.conf:
Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet lang=de_DE@euro waitusb=10:UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" tce=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" restore=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" swapfile=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" home=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" opt=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" local=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" tz=CET-1CEST,M3.5.0,M10.5.0/3 showapps blacklist=b43,ssb,bcma noautologin

(I even left out kmap=de to not create eventual confusion; which, otoh, in any case seem to not have any effect on the console, which despite that setting still uses english/us keymap. Aterm uses the lower 128 ascii of the german keyboard, but i think, aterm is an X application and therefore controlled by the keyboard setting of X).

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: getlocale.sh
« Reply #11 on: November 06, 2015, 08:54:56 PM »
Looking through the list of valid lang settings i didn't see this   
Quote
lang=de_DE@euro
 

also I don't believe the "local=" boot code is valid either..

I think we said earlier that showapps is only for diagnostic purposes as it delays the boot process a little


corrected boot code
Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet lang=de_DE waitusb=10:UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" tce=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" swapfile=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" home=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" opt=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" tz=CET-1CEST,M3.5.0,M10.5.0/3 blacklist=b43,ssb,bcma noautologin

:)
« Last Edit: November 06, 2015, 09:01:49 PM by coreplayer2 »

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: getlocale.sh
« Reply #12 on: November 07, 2015, 02:25:18 AM »
But getlocale.sh says:

Code: [Select]
Now processing... /
Locales installed. Creating extension... |

Done. The extension is at /mnt/sda1/tce/optional/mylocale.tcz and in onboot.lst
Reboot with lang=xyz (for example lang=de_DE@euro) to start using this.


Press enter to quit.

In any case, i tried all, but to no extent. The result of
Code: [Select]
~$ locale is:
Code: [Select]
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de
LC_CTYPE="de"
LC_NUMERIC="de"
LC_TIME="de"
LC_COLLATE="de"
LC_MONETARY="de"
LC_MESSAGES="de"
LC_PAPER="de"
LC_NAME="de"
LC_ADDRESS="de"
LC_TELEPHONE="de"
LC_MEASUREMENT="de"
LC_IDENTIFICATION="de"
LC_ALL=

I suspect there might be somewhere a rest of the previous (default) Xvesa setup, because at the end of the boot process i get the - obviously harmless - prompt:
Code: [Select]
xset: unable to open display ""

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: getlocale.sh
« Reply #13 on: November 07, 2015, 05:01:23 AM »
Some additional info. When i do APPS > Maintainance > Check for Updates i see there this error msg:

Quote
Error Could not verify mylocale.tcz
. Why? And what does that mean?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: getlocale.sh
« Reply #14 on: November 07, 2015, 05:35:28 AM »
mylocale is the local extension created by running the script from the getlocale extension.

mylocale doesn't exist in the repo, hence the error message.