summaryrefslogtreecommitdiff
path: root/django/utils/dateformat.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-11 10:15:35 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-11 10:15:35 +0000
commit2cf448152eaff0a5fbcf078ccf5a62f7a91ef3e1 (patch)
tree25baa01a8a81ef1afbe0e2eb4c04b54953554a5b /django/utils/dateformat.py
parentee1ca89dd40442232a21adb06eda793795eec18d (diff)
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
Diffstat (limited to 'django/utils/dateformat.py')
-rw-r--r--django/utils/dateformat.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py
index e3712175af..a558e3a69f 100644
--- a/django/utils/dateformat.py
+++ b/django/utils/dateformat.py
@@ -13,6 +13,7 @@ Usage:
from django.utils.dates import MONTHS, MONTHS_3, MONTHS_AP, WEEKDAYS
from django.utils.tzinfo import LocalTimezone
+from django.utils.translation import gettext as _
from calendar import isleap, monthrange
import re, time
@@ -36,14 +37,14 @@ class TimeFormat(Formatter):
def a(self):
"'a.m.' or 'p.m.'"
if self.data.hour > 11:
- return 'p.m.'
- return 'a.m.'
+ return _('p.m.')
+ return _('a.m.')
def A(self):
"'AM' or 'PM'"
if self.data.hour > 11:
- return 'PM'
- return 'AM'
+ return _('PM')
+ return _('AM')
def B(self):
"Swatch Internet time"
@@ -91,9 +92,9 @@ class TimeFormat(Formatter):
Proprietary extension.
"""
if self.data.minute == 0 and self.data.hour == 0:
- return 'midnight'
+ return _('midnight')
if self.data.minute == 0 and self.data.hour == 12:
- return 'noon'
+ return _('noon')
return '%s %s' % (self.f(), self.a())
def s(self):