Skip to content

Commit

Permalink
Merge pull request #620 from coders4help/release/v4.2.0
Browse files Browse the repository at this point in the history
Release `v4.2.0`
  • Loading branch information
christophmeissner authored Apr 14, 2022
2 parents 5217091 + b3c629d commit e6dcf9c
Show file tree
Hide file tree
Showing 62 changed files with 1,046 additions and 1,147 deletions.
2 changes: 1 addition & 1 deletion accounts/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RegistrationProfileAdmin(RegistrationAdmin):
def user_email(self, obj):
return obj.user.email

user_email.short_description = _("email")
user_email.short_description = _("e-mail address")
user_email.admin_order_field = "user__email"

def user_date_joined(self, obj):
Expand Down
4 changes: 2 additions & 2 deletions accounts/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def authenticate(self, request, username=None, password=None, **kwargs):
user = UserModel._default_manager.get(email__iexact=username)
return super().authenticate(request, user.username, password, **kwargs)
except UserModel.DoesNotExist:
logger.debug('No user with email address "%s"', username)
logger.debug('No user with e-mail address "%s"', username)
except UserModel.MultipleObjectsReturned:
logger.warning(
'Found %s users with email address "%s"',
'Found %s users with e-mail address "%s"',
UserModel._default_manager.filter(email=username).count(),
username,
)
Expand Down
14 changes: 14 additions & 0 deletions accounts/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django import forms
from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator
from django.utils.text import gettext_lazy as _

Expand Down Expand Up @@ -36,6 +37,19 @@ class RegistrationForm(RegistrationFormUniqueEmail):
],
)

email = forms.EmailField(label=_("e-mail address"))
email2 = forms.EmailField(label=_("repeat e-mail address"))

accept_privacy_policy = forms.BooleanField(
required=True, initial=False, label=_("Accept privacy policy")
)

def clean_email2(self):
email = self.cleaned_data.get("email")
email2 = self.cleaned_data.get("email2")
if email and email2 and email != email2:
raise ValidationError(
_("The two e-mail addresses didn’t match."),
code="email_mismatch",
)
return email2
7 changes: 5 additions & 2 deletions accounts/templates/user_account_delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
{% block content %}
<div class="col-md-8 col-md-offset-2">
<ul class="list-group">
<li class="list-group-item list-group-item-info">{% translate 'Username' %}: {{ user.username }}</li>
{% translate 'username' as username_label %}
{% translate 'e-mail address' as email_address_label %}

<li class="list-group-item list-group-item-info">{{ username_label|title }}: {{ user.username }}</li>
<li class="list-group-item list-group-item-info">{% translate 'First name' %}: {{ user.first_name }}</li>
<li class="list-group-item list-group-item-info">{% translate 'Last name' %}: {{ user.last_name }}</li>
<li class="list-group-item list-group-item-info">{% translate 'Email' %}: {{ user.email }}</li>
<li class="list-group-item list-group-item-info">{{ email_address_label|title }}: {{ user.email }}</li>
</ul>
{% translate 'If you delete your account, this information will be anonymized, and its not possible for you to log into Volunteer-Planner anymore.' %}
{% translate 'Its not possible to recover this information. If you want to work as volunteer again, you will have to create a new account.' %}
Expand Down
6 changes: 4 additions & 2 deletions accounts/templates/user_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
{% block content %}
<div class="col-md-8 col-md-offset-2">
<ul class="list-group">
<li class="list-group-item list-group-item-info">{% translate 'Username' %}: {{ user.username }}</li>
{% translate 'username' as username_label %}
{% translate 'e-mail address' as email_address_label %}
<li class="list-group-item list-group-item-info">{{ username_label|title }}: {{ user.username }}</li>
<li class="list-group-item list-group-item-info">{% translate 'First name' %}: {{ user.first_name }}</li>
<li class="list-group-item list-group-item-info">{% translate 'Last name' %}: {{ user.last_name }}</li>
<li class="list-group-item list-group-item-info">{% translate 'Email' %}: {{ user.email }}</li>
<li class="list-group-item list-group-item-info">{{ email_address_label|title }}: {{ user.email }}</li>
</ul>
<div>
<a href="{% url 'account_edit' %}" class="btn btn-default">{% translate 'Edit Account' %}</a>
Expand Down
8 changes: 6 additions & 2 deletions common/templatetags/site.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# coding: utf-8

