[PATCH] Use translated versions of the AM/PM strings consistently

Martin Kolman mkolman at redhat.com
Fri Oct 10 11:40:16 UTC 2014



----- Original Message -----
> From: "Vratislav Podzimek" <vpodzime at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, October 10, 2014 9:41:17 AM
> Subject: [PATCH] Use translated versions of the AM/PM strings consistently
> 
> 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
Looks good, ACK!
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 


More information about the anaconda-patches mailing list