summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-01-04 04:25:32 +0000
committerMatt Wilson <msw@redhat.com>2001-01-04 04:25:32 +0000
commit85b3078a4949833b02d1eaf2a168b34257ee44a1 (patch)
tree30f28f33d1bcc0287b993c2cd71e209d16f03822
parentabfd22d319295a8e0556a66d87f53f2bf49a93d9 (diff)
downloadanaconda-85b3078a4949833b02d1eaf2a168b34257ee44a1.tar.gz
anaconda-85b3078a4949833b02d1eaf2a168b34257ee44a1.tar.xz
anaconda-85b3078a4949833b02d1eaf2a168b34257ee44a1.zip
get the locale from todo, not the environment
-rw-r--r--iutil.py4
-rw-r--r--iw/timezone_gui.py2
-rw-r--r--textw/timezone_text.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/iutil.py b/iutil.py
index 1f7602d57..7f666162c 100644
--- a/iutil.py
+++ b/iutil.py
@@ -309,7 +309,7 @@ esac
stdout = None, stderr = None,
root = root)
-def defaultZone():
+def defaultZone(locale):
if os.access("lang-table", os.R_OK):
f = open("lang-table", "r")
elif os.access("/etc/lang-table", os.R_OK):
@@ -323,7 +323,7 @@ def defaultZone():
for line in lines:
string.strip(line)
l = string.split(line)
- if l[4] == os.environ["LANG"]:
+ if l[4] == locale:
return l[6]
return "US/Eastern"
diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py
index 368aff774..a79dfface 100644
--- a/iw/timezone_gui.py
+++ b/iw/timezone_gui.py
@@ -133,7 +133,7 @@ class TimezoneWindow (InstallWindow):
(self.default, asUTC, asArc) = rc
self.default = _(self.default)
else:
- self.default = _(iutil.defaultZone ())
+ self.default = _(iutil.defaultZone (self.todo.language.get()))
asUTC = 0
if (string.find (self.default, "UTC") != -1):
diff --git a/textw/timezone_text.py b/textw/timezone_text.py
index 3c8e07e21..0a04c1d79 100644
--- a/textw/timezone_text.py
+++ b/textw/timezone_text.py
@@ -63,7 +63,7 @@ class TimezoneWindow:
if rc:
(default, asUtc, asArc) = rc
else:
- default = iutil.defaultZone()
+ default = iutil.defaultZone(todo.language.get())
asUtc = 0
bb = ButtonBar(screen, [(_("OK"), "ok"), (_("Back"), "back")])