Commit aa396b70 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'fix/information-check' into 'master'

Fix translations for information check

See merge request thalia/concrexit!1015
parents c2962c40 0eee46ee
......@@ -12,7 +12,6 @@ from django.utils.translation import ugettext as _
from members.models import Member, Membership
logger = logging.getLogger(__name__)
......@@ -74,23 +73,27 @@ def send_information_request(dry_run=False):
member.email)
if not dry_run:
with translation.override(member.profile.language):
email_context = {
k: x if x else '' for k, x in {
'name': member.first_name,
'username': member.username,
'full_name': member.get_full_name(),
'address_street': member.profile.address_street,
'address_street2': member.profile.address_street2,
'address_postal_code':
member.profile.address_postal_code,
'address_city': member.profile.address_city,
'phone_number': member.profile.phone_number,
'birthday': member.profile.birthday,
'email': member.email,
'student_number': member.profile.student_number,
'starting_year': member.profile.starting_year,
'programme': member.profile.get_programme_display()
}.items()
}
email_body = loader.render_to_string(
'members/email/information_check.txt',
{'name': member.first_name,
'username': member.username,
'full_name': member.get_full_name(),
'address_street': member.profile.address_street,
'address_street2': member.profile.address_street2,
'address_postal_code':
member.profile.address_postal_code,
'address_city': member.profile.address_city,
'phone_number': member.profile.phone_number,
'birthday': member.profile.birthday,
'email': member.email,
'student_number': member.profile.student_number,
'starting_year': member.profile.starting_year,
'programme': member.profile.programme,
})
email_context)
mail.EmailMessage(
'[THALIA] {}'.format(
_('Membership information check')),
......
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-01 13:33+0200\n"
"PO-Revision-Date: 2018-10-01 13:34+0200\n"
"POT-Creation-Date: 2018-10-19 16:15+0200\n"
"PO-Revision-Date: 2018-10-19 16:15+0200\n"
"Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\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.1.1\n"
"X-Generator: Poedit 2.2\n"
#: admin.py
msgid "membership type"
......@@ -752,18 +752,18 @@ msgid ""
"We currently have the following information about you in our database.\n"
"Via this email we'd like to ask you to check the accuracy of this data.\n"
"\n"
"Username: %(member.username)s\n"
"Name: %(member.get_full_name)s\n"
"Address: %(member.profile.address_street)s\n"
" %(member.profile.address_street2)s\n"
" %(member.profile.address_postal_code)s\n"
" %(member.profile.address_city)s\n"
"Phone: %(member.profile.phone_number)s\n"
"Date of birth: %(member.profile.birthday)s\n"
"Email address: %(member.email)s\n"
"Student number: %(member.profile.student_number)s\n"
"Cohort: %(member.profile.starting_year)s\n"
"Programme: %(member.profile.programme)s\n"
"Username: %(username)s\n"
"Name: %(full_name)s\n"
"Address: %(address_street)s\n"
" %(address_street2)s\n"
" %(address_postal_code)s\n"
" %(address_city)s\n"
"Phone: %(phone_number)s\n"
"Date of birth: %(birthday)s\n"
"Email address: %(email)s\n"
"Student number: %(student_number)s\n"
"Cohort: %(starting_year)s\n"
"Programme: %(programme)s\n"
"\n"
"You can change this data by logging into the website and using the 'edit "
"profile' page.\n"
......@@ -784,18 +784,18 @@ msgstr ""
"geregistreerd\n"
"hebben. Wil je deze controleren op juistheid?\n"
"\n"
"Gebruikersnaam: %(member.username)s\n"
"Naam: %(member.get_full_name)s\n"
"Adres: %(member.profile.address_street)s\n"
" %(member.profile.address_street2)s\n"
" %(member.profile.address_postal_code)s\n"
" %(member.profile.address_city)s\n"
"Telefoonnummer: %(member.profile.phone_number)s\n"
"Geboortedatum: %(member.profile.birthday)s\n"
"Emailadres: %(member.email)s\n"
"Studentnummer: %(member.profile.student_number)s\n"
"Cohort: %(member.profile.starting_year)s\n"
"Programma: %(member.profile.programme)s\n"
"Gebruikersnaam: %(username)s\n"
"Naam: %(full_name)s\n"
"Adres: %(address_street)s\n"
" %(address_street2)s\n"
" %(address_postal_code)s\n"
" %(address_city)s\n"
"Telefoonnummer: %(phone_number)s\n"
"Geboortedatum: %(birthday)s\n"
"Emailadres: %(email)s\n"
"Studentnummer: %(student_number)s\n"
"Cohort: %(starting_year)s\n"
"Programma: %(programme)s\n"
"\n"
"Je kunt als je ingelogd bent via ‘Mijn gegevens’ de meeste van deze "
"gegevens\n"
......@@ -1018,3 +1018,6 @@ msgstr "Oud-lid"
#: views.py
msgid "Former benefactor"
msgstr "Oud-begunstiger"
#~ msgid "History"
#~ msgstr "Geschiedenis"
......@@ -2,19 +2,19 @@
We currently have the following information about you in our database.
Via this email we'd like to ask you to check the accuracy of this data.
{{ member }}
Username: {{ username|default_if_none:"" }}
Name: {{ name|default_if_none:"" }}
Address: {{ address_street|default_if_none:"" }}
{{ address_street2|default_if_none:"" }}
{{ address_postal_code|default_if_none:"" }}
{{ address_city|default_if_none:"" }}
Phone: {{ phone_number|default_if_none:"" }}
Date of birth: {{ birthday|default_if_none:"" }}
Email address: {{ email|default_if_none:"" }}
Student number: {{ student_number|default_if_none:"" }}
Cohort: {{ starting_year|default_if_none:"" }}
Programme: {{ programme|default_if_none:"" }}
Username: {{ username }}
Name: {{ full_name }}
Address: {{ address_street }}
{{ address_street2 }}
{{ address_postal_code }}
{{ address_city }}
Phone: {{ phone_number }}
Date of birth: {{ birthday }}
Email address: {{ email }}
Student number: {{ student_number }}
Cohort: {{ starting_year }}
Programme: {{ programme }}
You can change this data by logging into the website and using the 'edit profile' page.
Unable to edit the incorrect information? Then send an email: info@thalia.nu.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment