From 8683c4c30d05155099dcb75e064721d6c2ad7c57 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Sat, 25 Oct 2014 12:08:11 +0200 Subject: [PATCH] Further language cleanup. --- docs/settings.rst | 2 +- dpaste/forms.py | 2 +- dpaste/models.py | 2 +- dpaste/templates/dpaste/snippet_details.html | 4 ++-- dpaste/views.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 46658f2..b52562c 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -61,7 +61,7 @@ behavior without touching the code: (3600 * 24 * 30 * 12 * 100, ugettext(u'100 Years')), ) - **One-time snippets** are supported. One time snippets are automatically + **One-time snippets** are supported. One-Time snippets are automatically deleted once a defined view count has reached (Default: ``2``). To enable one-time snippets you have to add a choice ``onetime`` to the expire choices:: diff --git a/dpaste/forms.py b/dpaste/forms.py index 703d1f5..b5e42a9 100644 --- a/dpaste/forms.py +++ b/dpaste/forms.py @@ -82,7 +82,7 @@ class SnippetForm(forms.ModelForm): def clean_content(self): content = self.cleaned_data.get('content', '') if content.strip() == '': - raise forms.ValidationError(_('Please fill out this field.')) + raise forms.ValidationError(_('This field is required.')) return content def clean_expires(self): diff --git a/dpaste/models.py b/dpaste/models.py index ac2e293..2e5d63f 100644 --- a/dpaste/models.py +++ b/dpaste/models.py @@ -35,7 +35,7 @@ class Snippet(models.Model): EXPIRE_CHOICES = ( (EXPIRE_TIME, _(u'Expire by timestamp')), (EXPIRE_KEEP, _(u'Keep Forever')), - (EXPIRE_ONETIME, _(u'One time snippet')), + (EXPIRE_ONETIME, _(u'One-Time snippet')), ) secret_id = models.CharField(_(u'Secret ID'), max_length=255, blank=True, null=True, diff --git a/dpaste/templates/dpaste/snippet_details.html b/dpaste/templates/dpaste/snippet_details.html index 6397c68..2f14c22 100644 --- a/dpaste/templates/dpaste/snippet_details.html +++ b/dpaste/templates/dpaste/snippet_details.html @@ -81,9 +81,9 @@

{% trans "This is a one-time snippet." %} {% if snippet.remaining_views > 1 %} - {% trans "It will automatically get deleted after {{ remaining }} further views." %} + {% blocktrans with remaining=snippet.remaining_views %}It is automatically removed after {{ remaining }} further views.{% endblocktrans %} {% elif snippet.remaining_views == 1 %} - {% trans "It will automatically get deleted after the next view." %} + {% trans "It is automatically removed after the next view." %} {% else %} {% trans "It cannot be viewed again." %} {% endif %} diff --git a/dpaste/views.py b/dpaste/views.py index 8bd1c78..1cd7891 100644 --- a/dpaste/views.py +++ b/dpaste/views.py @@ -67,7 +67,7 @@ def snippet_details(request, snippet_id, template_name='dpaste/snippet_details.h """ snippet = get_object_or_404(Snippet, secret_id=snippet_id) - # One time snippet get deleted if the view count matches our limit + # One-Time snippet get deleted if the view count matches our limit if snippet.expire_type == Snippet.EXPIRE_ONETIME \ and snippet.view_count >= ONETIME_LIMIT: snippet.delete()