Commit 1e209b0a authored by Serge S. Koval's avatar Serge S. Koval

Fixed WTForms babel integration

parent bacca152
......@@ -15,10 +15,10 @@ except ImportError:
class Translations(object):
''' dummy Translations class for WTForms, no translation support '''
def gettext(self, string):
return gettext(string)
return string
def ngettext(self, singular, plural, n):
return ngettext(singular, plural, n)
return singular if num == 1 else plural
else:
from flask_admin import translations
......
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