diff options
author | Claude Paroz <claude@2xlibre.net> | 2018-05-09 09:46:38 +0200 |
---|---|---|
committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2018-05-09 09:46:38 +0200 |
commit | 3574a6d32fcd88d404b110a8d2204db1dd14a545 (patch) | |
tree | e95b106149c75a6fe454bc63808e6d9488b13884 | |
parent | 7ac3008fe473f8015bda9789be23657d3b329e6d (diff) | |
download | django-3574a6d32fcd88d404b110a8d2204db1dd14a545.tar.gz |
Replaced context by comment in 2 humanize strings.
-rw-r--r-- | django/contrib/humanize/locale/en/LC_MESSAGES/django.po | 10 | ||||
-rw-r--r-- | django/contrib/humanize/templatetags/humanize.py | 10 |
2 files changed, 9 insertions, 11 deletions
diff --git a/django/contrib/humanize/locale/en/LC_MESSAGES/django.po b/django/contrib/humanize/locale/en/LC_MESSAGES/django.po index f39cfde0aa..cf0f2fe34c 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: 2015-01-17 11:07+0100\n" +"POT-Creation-Date: 2018-05-07 18:29+0200\n" "PO-Revision-Date: 2010-05-13 15:35+0200\n" "Last-Translator: Django team\n" "Language-Team: English <en@li.org>\n" @@ -236,9 +236,9 @@ msgstr "" msgid "yesterday" msgstr "" -#: contrib/humanize/templatetags/humanize.py:202 +#. Translators: delta will contain a string like '2 months' or '1 month, 2 weeks' +#: contrib/humanize/templatetags/humanize.py:223 #, python-format -msgctxt "naturaltime" msgid "%(delta)s ago" msgstr "" @@ -274,9 +274,9 @@ msgid_plural "%(count)s hours ago" msgstr[0] "" msgstr[1] "" -#: contrib/humanize/templatetags/humanize.py:230 +#. Translators: delta will contain a string like '2 months' or '1 month, 2 weeks' +#: contrib/humanize/templatetags/humanize.py:250 #, python-format -msgctxt "naturaltime" msgid "%(delta)s from now" msgstr "" diff --git a/django/contrib/humanize/templatetags/humanize.py b/django/contrib/humanize/templatetags/humanize.py index 7b99d78f1e..482725c88c 100644 --- a/django/contrib/humanize/templatetags/humanize.py +++ b/django/contrib/humanize/templatetags/humanize.py @@ -219,9 +219,8 @@ def naturaltime(value): if value < now: delta = now - value if delta.days != 0: - return pgettext( - 'naturaltime', '%(delta)s ago' - ) % {'delta': defaultfilters.timesince(value, now)} + # Translators: delta will contain a string like '2 months' or '1 month, 2 weeks' + return _('%(delta)s ago') % {'delta': defaultfilters.timesince(value, now)} elif delta.seconds == 0: return _('now') elif delta.seconds < 60: @@ -247,9 +246,8 @@ def naturaltime(value): else: delta = value - now if delta.days != 0: - return pgettext( - 'naturaltime', '%(delta)s from now' - ) % {'delta': defaultfilters.timeuntil(value, now)} + # Translators: delta will contain a string like '2 months' or '1 month, 2 weeks' + return _('%(delta)s from now') % {'delta': defaultfilters.timeuntil(value, now)} elif delta.seconds == 0: return _('now') elif delta.seconds < 60: |