def _notifications_for_activities(activities, user_dict):
 if (not activities):
  return []
 if (not user_dict.get('activity_streams_email_notifications')):
  return []
 subject = ungettext('{n} new activity from {site_title}', '{n} new activities from {site_title}', len(activities)).format(site_title=config.get('ckan.site_title'), n=len(activities))
 body = base.render('activity_streams/activity_stream_email_notifications.text', extra_vars={'activities': activities})
 notifications = [{'subject': subject, 'body': body}]
 return notifications

def _notifications_for_activities ( activities , user_dict ) : if ( not activities ) : return [ ] if ( not user_dict . get ( 'activity_streams_email_notifications' ) ) : return [ ] subject = ungettext ( '{n} new activity from {site_title}' , '{n} new activities from {site_title}' , len ( activities ) ) . format ( site_title = config . get ( 'ckan.site_title' ) , n = len ( activities ) ) body = base . render ( 'activity_streams/activity_stream_email_notifications.text' , extra_vars = { 'activities' : activities } ) notifications = [ { 'subject' : subject , 'body' : body } ] return notifications
return one or more email notifications covering the given activities .