Fixed #803 (Groups not translated on user detail view and overview pdf)

This commit is contained in:
Emanuel Schuetze 2013-07-05 15:49:10 +02:00
parent 4625c4731d
commit 3fadb99ffd
2 changed files with 7 additions and 2 deletions

View File

@ -52,7 +52,12 @@
{{ shown_user.committee }} {{ shown_user.committee }}
<label>{% trans "Groups" %}</label> <label>{% trans "Groups" %}</label>
{% if shown_user.groups.all %} {% if shown_user.groups.all %}
{{ shown_user.groups.all|join:", " }} {% for group in shown_user.groups.all %}
{% if group.pk != 2 %}
{% trans group.name %}
{% if not forloop.last %}, {% endif %}
{% endif %}
{% endfor %}
{% else %} {% else %}
{% trans "The participant is not member of any group." %} {% trans "The participant is not member of any group." %}
{% endif %} {% endif %}

View File

@ -219,7 +219,7 @@ class ParticipantsListPDF(PDFView):
groups = '' groups = ''
for group in user.groups.all(): for group in user.groups.all():
if group.pk != 2: if group.pk != 2:
groups += "%s<br/>" % unicode(group) groups += "%s<br/>" % unicode(_(group.name))
data.append([ data.append([
counter, counter,
Paragraph(user.title, stylesheet['Tablecell']), Paragraph(user.title, stylesheet['Tablecell']),