Author Topic: Localization Manager (addlocale)  (Read 148149 times)

timot

  • Guest
Re: PCLinuxOS International: how to use addlocale
« Reply #195 on: October 30, 2009, 11:33:21 PM »
timot,

I don't understand, does it work, or not, or did it just take a long time for the first window to show up? The latter can happen if your Internet connection was not up yet when you started addlocale. I will add some verbose messages in the next version to make that clearer. In my KDE4 install and as normal user addlocale works just fine. If you have problems, could it be that the base for your current KDE4 install is not MiniME but the 2009.2 KDE3?
regards,
-p.

Yes, my base install is 2009.2 KDE3. When I launch addlocale as a root or normal user on terminal, it will work normally, but if I try to launch it from the Menu it ask's for a root password first (which is promising) and then nothing happens. My internet connection is up and running. But the base is KDE3 indeed.
« Last Edit: October 30, 2009, 11:42:14 PM by timot »

Online pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2843
    • other projects...
Re: PCLinuxOS International: how to use addlocale
« Reply #196 on: October 31, 2009, 03:56:08 AM »
Yes, my base install is 2009.2 KDE3. When I launch addlocale as a root or normal user on terminal, it will work normally, but if I try to launch it from the Menu it ask's for a root password first (which is promising) and then nothing happens. My internet connection is up and running. But the base is KDE3 indeed.

hmm, if your system is fully updated then: running addlocale in a non-root session and as normal user from a terminal is identical to launching it via the menu. And it should also ask you for a root password when you launch it from a terminal.
Anyway, I will see what can be done about it.
-p.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: PCLinuxOS International: how to use addlocale
« Reply #197 on: October 31, 2009, 04:42:48 AM »
Hi,

Just look at the desktop menu file under /usr/share/applications : you will find a file named addlocale.destkop : it contains a line with this command "Exec=/usr/sbin/addlocale" : it needs to be changed to /usr/bin/addlocale.

Sorry pinoc, I had noticed, but forgot to come say about it. (Too many things to tell about ! ;D )

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12518
Re: PCLinuxOS International: how to use addlocale
« Reply #198 on: October 31, 2009, 04:54:56 AM »
Addlocale 3.0 desktop file reads:

[Desktop Entry]
Version=1.0
Type=Application
Name=Add Locale
Exec=addlocale
Icon=localedrake.png
Categories=GTK;System;X-MandrivaLinux-System-Configuration
Terminal=false
Encoding=UTF-8
StartupNotify=true

Thanks to everyone who donates. You keep the servers running.

timot

  • Guest
Re: PCLinuxOS International: how to use addlocale
« Reply #199 on: October 31, 2009, 05:14:48 AM »
Sorry fellows, I think it was my bad ???

Somehow and whatever reason I don't remember now, I had put kdesu in front of the /usr/bin/addlocale line in the menu entry command. I removed it, and now it works.

I looked at pinoc's script and noticed it will search the kdesu command itself, is that right?

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12518
Re: PCLinuxOS International: how to use addlocale
« Reply #200 on: October 31, 2009, 05:23:19 AM »
Sorry fellows, I think it was my bad ???

Somehow and whatever reason I don't remember now, I had put kdesu in front of the /usr/bin/addlocale line in the menu entry command. I removed it, and now it works.

I looked at pinoc's script and noticed it will search the kdesu command itself, is that right?

You are correct sir.


Thanks to everyone who donates. You keep the servers running.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: PCLinuxOS International: how to use addlocale
« Reply #201 on: October 31, 2009, 05:23:33 AM »
Hello,

Yes, that's right. For the desktop file, I may have confused with a addlocale version 2.9 or before. pinoc updates his program quite fast, difficult to follow the changes !  :D

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

timot

  • Guest
Re: PCLinuxOS International: how to use addlocale
« Reply #202 on: October 31, 2009, 05:27:03 AM »
OK, all good now :D

Offline pstranger

  • Full Member
  • ***
  • Posts: 160
Re: PCLinuxOS International: how to use addlocale
« Reply #203 on: November 11, 2009, 12:59:05 AM »
It happened to install pclos 2009.2 on notebook yesterday. After installation I updated AL to ver. 3-something-2010 and was disappointed the fact that I was not able to make localization. That script absolutely did not work. It tried to wget from ibiblio and raise road no-enter-sign because of server problem or bad connection you name it.

After debugging and researching the problem I tried to download my file from ibiblio with wget from command line and I had success. So problem was not in connection at all. I changed script rudely and I got it finish its work.

Original code:
/bin/rm -f /tmp/AL_STEP2.txt
export LIST2='(wget -c '$AL_HTTP$AL_EXT2'.tar.bz2 -O /'$AL_EXT2'.tar.bz2 2>&1) | tee /tmp/AL_STEP2.txt'
if [ "$XOK" == "1" ];then
  $XXTERM -T $"addlocale: downloading translation archive..." -e "$LIST2"
else

Dirty code:
/bin/rm -f /tmp/AL_STEP2.txt
export LIST2='wget -c '$AL_HTTP$AL_EXT2'.tar.bz2 -O /'$AL_EXT2'.tar.bz2 2>&1 | tee /tmp/AL_STEP2.txt'
if [ "$XOK" == "1" ];then
  $XXTERM -T $"addlocale: downloading translation archive..." -e $LIST2
  sleep 10
else

While script was sleeping I injected in /tmp file AL_STEP2.txt with line 100%

Script has finished its work but after reentering I hadn't got my localization. Setting US as a default locale and repeat of this trick gave nothing. Rebooting was useless.

Terminal starts with warnings now:
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


Summary:

