<%! from django.utils.translation import ugettext as _, ungettext %>
<%def name="span(num)"><span>${num}</span></%def>
<div class="user-profile">
  <div class="sidebar-username"><a class="learner-profile-link" href="${learner_profile_page_url}">${django_user.username | h}</a></div>
  <div class="sidebar-user-roles">
      ${_(', ').join(sorted(set(map(_, [role.name for role in django_user.roles.all()]))))}
  </div>
  <div class="sidebar-threads-count">${ungettext('%s discussion started', '%s discussions started', profiled_user['threads_count']) % span(profiled_user['threads_count']) | h}</div>
  <div class="sidebar-comments-count">${ungettext('%s comment', '%s comments', profiled_user['comments_count']) % span(profiled_user['comments_count']) | h}</div>
</div>
