def fake_ugettext(translations):
 def _ugettext(text):
  return translations.get(text, text)
 return _ugettext

def fake_ugettext ( translations ) : def _ugettext ( text ) : return translations . get ( text , text ) return _ugettext
create a fake implementation of ugettext .