[PATCH 05/14] Proper months set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/ui/gui/spokes/datetime_spoke.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 353e9a1..598d488 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -30,6 +30,7 @@ from pyanaconda.ui.gui.spokes import NormalSpoke
 from pyanaconda.ui.gui.categories.localization import LocalizationCategory
 
 from pyanaconda import localization
+import datetime
 
 __all__ = ["DatetimeSpoke"]
 
@@ -63,8 +64,13 @@ class DatetimeSpoke(NormalSpoke):
         for day in xrange(1, 32):
             self.add_to_store(self._daysStore, day)
 
-        for month in xrange(1, 13):
+        self._months_nums = dict()
+        for i in xrange(1, 13):
+            #a bit hacky way, but should return the translated string
+            #TODO: how to handle language change? Clear and populate again?
+            month = datetime.date(2000, i, 1).strftime('%B')
             self.add_to_store(self._monthsStore, month)
+            self._months_nums[month] = i
 
         for year in xrange(1990, 2051):
             self.add_to_store(self._yearsStore, year)
-- 
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux