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

Fixed WTForms babel integration

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