1.1 --- a/imiptools/handlers/person.py Wed Nov 04 23:35:16 2015 +0100
1.2 +++ b/imiptools/handlers/person.py Thu Nov 05 00:58:02 2015 +0100
1.3 @@ -242,59 +242,75 @@
1.4
1.5 "Queue a suggested additional recurrence for any active event."
1.6
1.7 + _ = self.get_translator()
1.8 +
1.9 if self.allow_add() and self._process(self._add, queue=True):
1.10 - return self.wrap("An addition to an event has been received.")
1.11 + return self.wrap(_("An addition to an event has been received."))
1.12
1.13 def cancel(self):
1.14
1.15 "Queue a cancellation of any active event."
1.16
1.17 + _ = self.get_translator()
1.18 +
1.19 if self._cancel():
1.20 - return self.wrap("An event cancellation has been received.", link=False)
1.21 + return self.wrap(_("An event cancellation has been received."), link=False)
1.22
1.23 def counter(self):
1.24
1.25 "Record a counter-proposal to a proposed event."
1.26
1.27 + _ = self.get_translator()
1.28 +
1.29 if self._process(self._counter, from_organiser=False):
1.30 - return self.wrap("A counter proposal to an event invitation has been received.", link=True)
1.31 + return self.wrap(_("A counter proposal to an event invitation has been received."), link=True)
1.32
1.33 def declinecounter(self):
1.34
1.35 "Record a rejection of a counter-proposal."
1.36
1.37 + _ = self.get_translator()
1.38 +
1.39 if self._process(self._declinecounter):
1.40 - return self.wrap("Your counter proposal to an event invitation has been declined.", link=True)
1.41 + return self.wrap(_("Your counter proposal to an event invitation has been declined."), link=True)
1.42
1.43 def publish(self):
1.44
1.45 "Register details of any relevant event."
1.46
1.47 + _ = self.get_translator()
1.48 +
1.49 if self._publish():
1.50 - return self.wrap("Details of an event have been received.")
1.51 + return self.wrap(_("Details of an event have been received."))
1.52
1.53 def refresh(self):
1.54
1.55 "Requests to refresh events are handled either here or by the client."
1.56
1.57 + _ = self.get_translator()
1.58 +
1.59 if self.is_refreshing():
1.60 return self._process(self._refresh, from_organiser=False)
1.61 else:
1.62 - return self.wrap("A request for updated event details has been received.")
1.63 + return self.wrap(_("A request for updated event details has been received."))
1.64
1.65 def reply(self):
1.66
1.67 "Record replies and notify the recipient."
1.68
1.69 + _ = self.get_translator()
1.70 +
1.71 if self._process(self._schedule_for_organiser, from_organiser=False):
1.72 - return self.wrap("A reply to an event invitation has been received.")
1.73 + return self.wrap(_("A reply to an event invitation has been received."))
1.74
1.75 def request(self):
1.76
1.77 "Hold requests and notify the recipient."
1.78
1.79 + _ = self.get_translator()
1.80 +
1.81 if self._process(self._schedule_for_attendee, queue=True):
1.82 - return self.wrap("An event invitation has been received.")
1.83 + return self.wrap(_("An event invitation has been received."))
1.84
1.85 class Freebusy(CommonFreebusy, Handler):
1.86
1.87 @@ -304,23 +320,27 @@
1.88
1.89 "Register free/busy information."
1.90
1.91 + _ = self.get_translator()
1.92 +
1.93 self._record_freebusy(from_organiser=True)
1.94
1.95 # Produce a message if configured to do so.
1.96
1.97 if self.is_notifying():
1.98 - return self.wrap("A free/busy update has been received.", link=False)
1.99 + return self.wrap(_("A free/busy update has been received."), link=False)
1.100
1.101 def reply(self):
1.102
1.103 "Record replies and notify the recipient."
1.104
1.105 + _ = self.get_translator()
1.106 +
1.107 self._record_freebusy(from_organiser=False)
1.108
1.109 # Produce a message if configured to do so.
1.110
1.111 if self.is_notifying():
1.112 - return self.wrap("A reply to a free/busy request has been received.", link=False)
1.113 + return self.wrap(_("A reply to a free/busy request has been received."), link=False)
1.114
1.115 def request(self):
1.116