--- pyanaconda/textw/language_text.py | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/pyanaconda/textw/language_text.py b/pyanaconda/textw/language_text.py index 5875266..5a12a49 100644 --- a/pyanaconda/textw/language_text.py +++ b/pyanaconda/textw/language_text.py @@ -24,6 +24,7 @@ from constants_text import * from pyanaconda.constants import * import gettext _ = lambda x: gettext.ldgettext("anaconda", x) +from pyanaconda import text import logging log = logging.getLogger("anaconda") @@ -33,7 +34,20 @@ class LanguageWindow: languages = anaconda.instLanguage.available () languages.sort() - current = anaconda.instLanguage.instLang + wait_window = text.WaitWindow(screen, _("Getting GeoIP information"), + _("Trying to get GeoIP information.")) + current = None + try: + guess = anaconda.instLanguage.getGeoIPinfo() + current = anaconda.instLanguage.getLangByName(anaconda.instLanguage.getCountryLang(guess)) + log.debug("Language guess according to GeoIP info: {0}".format( + current)) + except ValueError: + pass + wait_window.pop() + + if not current: + current = anaconda.instLanguage.instLang height = min((8, len(languages))) buttons = [TEXT_OK_BUTTON, TEXT_BACK_BUTTON] -- 1.7.4.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list