summaryrefslogtreecommitdiffstats
path: root/wallace/module_resources.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-07-10 05:06:42 -0400
committerThomas Bruederli <bruederli@kolabsys.com>2014-07-10 05:06:42 -0400
commitd13dd3849d09d1eaa4fdd906686cb1217cc23ad4 (patch)
tree2dda1d50c8ca262e32ae20811fae94988e2e4ca9 /wallace/module_resources.py
parenta44dcfb0690305fe42f3b374cef0fbced465d64d (diff)
downloadpykolab-d13dd3849d09d1eaa4fdd906686cb1217cc23ad4.tar.gz
Use localized participant status texts in resource replies
Diffstat (limited to 'wallace/module_resources.py')
-rw-r--r--wallace/module_resources.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index b99cf1a..dba2653 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -42,6 +42,7 @@ from pykolab.conf import Conf
from pykolab.imap import IMAP
from pykolab.xml import to_dt
from pykolab.xml import event_from_message
+from pykolab.xml import participant_status_label
from pykolab.itip import events_from_message
from pykolab.itip import check_event_conflict
from pykolab.translate import _
@@ -905,7 +906,7 @@ def reservation_response_text(status, owner):
*** This is an automated response, please do not reply! ***
We hereby inform you that your reservation was %s.
- """) % (_(status))
+ """) % (participant_status_label(status))
if owner:
message_text += _("""
@@ -950,7 +951,7 @@ def send_owner_notification(resource, owner, itip_event, success=True):
msg['To'] = owner['mail']
msg['From'] = resource['mail']
msg['Date'] = formatdate(localtime=True)
- msg['Subject'] = _('Booking for %s has been %s') % (resource['cn'], _(status) if success else _('failed'))
+ msg['Subject'] = _('Booking for %s has been %s') % (resource['cn'], participant_status_label(status) if success else _('failed'))
smtp = smtplib.SMTP("localhost", 10027)
@@ -986,7 +987,7 @@ def owner_notification_text(resource, owner, event, success):
'resource': resource['cn'],
'summary': event.get_summary(),
'date': event.get_date_text(),
- 'status': _(status),
+ 'status': participant_status_label(status),
'orgname': organizer.name(),
'orgemail': organizer.email()
}