<li>
  <p>
    {% if change.method == "add_one_value" %}

      {{ _('Added field <q>{key}</q> with value <q>{value}</q> to {pkg_link}').format(
        pkg_link = h.nav_link(change.title, named_route='dataset.read', id=change.pkg_id),
        key = change.key,
        value = change.value
        )}}

    {% elif change.method == "add_one_no_value" %}

      {{ _('Added field <q>{key}</q> to {pkg_link}').format(
        pkg_link = h.nav_link(change.title, named_route='dataset.read', id=change.pkg_id),
        key = change.key
        )}}

    {% elif change.method == "add_multiple" %}

      {{ _('Added the following fields to {pkg_link}').format(
        pkg_link = h.nav_link(change.title, named_route='dataset.read', id=change.pkg_id)
        )}}
      <ul>
        {% for item in change.key_list %}
          <li>
            {% if change.value_list[item] != "" %}
              {{ _('{key} with value {value}').format(
                key = item,
                value = change.value_list[item]
                )|safe }}
            {% else %}
              {{ _('{key}').format(
                key = item
                )|safe }}
            {% endif %}
          </li>
        {% endfor %}
      </ul>

    {% elif change.method == "change_with_old_value" %}

      {{ _('Changed value of field <q>{key}</q> to <q>{new_val}</q> (previously <q>{old_val}</q>) in {pkg_link}').format(
        pkg_link = h.nav_link(change.title, named_route='dataset.read', id=change.pkg_id),
        key = change.key,
        new_val = change.new_value,
        old_val = change.old_value
        )}}

    {% elif change.method == "change_no_old_value" %}

      {{ _('Changed value of field <q>{key}</q> to <q>{new_val}</q> in {pkg_link}').format(
        pkg_link = h.nav_link(change.title, named_route='dataset.read', id=change.pkg_id),
        key = change.key,
        new_val = change.new_value,
        ) }}

    {% elif change.method == "remove_one" %}

      {{ _('Removed field <q>{key}</q> from {pkg_link}').format(
        pkg_link = h.nav_link(change.title, named_route='dataset.read', id=change.pkg_id),
        key = change.key,
        ) }}

    {% elif change.method == "remove_multiple" %}

      {{ _('Removed the following fields from {pkg_link}').format(
        pkg_link = h.nav_link(change.title, named_route='dataset.read', id=change.pkg_id)
        ) }}
      <ul>
        {% for item in change.key_list %}
          <li>
            {{ _('<q>{key}</q>').format(
                key = item
            )| safe }}
          </li>
        {% endfor %}
      </ul>

    {% else %}

      {{ _('No fields were updated. See the metadata diff for more details.') }}

    {% endif %}
  </p>
</li>
