[PATCH] Use translated versions of the AM/PM strings consistently
Vratislav Podzimek
vpodzime at redhat.com
Fri Oct 10 07:41:17 UTC 2014
Otherwise they don't match, are shown untranslated etc.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 6abc43b..145dd3f 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -693,9 +693,9 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
def _to_amPm(self, hours):
if hours >= 12:
- day_phase = "PM"
+ day_phase = _("PM")
else:
- day_phase = "AM"
+ day_phase = _("AM")
new_hours = ((hours - 1) % 12) + 1
@@ -704,10 +704,10 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
def _to_24h(self, hours, day_phase):
correction = 0
- if day_phase == "AM" and hours == 12:
+ if day_phase == _("AM") and hours == 12:
correction = -12
- elif day_phase == "PM" and hours != 12:
+ elif day_phase == _("PM") and hours != 12:
correction = 12
return (hours + correction) % 24
--
1.9.3
More information about the anaconda-patches
mailing list