summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-25 08:32:31 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-25 08:32:31 +0000
commitd744a660c4e1872370e40f77eb7a9e8d106aa73b (patch)
tree520d4403f7b4f372f38dae11571eab79dbfaf197 /django
parent6c812e91436f3819087b49ad49c77e8f1acb84c0 (diff)
Fixed #4137 -- Added translation markup to a couple of missed strings. Thanks,
Sung-Jin Hong. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/utils/timesince.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/utils/timesince.py b/django/utils/timesince.py
index e69c45c8c1..394f818395 100644
--- a/django/utils/timesince.py
+++ b/django/utils/timesince.py
@@ -1,6 +1,6 @@
import datetime, math, time
from django.utils.tzinfo import LocalTimezone
-from django.utils.translation import ngettext
+from django.utils.translation import ngettext, gettext
def timesince(d, now=None):
"""
@@ -37,14 +37,14 @@ def timesince(d, now=None):
if count != 0:
break
if count < 0:
- return '%d milliseconds' % math.floor((now - d).microseconds / 1000)
- s = '%d %s' % (count, name(count))
+ return gettext('%d milliseconds') % math.floor((now - d).microseconds / 1000)
+ s = gettext('%(number)d %(type)s') % {'number': count, 'type': name(count)}
if i + 1 < len(chunks):
# Now get the second item
seconds2, name2 = chunks[i + 1]
count2 = (since - (seconds * count)) / seconds2
if count2 != 0:
- s += ', %d %s' % (count2, name2(count2))
+ s += gettext(', %(number)d %(type)s') % {'number': count2, 'type': name2(count2)}
return s
def timeuntil(d, now=None):