From 7960ac985f9b5a80063f21012d53793cb2d22dd9 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Wed, 10 Aug 2011 12:07:59 -0500 Subject: [PATCH] Converting all forms to use the "fake/null" gettext conversion function Gettext doesn't actually get run right in the form but we do need to wrap the strings in _() so stuff extracts :) --- mediagoblin/auth/forms.py | 2 +- mediagoblin/edit/forms.py | 2 +- mediagoblin/submit/forms.py | 2 +- mediagoblin/user_pages/forms.py | 9 ++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mediagoblin/auth/forms.py b/mediagoblin/auth/forms.py index 1b6bc7c2..917909c5 100644 --- a/mediagoblin/auth/forms.py +++ b/mediagoblin/auth/forms.py @@ -16,7 +16,7 @@ import wtforms -from mediagoblin.util import pass_to_ugettext as _ +from mediagoblin.util import fake_ugettext_passthrough as _ class RegistrationForm(wtforms.Form): diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py index 8052f482..2f3ed203 100644 --- a/mediagoblin/edit/forms.py +++ b/mediagoblin/edit/forms.py @@ -18,7 +18,7 @@ import wtforms from mediagoblin.util import tag_length_validator, TOO_LONG_TAG_WARNING -from mediagoblin.util import pass_to_ugettext as _ +from mediagoblin.util import fake_ugettext_passthrough as _ class EditForm(wtforms.Form): diff --git a/mediagoblin/submit/forms.py b/mediagoblin/submit/forms.py index ccb62a03..241d32dc 100644 --- a/mediagoblin/submit/forms.py +++ b/mediagoblin/submit/forms.py @@ -18,7 +18,7 @@ import wtforms from mediagoblin.util import tag_length_validator -from mediagoblin.util import pass_to_ugettext as _ +from mediagoblin.util import fake_ugettext_passthrough as _ class SubmitStartForm(wtforms.Form): diff --git a/mediagoblin/user_pages/forms.py b/mediagoblin/user_pages/forms.py index 8829b674..0489f76a 100644 --- a/mediagoblin/user_pages/forms.py +++ b/mediagoblin/user_pages/forms.py @@ -16,7 +16,10 @@ import wtforms +from mediagoblin.util import pass_to_ugettext as _ + + class MediaCommentForm(wtforms.Form): - comment_content = wtforms.TextAreaField( - 'Comment', - [wtforms.validators.Required()]) + comment_content = wtforms.TextAreaField( + _('Comment'), + [wtforms.validators.Required()]) -- 2.25.1