Skip to content

Commit

Permalink
Fixed #104 -- Added translator comments
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed Sep 30, 2016
1 parent 9e653bf commit 282eb83
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions django_comments/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class CommentDetailsForm(CommentSecurityForm):
name = forms.CharField(label=pgettext_lazy("Person name", "Name"), max_length=50)
email = forms.EmailField(label=_("Email address"))
url = forms.URLField(label=_("URL"), required=False)
# Translators: 'Comment' is a noun here.
comment = forms.CharField(label=_('Comment'), widget=forms.Textarea,
max_length=COMMENT_MAX_LENGTH)

Expand Down
14 changes: 9 additions & 5 deletions django_comments/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-29 16:05+0200\n"
"POT-Creation-Date: 2016-09-30 19:54+0200\n"
"PO-Revision-Date: 2012-02-14 13:24+0000\n"
"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
"Language-Team: English <en@li.org>\n"
Expand Down Expand Up @@ -40,8 +40,9 @@ msgstr "user's email address"
msgid "user's URL"
msgstr "user's URL"

#. Translators: 'comment' is a noun here.
#: django_comments/abstracts.py:66 django_comments/abstracts.py:86
#: django_comments/models.py:36
#: django_comments/models.py:37
msgid "comment"
msgstr "comment"

Expand Down Expand Up @@ -180,7 +181,8 @@ msgstr "Email address"
msgid "URL"
msgstr "URL"

#: django_comments/forms.py:104
#. Translators: 'Comment' is a noun here.
#: django_comments/forms.py:105
msgid "Comment"
msgstr "Comment"

Expand All @@ -202,7 +204,8 @@ msgid ""
msgstr ""
"If you enter anything in this field your comment will be treated as spam"

#: django_comments/models.py:38
#. Translators: 'flag' is a noun here.
#: django_comments/models.py:40
msgid "flag"
msgstr "flag"

Expand Down Expand Up @@ -312,6 +315,7 @@ msgstr[1] "Please correct the errors below"
msgid "Post your comment"
msgstr "Post your comment"

#: django_comments/templates/comments/preview.html:18
#. Translators: This string follows the 'Post your comment' submit button.
#: django_comments/templates/comments/preview.html:20
msgid "or make changes"
msgstr "or make changes"
2 changes: 2 additions & 0 deletions django_comments/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ class CommentFlag(models.Model):
on_delete=models.CASCADE,
)
comment = models.ForeignKey(
# Translators: 'comment' is a noun here.
Comment, verbose_name=_('comment'), related_name="flags", on_delete=models.CASCADE,
)
# Translators: 'flag' is a noun here.
flag = models.CharField(_('flag'), max_length=30, db_index=True)
flag_date = models.DateTimeField(_('date'), default=None)

Expand Down
6 changes: 4 additions & 2 deletions django_comments/templates/comments/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ <h1>{% blocktrans count counter=form.errors|length %}Please correct the error be
<h1>{% trans "Preview your comment" %}</h1>
<blockquote>{{ comment|linebreaks }}</blockquote>
<p>
{% trans "and" %} <input type="submit" name="submit" class="submit-post" value="{% trans "Post your comment" %}"
id="submit"/> {% trans "or make changes" %}:
{% trans "and" %} <input id="submit" type="submit" name="submit" class="submit-post"
value="{% trans "Post your comment" %}"/>
{# Translators: This string follows the 'Post your comment' submit button. #}
{% trans "or make changes" %}:
</p>
{% endif %}
{% for field in form %}
Expand Down

0 comments on commit 282eb83

Please sign in to comment.