1  I upgraded (removed) the old packet and new was disfunctional. Where could I get vital packet? I still consider that should be way for undo changers and recover previous set of packages. There are a lot of distro repositories for os. Why not to freeze one of them for long term or do not upgrade one or two repos with fresh rpms and keep previous and before previous packages? There always should be a way for moving in backward direction.

2  Why do keep *.tar.bz2 files on ibiblio instead of repo's site? Ibiblio speed was very slow (0.9-10.0 kbps) and small file (10Mb) was downloaded about 15-20 min. Two repo sites were 20 times faster for me.

Online pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2843
    • other projects...
Re: PCLinuxOS International: how to use addlocale
« Reply #204 on: November 11, 2009, 02:11:24 AM »
Hi pstranger,

since 2009.2 a lot has changed in the repo, we have a new toolchain, bash, gcc, and much more. Addlocale 3.0 has been updated to work with these new tools and the updated situation in the repo. The best way to add a localization to a fresh install of 2009.2 is to first completely update your system and only after that run addlocale (I just did this for Russian, which I think is your locale you want to add, and it worked perfectly fine). Addlocale can only work properly if the system is in a stable state which ensures that any needed packages for the new localization can be installed without conflict. If you only partially update the system you will almost certainly run into problems.
To fix your system (Note: on 2009.2 you may have to run addlocale from a root terminal)
- run addlocale and reset to en_US
- fully update your system. Ensure all updates were applied successfully, you have no duplicated or broken packages, etc.
- run addlocale and add Russian

Or, not recommended but still interesting: even this works if your laptop has 2GB of Ram, I'm surprised myself and of course can not guarantee that this will work in the future ;)
- run the 2009.2 liveCD and login as guest
- do not update but run the old addlocale from the CD directly and choose Russian (you can even add OO in Russian)
- after the logout, choose console login, and login as root
- now that all is in Russian, install the russian PCLinuxOS live session to the harddrive 

To your questions:
1) you can always 'go back' by running addlocale and resetting to en_US, just ignore any warnings.
2) the language archives are on ibiblio because this is our main server. I don't want to go through the hassle of testing which mirror may have synced or not, the language archives are relatively small and only need to be accessed once when running addlocale.

hope this info is useful, good luck,
-p.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: PCLinuxOS International: how to use addlocale
« Reply #205 on: November 11, 2009, 04:19:25 AM »
Hi,

If anyone would like to have more up to date versions than the official ones, I can propose my remasters, which go from October to November now. However, only the KDE version and the Xfce version can offer to switch from french to english at login time : I don't know why the Gnome and Lxde one's don't.

http://melodie.tyruiop.org

Well in fact, the Xfce is not available at the moment, I'll have to upload it (there is a quite recent ready, along with another Gnome version... and trying to do a Zenmini fr version now, for some details in the Gnome one don't fit what I want to get)...

Conclusion, pstranger : you could give a try to PCLOS-2010-KDE-fr-Old-World-07-10-2009 if you want to. There is less to catch up there than with the official 2009.2, and you can start with switching language a login screen, then update it fully (changing mirror before could be a good idea too), then launch addlocale, which should work fine.

I would have liked to update it more recently, but after a recent upgrade, the keyboard is not seen anymore and I don't have any mean to access another way (it's a virtual machine).

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Online pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2843
    • other projects...
Re: PCLinuxOS International: how to use addlocale
« Reply #206 on: November 17, 2009, 12:58:20 AM »
announcing addlocale 3.1 with these changes:
- fixed: addlocale now runs again from a user account of a 2009.2 install
- added: utf8 xterm
- added: translations for (and big thanks to): Bulgarian (Maria Kantardjieva), Ukrainian (Vasyl Myastkivskyy), Czech (Jan Kucera)
- added: LC_ALL environment setting
- added: addlocale on KDE4 will no longer need to reboot but only logout to apply the changes

have fun,
-p.

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12518
Re: PCLinuxOS International: how to use addlocale
« Reply #207 on: November 17, 2009, 03:58:49 AM »
Thank you for the updates!

Thanks to everyone who donates. You keep the servers running.

Offline pstranger

  • Full Member
  • ***
  • Posts: 160
Re: PCLinuxOS International: how to use addlocale
« Reply #208 on: November 17, 2009, 04:16:14 AM »
I was busy for few days.

To pinoc.
I couldn't test your advice because notebook was used for other tasks and I don't know when I'll get it back.

To melodie.
Thanks for care. I bookmarked your site.

Many thanks to you guys, but I am still in doubt - when I was installing AL it required to upgrade about 5 packets which were not contained new versions of bash, gcc etc. What it was? Missed dependents? If there would be such dependences I would never upgraded AL to version 3. If version 3 goes with upcoming version 2010 and doesn't compatible with current version 2009.2 so it seems against the rule to locate it in repo of current version.

Am I wrong?

Online pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2843
    • other projects...
Re: PCLinuxOS International: how to use addlocale
« Reply #209 on: November 17, 2009, 11:13:07 AM »
pstranger,

addlocale is designed to work with a stable and fully updated system, anything else would be nonsense. As mentioned before, and in the original post: Important Notes, point 4a), if you have a partially updated system you almost certainly will run into all kind of problems which are independent of addlocale. You might be lucky in installing from an iso, not update anything, but run the version of addlocale from the iso.
That may work but it may also fail, depending on the newer packages and their inter-dependencies in the repo. The probability to fail increases with the amount of changes in the current repo with respect to the state when the iso was created. Right now this probability is very high, your options:
-> first fully update your system and then run addlocale,
-> use addlocale version of the ISO on a non-updated system (not guarantee to work and even if it does you will have to fully update the system afterwards anyway so why not doing it in the first place?),
-> wait for the next PCLinuxOS iso  ::)

regards,
-p.