diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /django/contrib/humanize | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'django/contrib/humanize')
| -rw-r--r-- | django/contrib/humanize/templatetags/humanize.py | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/django/contrib/humanize/templatetags/humanize.py b/django/contrib/humanize/templatetags/humanize.py index 7e2e3b5fed..91ffe3acad 100644 --- a/django/contrib/humanize/templatetags/humanize.py +++ b/django/contrib/humanize/templatetags/humanize.py @@ -39,11 +39,14 @@ def ordinal(value): templates = ( # Translators: Ordinal format when value ends with 0, e.g. 80th. pgettext("ordinal 0", "{}th"), - # Translators: Ordinal format when value ends with 1, e.g. 81st, except 11. + # Translators: Ordinal format when value ends with 1, e.g. 81st, + # except 11. pgettext("ordinal 1", "{}st"), - # Translators: Ordinal format when value ends with 2, e.g. 82nd, except 12. + # Translators: Ordinal format when value ends with 2, e.g. 82nd, + # except 12. pgettext("ordinal 2", "{}nd"), - # Translators: Ordinal format when value ends with 3, e.g. 83rd, except 13. + # Translators: Ordinal format when value ends with 3, e.g. 83rd, + # except 13. pgettext("ordinal 3", "{}rd"), # Translators: Ordinal format when value ends with 4, e.g. 84th. pgettext("ordinal 4", "{}th"), @@ -212,7 +215,8 @@ def naturaltime(value): class NaturalTimeFormatter: time_strings = { - # Translators: delta will contain a string like '2 months' or '1 month, 2 weeks' + # Translators: delta will contain a string like '2 months' or '1 month, + # 2 weeks' "past-day": gettext_lazy("%(delta)s ago"), # Translators: please keep a non-breaking space (U+00A0) between count # and time unit. @@ -225,25 +229,27 @@ class NaturalTimeFormatter: "past-second": ngettext_lazy("a second ago", "%(count)s seconds ago", "count"), "now": gettext_lazy("now"), # fmt: off - # fmt turned off to avoid black splitting the ngettext_lazy calls to multiple - # lines, as this results in gettext missing the 'Translators:' comments. + # fmt turned off to avoid black splitting the ngettext_lazy calls to + # multiple lines, as this results in gettext missing the 'Translators:' + # comments. "future-second": ngettext_lazy( - # Translators: please keep a non-breaking space (U+00A0) between count - # and time unit. + # Translators: please keep a non-breaking space (U+00A0) between + # count and time unit. "a second from now", "%(count)s seconds from now", "count" ), "future-minute": ngettext_lazy( - # Translators: please keep a non-breaking space (U+00A0) between count - # and time unit. + # Translators: please keep a non-breaking space (U+00A0) between + # count and time unit. "a minute from now", "%(count)s minutes from now", "count", ), "future-hour": ngettext_lazy( - # Translators: please keep a non-breaking space (U+00A0) between count - # and time unit. + # Translators: please keep a non-breaking space (U+00A0) between + # count and time unit. "an hour from now", "%(count)s hours from now", "count", ), # fmt: on - # Translators: delta will contain a string like '2 months' or '1 month, 2 weeks' + # Translators: delta will contain a string like '2 months' or '1 month, + # 2 weeks' "future-day": gettext_lazy("%(delta)s from now"), } past_substrings = { |
