1.1 --- a/imiptools/handlers/scheduling/freebusy.py Fri May 13 14:31:57 2016 +0200
1.2 +++ b/imiptools/handlers/scheduling/freebusy.py Fri May 13 15:41:38 2016 +0200
1.3 @@ -21,6 +21,7 @@
1.4
1.5 from imiptools.data import uri_values
1.6 from imiptools.dates import ValidityError, to_timezone
1.7 +from imiptools.handlers.scheduling.common import standard_responses
1.8
1.9 def schedule_in_freebusy(handler, args, freebusy=None):
1.10
1.11 @@ -34,8 +35,6 @@
1.12 free/busy records will be used.
1.13 """
1.14
1.15 - _ = handler.get_translator()
1.16 -
1.17 # If newer than any old version, discard old details from the
1.18 # free/busy record and check for suitability.
1.19
1.20 @@ -60,8 +59,6 @@
1.21 returning an indication of the kind of response to be returned.
1.22 """
1.23
1.24 - _ = handler.get_translator()
1.25 -
1.26 obj = handler.obj.copy()
1.27
1.28 # Check any constraints on the request.
1.29 @@ -222,22 +219,6 @@
1.30 response = response == "ACCEPTED" and (changed and "COUNTER" or "ACCEPTED") or "DECLINED"
1.31 return standard_responses(handler, response)
1.32
1.33 -def standard_responses(handler, response):
1.34 -
1.35 - """
1.36 - Using 'handler' to translate descriptions, return a tuple containing the
1.37 - 'response' and a suitable description.
1.38 - """
1.39 -
1.40 - _ = handler.get_translator()
1.41 -
1.42 - if response == "ACCEPTED":
1.43 - return response, _("The recipient has scheduled the requested period.")
1.44 - elif response == "COUNTER":
1.45 - return response, _("The recipient has suggested a different period.")
1.46 - else:
1.47 - return response, _("The recipient is unavailable in the requested period.")
1.48 -
1.49 # Registry of scheduling functions.
1.50
1.51 scheduling_functions = {