@cache_permission
def can_use_mt(user, translation):
 if (not appsettings.MACHINE_TRANSLATION_ENABLED):
  return False
 if (not has_group_perm(user, 'trans.use_mt', translation)):
  return False
 if check_owner(user, translation.subproject.project, 'trans.use_mt'):
  return True
 return (can_translate(user, translation) or can_suggest(user, translation))

@ cache_permission def can_use_mt ( user , translation ) : if ( not appsettings . MACHINE_TRANSLATION_ENABLED ) : return False if ( not has_group_perm ( user , 'trans.use_mt' , translation ) ) : return False if check_owner ( user , translation . subproject . project , 'trans.use_mt' ) : return True return ( can_translate ( user , translation ) or can_suggest ( user , translation ) )
checks whether user can use machine translation .