Skip to content

Commit

Permalink
Rename "Today's Feedings" as "Recent Feedings"
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubz committed Jul 17, 2023
1 parent 253d417 commit 154d794
Show file tree
Hide file tree
Showing 38 changed files with 496 additions and 414 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block header %}
<a href="{% url "core:feeding-list" %}">
{% trans "Today's Feeding" %}
{% trans "Recent Feedings" %}
</a>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion dashboard/templates/dashboard/child.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{% card_feeding_last_method object %}
</div>
<div class="col-sm-6 col-lg-4">
{% card_feeding_day object %}
{% card_feeding_recent object %}
</div>
<div class="col-sm-6 col-lg-4">
{% card_statistics object %}
Expand Down
4 changes: 2 additions & 2 deletions dashboard/templatetags/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def card_diaperchange_types(context, child, date=None):
}


@register.inclusion_tag("cards/feeding_day.html", takes_context=True)
def card_feeding_day(context, child, end_date=None):
@register.inclusion_tag("cards/feeding_recent.html", takes_context=True)
def card_feeding_recent(context, child, end_date=None):
"""
Filters Feeding instances to get total amount for a specific date and for 7 days before
:param child: an instance of the Child model.
Expand Down
4 changes: 2 additions & 2 deletions dashboard/tests/tests_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def test_card_diaperchange_types(self):
}
self.assertEqual(data["stats"], stats)

def test_card_feeding_day(self):
data = cards.card_feeding_day(self.context, self.child, self.date)
def test_card_feeding_recent(self):
data = cards.card_feeding_recent(self.context, self.child, self.date)
self.assertEqual(data["type"], "feeding")
self.assertFalse(data["empty"])
self.assertFalse(data["hide_empty"])
Expand Down
Binary file modified locale/ca/LC_MESSAGES/django.mo
Binary file not shown.
49 changes: 27 additions & 22 deletions locale/ca/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: 2023-07-17 13:37+0000\n"
"POT-Creation-Date: 2023-07-17 13:48+0000\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -563,8 +563,8 @@ msgstr "Xat / Suport"
#: core/templates/timeline/_timeline.html:7
#: core/templates/timeline/_timeline.html:71
#: core/templates/timeline/_timeline.html:73
#: dashboard/templates/cards/feeding_day.html:46
#: dashboard/templates/cards/feeding_last_method.html:37
#: dashboard/templates/cards/feeding_recent.html:46
#: dashboard/templates/cards/sleep_recent.html:43
#: dashboard/templates/cards/statistics.html:37
msgid "Previous"
Expand All @@ -575,8 +575,8 @@ msgstr "Anterior"
#: core/templates/timeline/_timeline.html:14
#: core/templates/timeline/_timeline.html:78
#: core/templates/timeline/_timeline.html:80
#: dashboard/templates/cards/feeding_day.html:53
#: dashboard/templates/cards/feeding_last_method.html:44
#: dashboard/templates/cards/feeding_recent.html:53
#: dashboard/templates/cards/sleep_recent.html:47
#: dashboard/templates/cards/statistics.html:44
msgid "Next"
Expand Down Expand Up @@ -1594,10 +1594,10 @@ msgstr "Veure Temporitzadors"
#: core/templates/core/timer_nav.html:50
#: dashboard/templates/cards/diaperchange_last.html:17
#: dashboard/templates/cards/diaperchange_types.html:12
#: dashboard/templates/cards/feeding_day.html:20
#: dashboard/templates/cards/feeding_day.html:58
#: dashboard/templates/cards/feeding_last.html:17
#: dashboard/templates/cards/feeding_last_method.html:49
#: dashboard/templates/cards/feeding_recent.html:20
#: dashboard/templates/cards/feeding_recent.html:58
#: dashboard/templates/cards/pumping_last.html:17
#: dashboard/templates/cards/sleep_last.html:17
#: dashboard/templates/cards/sleep_naps_day.html:18
Expand Down Expand Up @@ -1889,23 +1889,6 @@ msgstr "sòlid"
msgid "%(key)s days ago"
msgstr "Fa %(key)s dies"

#: dashboard/templates/cards/feeding_day.html:6
msgid "Today's Feeding"
msgstr "Alimentació d'Avui"

#: dashboard/templates/cards/feeding_day.html:25
#, python-format
msgid "%(counter)s feeding"
msgid_plural "%(counter)s feedings"
msgstr[0] ""
msgstr[1] ""

#: dashboard/templates/cards/feeding_day.html:32
#: dashboard/templates/cards/sleep_recent.html:32
#, python-format
msgid "<div class=\"text-center small text-body-secondary\"> %(since)s </div>"
msgstr ""

#: dashboard/templates/cards/feeding_last.html:6
msgid "Last Feeding"
msgstr "últim menjar"
Expand All @@ -1925,6 +1908,25 @@ msgid_plural "%(n)s feedings ago"
msgstr[0] ""
msgstr[1] ""

#: dashboard/templates/cards/feeding_recent.html:6
#, fuzzy
#| msgid "Delete a Feeding"
msgid "Recent Feedings"
msgstr "Esborra Alimentacions"

#: dashboard/templates/cards/feeding_recent.html:25
#, python-format
msgid "%(counter)s feeding"
msgid_plural "%(counter)s feedings"
msgstr[0] ""
msgstr[1] ""

#: dashboard/templates/cards/feeding_recent.html:32
#: dashboard/templates/cards/sleep_recent.html:32
#, python-format
msgid "<div class=\"text-center small text-body-secondary\"> %(since)s </div>"
msgstr ""

#: dashboard/templates/cards/pumping_last.html:6
#, fuzzy
#| msgid "Last Feeding"
Expand Down Expand Up @@ -2266,6 +2268,9 @@ msgstr "Durada del temps de panxa (suma)"
msgid "Total Tummy Time Durations"
msgstr "Durada total del temps de panxa"

#~ msgid "Today's Feeding"
#~ msgstr "Alimentació d'Avui"

#~ msgid "Napping"
#~ msgstr "Migdiada"

Expand Down
48 changes: 25 additions & 23 deletions locale/cs/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: 2023-07-17 13:37+0000\n"
"POT-Creation-Date: 2023-07-17 13:48+0000\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -562,8 +562,8 @@ msgstr "Chat / podpora"
#: core/templates/timeline/_timeline.html:7
#: core/templates/timeline/_timeline.html:71
#: core/templates/timeline/_timeline.html:73
#: dashboard/templates/cards/feeding_day.html:46
#: dashboard/templates/cards/feeding_last_method.html:37
#: dashboard/templates/cards/feeding_recent.html:46
#: dashboard/templates/cards/sleep_recent.html:43
#: dashboard/templates/cards/statistics.html:37
msgid "Previous"
Expand All @@ -574,8 +574,8 @@ msgstr "Předchozí"
#: core/templates/timeline/_timeline.html:14
#: core/templates/timeline/_timeline.html:78
#: core/templates/timeline/_timeline.html:80
#: dashboard/templates/cards/feeding_day.html:53
#: dashboard/templates/cards/feeding_last_method.html:44
#: dashboard/templates/cards/feeding_recent.html:53
#: dashboard/templates/cards/sleep_recent.html:47
#: dashboard/templates/cards/statistics.html:44
msgid "Next"
Expand Down Expand Up @@ -1587,10 +1587,10 @@ msgstr "Zobrazit časovače"
#: core/templates/core/timer_nav.html:50
#: dashboard/templates/cards/diaperchange_last.html:17
#: dashboard/templates/cards/diaperchange_types.html:12
#: dashboard/templates/cards/feeding_day.html:20
#: dashboard/templates/cards/feeding_day.html:58
#: dashboard/templates/cards/feeding_last.html:17
#: dashboard/templates/cards/feeding_last_method.html:49
#: dashboard/templates/cards/feeding_recent.html:20
#: dashboard/templates/cards/feeding_recent.html:58
#: dashboard/templates/cards/pumping_last.html:17
#: dashboard/templates/cards/sleep_last.html:17
#: dashboard/templates/cards/sleep_naps_day.html:18
Expand Down Expand Up @@ -1874,24 +1874,6 @@ msgstr "pevné"
msgid "%(key)s days ago"
msgstr "před %(key)s dny"

#: dashboard/templates/cards/feeding_day.html:6
msgid "Today's Feeding"
msgstr ""

#: dashboard/templates/cards/feeding_day.html:25
#, python-format
msgid "%(counter)s feeding"
msgid_plural "%(counter)s feedings"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""

#: dashboard/templates/cards/feeding_day.html:32
#: dashboard/templates/cards/sleep_recent.html:32
#, python-format
msgid "<div class=\"text-center small text-body-secondary\"> %(since)s </div>"
msgstr ""

#: dashboard/templates/cards/feeding_last.html:6
msgid "Last Feeding"
msgstr "Poslední krmení"
Expand All @@ -1912,6 +1894,26 @@ msgstr[0] ""
msgstr[1] ""
msgstr[2] ""

#: dashboard/templates/cards/feeding_recent.html:6
#, fuzzy
#| msgid "Delete a Feeding"
msgid "Recent Feedings"
msgstr "Vymazat krmení"

#: dashboard/templates/cards/feeding_recent.html:25
#, python-format
msgid "%(counter)s feeding"
msgid_plural "%(counter)s feedings"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""

#: dashboard/templates/cards/feeding_recent.html:32
#: dashboard/templates/cards/sleep_recent.html:32
#, python-format
msgid "<div class=\"text-center small text-body-secondary\"> %(since)s </div>"
msgstr ""

#: dashboard/templates/cards/pumping_last.html:6
#, fuzzy
#| msgid "Last Feeding"
Expand Down
Binary file modified locale/da/LC_MESSAGES/django.mo
Binary file not shown.
49 changes: 27 additions & 22 deletions locale/da/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: 2023-07-17 13:37+0000\n"
"POT-Creation-Date: 2023-07-17 13:48+0000\n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -565,8 +565,8 @@ msgstr "Chat / Support"
#: core/templates/timeline/_timeline.html:7
#: core/templates/timeline/_timeline.html:71
#: core/templates/timeline/_timeline.html:73
#: dashboard/templates/cards/feeding_day.html:46
#: dashboard/templates/cards/feeding_last_method.html:37
#: dashboard/templates/cards/feeding_recent.html:46
#: dashboard/templates/cards/sleep_recent.html:43
#: dashboard/templates/cards/statistics.html:37
msgid "Previous"
Expand All @@ -577,8 +577,8 @@ msgstr "Forrige"
#: core/templates/timeline/_timeline.html:14
#: core/templates/timeline/_timeline.html:78
#: core/templates/timeline/_timeline.html:80
#: dashboard/templates/cards/feeding_day.html:53
#: dashboard/templates/cards/feeding_last_method.html:44
#: dashboard/templates/cards/feeding_recent.html:53
#: dashboard/templates/cards/sleep_recent.html:47
#: dashboard/templates/cards/statistics.html:44
msgid "Next"
Expand Down Expand Up @@ -1597,10 +1597,10 @@ msgstr "Vis Timere"
#: core/templates/core/timer_nav.html:50
#: dashboard/templates/cards/diaperchange_last.html:17
#: dashboard/templates/cards/diaperchange_types.html:12
#: dashboard/templates/cards/feeding_day.html:20
#: dashboard/templates/cards/feeding_day.html:58
#: dashboard/templates/cards/feeding_last.html:17
#: dashboard/templates/cards/feeding_last_method.html:49
#: dashboard/templates/cards/feeding_recent.html:20
#: dashboard/templates/cards/feeding_recent.html:58
#: dashboard/templates/cards/pumping_last.html:17
#: dashboard/templates/cards/sleep_last.html:17
#: dashboard/templates/cards/sleep_naps_day.html:18
Expand Down Expand Up @@ -1882,23 +1882,6 @@ msgstr "fast"
msgid "%(key)s days ago"
msgstr "%(key)s dage siden"

#: dashboard/templates/cards/feeding_day.html:6
msgid "Today's Feeding"
msgstr "Dagens fodring"

#: dashboard/templates/cards/feeding_day.html:25
#, python-format
msgid "%(counter)s feeding"
msgid_plural "%(counter)s feedings"
msgstr[0] ""
msgstr[1] ""

#: dashboard/templates/cards/feeding_day.html:32
#: dashboard/templates/cards/sleep_recent.html:32
#, python-format
msgid "<div class=\"text-center small text-body-secondary\"> %(since)s </div>"
msgstr ""

#: dashboard/templates/cards/feeding_last.html:6
msgid "Last Feeding"
msgstr "Seneste madning"
Expand All @@ -1918,6 +1901,25 @@ msgid_plural "%(n)s feedings ago"
msgstr[0] ""
msgstr[1] ""

#: dashboard/templates/cards/feeding_recent.html:6
#, fuzzy
#| msgid "Delete a Feeding"
msgid "Recent Feedings"
msgstr "Slet en Madning"

#: dashboard/templates/cards/feeding_recent.html:25
#, python-format
msgid "%(counter)s feeding"
msgid_plural "%(counter)s feedings"
msgstr[0] ""
msgstr[1] ""

#: dashboard/templates/cards/feeding_recent.html:32
#: dashboard/templates/cards/sleep_recent.html:32
#, python-format
msgid "<div class=\"text-center small text-body-secondary\"> %(since)s </div>"
msgstr ""

#: dashboard/templates/cards/pumping_last.html:6
#, fuzzy
#| msgid "Last Feeding"
Expand Down Expand Up @@ -2259,6 +2261,9 @@ msgstr "Mavetid (Total)"
msgid "Total Tummy Time Durations"
msgstr ""

#~ msgid "Today's Feeding"
#~ msgstr "Dagens fodring"

#~ msgid "Napping"
#~ msgstr "Sover"

Expand Down
Binary file modified locale/de/LC_MESSAGES/django.mo
Binary file not shown.

0 comments on commit 154d794

Please sign in to comment.