$def with (book) $ status = book.waitlist_record.get('status', '')

$ ndays = book.waitlist_record.get_waiting_in_days() $ungettext("Waiting for %d day", "Waiting for %d days", ndays, ndays)

$if status == "waiting": $ wsize = book.waitlist_record.get_waitinglist_size() $ pos = book.waitlist_record.get_position() $if pos == 1: You are the next person to receive this book. $else: $ungettext("There is one person ahead of you in the waiting list.", "There are %(count)d people ahead of you in the waiting list.", pos-1, count=pos-1)
$book.waitinglist_record['status'].title()
$if status == "available": $ delta_hours = book.waitinglist_record.get_expiry_in_hours()
$if delta_hours == 0: $_("You have less than an hour to borrow it.") $else: $ungettext('You have %(count)d more hour to borrow it.', 'You have %(count)d more hours to borrow it.', delta_hours, count=delta_hours)
$if status == "available":
$_("Leave the waiting list?")