diff options
| -rw-r--r-- | django/contrib/humanize/locale/en/LC_MESSAGES/django.mo | bin | 343 -> 343 bytes | |||
| -rw-r--r-- | django/contrib/humanize/locale/en/LC_MESSAGES/django.po | 68 | ||||
| -rw-r--r-- | django/contrib/humanize/templatetags/humanize.py | 10 |
3 files changed, 36 insertions, 42 deletions
diff --git a/django/contrib/humanize/locale/en/LC_MESSAGES/django.mo b/django/contrib/humanize/locale/en/LC_MESSAGES/django.mo Binary files differindex 0410aee337..a08dc329d0 100644 --- a/django/contrib/humanize/locale/en/LC_MESSAGES/django.mo +++ b/django/contrib/humanize/locale/en/LC_MESSAGES/django.mo diff --git a/django/contrib/humanize/locale/en/LC_MESSAGES/django.po b/django/contrib/humanize/locale/en/LC_MESSAGES/django.po index 713f770520..0e7f3f33ed 100644 --- a/django/contrib/humanize/locale/en/LC_MESSAGES/django.po +++ b/django/contrib/humanize/locale/en/LC_MESSAGES/django.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Django\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-06 14:14+0200\n" +"POT-Creation-Date: 2011-05-07 21:53+0200\n" "PO-Revision-Date: 2010-05-13 15:35+0200\n" "Last-Translator: Django team\n" "Language-Team: English <en@li.org>\n" @@ -28,119 +28,117 @@ msgstr "" msgid "rd" msgstr "" -#: templatetags/humanize.py:68 +#: templatetags/humanize.py:74 #, python-format msgid "%(value).1f million" msgid_plural "%(value).1f million" msgstr[0] "" msgstr[1] "" -#: templatetags/humanize.py:69 +#: templatetags/humanize.py:75 #, python-format msgid "%(value)s million" msgid_plural "%(value)s million" msgstr[0] "" msgstr[1] "" -#: templatetags/humanize.py:74 +#: templatetags/humanize.py:80 #, python-format msgid "%(value).1f billion" msgid_plural "%(value).1f billion" msgstr[0] "" msgstr[1] "" -#: templatetags/humanize.py:75 +#: templatetags/humanize.py:81 #, python-format msgid "%(value)s billion" msgid_plural "%(value)s billion" msgstr[0] "" msgstr[1] "" -#: templatetags/humanize.py:80 +#: templatetags/humanize.py:86 #, python-format msgid "%(value).1f trillion" msgid_plural "%(value).1f trillion" msgstr[0] "" msgstr[1] "" -#: templatetags/humanize.py:81 +#: templatetags/humanize.py:87 #, python-format msgid "%(value)s trillion" msgid_plural "%(value)s trillion" msgstr[0] "" msgstr[1] "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "one" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "two" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "three" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "four" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "five" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "six" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "seven" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "eight" msgstr "" -#: templatetags/humanize.py:98 +#: templatetags/humanize.py:104 msgid "nine" msgstr "" -#: templatetags/humanize.py:121 +#: templatetags/humanize.py:127 msgid "today" msgstr "" -#: templatetags/humanize.py:123 +#: templatetags/humanize.py:129 msgid "tomorrow" msgstr "" -#: templatetags/humanize.py:125 +#: templatetags/humanize.py:131 msgid "yesterday" msgstr "" -#: templatetags/humanize.py:147 +#: templatetags/humanize.py:153 msgid "now" msgstr "" -#: templatetags/humanize.py:149 +#: templatetags/humanize.py:155 #, python-format msgid "%s seconds ago" -msgstr "" +msgid_plural "%s seconds ago" +msgstr[0] "" +msgstr[1] "" -#: templatetags/humanize.py:151 +#: templatetags/humanize.py:157 +#, python-format msgid "a minute ago" -msgstr "" +msgid_plural "%s minutes ago" +msgstr[0] "" +msgstr[1] "" -#: templatetags/humanize.py:153 +#: templatetags/humanize.py:159 #, python-format -msgid "%s minutes ago" -msgstr "" - -#: templatetags/humanize.py:155 msgid "an hour ago" -msgstr "" - -#: templatetags/humanize.py:157 -#, python-format -msgid "%s hours ago" -msgstr "" +msgid_plural "%s hours ago" +msgstr[0] "" +msgstr[1] "" diff --git a/django/contrib/humanize/templatetags/humanize.py b/django/contrib/humanize/templatetags/humanize.py index a711145064..560f2a49ec 100644 --- a/django/contrib/humanize/templatetags/humanize.py +++ b/django/contrib/humanize/templatetags/humanize.py @@ -152,13 +152,9 @@ def naturaltime(value, arg=None): elif delta.seconds == 0: return _(u'now') elif delta.seconds < 60: - return _(u'%s seconds ago' % (delta.seconds)) - elif delta.seconds / 60 < 2: - return _(r'a minute ago') + return ungettext(u'%s seconds ago', u'%s seconds ago', delta.seconds) elif delta.seconds / 60 < 60: - return _(u'%s minutes ago' % (delta.seconds/60)) - elif delta.seconds / 60 / 60 < 2: - return _(u'an hour ago') + return ungettext(u'a minute ago', u'%s minutes ago', delta.seconds/60) elif delta.seconds / 60 / 60 < 24: - return _(u'%s hours ago' % (delta.seconds/60/60)) + return ungettext(u'an hour ago', u'%s hours ago', delta.seconds/60/60) return naturalday(value, arg) |
