def _get_translations():
 ctx = _request_ctx_stack.top
 if (ctx is None):
  return None
 if ('babel' not in ctx.app.extensions):
  return None
 translations = getattr(ctx, 'wtforms_translations', None)
 if (translations is None):
  dirname = messages_path()
  translations = support.Translations.load(dirname, [get_locale()], domain='wtforms')
  ctx.wtforms_translations = translations
 return translations

def _get_translations ( ) : ctx = _request_ctx_stack . top if ( ctx is None ) : return None if ( 'babel' not in ctx . app . extensions ) : return None translations = getattr ( ctx , 'wtforms_translations' , None ) if ( translations is None ) : dirname = messages_path ( ) translations = support . Translations . load ( dirname , [ get_locale ( ) ] , domain = 'wtforms' ) ctx . wtforms_translations = translations return translations
returns the correct gettext translations .