def _(msg, lang=None):
 from frappe.translate import get_full_dict
 if (not lang):
  lang = local.lang
 msg = as_unicode(msg).strip()
 return (get_full_dict(local.lang).get(msg) or msg)

def _ ( msg , lang = None ) : from frappe . translate import get_full_dict if ( not lang ) : lang = local . lang msg = as_unicode ( msg ) . strip ( ) return ( get_full_dict ( local . lang ) . get ( msg ) or msg )
returns translated string in current lang .