forked from jan/debianmemberportfolio
fix i18n of form validation messages
This commit is contained in:
parent
379feed21f
commit
9c641cb79c
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,9 @@ class DdportfolioController(BaseController):
|
|||
def handle_post(self):
|
||||
schema = DeveloperData()
|
||||
try:
|
||||
formencode.api.set_stdtranslation(
|
||||
domain="FormEncode",
|
||||
languages=[lang[0:2] for lang in request.languages])
|
||||
form_result = schema.to_python(request.params)
|
||||
except formencode.validators.Invalid, error:
|
||||
c.messages = { 'errors' : error.unpack_errors() }
|
||||
|
|
Loading…
Reference in a new issue