summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-20 15:34:52 +0000
committerMatt Wilson <msw@redhat.com>1999-09-20 15:34:52 +0000
commit16418b06ece578a61845a451c1c2be0ead138151 (patch)
treeac92bd55a5f0e37add30ec4b897a10cfbba38589 /text.py
parent611b6cd260204f683badfa48fb2cf8dbf893d903 (diff)
downloadanaconda-16418b06ece578a61845a451c1c2be0ead138151.tar.gz
anaconda-16418b06ece578a61845a451c1c2be0ead138151.tar.xz
anaconda-16418b06ece578a61845a451c1c2be0ead138151.zip
o dependent package selection - if games has conditional packages keyed on
kde, when kde is selected check to see if games is selected and if so select all the conditional packages in games. o pass LC_ALL from loader to anaconda o updated language table o fallback to two char LANG for translations o magically build kickstart lang dictionary o start of DHCP network insensitivity in GUI
Diffstat (limited to 'text.py')
-rw-r--r--text.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/text.py b/text.py
index 1358707a6..e947e6d3a 100644
--- a/text.py
+++ b/text.py
@@ -32,21 +32,31 @@ class LanguageWindow:
def __call__(self, screen, todo):
languages = todo.language.available ()
descriptions = languages.keys ()
- locales = languages.values ()
- default = locales.index (todo.language.get ())
-
+ descriptions.sort ()
+ current = todo.language.get ()
+ for lang in descriptions:
+ if languages[lang] == current:
+ default = descriptions.index (lang)
+
+ height = screen.height - 16
(button, choice) = \
ListboxChoiceWindow(screen, _("Language Selection"),
_("What language would you like to use during the "
"installation process?"), descriptions,
- buttons = [_("OK")], width = 30, default = default)
+ buttons = [_("OK")], width = 30, default = default, scroll = 1,
+ height = height)
+ choice = descriptions[choice]
+ lang = languages [choice]
+ newlangs = [lang]
+ if len(lang) > 2:
+ newlangs.append(lang[:2])
langs = gettext.getlangs ()
- langs = [languages [languages.keys()[choice]]] + langs
+ langs = newlangs + langs
gettext.setlangs (langs)
global cat, _
- cat = gettext.Catalog ("anaconda-text", "/usr/share/locale")
+ cat = gettext.Catalog ("anaconda", "/usr/share/locale")
_ = cat.gettext
- todo.language.set (languages.keys()[choice])
+ todo.language.set (choice)
return INSTALL_OK
class MouseDeviceWindow: