Reformat "days ago" string for easier translation

This commit is contained in:
Christopher C. Wells 2023-10-14 06:47:45 -07:00 committed by Christopher Charbonneau Wells
parent 0d08d6174b
commit 03f3197884
38 changed files with 26006 additions and 24374 deletions

View File

@ -107,7 +107,7 @@ def dayssince(value, today=None):
today = timezone.localtime().date() today = timezone.localtime().date()
delta = today - value delta = today - value
days_ago = _(" ") + str(delta.days) + _(" days ago") days_ago = _("%(days_ago)s days ago") % {"days_ago": str(delta.days)}
if delta < datetime.timedelta(days=1): if delta < datetime.timedelta(days=1):
return _("today") return _("today")

View File

@ -47,7 +47,7 @@
{% elif key == 1 %} {% elif key == 1 %}
{% trans "yesterday" %} {% trans "yesterday" %}
{% else %} {% else %}
{% blocktrans %}{{ key }} days ago{% endblocktrans %} {% blocktrans with days_ago=key %}{{ days_ago }} days ago{% endblocktrans %}
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Baby Buddy\n" "Project-Id-Version: Baby Buddy\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-09 13:30+0000\n" "POT-Creation-Date: 2023-10-14 13:44+0000\n"
"Language: en-GB\n" "Language: en-GB\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -1293,10 +1293,8 @@ msgid "Add BMI"
msgstr "" msgstr ""
#: core/templates/core/bmi_list.html:69 #: core/templates/core/bmi_list.html:69
#, fuzzy
#| msgid "No diaper changes found."
msgid "No BMI entries found." msgid "No BMI entries found."
msgstr "No nappy changes found." msgstr ""
#: core/templates/core/child_confirm_delete.html:4 #: core/templates/core/child_confirm_delete.html:4
msgid "Delete a Child" msgid "Delete a Child"
@ -1696,20 +1694,22 @@ msgstr ""
msgid "0 days" msgid "0 days"
msgstr "" msgstr ""
#: core/templatetags/duration.py:111 #: core/templatetags/duration.py:110
#: dashboard/templates/cards/diaperchange_types.html:50
#, python-format
msgid "%(days_ago)s days ago"
msgstr ""
#: core/templatetags/duration.py:113
#: dashboard/templates/cards/diaperchange_types.html:46 #: dashboard/templates/cards/diaperchange_types.html:46
msgid "today" msgid "today"
msgstr "" msgstr ""
#: core/templatetags/duration.py:113 #: core/templatetags/duration.py:115
#: dashboard/templates/cards/diaperchange_types.html:48 #: dashboard/templates/cards/diaperchange_types.html:48
msgid "yesterday" msgid "yesterday"
msgstr "" msgstr ""
#: core/templatetags/duration.py:116
msgid " days ago"
msgstr ""
#: core/timeline.py:54 #: core/timeline.py:54
#, python-format #, python-format
msgid "%(child)s started tummy time!" msgid "%(child)s started tummy time!"
@ -1756,10 +1756,9 @@ msgid "Temperature: %(temperature).0f"
msgstr "" msgstr ""
#: core/timeline.py:234 #: core/timeline.py:234
#, fuzzy, python-format #, python-format
#| msgid "%(child)s had a %(type)s diaper change."
msgid "%(child)s had a temperature measurement." msgid "%(child)s had a temperature measurement."
msgstr "%(child)s had a %(type)s nappy change." msgstr ""
#: core/utils.py:40 #: core/utils.py:40
#, python-format #, python-format
@ -1847,11 +1846,6 @@ msgstr ""
msgid "solid" msgid "solid"
msgstr "" msgstr ""
#: dashboard/templates/cards/diaperchange_types.html:50
#, python-format
msgid "%(key)s days ago"
msgstr ""
#: dashboard/templates/cards/feeding_last.html:6 #: dashboard/templates/cards/feeding_last.html:6
msgid "Last Feeding" msgid "Last Feeding"
msgstr "" msgstr ""
@ -1914,7 +1908,7 @@ msgstr ""
#: dashboard/templates/cards/sleep_recent.html:25 #: dashboard/templates/cards/sleep_recent.html:25
#, python-format #, python-format
msgid "%(counter)s sleep" msgid "%(counter)s sleep"
msgid_plural "%(counter)s sleep" msgid_plural "%(counter)s sleeps"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
@ -2049,8 +2043,6 @@ msgid "Total"
msgstr "" msgstr ""
#: reports/graphs/diaperchange_intervals.py:66 #: reports/graphs/diaperchange_intervals.py:66
#, fuzzy
#| msgid "<b>Diaper Change Amounts</b>"
msgid "<b>Diaper Change Intervals</b>" msgid "<b>Diaper Change Intervals</b>"
msgstr "<b>Nappy Change Amounts</b>" msgstr "<b>Nappy Change Amounts</b>"
@ -2202,10 +2194,8 @@ msgstr "Nappy Amounts"
#: reports/templates/reports/diaperchange_intervals.html:4 #: reports/templates/reports/diaperchange_intervals.html:4
#: reports/templates/reports/diaperchange_intervals.html:8 #: reports/templates/reports/diaperchange_intervals.html:8
#, fuzzy
#| msgid "Diaper Change Amounts"
msgid "Diaper Change Intervals" msgid "Diaper Change Intervals"
msgstr "Nappy Change Amounts" msgstr "Nappy Change Intervals"
#: reports/templates/reports/diaperchange_lifetimes.html:4 #: reports/templates/reports/diaperchange_lifetimes.html:4
#: reports/templates/reports/diaperchange_lifetimes.html:9 #: reports/templates/reports/diaperchange_lifetimes.html:9
@ -2249,10 +2239,8 @@ msgid "Diaper Change Amounts"
msgstr "Nappy Change Amounts" msgstr "Nappy Change Amounts"
#: reports/templates/reports/report_list.html:22 #: reports/templates/reports/report_list.html:22
#, fuzzy
#| msgid "Diaper Changes"
msgid "Diaper Intervals" msgid "Diaper Intervals"
msgstr "Nappy Changes" msgstr "Nappy Intervals"
#: reports/templates/reports/report_list.html:25 #: reports/templates/reports/report_list.html:25
msgid "Feeding Durations (Average)" msgid "Feeding Durations (Average)"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff