Commit 0fce18e3 authored by Serge S. Koval's avatar Serge S. Koval

Fixed wtforms babel domain

parent 216a66b6
......@@ -52,10 +52,12 @@ else:
class Translations(object):
''' Fixes WTForms translation support and uses wtforms translations '''
def gettext(self, string):
return wtforms_domain.gettext(string)
t = wtforms_domain.get_translations()
return t.ugettext(string)
def ngettext(self, singular, plural, n):
return wtforms_domain.ngettext(singular, plural, n)
t = wtforms_domain.get_translations()
return t.ungettext(singular, plural, n)
# lazy imports
......
......@@ -934,6 +934,7 @@ def test_form_args():
# ensure shared field_args don't create duplicate validators
create_form = view.create_form()
eq_(len(create_form.test.validators), 2)
edit_form = view.edit_form()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment