[Bug 1253050] [NEW] localechooser set wrong language

Bin Li 1253050 at bugs.launchpad.net
Wed Nov 20 11:18:01 UTC 2013


Public bug reported:

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"

** Affects: localechooser
     Importance: Undecided
         Status: New

** Affects: oem-priority
     Importance: Undecided
         Status: New

** Affects: localechooser (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 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