$def with (change, page=None)
$ work = change.get_work()
$ edition = change.get_edition()
$ author = change.get_author()
$if edition.publishers:
$ edition_name = "; ".join(edition.publishers)
$else:
$ edition_name = "Unknown publisher"
$if edition.publish_date:
$ edition_name = edition.publish_date + " " + truncate(edition_name, 20)
$if page and page.type.key == "/type/edition":
Added new edition.
$elif page and page.type.key == "/type/work":
Added new work.
$elif page and page.type.key == "/type/author":
Added new author.
$else:
$if author:
Added $edition_name edition of $work.title, and added a new author $author.name.
$else:
Added $edition_name edition of $work.title.