diff --git a/biscuit/apps/chronos/util.py b/biscuit/apps/chronos/util.py index fe5f203b31f722ee0e65fe9b115897c0b06705ca..3e5b4ed694234866613fde1648cb336b882bb73c 100644 --- a/biscuit/apps/chronos/util.py +++ b/biscuit/apps/chronos/util.py @@ -6,6 +6,7 @@ from typing import Optional, Sequence, Tuple from django.apps import apps from django.db import models +from django.utils.translation import ugettext as _ @dataclass @@ -29,6 +30,9 @@ class CalendarWeek: if not self.week: self.week = today.isoweekday() + def __str__(self) -> str: + return '%s (%s %s %s)' % (_('Kalenderwoche'), self[0], _('to'), self[-1]) + def __len__(self) -> int: return 7