diff --git a/core/templatetags/duration.py b/core/templatetags/duration.py index 75bd2cf8..81505669 100644 --- a/core/templatetags/duration.py +++ b/core/templatetags/duration.py @@ -108,9 +108,9 @@ def dayssince(value, today=None): delta = today - value if delta < datetime.timedelta(days=1): - return "today" + return _("today") if delta < datetime.timedelta(days=2): - return "yesterday" + return _("yesterday") # use standard timesince for anything beyond yesterday - return str(delta.days) + " days ago" + return str(delta.days) + _(" days ago") diff --git a/locale/zh/LC_MESSAGES/django.mo b/locale/zh/LC_MESSAGES/django.mo index b246a46b..501875b5 100644 Binary files a/locale/zh/LC_MESSAGES/django.mo and b/locale/zh/LC_MESSAGES/django.mo differ diff --git a/locale/zh/LC_MESSAGES/django.po b/locale/zh/LC_MESSAGES/django.po index c06f3d72..88c40874 100644 --- a/locale/zh/LC_MESSAGES/django.po +++ b/locale/zh/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Baby Buddy\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-04 03:37+0000\n" +"POT-Creation-Date: 2022-06-07 06:48+0000\n" "Language: zh-Hans\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1559,6 +1559,20 @@ msgstr "{}, {}" msgid "0 days" msgstr "0天" +#: core/templatetags/duration.py:111 +#: dashboard/templates/cards/diaperchange_types.html:49 +msgid "today" +msgstr "今天" + +#: core/templatetags/duration.py:113 +#: dashboard/templates/cards/diaperchange_types.html:51 +msgid "yesterday" +msgstr "昨天" + +#: core/templatetags/duration.py:116 +msgid " days ago" +msgstr "天之前" + #: core/timeline.py:53 #, python-format msgid "%(child)s started tummy time!" @@ -1694,14 +1708,6 @@ msgstr "小便" msgid "solid" msgstr "大便" -#: dashboard/templates/cards/diaperchange_types.html:49 -msgid "today" -msgstr "今天" - -#: dashboard/templates/cards/diaperchange_types.html:51 -msgid "yesterday" -msgstr "昨天" - #: dashboard/templates/cards/diaperchange_types.html:53 #, python-format msgid "%(key)s days ago"