Fixed #2998 -- Wrapped a couple more strings for translation. Thanks, Jannis
Leidel. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ee1ca89dd4
commit
2cf448152e
|
@ -13,6 +13,7 @@ Usage:
|
||||||
|
|
||||||
from django.utils.dates import MONTHS, MONTHS_3, MONTHS_AP, WEEKDAYS
|
from django.utils.dates import MONTHS, MONTHS_3, MONTHS_AP, WEEKDAYS
|
||||||
from django.utils.tzinfo import LocalTimezone
|
from django.utils.tzinfo import LocalTimezone
|
||||||
|
from django.utils.translation import gettext as _
|
||||||
from calendar import isleap, monthrange
|
from calendar import isleap, monthrange
|
||||||
import re, time
|
import re, time
|
||||||
|
|
||||||
|
@ -36,14 +37,14 @@ class TimeFormat(Formatter):
|
||||||
def a(self):
|
def a(self):
|
||||||
"'a.m.' or 'p.m.'"
|
"'a.m.' or 'p.m.'"
|
||||||
if self.data.hour > 11:
|
if self.data.hour > 11:
|
||||||
return 'p.m.'
|
return _('p.m.')
|
||||||
return 'a.m.'
|
return _('a.m.')
|
||||||
|
|
||||||
def A(self):
|
def A(self):
|
||||||
"'AM' or 'PM'"
|
"'AM' or 'PM'"
|
||||||
if self.data.hour > 11:
|
if self.data.hour > 11:
|
||||||
return 'PM'
|
return _('PM')
|
||||||
return 'AM'
|
return _('AM')
|
||||||
|
|
||||||
def B(self):
|
def B(self):
|
||||||
"Swatch Internet time"
|
"Swatch Internet time"
|
||||||
|
@ -91,9 +92,9 @@ class TimeFormat(Formatter):
|
||||||
Proprietary extension.
|
Proprietary extension.
|
||||||
"""
|
"""
|
||||||
if self.data.minute == 0 and self.data.hour == 0:
|
if self.data.minute == 0 and self.data.hour == 0:
|
||||||
return 'midnight'
|
return _('midnight')
|
||||||
if self.data.minute == 0 and self.data.hour == 12:
|
if self.data.minute == 0 and self.data.hour == 12:
|
||||||
return 'noon'
|
return _('noon')
|
||||||
return '%s %s' % (self.f(), self.a())
|
return '%s %s' % (self.f(), self.a())
|
||||||
|
|
||||||
def s(self):
|
def s(self):
|
||||||
|
|
Loading…
Reference in New Issue