# coding: utf-8

from django import template
from django import conf, template

from django.contrib.sites.shortcuts import get_current_site

Expand All @@ -12,3 +11,8 @@
@register.simple_tag
def request_site(request):
return get_current_site(request_site)


@register.simple_tag
def get_version():
return conf.settings.VERSION
61 changes: 27 additions & 34 deletions locale/ar/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
# Maha Abdulkaream Mohammad Sharaf, 2022
# Maha Abdulkaream Mohammad Sharaf, 2022
# Night Bird, 2022
# Night Bird, 2022
msgid ""
msgstr ""
"Project-Id-Version: volunteer-planner.org\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-13 23:55+0200\n"
"POT-Creation-Date: 2022-04-14 15:05+0200\n"
"PO-Revision-Date: 2015-09-24 12:23+0000\n"
"Last-Translator: Night Bird, 2022\n"
"Language-Team: Arabic (http://www.transifex.com/coders4help/volunteer-planner/language/ar/)\n"
Expand All @@ -25,7 +26,7 @@ msgstr "الاسم الأول "
msgid "last name"
msgstr "اسم العائلة"

msgid "email"
msgid "e-mail address"
msgstr "البريد الإلكتروني "

msgid "date joined"
Expand All @@ -49,9 +50,15 @@ msgstr "اسم المستخدم يجب أن ينتهي إما بحرف هجائ
msgid "Username must not contain consecutive \".\" or \"_\" characters."
msgstr "اسم المستخدم يجب ألّا يتضمن الرموز التالية \".\" أو \"_\" بشكل متتالي"

msgid "repeat e-mail address"
msgstr "البريد الإلكتروني "

msgid "Accept privacy policy"
msgstr "قَبُول سياسة الخصوصية"

msgid "The two e-mail addresses didn’t match."
msgstr ""

msgid "user account"
msgstr "حساب المستخدم"

Expand Down Expand Up @@ -97,7 +104,7 @@ msgstr "لا يوجد بعد مناوبات مقيدة"
msgid "Show my work shifts in the future"
msgstr "عرض فترات مناوباتي القادمة"

msgid "Username"
msgid "username"
msgstr "اسم المستخدم "

msgid "First name"
Expand All @@ -106,9 +113,6 @@ msgstr "الاسم الأول "
msgid "Last name"
msgstr "اللقب"

msgid "Email"
msgstr "البريد الإلكتروني"

msgid "If you delete your account, this information will be anonymized, and its not possible for you to log into Volunteer-Planner anymore."
msgstr "إذا قمت بحذف حسابك, ستصبح هذه المعلومات مجهولة المصدر, ولن يكون بإمكانك تسجيل الدخول volunteer- بعد الآن planner.org"

Expand Down Expand Up @@ -469,8 +473,8 @@ msgstr "مجانا, دون إعلانات"

msgid ""
"\n"
" <p> The platform was build by a group of volunteering professionals in the area of software development, project management, design,\n"
" and marketing. The code is open sourced for non-commercial use. Private data (emailaddresses, profile data etc.) will be not given to any third party.</p>\n"
" <p> The platform was built by a group of volunteering professionals in the area of software development, project management, design,\n"
" and marketing. The code is open sourced for non-commercial use. Private data (e-mail addresses, profile data etc.) will be not given to any third party.</p>\n"
" "
msgstr ""

Expand Down Expand Up @@ -900,7 +904,7 @@ msgstr ""
msgid "Covered"
msgstr ""

msgid "Send email to all volunteers"
msgid "Send e-mail to all volunteers"
msgstr "إرسال بريد إلكتروني إلى جميع المتطوعين"

msgid "Drop out"
Expand Down Expand Up @@ -995,10 +999,10 @@ msgstr ""
msgid "You successfully left this shift."
msgstr ""

msgid "You have no permissions to send emails!"
msgid "You have no permissions to send e-mails!"
msgstr ""

