{% extends "base.html" %}

{% load i18n %}

{% block title %}{% trans "Translate News Article" %}{% endblock %}
{% block body-pageid %}news-edit{% endblock %}

{% block content %}

<form method="post" action=".">
{% csrf_token %}

{% if form.errors %}
<p class="error">{% trans "Please correct the errors below" %}: {{ form.errors }}</p>
{% endif %}

  <h2>{% trans "Translate News Article into" %} {{ language }}</h2>

    <table>
      <tr><th scope="col" colspan="2">{% trans "New Translation" %}</th><th>{% trans "Original" %}</th></tr>
      <tr><th scope="row">{% trans "Title" %}:</th><td>{{ form.title }}</td><td>{{ original.title }}</td>
      {% if form.title.errors %}<tr class="error"><td colspan="2">{{ form.title.errors|join:", " }}</td></tr>{% endif %}
      <tr><th scope="row">{% trans "Excerpt" %}:</th><td>{{ form.excerpt }}</td><td>{{ original.excerpt }}</td>
      {% if form.excerpt.errors %}<tr class="error"><td colspan="2">{{ form.except.errors|join:", " }}</td></tr>{% endif %}
      <tr><th scope="row">{% trans "Content" %}:</th><td>{{ form.content }}</td><td>{{ original.content }}</td>
      {% if form.content.errors %}<tr class="error"><td colspan="2">{{ form.content.errors|join:", " }}</td></tr>{% endif %}
    </table>

  <input type="submit" value="{% trans "Save Translation" %}"/>
  
</form>

{% endblock %}

