aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r--mediagoblin/edit/forms.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index a1783a72..2f3ed203 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -16,25 +16,28 @@
import wtforms
+
from mediagoblin.util import tag_length_validator, TOO_LONG_TAG_WARNING
+from mediagoblin.util import fake_ugettext_passthrough as _
class EditForm(wtforms.Form):
title = wtforms.TextField(
- 'Title',
+ _('Title'),
[wtforms.validators.Length(min=0, max=500)])
slug = wtforms.TextField(
- 'Slug',
- [wtforms.validators.Required(message="The slug can't be empty")])
+ _('Slug'),
+ [wtforms.validators.Required(message=_("The slug can't be empty"))])
description = wtforms.TextAreaField('Description of this work')
tags = wtforms.TextField(
- 'Tags',
+ _('Tags'),
[tag_length_validator])
class EditProfileForm(wtforms.Form):
- bio = wtforms.TextAreaField('Bio',
+ bio = wtforms.TextAreaField(
+ _('Bio'),
[wtforms.validators.Length(min=0, max=500)])
url = wtforms.TextField(
- 'Website',
+ _('Website'),
[wtforms.validators.Optional(),
- wtforms.validators.URL(message='Improperly formed URL')])
+ wtforms.validators.URL(message=_('Improperly formed URL'))])