msgid "Email has been sent."
msgid "E-mail has been sent."
msgstr "تم إرسال البريد الإلكتروني"

#, python-brace-format
Expand Down Expand Up @@ -1045,10 +1049,6 @@ msgstr ""
msgid "shift template"
msgstr ""

#, python-brace-format
msgid "{task_name} - {workplace_name}"
msgstr ""

msgid "Home"
msgstr "الصفحة الرئيسية "

Expand Down Expand Up @@ -1208,13 +1208,6 @@ msgstr ""
msgid "Your account is now approved. You can log in using the following link"
msgstr "تم تفعيل حسابك الآن. يمكنك تسجيل الدخول باستخدام الرابط التالي"

msgid "Email address"
msgstr "البريد الإلكتروني "

#, python-format
msgid "%(email_trans)s / %(username_trans)s"
msgstr ""

msgid "Password"
msgstr "كلمة المرور "

Expand All @@ -1233,9 +1226,6 @@ msgstr "تم تغيير كلمة المرور بنجاح "
msgid "Change Password"
msgstr "قم بتغيير كلمة المرور "

msgid "Change password"
msgstr "تغيير كلمة المرور"

msgid "Password reset complete"
msgstr "اعادة تعيين كلمة المرور تم بنجاح"

Expand All @@ -1257,15 +1247,15 @@ msgstr "ادخل كلمة المرور الجديدة لإعادة تعيين ك
msgid "Password reset"
msgstr "إعادة تعيين كلمة المرور"

msgid "We sent you an email with a link to reset your password."
msgid "We sent you an e-mail with a link to reset your password."
msgstr "تم إرسال بريد إلكتروني يحتوي على رابط لإعادة تعيين كلمة المرور الخاصة بك"

msgid "Please check your email and click the link to continue."
msgid "Please check your e-mails and click the link to continue."
msgstr "يرجى التحقق من بريدك الإلكتروني والنقر على الرابط للمتابعة"

#, python-format
msgid ""
"You are receiving this email because you (or someone pretending to be you)\n"
"You are receiving this e-mail because you (or someone pretending to be you)\n"
"requested that your password be reset on the %(domain)s site. If you do not\n"
"wish to reset your password, please ignore this message.\n"
"\n"
Expand All @@ -1288,13 +1278,13 @@ msgstr "إعادة تعيين كلمة المرور"
msgid "No Problem! We'll send you instructions on how to reset your password."
msgstr ""

msgid "Activation email sent"
msgid "Activation e-mail sent"
msgstr "تم إرسال بريد التفعيل"

msgid "An activation mail will be sent to you email address."
msgid "An activation e-mail will be sent to your e-mail address."
msgstr "سيتم إرسال بريد التفعيل إلى عنوان بريدك الإلكتروني"

msgid "Please confirm registration with the link in the email. If you haven't received it in 10 minutes, look for it in your spam folder."
msgid "Please confirm registration with the link in the e-mail. If you haven't received it in 10 minutes, look for it in your spam folder."
msgstr "الرجاء تأكيد تسجيلك بواسطة الضغط على الرابط في البريد الإلكتروني. في حال عدم تلقي البريد الإلكتروني خلال 10 دقائق يرجى البحث في مجلد البريد العشوائي"

msgid "Register for an account"
Expand All @@ -1308,14 +1298,17 @@ msgstr ""
msgid "Create a new account"
msgstr "إنشاء حساب جديد"

msgid "Volunteer-Planner and shelters will send you emails concerning your shifts."
msgstr ""

msgid "Your username will be visible to other users. Don't use spaces or special characters."
msgstr ""
"اسم المستخدم الخاص بك سيكون مرئيا للآخرين.\n"
"يجب عدم استخدام مسافات أو أحرفا خاصة."

msgid "Volunteer Planner and event organizers might send you e-mails concerning your volunteer work."
msgstr ""

msgid "Please repeat your e-mail address."
msgstr ""

msgid "Repeat password"
msgstr "يرجى إعادة إدخال كلمة المرور"

Expand Down
Loading

0 comments on commit e6dcf9c

Please sign in to comment.