From 5f742c60dbb0f575223a1ffb964242a8e858c43c Mon Sep 17 00:00:00 2001 From: moanos Date: Sat, 4 Jan 2025 09:50:32 +0100 Subject: [PATCH] fix: fix missing d otherwise throws unsupported format character 'W' (0x57) at index 13 --- src/fellchensammlung/tools/misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fellchensammlung/tools/misc.py b/src/fellchensammlung/tools/misc.py index abcc554..52524d4 100644 --- a/src/fellchensammlung/tools/misc.py +++ b/src/fellchensammlung/tools/misc.py @@ -40,15 +40,15 @@ def time_since_as_hr_string(age: datetime.timedelta) -> str: if years >= 1: text = ngettext( "vor einem Jahr", - "vor %(years) Tagen", + "vor %(years)d Tagen", years, ) % { "years": years, } elif months >= 3: - _("vor %(month) Monaten") % {"month": months} + _("vor %(month)d Monaten") % {"month": months} elif weeks >= 3: - text = _("vor %(weeks) Wochen") % {"weeks": weeks} + text = _("vor %(weeks)d Wochen") % {"weeks": weeks} else: if days == 0: text = _("Heute")