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

Bug#230463: invalid locale message



Quoting Kenshi Muto (kmuto@debian.org):

> > On Sat, Jan 31, 2004 at 11:10:50AM +0900, Kenshi Muto wrote:
> > > But something change occured about "debian-installer/locale" variable?
> > 
> > The debian-installer/locale variable is "en_US" until
> > countrychooser is run, which changes it to "en_:en_US".
> 
> Argh, I see.
> In countrychooser:
> 
> ----------------------
> localecode="debian-installer/locale"
>  ...
> if [ "$COUNTRYCODE" != "$COUNTRYCODE_LANGUAGECHOOSER" ]; then
>       LOCALE=${LANGUAGECODE}_${COUNTRYCODE}:${LOCALE}
> fi
>  ...
> db_set "$localecode" "$LOCALE"
> ----------------------
> 
> Hmm, base-config(termwrap) expects debian-installer/locale is just
> locale, like "en_US" or "ja_JP.EUC-JP" and so on.
> 
> I prefer countrychooser should preserve debian-installer/locale as old
> style. Such as "en_:en_US" breaks compatibility with old style, and
> needs modifying base-config (and may cause another bug...).
> 
> Christian, have you any idea for solve this problem?

Probably by forgetting about this and either just use
${LANGUAGECODE}_${COUNTRYCODE}....or keep the locale set by
languagechooser.

I don't understand why COUNTRYCODE is empty, however. Which language do
you choose and then which country?


ANyway, I slightly changed the above to:

if [ "$COUNTRYCODE" != "$COUNTRYCODE_LANGUAGECHOOSER" -a -n "$COUNTRYCODE" -a -n $LANGUAGECODE ]; then
	LOCALE=${LANGUAGECODE}_${COUNTRYCODE}
fi


Still not perfect as this could result in things like fr_JA but we
shoul dno more have "en_:en_US"

-- 






Reply to: