[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: locale for the root user



On Wed, May 26, 2004 at 11:20:03PM -0300, Joey Hess wrote:
> Bill Allombert wrote:
> > This has some consequences:
> > 1) Debian menu is translated, since update-menus was ran under
> > proper locales! This is very nice ! Thanks to everybody involved!
> 
> Is this _really_ a good thing?

It is!

> > 2) The debconf database might contain some non-7bit value 
> > (especially since some default value are translated by non-7bit string)
> > Unfortunately, if root rerun debconf, it will use C-locale and it
> > seems debconf under C locale does not handle well non-7bit string in
> > the database. I had problems with dexconf "Enter an indentifier for
> > your video card" which default in french to "carte vidéo générique".
> 
> Those strings sound like descriptions, which should not be displayed in
> localised form if the locale is C. Details?

See /var/lib/dpkg/info/xserver-xfree86.config:

if [ -z "$DEFAULT" ]; then
  # fall back to some language-specific generic text
  case "${LC_ALL:-${LC_MESSAGES:-$LANG}}" in
    ca_*) DEFAULT="Targeta de vídeo genèrica" ;;
    # da
    de_*) DEFAULT="Standardgrafikkarte" ;;
    es_*) DEFAULT="Tarjeta de vídeo genérica" ;;
    fr_*) DEFAULT="Carte vidéo générique" ;;
    gl_*) DEFAULT="Tarxeta de Video Xenérica" ;;
    it_*) DEFAULT="Scheda video generica" ;;
    # ja
    # nl
    pt_BR) DEFAULT="Placa de Vídeo Genérica" ;;
    # ru
    # sv
    *) DEFAULT="Generic Video Card" ;;
  esac
fi

So if user just enter [return], the value of DEFAULT, a localized
string, will be stored in the debconf database.

> > a) should the root user be configured with proper locale by d-i ?
> 
> d-i appends a LANG setting to /etc/environment, is there some reason why
> this doesn't affect root?

Strangely, today it does, and root has proper locales. I suspect either
login/PAM did not reread /etc/environment or I logged in before baseconfig
was completed. At was stage /etc/environment is filled ? 

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 



Reply to: