Skip to content

Commit

Permalink
Merge 5f776aa into f6960dc
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Jun 7, 2022
2 parents f6960dc + 5f776aa commit bcec1bb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
6 changes: 3 additions & 3 deletions core/templatetags/duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Binary file modified locale/zh/LC_MESSAGES/django.mo
Binary file not shown.
24 changes: 15 additions & 9 deletions locale/zh/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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!"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit bcec1bb

Please sign in to comment.