Skip to content

Commit

Permalink
Merge pull request #403 from coders4help/develop
Browse files Browse the repository at this point in the history
Merge v3.1.1 from develop in master
klinger authored Feb 6, 2017
2 parents 6d7e97a + 734b409 commit 8a44645
Showing 12 changed files with 7,759 additions and 1,101 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file.

## [Unreleased]
### Added

### Changed

### Fixed

### Removed

## [3.1.1] - 2017-02-06
### Added
*added french translation
*added portuguese translation (not fully translated yet)
*added turkish translation (not fully translated yet)

### Changed
*updated all existing translations (massive improvements in translation)

### Fixed
- fix #398: deleting a non-past shift failed hard when trying to gather information about email about to be sent

### Removed

## [3.1.0] - 2016-10-10
### Added
- [UI] Display a warning when joining overlapping shifts #395
- [UI] shift managers can see the e-mail address of approved and pending facility members to contact them
- enhancements to the excel document that is sent to shift managers
540 changes: 264 additions & 276 deletions locale/de/LC_MESSAGES/django.po

Large diffs are not rendered by default.

501 changes: 231 additions & 270 deletions locale/el/LC_MESSAGES/django.po

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-12 16:20+0200\n"
"POT-Creation-Date: 2017-02-06 20:47+0100\n"
"PO-Revision-Date: 2015-10-04 21:53+0000\n"
"Last-Translator: Dorian Cantzen <[email protected]>\n"
"Language-Team: English (http://www.transifex.com/coders4help/volunteer-planner/language/en/)\n"
@@ -1633,13 +1633,25 @@ msgid "German"
msgstr ""

#: volunteer_planner/settings/base.py:144
msgid "Greek"
msgid "French"
msgstr ""

#: volunteer_planner/settings/base.py:145
msgid "Hungarian"
msgid "Greek"
msgstr ""

#: volunteer_planner/settings/base.py:146
msgid "Hungarian"
msgstr ""

#: volunteer_planner/settings/base.py:147
msgid "Swedish"
msgstr ""

#: volunteer_planner/settings/base.py:148
msgid "Portuguese"
msgstr ""

#: volunteer_planner/settings/base.py:149
msgid "Turkish"
msgstr ""
1,730 changes: 1,730 additions & 0 deletions locale/es/LC_MESSAGES/django.po

Large diffs are not rendered by default.

1,757 changes: 1,757 additions & 0 deletions locale/fr/LC_MESSAGES/django.po

Large diffs are not rendered by default.

431 changes: 169 additions & 262 deletions locale/hu/LC_MESSAGES/django.po

Large diffs are not rendered by default.

1,659 changes: 1,659 additions & 0 deletions locale/pt/LC_MESSAGES/django.po

Large diffs are not rendered by default.

495 changes: 225 additions & 270 deletions locale/sv/LC_MESSAGES/django.po

Large diffs are not rendered by default.

1,658 changes: 1,658 additions & 0 deletions locale/tr/LC_MESSAGES/django.po

Large diffs are not rendered by default.

45 changes: 25 additions & 20 deletions scheduler/signals.py
Original file line number Diff line number Diff line change
@@ -24,27 +24,32 @@ def send_email_notifications(sender, instance, **kwargs):
Also: No try/except
sender : request.user
sender : request.user # WTF? Is that a wish? A question? A prayer? :/
"""
shift = instance
if shift.ending_time >= datetime.now():
subject = u'Schicht am {} wurde abgesagt'.format(
shift.starting_time.strftime('%d.%m.%y'))

message = render_to_string('shift_cancellation_notification.html',
dict(shift=shift))

from_email = settings.DEFAULT_FROM_EMAIL
reply_to = sender.email
addresses = shift.helpers.values_list('user__email', flat=True)

if addresses:
mail = EmailMessage(subject=subject, body=message,
to=['support@volunteer-planner.org'],
from_email=from_email,
bcc=addresses,
reply_to=reply_to)
mail.send()
try:
shift = instance
if shift.ending_time >= datetime.now():
subject = u'Schicht am {} wurde abgesagt'.format(
shift.starting_time.strftime('%d.%m.%y'))

message = render_to_string('shift_cancellation_notification.html',
dict(shift=shift))

from_email = settings.DEFAULT_FROM_EMAIL
# TODO Find a way to identify current manager or give facility an e-mail address
reply_to = ['support@volunteer-planner.org']
addresses = shift.helpers.values_list('user__email', flat=True)

if addresses:
mail = EmailMessage(subject=subject, body=message,
to=['support@volunteer-planner.org'],
from_email=from_email,
bcc=addresses,
reply_to=reply_to)
mail.send()
except Exception as e:
logger.exception("Error sending notification email (Shift: %s)" % instance)
pass


def times_changed(shift, old_shift, grace=timedelta(minutes=5)):
3 changes: 3 additions & 0 deletions volunteer_planner/settings/base.py
Original file line number Diff line number Diff line change
@@ -141,9 +141,12 @@
LANGUAGES = (
('en', _('English')),
('de', _('German')),
('fr', _('French')),
('el', _('Greek')),
('hu', _('Hungarian')),
('sv', _('Swedish')),
('pt', _('Portuguese')),
('tr', _('Turkish'))
)

LOCALE_PATHS = (

0 comments on commit 8a44645

Please sign in to comment.