mrjoes/flask-babelex — pull request #3 by djanku (2014-10-21 06:46:45+00:00)
Title: Update __init__.py

I've inserted return conditions in "gettext" family functions by reason of cause exceptions in flask-wtf extensions library. For example, Flask-WTF passing arguments to string after translation (in Length validator):

message = field.gettext('Field must be between %(min)d and %(max)d characters long.')
raise ValidationError(message % dict(min=self.min, max=self.max, length=l))

This cause KeyError exception, because "some string with %(arg)d" % {} is invoked. We need translated string primarily.