Changeset 9119
- Timestamp:
- 10/05/08 00:09:21 (3 months ago)
- Files:
-
- django/trunk/django/contrib/comments/templates/comments/approved.html (modified) (1 diff)
- django/trunk/django/contrib/comments/templates/comments/approve.html (modified) (1 diff)
- django/trunk/django/contrib/comments/templates/comments/deleted.html (modified) (1 diff)
- django/trunk/django/contrib/comments/templates/comments/delete.html (modified) (1 diff)
- django/trunk/django/contrib/comments/templates/comments/flagged.html (modified) (1 diff)
- django/trunk/django/contrib/comments/templates/comments/flag.html (modified) (1 diff)
- django/trunk/django/contrib/comments/templates/comments/form.html (modified) (2 diffs)
- django/trunk/django/contrib/comments/templates/comments/moderation_queue.html (modified) (6 diffs)
- django/trunk/django/contrib/comments/templates/comments/posted.html (modified) (1 diff)
- django/trunk/django/contrib/comments/templates/comments/preview.html (modified) (3 diffs)
- django/trunk/django/contrib/comments/views/comments.py (modified) (2 diffs)
- django/trunk/tests/regressiontests/comment_tests/tests/comment_view_tests.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/comments/templates/comments/approved.html
r8557 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Thanks for approving.{% endblock %}4 {% block title %}{% trans "Thanks for approving" %}.{% endblock %} 4 5 5 6 {% block content %} 6 <h1> Thanks for taking the time to improve the quality of discussion on our site.</h1>7 <h1>{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.</h1> 7 8 {% endblock %} django/trunk/django/contrib/comments/templates/comments/approve.html
r9117 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Approve a comment{% endblock %}4 {% block title %}{% trans "Approve a comment" %}{% endblock %} 4 5 5 6 {% block content %} 6 <h1> Really make this comment public?</h1>7 <h1>{% trans "Really make this comment public?" %}</h1> 7 8 <blockquote>{{ comment|linebreaks }}</blockquote> 8 9 <form action="." method="post"> 9 10 <input type="hidden" name="next" value="{{ next }}" id="next" /> 10 11 <p class="submit"> 11 <input type="submit" name="submit" value=" Approve" /> or <a href="{{ comment.permalink }}">cancel</a>12 <input type="submit" name="submit" value="{% trans "Approve" %}" /> or <a href="{{ comment.permalink }}">cancel</a> 12 13 </p> 13 14 </form> django/trunk/django/contrib/comments/templates/comments/deleted.html
r8557 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Thanks for removing.{% endblock %}4 {% block title %}{% trans "Thanks for removing" %}.{% endblock %} 4 5 5 6 {% block content %} 6 <h1> Thanks for taking the time to improve the quality of discussion on our site.</h1>7 <h1>{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.</h1> 7 8 {% endblock %} django/trunk/django/contrib/comments/templates/comments/delete.html
r9117 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Remove a comment{% endblock %}4 {% block title %}{% trans "Remove a comment" %}{% endblock %} 4 5 5 6 {% block content %} 6 <h1>Really remove this comment?</h1>7 <h1>{% trans "Really remove this comment?" %}</h1> 7 8 <blockquote>{{ comment|linebreaks }}</blockquote> 8 9 <form action="." method="post"> 9 10 <input type="hidden" name="next" value="{{ next }}" id="next" /> 10 11 <p class="submit"> 11 <input type="submit" name="submit" value="Remove" /> or <a href="{{ comment.permalink }}">cancel</a>12 <input type="submit" name="submit" value="{% trans "Remove" %}" /> or <a href="{{ comment.permalink }}">cancel</a> 12 13 </p> 13 14 </form> django/trunk/django/contrib/comments/templates/comments/flagged.html
r8557 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Thanks for flagging.{% endblock %}4 {% block title %}{% trans "Thanks for flagging" %}.{% endblock %} 4 5 5 6 {% block content %} 6 <h1> Thanks for taking the time to improve the quality of discussion on our site.</h1>7 <h1>{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.</h1> 7 8 {% endblock %} django/trunk/django/contrib/comments/templates/comments/flag.html
r9117 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Flag this comment{% endblock %}4 {% block title %}{% trans "Flag this comment" %}{% endblock %} 4 5 5 6 {% block content %} 6 <h1>Really flag this comment?</h1>7 <h1>{% trans "Really flag this comment?" %}</h1> 7 8 <blockquote>{{ comment|linebreaks }}</blockquote> 8 9 <form action="." method="post"> 9 10 <input type="hidden" name="next" value="{{ next }}" id="next" /> 10 11 <p class="submit"> 11 <input type="submit" name="submit" value="Flag" /> or <a href="{{ comment.permalink }}">cancel</a>12 <input type="submit" name="submit" value="{% trans "Flag" %}" /> or <a href="{{ comment.permalink }}">cancel</a> 12 13 </p> 13 14 </form> django/trunk/django/contrib/comments/templates/comments/form.html
r9050 r9119 1 {% load comments %}1 {% load comments i18n %} 2 2 <form action="{% comment_form_target %}" method="post"> 3 3 {% for field in form %} … … 14 14 {% endfor %} 15 15 <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" />16 <input type="submit" name="post" class="submit-post" value="{% trans "Post" %}" /> 17 <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" /> 18 18 </p> 19 19 </form> django/trunk/django/contrib/comments/templates/comments/moderation_queue.html
r9117 r9119 1 1 {% extends "admin/change_list.html" %} 2 {% load adminmedia %}2 {% load adminmedia i18n %} 3 3 4 {% block title %} Comment moderation queue{% endblock %}4 {% block title %}{% trans "Comment moderation queue" %}{% endblock %} 5 5 6 6 {% block extrahead %} … … 17 17 18 18 {% block branding %} 19 <h1 id="site-name"> Comment moderation queue</h1>19 <h1 id="site-name">{% trans "Comment moderation queue" %}</h1> 20 20 {% endblock %} 21 21 … … 24 24 {% block content %} 25 25 {% if empty %} 26 <p id="nocomments">No comments to moderate.</p>26 <p id="nocomments">{% trans "No comments to moderate" %}.</p> 27 27 {% else %} 28 28 <div id="content-main"> … … 31 31 <thead> 32 32 <tr> 33 <th> Action</th>34 <th> Name</th>35 <th> Comment</th>36 <th> Email</th>37 <th> URL</th>38 <th> Authenticated?</th>39 <th> IP Address</th>40 <th class="sorted desc"> Date posted</th>33 <th>{% trans "Action" %}</th> 34 <th>{% trans "Name" %}</th> 35 <th>{% trans "Comment" %}</th> 36 <th>{% trans "Email" %}</th> 37 <th>{% trans "URL" %}</th> 38 <th>{% trans "Authenticated?" %}</th> 39 <th>{% trans "IP Address" %}</th> 40 <th class="sorted desc">{% trans "Date posted" %}</th> 41 41 </tr> 42 42 </thead> … … 47 47 <form action="{% url comments-approve comment.pk %}" method="post"> 48 48 <input type="hidden" name="next" value="{% url comments-moderation-queue %}" /> 49 <input class="approve submit" type="submit" name="submit" value=" Approve" />49 <input class="approve submit" type="submit" name="submit" value="{% trans "Approve" %}" /> 50 50 </form> 51 51 <form action="{% url comments-delete comment.pk %}" method="post"> 52 52 <input type="hidden" name="next" value="{% url comments-moderation-queue %}" /> 53 <input class="remove submit" type="submit" name="submit" value=" Remove" />53 <input class="remove submit" type="submit" name="submit" value="{% trans "Remove" %}" /> 54 54 </form> 55 55 </td> … … 61 61 <img 62 62 src="{% admin_media_prefix %}img/admin/icon-{% if comment.user %}yes{% else %}no{% endif %}.gif" 63 alt="{% if comment.user %} yes{% else %}no{% endif %}"63 alt="{% if comment.user %}{% trans "yes" %}{% else %}{% trans "no" %}{% endif %}" 64 64 /> 65 65 </td> django/trunk/django/contrib/comments/templates/comments/posted.html
r8557 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Thanks for commenting.{% endblock %}4 {% block title %}{% trans "Thanks for commenting" %}.{% endblock %} 4 5 5 6 {% block content %} 6 <h1> Thank you for your comment.</h1>7 <h1>{% trans "Thank you for your comment" %}.</h1> 7 8 {% endblock %} django/trunk/django/contrib/comments/templates/comments/preview.html
r9117 r9119 1 1 {% extends "comments/base.html" %} 2 {% load i18n %} 2 3 3 {% block title %} Preview your comment{% endblock %}4 {% block title %}{% trans "Preview your comment" %}{% endblock %} 4 5 5 6 {% block content %} … … 7 8 <form action="{% comment_form_target %}" method="post"> 8 9 {% if form.errors %} 9 <h1>Please correct the error{{ form.errors|pluralize }} below</h1>10 <h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1> 10 11 {% else %} 11 <h1>Preview your comment</h1>12 <h1>{% trans "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 {% trans "and" %} <input type="submit" name="submit" value="{% trans "Post your comment" %}" id="submit" /> {% trans "or make changes" %}: 15 16 </p> 16 17 {% 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="submit" class="submit-post" value="{% trans "Post" %}" /> 32 <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" /> 32 33 </p> 33 34 </form> django/trunk/django/contrib/comments/views/comments.py
r9118 r9119 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 = "preview" in data 67 66 68 67 # Construct the comment form … … 86 85 "comment" : form.data.get("comment", ""), 87 86 "form" : form, 88 }, 87 }, 89 88 RequestContext(request, {}) 90 89 ) django/trunk/tests/regressiontests/comment_tests/tests/comment_view_tests.py
r9118 r9119 46 46 a = Article.objects.get(pk=1) 47 47 data = self.getValidData(a) 48 data[" submit"] = "preview"48 data["preview"] = "Preview" 49 49 response = self.client.post("/post/", data) 50 50 self.assertEqual(response.status_code, 200)
