Django

Code

Changeset 5071

Show
Ignore:
Timestamp:
04/25/07 03:32:31 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4137 -- Added translation markup to a couple of missed strings. Thanks,
Sung-Jin Hong.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/AUTHORS

    r5053 r5071  
    109109    Ian Holsman <http://feh.holsman.net/> 
    110110    Kieran Holland <http://www.kieranholland.com> 
     111    Sung-Jin Hong <serialx.net@gmail.com> 
    111112    Robert Rock Howard <http://djangomojo.com/> 
    112113    Jason Huggins <http://www.jrandolph.com/blog/> 
  • django/trunk/django/utils/timesince.py

    r3186 r5071  
    11import datetime, math, time 
    22from django.utils.tzinfo import LocalTimezone 
    3 from django.utils.translation import ngettext 
     3from django.utils.translation import ngettext, gettext 
    44 
    55def timesince(d, now=None): 
     
    3838            break 
    3939    if count < 0: 
    40         return '%d milliseconds' % math.floor((now - d).microseconds / 1000) 
    41     s = '%d %s' % (count, name(count)) 
     40        return gettext('%d milliseconds') % math.floor((now - d).microseconds / 1000) 
     41    s = gettext('%(number)d %(type)s') % {'number': count, 'type': name(count)} 
    4242    if i + 1 < len(chunks): 
    4343        # Now get the second item 
     
    4545        count2 = (since - (seconds * count)) / seconds2 
    4646        if count2 != 0: 
    47             s += ', %d %s' % (count2, name2(count2)) 
     47            s += gettext(', %(number)d %(type)s') % {'number': count2, 'type': name2(count2)} 
    4848    return s 
    4949