diff --git a/django/contrib/comments/templates/comments/form.html b/django/contrib/comments/templates/comments/form.html
index 183b668..3ac5247 100644
|
a
|
b
|
|
| 1 | 1 | {% load comments %} |
| | 2 | {% load i18n %} |
| 2 | 3 | <form action="{% comment_form_target %}" method="post"> |
| 3 | 4 | {% for field in form %} |
| 4 | 5 | {% if field.is_hidden %} |
| … |
… |
|
| 13 | 14 | {% endif %} |
| 14 | 15 | {% endfor %} |
| 15 | 16 | <p class="submit"> |
| 16 | | <input type="submit" name="submit" class="submit-post" value="Post" /> |
| 17 | | <input type="submit" name="submit" class="submit-preview" value="Preview" /> |
| | 17 | <input type="submit" name="post" class="submit-post" value="{% trans 'Post' %}" /> |
| | 18 | <input type="submit" name="preview" class="submit-preview" value="{% trans 'Preview' %}" /> |
| 18 | 19 | </p> |
| 19 | 20 | </form> |
diff --git a/django/contrib/comments/templates/comments/preview.html b/django/contrib/comments/templates/comments/preview.html
index 0947476..01aaaa2 100644
|
a
|
b
|
|
| 4 | 4 | |
| 5 | 5 | {% block content %} |
| 6 | 6 | {% load comments %} |
| | 7 | {% load i18n %} |
| 7 | 8 | <form action="{% comment_form_target %}" method="post"> |
| 8 | 9 | {% if form.errors %} |
| 9 | 10 | <h1>Please correct the error{{ form.errors|pluralize }} below</h1> |
| … |
… |
|
| 11 | 12 | <h1>Preview your comment</h1> |
| 12 | 13 | <blockquote>{{ comment|linebreaks }}</blockquote> |
| 13 | 14 | <p> |
| 14 | | and <input type="submit" name="submit" value="Post your comment" id="submit"> or make changes: |
| | 15 | and <input type="submit" name="post" value="{% trans 'Post your comment' %}" id="submit"> or make changes: |
| 15 | 16 | </p> |
| 16 | 17 | {% endif %} |
| 17 | 18 | {% for field in form %} |
| … |
… |
|
| 27 | 28 | {% endif %} |
| 28 | 29 | {% endfor %} |
| 29 | 30 | <p class="submit"> |
| 30 | | <input type="submit" name="submit" class="submit-post" value="Post"> |
| 31 | | <input type="submit" name="submit" class="submit-preview" value="Preview"> |
| | 31 | <input type="submit" name="post" class="submit-post" value="{% trans 'Post' %}"> |
| | 32 | <input type="submit" name="preview" class="submit-preview" value="{% trans 'Preview' %}"> |
| 32 | 33 | </p> |
| 33 | 34 | </form> |
| 34 | 35 | {% endblock %} |
diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py
index e583d9d..ea66f25 100644
|
a
|
b
|
def post_comment(request, next=None):
|
| 62 | 62 | (escape(ctype), escape(object_pk))) |
| 63 | 63 | |
| 64 | 64 | # Do we want to preview the comment? |
| 65 | | preview = data.get("submit", "").lower() == "preview" or \ |
| 66 | | data.get("preview", None) is not None |
| | 65 | preview = data.get("preview", None) is not None |
| 67 | 66 | |
| 68 | 67 | # Construct the comment form |
| 69 | 68 | form = comments.get_form()(target, data=data) |