[Bug 1253050] Re: localechooser set wrong language
Bin Li
1253050 at bugs.launchpad.net
Thu Nov 21 02:23:16 UTC 2013
Gunnar,
Thanks for your quick reply. Now I just ignore it, this should be a
ugly fixes.
if [ "$LOCALE" != C ] && \
- [ "$LANGUAGE" ] && [ "$COUNTRYCODE" ] && \
+ [ "$LANGUAGE" ] && [ "$LANGUAGELIST" ] && [ "$COUNTRYCODE" ] && \
[ "$COUNTRYCODE" != "$DEFAULT_COUNTRY" ] && \
Is it correct to set the $LANGUAGELIST to $tpl_di_lanaguage?
If it's correct, we could also have a better one like below.
grep -q "^$extra_lang" $SUPPORTEDLOCALES; then
- LANGUAGELIST=$extra_lang:$LANGUAGELIST
+ LANGUAGELIST=$LANGUAGE:$extra_lang:$LANGUAGELIST
db_set "$tpl_di_language" "$LANGUAGELIST"
log "Set $tpl_di_language = '$LANGUAGELIST'"
set_debconf_language "$LANGUAGELIST"
If it's not correct,
grep -q "^$extra_lang" $SUPPORTEDLOCALES; then
LANGUAGELIST=$extra_lang:$LANGUAGELIST
- db_set "$tpl_di_language" "$LANGUAGELIST"
+ db_set "$tpl_languagelist" "$LANGUAGELIST"
- log "Set $tpl_di_language = '$LANGUAGELIST'"
+ log "Set $tpl_languagelist = '$LANGUAGELIST'"
- set_debconf_language "$LANGUAGELIST"
+ # set_debconf_language "$LANGUAGELIST"
What's your idea? Thanks!
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to localechooser in Ubuntu.
https://bugs.launchpad.net/bugs/1253050
Title:
localechooser set wrong language
Status in localechooser:
New
Status in OEM Priority Project:
New
Status in “localechooser” package in Ubuntu:
New
Bug description:
When I use ubiquity, I found the tpl_di_language is set a wrong value "en_US:", after dig it I found when LANGUAGELIST is null, it will be set to this value.
Another question is why we set 'en_US' in language, while not 'en', when I use get_current_language, it will return null when the language is 'en_US'.
33) # We have a locale
# Display system locale selection on backup or rerun
db_fset $tpl_di_locale seen false || true
db_get $tpl_di_locale
log "System locale ($tpl_di_locale) = '$RET'"
# The code below adds lang_COUNTRY at the beginning of the
# language list we got from language selection, unless it's
# already included or no locale exists for the combination.
if [ "$askedpreflocale" ]; then
extra_lang=$(echo "$LOCALE" | sed -e 's/[.@].*$//')
else
extra_lang=${LANGUAGE%%_*}_$COUNTRYCODE
fi
if [ "$LOCALE" != C ] && \
[ "$LANGUAGE" ] && [ "$COUNTRYCODE" ] && \
[ "$COUNTRYCODE" != "$DEFAULT_COUNTRY" ] && \
! echo ":$LANGUAGELIST:" | grep -q ":$extra_lang:" && \
grep -q "^$extra_lang" $SUPPORTEDLOCALES; then
LANGUAGELIST=$extra_lang:$LANGUAGELIST
db_set "$tpl_di_language" "$LANGUAGELIST"
log "Set $tpl_di_language = '$LANGUAGELIST'"
set_debconf_language "$LANGUAGELIST"
To manage notifications about this bug go to:
https://bugs.launchpad.net/localechooser/+bug/1253050/+subscriptions
More information about the foundations-bugs
mailing list