summaryrefslogtreecommitdiffstats
path: root/pykolab/xml/attendee.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/xml/attendee.py')
-rw-r--r--pykolab/xml/attendee.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/pykolab/xml/attendee.py b/pykolab/xml/attendee.py
index 579158e..220ab8c 100644
--- a/pykolab/xml/attendee.py
+++ b/pykolab/xml/attendee.py
@@ -4,6 +4,26 @@ from pykolab.translate import _
from contact_reference import ContactReference
+participant_status_labels = {
+ "NEEDS-ACTION": _("Needs Action"),
+ "ACCEPTED": _("Accepted"),
+ "DECLINED": _("Declined"),
+ "TENTATIVE": _("Tentatively Accepted"),
+ "DELEGATED": _("Delegated"),
+ "COMPLETED": _("Completed"),
+ "IN-PROCESS": _("In Process"),
+ # support integer values, too
+ kolabformat.PartNeedsAction: _("Needs Action"),
+ kolabformat.PartAccepted: _("Accepted"),
+ kolabformat.PartDeclined: _("Declined"),
+ kolabformat.PartTentative: _("Tentatively Accepted"),
+ kolabformat.PartDelegated: _("Delegated"),
+ }
+
+def participant_status_label(status):
+ return participant_status_labels[status] if participant_status_labels.has_key(status) else status
+
+
class Attendee(kolabformat.Attendee):
cutype_map = {
"INDIVIDUAL": kolabformat.CutypeIndividual,