We planned to upgrade GitLab and Mattermost to the latest version this Friday morning. Expect some downtime!

Commit 9f44e25c authored by Thijs de Jong's avatar Thijs de Jong Committed by Sébastiaan Versteeg

Change all textual mentions of supporter to benefactor

parent 0fac9c0a
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-17 10:02+0200\n"
"PO-Revision-Date: 2018-09-17 10:58+0200\n"
"POT-Creation-Date: 2018-09-28 13:44+0200\n"
"PO-Revision-Date: 2018-09-28 13:45+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -154,7 +154,7 @@ msgstr ""
#: templates/admin/mailinglists/change_list.html
msgid ""
"Archived moderated list that can be used to send mail to all supporters. "
"Archived moderated list that can be used to send mail to all benefactors. "
"Supports language code suffix."
msgstr ""
"Gearchiveerde en gemodereerde lijst die gebruikt kan worden om mail naar "
......
......@@ -2,7 +2,7 @@ from django.conf import settings
from django.utils import timezone
from activemembers.models import MemberGroupMembership, Mentorship, Board
from members.models import Member
from members.models import Member, Membership
from utils.snippets import datetime_to_lectureyear
......@@ -36,8 +36,8 @@ def get_automatic_lists():
['leden', 'members'], '[THALIA]',
Member.all_with_membership('member'), True, True, True)
lists += _create_automatic_list(
['begunstigers', 'supporters'], '[THALIA]', Member.all_with_membership(
'supporter'), multilingual=True)
['begunstigers', 'benefactors'], '[THALIA]', Member.all_with_membership(
Membership.BENEFACTOR), multilingual=True)
lists += _create_automatic_list(
['ereleden', 'honorary'], '[THALIA]', Member.all_with_membership(
'honorary'), multilingual=True)
......
......@@ -30,8 +30,8 @@
</tr>
<tr>
<td></td>
<td>begunstigers, supporters</td>
<td>{% trans "Archived moderated list that can be used to send mail to all supporters. Supports language code suffix." %}</td>
<td>begunstigers, benefactors</td>
<td>{% trans "Archived moderated list that can be used to send mail to all benefactors. Supports language code suffix." %}</td>
</tr>
<tr>
<td></td>
......
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-31 17:06+0200\n"
"PO-Revision-Date: 2018-09-26 20:12+0200\n"
"POT-Creation-Date: 2018-09-28 13:58+0200\n"
"PO-Revision-Date: 2018-09-28 13:58+0200\n"
"Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -373,7 +373,7 @@ msgid "Member"
msgstr "Lid"
#: models.py
msgid "Supporter"
msgid "Benefactor"
msgstr "Begunstiger"
#: models.py
......@@ -1020,5 +1020,5 @@ msgid "Former member"
msgstr "Oud-lid"
#: views.py
msgid "Former supporter"
msgid "Former benefactor"
msgstr "Oud-begunstiger"
# Generated by Django 2.0.8 on 2018-09-28 12:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('members', '0024_auto_20180907_1528'),
]
operations = [
migrations.AlterField(
model_name='membership',
name='type',
field=models.CharField(choices=[('member', 'Member'), ('supporter', 'Benefactor'), ('honorary', 'Honorary Member')], max_length=40, verbose_name='Membership type'),
),
]
......@@ -513,12 +513,12 @@ class Profile(models.Model):
class Membership(models.Model):
MEMBER = 'member'
SUPPORTER = 'supporter'
BENEFACTOR = 'supporter'
HONORARY = 'honorary'
MEMBERSHIP_TYPES = (
(MEMBER, _('Member')),
(SUPPORTER, _('Supporter')),
(BENEFACTOR, _('Benefactor')),
(HONORARY, _('Honorary Member')))
type = models.CharField(
......
......@@ -59,7 +59,7 @@ $(function () {
name: gettext('Members'),
y: total_stats_member_type.member
},{
name: gettext('Supporters'),
name: gettext('Benefactors'),
y: total_stats_member_type.supporter
},{
name: gettext('Honorary Members'),
......@@ -139,12 +139,12 @@ $(function () {
});
$('#supportersYearChart').highcharts({
$('#benefactorsYearChart').highcharts({
chart: {
type: 'pie'
},
title: {
text: gettext("Supporters per year"),
text: gettext("Benefactors per year"),
},
plotOptions: {
pie: pieOptions
......
......@@ -13,7 +13,7 @@
<div id="membersTypeChart" style="width:100%; height:400px;"></div>
<div id="totalYearChart" style="width:100%; height:400px;"></div>
<div id="membersYearChart" style="width:100%; height:400px;"></div>
<div id="supportersYearChart" style="width:100%; height:400px;"></div>
<div id="benefactorsYearChart" style="width:100%; height:400px;"></div>
<div id="pizzaTotalTypeChart" style="width:100%; height:400px;"></div>
{% if current_pizza_orders != 'null' %} {# None is json-serialized to 'null' #}
<div id="pizzaCurrentTypeChart" style="width:100%; height:400px;"></div>
......
......@@ -112,20 +112,20 @@ class EmailsTest(TestCase):
since=timezone.now().replace(year=2017, month=9, day=6),
until=None
)
cls.supporter = Member.objects.create(
cls.benefactor = Member.objects.create(
username='test6',
first_name='Test6',
last_name='Example',
email='test6@example.org'
)
Membership.objects.create(
user=cls.supporter,
type=Membership.SUPPORTER,
user=cls.benefactor,
type=Membership.BENEFACTOR,
since=timezone.now().replace(year=2017, month=9, day=1),
until=timezone.now().replace(year=2018, month=9, day=1)
)
Profile.objects.create(
user=cls.supporter,
user=cls.benefactor,
language='nl',
)
cls.honorary_member = Member.objects.create(
......
......@@ -156,26 +156,26 @@ class MembershipFilterTest(TestCase):
profiles = [Profile(user_id=i) for i in range(7)]
Profile.objects.bulk_create(profiles)
Membership(user_id=0, type='honorary',
Membership(user_id=0, type=Membership.HONORARY,
until=date.today() + timedelta(days=1)).save()
Membership(user_id=1, type='supporter',
Membership(user_id=1, type=Membership.BENEFACTOR,
until=date.today() + timedelta(days=1)).save()
Membership(user_id=2, type='member',
Membership(user_id=2, type=Membership.MEMBER,
until=date.today() + timedelta(days=1)).save()
Membership(user_id=3, type='member',
Membership(user_id=3, type=Membership.MEMBER,
until=date.today() + timedelta(days=1)).save()
Membership(user_id=3, type='member',
Membership(user_id=3, type=Membership.MEMBER,
until=date.today() - timedelta(days=365*10)).save()
Membership(user_id=4, type='supporter',
Membership(user_id=4, type=Membership.BENEFACTOR,
until=date.today() + timedelta(days=1)).save()
Membership(user_id=4, type='member',
Membership(user_id=4, type=Membership.MEMBER,
until=date.today() - timedelta(days=365*10)).save()
Membership(user_id=5, type='member',
Membership(user_id=5, type=Membership.MEMBER,
until=date.today() - timedelta(days=365*10)).save()
# user_id=6 has no memberships at all
......
......@@ -19,7 +19,7 @@ class StatisticsTest(TestCase):
# Add 10 members with default membership
members = [Member(id=i, username=i) for i in range(10)]
Member.objects.bulk_create(members)
memberships = [Membership(user_id=i, type="member")
memberships = [Membership(user_id=i, type=Membership.MEMBER)
for i in range(10)]
Membership.objects.bulk_create(memberships)
profiles = [Profile(user_id=i) for i in range(10)]
......@@ -35,7 +35,7 @@ class StatisticsTest(TestCase):
return sum(members.values())
def test_gen_stats_year_no_members(self):
member_types = ["member", "supporter", "honorary"]
member_types = [t[0] for t in Membership.MEMBERSHIP_TYPES]
result = gen_stats_year(member_types)
self.assertEqual(0, self.sum_members(result))
......@@ -43,7 +43,7 @@ class StatisticsTest(TestCase):
"""
Testing if active and non-active objects are counted correctly
"""
member_types = ["member", "supporter", "honorary"]
member_types = [t[0] for t in Membership.MEMBERSHIP_TYPES]
current_year = datetime_to_lectureyear(date.today())
# Set start date to current year - 1:
......@@ -52,42 +52,42 @@ class StatisticsTest(TestCase):
m.profile.save()
result = gen_stats_year(member_types)
self.assertEqual(10, self.sum_members(result))
self.assertEqual(10, self.sum_members(result, "member"))
self.assertEqual(10, self.sum_members(result, Membership.MEMBER))
result = gen_stats_member_type(member_types)
self.assertEqual(10, self.sum_member_types(result))
# Change one membership to supporter should decrease amount of members
# Change one membership to benefactor should decrease amount of members
m = Membership.objects.all()[0]
m.type = "supporter"
m.type = Membership.BENEFACTOR
m.save()
result = gen_stats_year(member_types)
self.assertEqual(10, self.sum_members(result))
self.assertEqual(9, self.sum_members(result, "member"))
self.assertEqual(1, self.sum_members(result, "supporter"))
self.assertEqual(9, self.sum_members(result, Membership.MEMBER))
self.assertEqual(1, self.sum_members(result, Membership.BENEFACTOR))
result = gen_stats_member_type(member_types)
self.assertEqual(10, self.sum_member_types(result))
self.assertEqual(9, result["member"])
self.assertEqual(1, result["supporter"])
self.assertEqual(9, result[Membership.MEMBER])
self.assertEqual(1, result[Membership.BENEFACTOR])
# Same for honorary members
m = Membership.objects.all()[1]
m.type = "honorary"
m.type = Membership.HONORARY
m.save()
result = gen_stats_year(member_types)
self.assertEqual(10, self.sum_members(result))
self.assertEqual(8, self.sum_members(result, "member"))
self.assertEqual(1, self.sum_members(result, "supporter"))
self.assertEqual(1, self.sum_members(result, "honorary"))
self.assertEqual(8, self.sum_members(result, Membership.MEMBER))
self.assertEqual(1, self.sum_members(result, Membership.BENEFACTOR))
self.assertEqual(1, self.sum_members(result, Membership.HONORARY))
result = gen_stats_member_type(member_types)
self.assertEqual(10, self.sum_member_types(result))
self.assertEqual(8, result["member"])
self.assertEqual(1, result["supporter"])
self.assertEqual(1, result["honorary"])
self.assertEqual(8, result[Membership.MEMBER])
self.assertEqual(1, result[Membership.BENEFACTOR])
self.assertEqual(1, result[Membership.HONORARY])
# Terminate one membership by setting end date to current_year -1,
# should decrease total amount and total members
......@@ -96,18 +96,18 @@ class StatisticsTest(TestCase):
m.save()
result = gen_stats_year(member_types)
self.assertEqual(9, self.sum_members(result))
self.assertEqual(7, self.sum_members(result, "member"))
self.assertEqual(1, self.sum_members(result, "supporter"))
self.assertEqual(1, self.sum_members(result, "honorary"))
self.assertEqual(7, self.sum_members(result, Membership.MEMBER))
self.assertEqual(1, self.sum_members(result, Membership.BENEFACTOR))
self.assertEqual(1, self.sum_members(result, Membership.HONORARY))
result = gen_stats_member_type(member_types)
self.assertEqual(9, self.sum_member_types(result))
self.assertEqual(7, result["member"])
self.assertEqual(1, result["supporter"])
self.assertEqual(1, result["honorary"])
self.assertEqual(7, result[Membership.MEMBER])
self.assertEqual(1, result[Membership.BENEFACTOR])
self.assertEqual(1, result[Membership.HONORARY])
def test_gen_stats_different_years(self):
member_types = ["member", "supporter", "honorary"]
member_types = [t[0] for t in Membership.MEMBERSHIP_TYPES]
current_year = datetime_to_lectureyear(date.today())
# postgres does not define random access directly on unsorted querysets
......@@ -140,25 +140,25 @@ class StatisticsTest(TestCase):
# 4 active members
result = gen_stats_year(member_types)
self.assertEqual(4, self.sum_members(result))
self.assertEqual(4, self.sum_members(result, "member"))
self.assertEqual(4, self.sum_members(result, Membership.MEMBER))
# one first year student
self.assertEqual(1, result[0]['member'])
self.assertEqual(1, result[0][Membership.MEMBER])
# one second year student
self.assertEqual(1, result[1]['member'])
self.assertEqual(1, result[1][Membership.MEMBER])
# no third year students
self.assertEqual(0, result[2]['member'])
self.assertEqual(0, result[2][Membership.MEMBER])
# one fourth year student
self.assertEqual(1, result[3]['member'])
self.assertEqual(1, result[3][Membership.MEMBER])
# no fifth year students
self.assertEqual(0, result[4]['member'])
self.assertEqual(0, result[4][Membership.MEMBER])
# one >5 year student
self.assertEqual(1, result[5]['member'])
self.assertEqual(1, result[5][Membership.MEMBER])
class EmailChangeTest(TestCase):
......
......@@ -17,7 +17,7 @@ from rest_framework.response import Response
import pizzas.services
from members import services, emails
from members.models import EmailChange
from members.models import EmailChange, Membership
from . import models
from .forms import ProfileForm, EmailChangeForm
from .services import member_achievements
......@@ -150,7 +150,7 @@ def profile(request, pk=None):
elif member.has_been_member():
membership_type = _("Former member")
elif member.latest_membership:
membership_type = _("Former supporter")
membership_type = _("Former benefactor")
return render(request, 'members/profile.html',
{
......@@ -212,7 +212,7 @@ def iban_export(request):
@login_required
def statistics(request):
member_types = ("member", "supporter", "honorary")
member_types = (t[0] for t in Membership.MEMBERSHIP_TYPES)
# The numbers
total = models.Member.current_members.count()
......
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-28 16:51+0200\n"
"PO-Revision-Date: 2018-08-28 16:51+0200\n"
"POT-Creation-Date: 2018-09-28 14:01+0200\n"
"PO-Revision-Date: 2018-09-28 14:02+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.4\n"
"X-Generator: Poedit 2.1.1\n"
#: admin.py
msgid "Application information"
......@@ -136,7 +136,7 @@ msgstr "Voltooid"
msgid "status"
msgstr "status"
#: models.py
#: models.py templates/registrations/renewal.html
msgid "One year"
msgstr "Één jaar"
......@@ -144,7 +144,7 @@ msgstr "Één jaar"
msgid "Until graduation"
msgstr "Tot afstuderen"
#: models.py
#: models.py templates/registrations/renewal.html
msgid "membership length"
msgstr "lengte lidmaatschap"
......@@ -300,7 +300,7 @@ msgstr "Je kunt je lidmaatschap op dit moment niet verlengen."
#: models.py
msgid ""
"Supporters cannot have a membership that lasts their entire study duration."
"Benefactors cannot have a membership that lasts their entire study duration."
msgstr "Begunstigers kunnen geen lidmaatschap hebben dat loopt tot afstuderen."
#: models.py templates/registrations/renewal.html
......@@ -376,10 +376,10 @@ msgstr ""
msgid ""
"It is still possible to be associated with Thalia, even if you do not study "
"Computing Science or Information Sciences (anymore): You can become a "
"supporter. For at least € %(year_fees)s per year, you too can enjoy "
"benefactor. For at least € %(year_fees)s per year, you too can enjoy "
"everything Thalia has to offer. If you are not a former Thalia member, ICIS "
"staff member or alumni, you must submit a written along with two signatures "
"of current Thalia members. You can fill all of this in on the supporter "
"of current Thalia members. You can fill all of this in on the benefactor "
"form, which you can get at the board room (M1.0.08, ground floor of Mercator "
"1)."
msgstr ""
......@@ -688,10 +688,10 @@ msgid ""
"Sciences students at the Radboud University can become a member.<br/><br/> "
"It is still possible to be associated with Thalia, even if you do not study "
"Computing Science or Information Sciences (anymore): You can become a "
"supporter. For at least € %(year_fees)s per year, you too can enjoy "
"benefactor. For at least € %(year_fees)s per year, you too can enjoy "
"everything Thalia has to offer.<br /> <em>Note that this form is only for "
"member registration. Please visit the board room if you want to become a "
"supporter.</em>"
"benefactor.</em>"
msgstr ""
"Een lidmaatschap kost € %(year_fees)s per jaar, of € %(study_fees)s voor je "
"hele studieperiode.<br/>Let wel op: Je kunt alleen lid worden wanneer je "
......@@ -767,10 +767,10 @@ msgstr ""
msgid ""
"A membership costs € %(year_fees)s per year, or € %(study_fees)s for your "
"entire study duration.<br/> Note: Only Computing Science and Information "
"Sciences students at the Radboud University can become a member.<br/><br/> "
"Sciences students at the Radboud University can become a member.<br/> <br/> "
"It is still possible to be associated with Thalia, even if you do not study "
"Computing Science or Information Sciences (anymore): You can become a "
"supporter. For at least € %(year_fees)s per year, you too can enjoy "
"benefactor. For at least € %(year_fees)s per year, you too can enjoy "
"everything Thalia has to offer."
msgstr ""
"Een lidmaatschap kost € %(year_fees)s per jaar, of € %(study_fees)s voor je "
......@@ -831,7 +831,7 @@ msgstr ""
"verlengen."
#: templates/registrations/renewal.html
msgid "You're a supporter. Contact the board to renew your membership."
msgid "You're a benefactor. Contact the board to renew your membership."
msgstr ""
"Je bent een begunstiger. Neem contact op met het bestuur om je lidmaatschap "
"te verlengen."
......@@ -847,6 +847,10 @@ msgstr ""
"gestopt?<br/>Laat ons dat alsjeblieft weten door een mail te sturen naar "
"info@thalia.nu."
#: templates/registrations/renewal.html
msgid "Benefactor"
msgstr "Begunstiger"
#: templates/registrations/renewal_success.html
msgid "success"
msgstr "gelukt"
......
# Generated by Django 2.0.8 on 2018-09-28 12:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('registrations', '0010_auto_20180828_1610'),
]
operations = [
migrations.AlterField(
model_name='entry',
name='membership_type',
field=models.CharField(choices=[('member', 'Member'), ('supporter', 'Benefactor')], default='member', max_length=40, verbose_name='membership type'),
),
]
......@@ -271,12 +271,12 @@ class Registration(Entry):
'username': _('A user with that username already exists.')})
if (self.starting_year is None and
self.membership_type != Membership.SUPPORTER):
self.membership_type != Membership.BENEFACTOR):
errors.update({
'starting_year': _('This field is required.')})
if (self.programme is None and
self.membership_type != Membership.SUPPORTER):
self.membership_type != Membership.BENEFACTOR):
errors.update({
'programme': _('This field is required.')})
......@@ -344,10 +344,10 @@ class Renewal(Entry):
'length': _('You cannot renew your membership at this moment.')
})
if (self.membership_type == Membership.SUPPORTER and
if (self.membership_type == Membership.BENEFACTOR and
self.length == Entry.MEMBERSHIP_STUDY):
errors.update({
'length': _('Supporters cannot have a membership '
'length': _('Benefactors cannot have a membership '
'that lasts their entire study duration.')
})
......
......@@ -17,7 +17,7 @@
<h4>{% trans "I'm not a Computing Science and Information Sciences student at the Radboud University, but I do want to attend your events. Now what?" %}</h4>
<p>{% blocktrans %}It is still possible to be associated with Thalia, even if you do not study Computing Science or Information Sciences (anymore): You can become a supporter. For at least € {{ year_fees }} per year, you too can enjoy everything Thalia has to offer. If you are not a former Thalia member, ICIS staff member or alumni, you must submit a written along with two signatures of current Thalia members. You can fill all of this in on the supporter form, which you can get at the board room (M1.0.08, ground floor of Mercator 1).{% endblocktrans %}</p>
<p>{% blocktrans %}It is still possible to be associated with Thalia, even if you do not study Computing Science or Information Sciences (anymore): You can become a benefactor. For at least € {{ year_fees }} per year, you too can enjoy everything Thalia has to offer. If you are not a former Thalia member, ICIS staff member or alumni, you must submit a written along with two signatures of current Thalia members. You can fill all of this in on the benefactor form, which you can get at the board room (M1.0.08, ground floor of Mercator 1).{% endblocktrans %}</p>
<p>{% blocktrans %}Payment can be made both in cash or by card. If you have any other questions about Thalia and/or your membership, feel free to email <a href="mailto:info@thalia.nu" target="_blank">info@thalia.nu</a>!{% endblocktrans %}</p>
{% endblock %}
......@@ -17,8 +17,8 @@
{% blocktrans trimmed %}
A membership costs € {{ year_fees }} per year, or € {{ study_fees }} for your entire study duration.<br/>
Note: Only Computing Science and Information Sciences students at the Radboud University can become a member.<br/><br/>
It is still possible to be associated with Thalia, even if you do not study Computing Science or Information Sciences (anymore): You can become a supporter. For at least € {{ year_fees }} per year, you too can enjoy everything Thalia has to offer.<br />
<em>Note that this form is only for member registration. Please visit the board room if you want to become a supporter.</em>
It is still possible to be associated with Thalia, even if you do not study Computing Science or Information Sciences (anymore): You can become a benefactor. For at least € {{ year_fees }} per year, you too can enjoy everything Thalia has to offer.<br />
<em>Note that this form is only for member registration. Please visit the board room if you want to become a benefactor.</em>
{% endblocktrans %}
</p>
......
......@@ -12,7 +12,7 @@
Note: Only Computing Science and Information Sciences students at the Radboud University can become a member.<br/>
<br/>
It is still possible to be associated with Thalia, even if you do not study Computing Science or Information
Sciences (anymore): You can become a supporter. For at least € {{ year_fees }} per year, you too can enjoy
Sciences (anymore): You can become a benefactor. For at least € {{ year_fees }} per year, you too can enjoy
everything Thalia has to offer.
{% endblocktrans %}
</p>
......@@ -55,7 +55,7 @@
{% elif membership.type == 'supporter' and not was_member %}
<p class="tcenter">
{% blocktrans trimmed %}
You're a supporter. Contact the board to renew your membership.
You're a benefactor. Contact the board to renew your membership.
{% endblocktrans %}
</p>
{% elif membership.until is None %}
......@@ -85,7 +85,7 @@
<div class="control-group row">
<label class="control-label" for="id_membership_type">{% trans 'membership type'|capfirst %}:</label>
<div class="controls">
<input type="text" readonly disabled value="{% trans 'Supporter' %}"/>
<input type="text" readonly disabled value="{% trans 'Benefactor' %}"/>
</div>
</div>
<div class="control-group row">
......
......@@ -160,7 +160,7 @@ class RegistrationTest(TestCase):
"{'programme': ['This field is required.']}"
):
self.registration.clean()
self.registration.membership_type = Membership.SUPPORTER
self.registration.membership_type = Membership.BENEFACTOR
self.registration.clean()
def test_require_starting_year_members(self):
......@@ -170,7 +170,7 @@ class RegistrationTest(TestCase):
"{'starting_year': ['This field is required.']}"
):
self.registration.clean()
self.registration.membership_type = Membership.SUPPORTER
self.registration.membership_type = Membership.BENEFACTOR
self.registration.clean()
def test_save(self):
......@@ -269,9 +269,9 @@ class RenewalTest(TestCase):
self.renewal.clean()
def test_supporter_no_study_length(self):
def test_benefactor_no_study_length(self):
self.renewal.length = Entry.MEMBERSHIP_STUDY
self.renewal.membership_type = Membership.SUPPORTER
self.renewal.membership_type = Membership.BENEFACTOR
membership = self.member.latest_membership
membership.until = timezone.now()
membership.save()
......@@ -283,7 +283,7 @@ class RenewalTest(TestCase):
self.renewal.clean()
except ValidationError as e:
self.assertCountEqual(e.error_dict, {
'length': 'Supporters cannot have a membership '
'length': 'Benefactors cannot have a membership '
'that lasts their entire study duration.',
})
......
......@@ -493,12 +493,12 @@ class RenewalFormViewTest(TestCase):
with self.subTest('Benefactor type'):
request.POST = QueryDict()
request.member.latest_membership.type = Membership.SUPPORTER
request.member.latest_membership.type = Membership.BENEFACTOR
self.view.post(request)
request = super_post.call_args[0][0]
self.assertEqual(request.POST['member'], 2)
self.assertEqual(request.POST['membership_type'], Membership.SUPPORTER)
self.assertEqual(request.POST['membership_type'], Membership.BENEFACTOR)
self.assertEqual(request.POST['length'], Entry.MEMBERSHIP_YEAR)
@mock.patch('registrations.emails.send_new_renewal_board_message')
......
......@@ -181,8 +181,8 @@ class RenewalFormView(FormView):
def post(self, request, *args, **kwargs):
request.POST = request.POST.dict()
if request.member.latest_membership.type == Membership.SUPPORTER:
request.POST['membership_type'] = Membership.SUPPORTER
if request.member.latest_membership.type == Membership.BENEFACTOR:
request.POST['membership_type'] = Membership.BENEFACTOR
request.POST['length'] = Entry.MEMBERSHIP_YEAR
request.POST['member'] = request.member.pk
return super().post(request, *args, **kwargs)
......
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 11:18+0200\n"
"PO-Revision-Date: 2018-09-27 11:16+0200\n"
"POT-Creation-Date: 2018-09-28 14:05+0200\n"
"PO-Revision-Date: 2018-09-28 14:06+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -477,7 +477,7 @@ msgstr "Versie"
#: templates/singlepages/privacy_policy.html
msgid ""
"This document contains the privacy conditions of Study Association Thalia. "
"The conditions are applicable on all members, supporters and honorary "
"The conditions are applicable on all members, benefactors and honorary "
"members of Thalia. Where there are differences in the applicability of the "
"conditions on the mentioned groups this will be stated."
msgstr ""
......@@ -496,7 +496,7 @@ msgid ""
"otherwise. At the end of the membership the address information will be "
"deleted, the name, email address and history with Thalia will be collected "
"in the alumni database. The account on the Thalia-website will be "
"operational even after the end of the membership or supportership."
"operational even after the end of the membership or benefactorship."
msgstr ""
"Alle gegevens worden minstens voor de duur van het lidmaatschap opgeslagen, "
"tenzij anders aangegeven. Bij het aflopen van het lidmaatschap worden de "
......@@ -505,7 +505,7 @@ msgstr ""
"blijft ook na het lidmaatschap of begunstigerschap behouden."
#: templates/singlepages/privacy_policy.html
msgid "Applicable to members, supporters and honorary members:"
msgid "Applicable to members, benefactors and honorary members:"
msgstr "Op leden, begunstigers en ereleden van toepassing:"
#: templates/singlepages/privacy_policy.html
......@@ -514,7 +514,7 @@ msgstr "Voor- en achternaam"
#: templates/singlepages/privacy_policy.html
msgid ""
"Thalia uses the name of members, supporters and honorary members for its "
"Thalia uses the name of members, benefactors and honorary members for its "
"administration and for personalising its communication. Processing of these "
"data happens on the basis of it being necessary to fulfill the membership "
"agreement."
......@@ -530,7 +530,7 @@ msgstr "Adres"
#: templates/singlepages/privacy_policy.html
msgid ""
"Thalia uses the address of the members, supporters and honorary members for "
"Thalia uses the address of the members, benefactors and honorary members for "
"its administration and for sending the association magazine. Processing of "
"these data happens on the basis of it being necessary to fulfill the "
"membership agreement."
......@@ -546,7 +546,7 @@ msgstr "E-mailadres"