• {% set pkg_link = (h.url_for('dataset.read', id=change.pkg_id)) %} {# if both of them have URLs #} {% if change.new_url != "" and change.old_url != "" %} {{ _('Changed the license of ') }} {{ change.title }} {{ _('to') }} {{change.new_title}} {{ _('( previously') }} {{change.old_title}} {{_(')')}} {# if only the new one has a URL #} {% elif change.new_url != "" and change.old_url == "" %} {{ _('Changed the license of') }} {{change.title}} {{ _('to') }} {{change.new_title}} {{ _('(previously') + change.old_title + ' )'}} {# if only the old one has a URL #} {% elif change.new_url == "" and change.old_url != "" %} {{ _('Changed the license of') }} {{change.title}} {{ _('to') + change.new_title }} {{ _('( previously') }} {{change.old_title}} {{_(')')}} {# otherwise neither has a URL #} {% else %} {{ _('Changed the license of') }} {{change.title}} {{ _('to') + change.new_title}} {{ _('(previously') + change.old_title + _(')')|safe }} {% endif %}