<%! from django.utils.translation import ugettext as _, ungettext %>
<%def name="span(num)"><span>${num}</span></%def>
<div class="user-profile">
  <div class="sidebar-username">${django_user.username | h}</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>
