diff --git a/pyanaconda/ui/gui/spokes/datetime.py b/pyanaconda/ui/gui/spokes/datetime.py
index e7aa955..aed63f2 100644
--- a/pyanaconda/ui/gui/spokes/datetime.py
+++ b/pyanaconda/ui/gui/spokes/datetime.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"]
@@ -61,8 +62,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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
I think this could be merged with the previous patch too.
> @@ -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?
I had some ideas on this, but they turned out to not quite be correct.
I will be looking at it more carefully when we have translations.
- Chris
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list