--- pyanaconda/ui/tui/spokes/time.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/time.py b/pyanaconda/ui/tui/spokes/time.py index b9d5a26..98b9dc7 100644 --- a/pyanaconda/ui/tui/spokes/time.py +++ b/pyanaconda/ui/tui/spokes/time.py @@ -46,7 +46,7 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
@property def completed(self): - return bool(self.data.timezone.timezone or self._selection) + return bool(self.data.timezone.timezone)
@property def mandatory(self): @@ -56,8 +56,6 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke): def status(self): if self.data.timezone.timezone: return _("%s timezone") % self.data.timezone.timezone - elif self._selection: - return _("%s timezone") % self._selection else: return _("Timezone is not set.")
--- pyanaconda/ui/tui/spokes/time.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/time.py b/pyanaconda/ui/tui/spokes/time.py index 98b9dc7..6a30778 100644 --- a/pyanaconda/ui/tui/spokes/time.py +++ b/pyanaconda/ui/tui/spokes/time.py @@ -40,7 +40,7 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke): self._lower_regions = [r.lower() for r in self._timezones]
self._zones = ["%s/%s" % (region, z) for region in self._timezones for z in self._timezones[region]] - self._lower_zones = [z.lower() for region in self._timezones for z in self._timezones[region]] # for lowercase lookup + self._lower_zones = [z.lower().replace("_", " ") for region in self._timezones for z in self._timezones[region]] # for lowercase lookup
self._selection = ""
@@ -105,8 +105,8 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke): except (ValueError, IndexError): pass
- if key.lower() in self._lower_zones: - id = self._lower_zones.index(key.lower()) + if key.lower().replace("_", " ") in self._lower_zones: + id = self._lower_zones.index(key.lower().replace("_", " ")) self._selection = self._zones[id] self.apply() self.close()
On Thu, 2013-03-21 at 16:47 +0100, Martin Sivak wrote:
pyanaconda/ui/tui/spokes/time.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/time.py b/pyanaconda/ui/tui/spokes/time.py index 98b9dc7..6a30778 100644 --- a/pyanaconda/ui/tui/spokes/time.py +++ b/pyanaconda/ui/tui/spokes/time.py @@ -40,7 +40,7 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke): self._lower_regions = [r.lower() for r in self._timezones]
self._zones = ["%s/%s" % (region, z) for region in self._timezones for z in self._timezones[region]]
self._lower_zones = [z.lower() for region in self._timezones for z in self._timezones[region]] # for lowercase lookup
self._lower_zones = [z.lower().replace("_", " ") for region in self._timezones for z in self._timezones[region]] # for lowercase lookup self._selection = ""@@ -105,8 +105,8 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke): except (ValueError, IndexError): pass
if key.lower() in self._lower_zones:id = self._lower_zones.index(key.lower())
if key.lower().replace("_", " ") in self._lower_zones:id = self._lower_zones.index(key.lower().replace("_", " ")) self._selection = self._zones[id] self.apply() self.close()
This should be fixed more generally by using babel module providing (translated) timezone names instead of identifiers, but ACK for now. PATCH 1/2 also looks good to me.
anaconda-patches@lists.fedorahosted.org