[CalendarServer-changes] [3310] CalendarServer/branches/users/sagen/localization-3308

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 3 09:01:16 PST 2008


Revision: 3310
          http://trac.macosforge.org/projects/calendarserver/changeset/3310
Author:   sagen at apple.com
Date:     2008-11-03 09:01:16 -0800 (Mon, 03 Nov 2008)
Log Message:
-----------
Bringing localization changes forward to new branch

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/localization-3308/conf/caldavd-test.plist
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/config.py
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/ical.py
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/mail.py

Added Paths:
-----------
    CalendarServer/branches/users/sagen/localization-3308/locales/
    CalendarServer/branches/users/sagen/localization-3308/locales/en/
    CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/localization.py
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/test_localization.py

Removed Paths:
-------------
    CalendarServer/branches/users/sagen/localization-3308/locales/en/
    CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.mo
    CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po

Modified: CalendarServer/branches/users/sagen/localization-3308/conf/caldavd-test.plist
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/conf/caldavd-test.plist	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/conf/caldavd-test.plist	2008-11-03 17:01:16 UTC (rev 3310)
@@ -638,6 +638,13 @@
       <string>logs/caldavd-pydir.sock</string>
     </dict>
 
+    <key>Localization</key>
+    <dict>
+      <key>LocalesDirectory</key>
+      <string>locales</string>
+      <key>Language</key>
+      <string>en</string>
+    </dict>
 
   </dict>
 </plist>

Deleted: CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.mo
===================================================================
(Binary files differ)

Copied: CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.mo (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/locales/en/LC_MESSAGES/calendarserver.mo)
===================================================================
(Binary files differ)

Deleted: CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.po
===================================================================
--- CalendarServer/branches/users/sagen/localization-3280/locales/en/LC_MESSAGES/calendarserver.po	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -1,260 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR ORGANIZATION
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-
-
-#: localization.py:171
-msgid "All day"
-msgstr ""
-
-#: localization.py:177
-msgid "%(startTime)s to %(endTime)s"
-msgstr ""
-
-#: localization.py:191
-msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-msgstr ""
-
-#: localization.py:207
-msgid "AM"
-msgstr ""
-
-#: localization.py:207
-msgid "PM"
-msgstr ""
-
-#: localization.py:213
-msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
-msgstr ""
-
-#: localization.py:236
-msgid "Monday"
-msgstr ""
-
-#: localization.py:237
-msgid "Tuesday"
-msgstr ""
-
-#: localization.py:238
-msgid "Wednesday"
-msgstr ""
-
-#: localization.py:239
-msgid "Thursday"
-msgstr ""
-
-#: localization.py:240
-msgid "Friday"
-msgstr ""
-
-#: localization.py:241
-msgid "Saturday"
-msgstr ""
-
-#: localization.py:242
-msgid "Sunday"
-msgstr ""
-
-#: localization.py:246
-msgid "Mon"
-msgstr ""
-
-#: localization.py:247
-msgid "Tue"
-msgstr ""
-
-#: localization.py:248
-msgid "Wed"
-msgstr ""
-
-#: localization.py:249
-msgid "Thu"
-msgstr ""
-
-#: localization.py:250
-msgid "Fri"
-msgstr ""
-
-#: localization.py:251
-msgid "Sun"
-msgstr ""
-
-#: localization.py:252
-msgid "Sat"
-msgstr ""
-
-#: localization.py:257
-msgid "January"
-msgstr ""
-
-#: localization.py:258
-msgid "February"
-msgstr ""
-
-#: localization.py:259
-msgid "March"
-msgstr ""
-
-#: localization.py:260
-msgid "April"
-msgstr ""
-
-#: localization.py:261 localization.py:277
-msgid "May"
-msgstr ""
-
-#: localization.py:262
-msgid "June"
-msgstr ""
-
-#: localization.py:263
-msgid "July"
-msgstr ""
-
-#: localization.py:264
-msgid "August"
-msgstr ""
-
-#: localization.py:265
-msgid "September"
-msgstr ""
-
-#: localization.py:266
-msgid "October"
-msgstr ""
-
-#: localization.py:267
-msgid "November"
-msgstr ""
-
-#: localization.py:268
-msgid "December"
-msgstr ""
-
-#: localization.py:273
-msgid "Jan"
-msgstr ""
-
-#: localization.py:274
-msgid "Feb"
-msgstr ""
-
-#: localization.py:275
-msgid "Mar"
-msgstr ""
-
-#: localization.py:276
-msgid "Apr"
-msgstr ""
-
-#: localization.py:278
-msgid "Jun"
-msgstr ""
-
-#: localization.py:279
-msgid "Jul"
-msgstr ""
-
-#: localization.py:280
-msgid "Aug"
-msgstr ""
-
-#: localization.py:281
-msgid "Sep"
-msgstr ""
-
-#: localization.py:282
-msgid "Oct"
-msgstr ""
-
-#: localization.py:283
-msgid "Nov"
-msgstr ""
-
-#: localization.py:284
-msgid "Dec"
-msgstr ""
-
-#: mail.py:726 mail.py:755 mail.py:792
-msgid "Event cancelled"
-msgstr ""
-
-#: mail.py:727
-msgid "Event invitation: %(summary)s"
-msgstr ""
-
-#: mail.py:736
-msgid "Event Invitation"
-msgstr ""
-
-#: mail.py:737
-msgid "Date"
-msgstr ""
-
-#: mail.py:738
-msgid "Time"
-msgstr ""
-
-#: mail.py:739
-msgid "Description"
-msgstr ""
-
-#: mail.py:740
-msgid "Organizer"
-msgstr ""
-
-#: mail.py:741
-msgid "Attendees"
-msgstr ""
-
-#: mail.py:742
-msgid "Location"
-msgstr ""
-
-msgid "Duration"
-msgstr ""
-
-msgid "Occurs"
-msgstr ""
-
-msgid "Repeating"
-msgstr ""
-
-msgid "Once"
-msgstr ""
-
-msgid "1 day"
-msgstr
-
-msgid "%(dayCount)d days"
-msgstr
-
-msgid "1 hour"
-
-msgid "%(hourCount)d hours"
-msgstr
-
-msgid "1 minute"
-msgstr
-
-msgid "%(minuteCount)d minutes"
-msgstr
-
-msgid "1 second"
-msgstr
-
-msgid "%(secondCount)d seconds"
-msgstr
-

Copied: CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.po (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/locales/en/LC_MESSAGES/calendarserver.po)
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.po	                        (rev 0)
+++ CalendarServer/branches/users/sagen/localization-3308/locales/en/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -0,0 +1,260 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: localization.py:171
+msgid "All day"
+msgstr ""
+
+#: localization.py:177
+msgid "%(startTime)s to %(endTime)s"
+msgstr ""
+
+#: localization.py:191
+msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+msgstr ""
+
+#: localization.py:207
+msgid "AM"
+msgstr ""
+
+#: localization.py:207
+msgid "PM"
+msgstr ""
+
+#: localization.py:213
+msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
+msgstr ""
+
+#: localization.py:236
+msgid "Monday"
+msgstr ""
+
+#: localization.py:237
+msgid "Tuesday"
+msgstr ""
+
+#: localization.py:238
+msgid "Wednesday"
+msgstr ""
+
+#: localization.py:239
+msgid "Thursday"
+msgstr ""
+
+#: localization.py:240
+msgid "Friday"
+msgstr ""
+
+#: localization.py:241
+msgid "Saturday"
+msgstr ""
+
+#: localization.py:242
+msgid "Sunday"
+msgstr ""
+
+#: localization.py:246
+msgid "Mon"
+msgstr ""
+
+#: localization.py:247
+msgid "Tue"
+msgstr ""
+
+#: localization.py:248
+msgid "Wed"
+msgstr ""
+
+#: localization.py:249
+msgid "Thu"
+msgstr ""
+
+#: localization.py:250
+msgid "Fri"
+msgstr ""
+
+#: localization.py:251
+msgid "Sun"
+msgstr ""
+
+#: localization.py:252
+msgid "Sat"
+msgstr ""
+
+#: localization.py:257
+msgid "January"
+msgstr ""
+
+#: localization.py:258
+msgid "February"
+msgstr ""
+
+#: localization.py:259
+msgid "March"
+msgstr ""
+
+#: localization.py:260
+msgid "April"
+msgstr ""
+
+#: localization.py:261 localization.py:277
+msgid "May"
+msgstr ""
+
+#: localization.py:262
+msgid "June"
+msgstr ""
+
+#: localization.py:263
+msgid "July"
+msgstr ""
+
+#: localization.py:264
+msgid "August"
+msgstr ""
+
+#: localization.py:265
+msgid "September"
+msgstr ""
+
+#: localization.py:266
+msgid "October"
+msgstr ""
+
+#: localization.py:267
+msgid "November"
+msgstr ""
+
+#: localization.py:268
+msgid "December"
+msgstr ""
+
+#: localization.py:273
+msgid "Jan"
+msgstr ""
+
+#: localization.py:274
+msgid "Feb"
+msgstr ""
+
+#: localization.py:275
+msgid "Mar"
+msgstr ""
+
+#: localization.py:276
+msgid "Apr"
+msgstr ""
+
+#: localization.py:278
+msgid "Jun"
+msgstr ""
+
+#: localization.py:279
+msgid "Jul"
+msgstr ""
+
+#: localization.py:280
+msgid "Aug"
+msgstr ""
+
+#: localization.py:281
+msgid "Sep"
+msgstr ""
+
+#: localization.py:282
+msgid "Oct"
+msgstr ""
+
+#: localization.py:283
+msgid "Nov"
+msgstr ""
+
+#: localization.py:284
+msgid "Dec"
+msgstr ""
+
+#: mail.py:726 mail.py:755 mail.py:792
+msgid "Event cancelled"
+msgstr ""
+
+#: mail.py:727
+msgid "Event invitation: %(summary)s"
+msgstr ""
+
+#: mail.py:736
+msgid "Event Invitation"
+msgstr ""
+
+#: mail.py:737
+msgid "Date"
+msgstr ""
+
+#: mail.py:738
+msgid "Time"
+msgstr ""
+
+#: mail.py:739
+msgid "Description"
+msgstr ""
+
+#: mail.py:740
+msgid "Organizer"
+msgstr ""
+
+#: mail.py:741
+msgid "Attendees"
+msgstr ""
+
+#: mail.py:742
+msgid "Location"
+msgstr ""
+
+msgid "Duration"
+msgstr ""
+
+msgid "Occurs"
+msgstr ""
+
+msgid "Repeating"
+msgstr ""
+
+msgid "Once"
+msgstr ""
+
+msgid "1 day"
+msgstr
+
+msgid "%(dayCount)d days"
+msgstr
+
+msgid "1 hour"
+
+msgid "%(hourCount)d hours"
+msgstr
+
+msgid "1 minute"
+msgstr
+
+msgid "%(minuteCount)d minutes"
+msgstr
+
+msgid "1 second"
+msgstr
+
+msgid "%(secondCount)d seconds"
+msgstr
+

Deleted: CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.mo
===================================================================
(Binary files differ)

Copied: CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.mo (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/locales/fr/LC_MESSAGES/calendarserver.mo)
===================================================================
(Binary files differ)

Deleted: CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.po
===================================================================
--- CalendarServer/branches/users/sagen/localization-3280/locales/fr/LC_MESSAGES/calendarserver.po	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -1,252 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR ORGANIZATION
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-
-
-#: localization.py:171
-msgid "All day"
-msgstr "Toute la journée"
-
-#: localization.py:177
-msgid "%(startTime)s to %(endTime)s"
-msgstr "%(startTime)s jusqu'à ce que %(endTime)s"
-
-#: localization.py:191
-msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-msgstr "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-
-#: localization.py:213
-msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
-msgstr "%(hour24Number)d:%(minuteNumber)02d"
-
-#: mail.py:726 mail.py:755 mail.py:792
-msgid "Event cancelled"
-msgstr "Événement annulé"
-
-#: mail.py:727
-msgid "Event invitation: %(summary)s"
-msgstr "Invitation: %(summary)s"
-
-#: mail.py:736
-msgid "Event Invitation"
-msgstr "Invitation"
-
-#: mail.py:737
-msgid "Date"
-msgstr "Date"
-
-#: mail.py:738
-msgid "Time"
-msgstr "Heure"
-
-#: mail.py:739
-msgid "Description"
-msgstr "Description"
-
-#: mail.py:740
-msgid "Organizer"
-msgstr "Organisateur"
-
-#: mail.py:741
-msgid "Attendees"
-msgstr "Participants"
-
-#: mail.py:742
-msgid "Location"
-msgstr "Emplacement"
-
-msgid "Duration"
-msgstr "Durée"
-
-msgid "Occurs"
-msgstr "Se produit"
-
-msgid "(Repeating)"
-msgstr "(Répétition)"
-
-msgid "Once"
-msgstr "Une fois"
-
-#: twistedcaldav/localization.py:131
-msgid "Monday"
-msgstr "Lundi"
-
-#: twistedcaldav/localization.py:132
-msgid "Tuesday"
-msgstr "Mardi"
-
-#: twistedcaldav/localization.py:133
-msgid "Wednesday"
-msgstr "Mercredi"
-
-#: twistedcaldav/localization.py:134
-msgid "Thursday"
-msgstr "Jeudi"
-
-#: twistedcaldav/localization.py:135
-msgid "Friday"
-msgstr "Vendredi"
-
-#: twistedcaldav/localization.py:136
-msgid "Saturday"
-msgstr "Samedi"
-
-#: twistedcaldav/localization.py:137
-msgid "Sunday"
-msgstr "Dimanche"
-
-#: twistedcaldav/localization.py:141
-msgid "Mon"
-msgstr ""
-
-#: twistedcaldav/localization.py:142
-msgid "Tue"
-msgstr ""
-
-#: twistedcaldav/localization.py:143
-msgid "Wed"
-msgstr ""
-
-#: twistedcaldav/localization.py:144
-msgid "Thu"
-msgstr ""
-
-#: twistedcaldav/localization.py:145
-msgid "Fri"
-msgstr ""
-
-#: twistedcaldav/localization.py:146
-msgid "Sun"
-msgstr ""
-
-#: twistedcaldav/localization.py:147
-msgid "Sat"
-msgstr ""
-
-#: twistedcaldav/localization.py:152
-msgid "January"
-msgstr "Janvier"
-
-#: twistedcaldav/localization.py:153
-msgid "February"
-msgstr "Février"
-
-#: twistedcaldav/localization.py:154
-msgid "March"
-msgstr "Mars"
-
-#: twistedcaldav/localization.py:155
-msgid "April"
-msgstr "Avril"
-
-#: twistedcaldav/localization.py:156 twistedcaldav/localization.py:172
-msgid "May"
-msgstr "Mai"
-
-#: twistedcaldav/localization.py:157
-msgid "June"
-msgstr "Juin"
-
-#: twistedcaldav/localization.py:158
-msgid "July"
-msgstr "Juillet"
-
-#: twistedcaldav/localization.py:159
-msgid "August"
-msgstr "Août"
-
-#: twistedcaldav/localization.py:160
-msgid "September"
-msgstr "Septembre"
-
-#: twistedcaldav/localization.py:161
-msgid "October"
-msgstr "Octobre"
-
-#: twistedcaldav/localization.py:162
-msgid "November"
-msgstr "Novembre"
-
-#: twistedcaldav/localization.py:163
-msgid "December"
-msgstr "Décembre"
-
-#: twistedcaldav/localization.py:168
-msgid "Jan"
-msgstr ""
-
-#: twistedcaldav/localization.py:169
-msgid "Feb"
-msgstr ""
-
-#: twistedcaldav/localization.py:170
-msgid "Mar"
-msgstr ""
-
-#: twistedcaldav/localization.py:171
-msgid "Apr"
-msgstr ""
-
-#: twistedcaldav/localization.py:173
-msgid "Jun"
-msgstr ""
-
-#: twistedcaldav/localization.py:174
-msgid "Jul"
-msgstr ""
-
-#: twistedcaldav/localization.py:175
-msgid "Aug"
-msgstr ""
-
-#: twistedcaldav/localization.py:176
-msgid "Sep"
-msgstr ""
-
-#: twistedcaldav/localization.py:177
-msgid "Oct"
-msgstr ""
-
-#: twistedcaldav/localization.py:178
-msgid "Nov"
-msgstr ""
-
-#: twistedcaldav/localization.py:179
-msgid "Dec"
-msgstr ""
-
-msgid "1 day"
-msgstr
-
-msgid "%(dayCount)d days"
-msgstr
-
-msgid "1 hour"
-msgstr "1 jour"
-
-msgid "%(hourCount)d hours"
-msgstr "%(hourCount)d jours"
-
-msgid "1 minute"
-msgstr "1 minute"
-
-msgid "%(minuteCount)d minutes"
-msgstr "%(minuteCount)d minutes"
-
-msgid "1 second"
-msgstr "1 seconde"
-
-msgid "%(secondCount)d seconds"
-msgstr "%(secondCount)d secondes"

Copied: CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.po (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/locales/fr/LC_MESSAGES/calendarserver.po)
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.po	                        (rev 0)
+++ CalendarServer/branches/users/sagen/localization-3308/locales/fr/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -0,0 +1,252 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: localization.py:171
+msgid "All day"
+msgstr "Toute la journée"
+
+#: localization.py:177
+msgid "%(startTime)s to %(endTime)s"
+msgstr "%(startTime)s jusqu'à ce que %(endTime)s"
+
+#: localization.py:191
+msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+msgstr "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+
+#: localization.py:213
+msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
+msgstr "%(hour24Number)d:%(minuteNumber)02d"
+
+#: mail.py:726 mail.py:755 mail.py:792
+msgid "Event cancelled"
+msgstr "Événement annulé"
+
+#: mail.py:727
+msgid "Event invitation: %(summary)s"
+msgstr "Invitation: %(summary)s"
+
+#: mail.py:736
+msgid "Event Invitation"
+msgstr "Invitation"
+
+#: mail.py:737
+msgid "Date"
+msgstr "Date"
+
+#: mail.py:738
+msgid "Time"
+msgstr "Heure"
+
+#: mail.py:739
+msgid "Description"
+msgstr "Description"
+
+#: mail.py:740
+msgid "Organizer"
+msgstr "Organisateur"
+
+#: mail.py:741
+msgid "Attendees"
+msgstr "Participants"
+
+#: mail.py:742
+msgid "Location"
+msgstr "Emplacement"
+
+msgid "Duration"
+msgstr "Durée"
+
+msgid "Occurs"
+msgstr "Se produit"
+
+msgid "(Repeating)"
+msgstr "(Répétition)"
+
+msgid "Once"
+msgstr "Une fois"
+
+#: twistedcaldav/localization.py:131
+msgid "Monday"
+msgstr "Lundi"
+
+#: twistedcaldav/localization.py:132
+msgid "Tuesday"
+msgstr "Mardi"
+
+#: twistedcaldav/localization.py:133
+msgid "Wednesday"
+msgstr "Mercredi"
+
+#: twistedcaldav/localization.py:134
+msgid "Thursday"
+msgstr "Jeudi"
+
+#: twistedcaldav/localization.py:135
+msgid "Friday"
+msgstr "Vendredi"
+
+#: twistedcaldav/localization.py:136
+msgid "Saturday"
+msgstr "Samedi"
+
+#: twistedcaldav/localization.py:137
+msgid "Sunday"
+msgstr "Dimanche"
+
+#: twistedcaldav/localization.py:141
+msgid "Mon"
+msgstr ""
+
+#: twistedcaldav/localization.py:142
+msgid "Tue"
+msgstr ""
+
+#: twistedcaldav/localization.py:143
+msgid "Wed"
+msgstr ""
+
+#: twistedcaldav/localization.py:144
+msgid "Thu"
+msgstr ""
+
+#: twistedcaldav/localization.py:145
+msgid "Fri"
+msgstr ""
+
+#: twistedcaldav/localization.py:146
+msgid "Sun"
+msgstr ""
+
+#: twistedcaldav/localization.py:147
+msgid "Sat"
+msgstr ""
+
+#: twistedcaldav/localization.py:152
+msgid "January"
+msgstr "Janvier"
+
+#: twistedcaldav/localization.py:153
+msgid "February"
+msgstr "Février"
+
+#: twistedcaldav/localization.py:154
+msgid "March"
+msgstr "Mars"
+
+#: twistedcaldav/localization.py:155
+msgid "April"
+msgstr "Avril"
+
+#: twistedcaldav/localization.py:156 twistedcaldav/localization.py:172
+msgid "May"
+msgstr "Mai"
+
+#: twistedcaldav/localization.py:157
+msgid "June"
+msgstr "Juin"
+
+#: twistedcaldav/localization.py:158
+msgid "July"
+msgstr "Juillet"
+
+#: twistedcaldav/localization.py:159
+msgid "August"
+msgstr "Août"
+
+#: twistedcaldav/localization.py:160
+msgid "September"
+msgstr "Septembre"
+
+#: twistedcaldav/localization.py:161
+msgid "October"
+msgstr "Octobre"
+
+#: twistedcaldav/localization.py:162
+msgid "November"
+msgstr "Novembre"
+
+#: twistedcaldav/localization.py:163
+msgid "December"
+msgstr "Décembre"
+
+#: twistedcaldav/localization.py:168
+msgid "Jan"
+msgstr ""
+
+#: twistedcaldav/localization.py:169
+msgid "Feb"
+msgstr ""
+
+#: twistedcaldav/localization.py:170
+msgid "Mar"
+msgstr ""
+
+#: twistedcaldav/localization.py:171
+msgid "Apr"
+msgstr ""
+
+#: twistedcaldav/localization.py:173
+msgid "Jun"
+msgstr ""
+
+#: twistedcaldav/localization.py:174
+msgid "Jul"
+msgstr ""
+
+#: twistedcaldav/localization.py:175
+msgid "Aug"
+msgstr ""
+
+#: twistedcaldav/localization.py:176
+msgid "Sep"
+msgstr ""
+
+#: twistedcaldav/localization.py:177
+msgid "Oct"
+msgstr ""
+
+#: twistedcaldav/localization.py:178
+msgid "Nov"
+msgstr ""
+
+#: twistedcaldav/localization.py:179
+msgid "Dec"
+msgstr ""
+
+msgid "1 day"
+msgstr
+
+msgid "%(dayCount)d days"
+msgstr
+
+msgid "1 hour"
+msgstr "1 jour"
+
+msgid "%(hourCount)d hours"
+msgstr "%(hourCount)d jours"
+
+msgid "1 minute"
+msgstr "1 minute"
+
+msgid "%(minuteCount)d minutes"
+msgstr "%(minuteCount)d minutes"
+
+msgid "1 second"
+msgstr "1 seconde"
+
+msgid "%(secondCount)d seconds"
+msgstr "%(secondCount)d secondes"

Deleted: CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.mo
===================================================================
(Binary files differ)

Copied: CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.mo (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/locales/pig/LC_MESSAGES/calendarserver.mo)
===================================================================
(Binary files differ)

Deleted: CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.po
===================================================================
--- CalendarServer/branches/users/sagen/localization-3280/locales/pig/LC_MESSAGES/calendarserver.po	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -1,262 +0,0 @@
-# Pig Latin Translation
-# Copyright (C) YEAR ORGANIZATION
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-
-
-#: localization.py:171
-msgid "All day"
-msgstr "Allway ayday"
-
-#: localization.py:177
-msgid "%(startTime)s to %(endTime)s"
-msgstr "%(startTime)s otay %(endTime)s"
-
-#: localization.py:191
-msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-msgstr "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-
-#: localization.py:207
-msgid "AM"
-msgstr "AMWAY"
-
-#: localization.py:207
-msgid "PM"
-msgstr "PMAY"
-
-#: localization.py:213
-msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
-msgstr "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
-
-#: localization.py:236
-msgid "Monday"
-msgstr "Ondaymay"
-
-#: localization.py:237
-msgid "Tuesday"
-msgstr "Uesdaytay"
-
-#: localization.py:238
-msgid "Wednesday"
-msgstr "Ednesdayway"
-
-#: localization.py:239
-msgid "Thursday"
-msgstr "Ursdaythay"
-
-#: localization.py:240
-msgid "Friday"
-msgstr "Idayfray"
-
-#: localization.py:241
-msgid "Saturday"
-msgstr "Aturdaysay"
-
-#: localization.py:242
-msgid "Sunday"
-msgstr "Undaysay"
-
-#: localization.py:246
-msgid "Mon"
-msgstr ""
-
-#: localization.py:247
-msgid "Tue"
-msgstr ""
-
-#: localization.py:248
-msgid "Wed"
-msgstr ""
-
-#: localization.py:249
-msgid "Thu"
-msgstr ""
-
-#: localization.py:250
-msgid "Fri"
-msgstr ""
-
-#: localization.py:251
-msgid "Sun"
-msgstr ""
-
-#: localization.py:252
-msgid "Sat"
-msgstr ""
-
-#: localization.py:257
-msgid "January"
-msgstr "Anuaryjay"
-
-#: localization.py:258
-msgid "February"
-msgstr "Ebruaryfay"
-
-#: localization.py:259
-msgid "March"
-msgstr "Archmay"
-
-#: localization.py:260
-msgid "April"
-msgstr "Aprilway"
-
-#: localization.py:261 localization.py:277
-msgid "May"
-msgstr "Aymay"
-
-#: localization.py:262
-msgid "June"
-msgstr "Unejay"
-
-#: localization.py:263
-msgid "July"
-msgstr "Ulyjay"
-
-#: localization.py:264
-msgid "August"
-msgstr "Augustway"
-
-#: localization.py:265
-msgid "September"
-msgstr "Eptembersay"
-
-#: localization.py:266
-msgid "October"
-msgstr "Octoberway"
-
-#: localization.py:267
-msgid "November"
-msgstr "Ovembernay"
-
-#: localization.py:268
-msgid "December"
-msgstr "Ecemberday"
-
-#: localization.py:273
-msgid "Jan"
-msgstr ""
-
-#: localization.py:274
-msgid "Feb"
-msgstr ""
-
-#: localization.py:275
-msgid "Mar"
-msgstr ""
-
-#: localization.py:276
-msgid "Apr"
-msgstr ""
-
-#: localization.py:278
-msgid "Jun"
-msgstr ""
-
-#: localization.py:279
-msgid "Jul"
-msgstr ""
-
-#: localization.py:280
-msgid "Aug"
-msgstr ""
-
-#: localization.py:281
-msgid "Sep"
-msgstr ""
-
-#: localization.py:282
-msgid "Oct"
-msgstr ""
-
-#: localization.py:283
-msgid "Nov"
-msgstr ""
-
-#: localization.py:284
-msgid "Dec"
-msgstr ""
-
-#: mail.py:726 mail.py:755 mail.py:792
-msgid "Event cancelled"
-msgstr "Eventway ancelledcay"
-
-#: mail.py:727
-msgid "Event invitation: %(summary)s"
-msgstr "Eventway invitationway: %(summary)s"
-
-#: mail.py:736
-msgid "Event Invitation"
-msgstr "Eventway invitationway"
-
-#: mail.py:737
-msgid "Date"
-msgstr "Ateday"
-
-#: mail.py:738
-msgid "Time"
-msgstr "Imetay"
-
-#: mail.py:739
-msgid "Description"
-msgstr "Escriptionday"
-
-#: mail.py:740
-msgid "Organizer"
-msgstr "Organizerway"
-
-#: mail.py:741
-msgid "Attendees"
-msgstr "Attendeesway"
-
-#: mail.py:742
-msgid "Location"
-msgstr "Ocationlay"
-
-msgid "Duration"
-msgstr "Urationday"
-
-msgid "Occurs"
-msgstr "Occursway"
-
-msgid "(Repeating)"
-msgstr "(Epeatingray)"
-
-msgid "Once"
-msgstr "Onceway"
-
-
-msgid "1 day"
-msgstr "1 ayday"
-
-msgid "%(dayCount)d days"
-msgstr "%(dayCount)d aysday"
-
-msgid "1 hour"
-msgstr "1 ourhay"
-
-msgid "%(hourCount)d hours"
-msgstr "%(hourCount)d ourshay"
-
-msgid "1 minute"
-msgstr "1 inutemay"
-
-msgid "%(minuteCount)d minutes"
-msgstr "%(minuteCount)d inutesmay"
-
-msgid "1 second"
-msgstr "1 econdsay"
-
-msgid "%(secondCount)d seconds"
-msgstr "%(secondCount)d econdsay"
-

Copied: CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.po (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/locales/pig/LC_MESSAGES/calendarserver.po)
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.po	                        (rev 0)
+++ CalendarServer/branches/users/sagen/localization-3308/locales/pig/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -0,0 +1,262 @@
+# Pig Latin Translation
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: localization.py:171
+msgid "All day"
+msgstr "Allway ayday"
+
+#: localization.py:177
+msgid "%(startTime)s to %(endTime)s"
+msgstr "%(startTime)s otay %(endTime)s"
+
+#: localization.py:191
+msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+msgstr "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+
+#: localization.py:207
+msgid "AM"
+msgstr "AMWAY"
+
+#: localization.py:207
+msgid "PM"
+msgstr "PMAY"
+
+#: localization.py:213
+msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
+msgstr "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
+
+#: localization.py:236
+msgid "Monday"
+msgstr "Ondaymay"
+
+#: localization.py:237
+msgid "Tuesday"
+msgstr "Uesdaytay"
+
+#: localization.py:238
+msgid "Wednesday"
+msgstr "Ednesdayway"
+
+#: localization.py:239
+msgid "Thursday"
+msgstr "Ursdaythay"
+
+#: localization.py:240
+msgid "Friday"
+msgstr "Idayfray"
+
+#: localization.py:241
+msgid "Saturday"
+msgstr "Aturdaysay"
+
+#: localization.py:242
+msgid "Sunday"
+msgstr "Undaysay"
+
+#: localization.py:246
+msgid "Mon"
+msgstr ""
+
+#: localization.py:247
+msgid "Tue"
+msgstr ""
+
+#: localization.py:248
+msgid "Wed"
+msgstr ""
+
+#: localization.py:249
+msgid "Thu"
+msgstr ""
+
+#: localization.py:250
+msgid "Fri"
+msgstr ""
+
+#: localization.py:251
+msgid "Sun"
+msgstr ""
+
+#: localization.py:252
+msgid "Sat"
+msgstr ""
+
+#: localization.py:257
+msgid "January"
+msgstr "Anuaryjay"
+
+#: localization.py:258
+msgid "February"
+msgstr "Ebruaryfay"
+
+#: localization.py:259
+msgid "March"
+msgstr "Archmay"
+
+#: localization.py:260
+msgid "April"
+msgstr "Aprilway"
+
+#: localization.py:261 localization.py:277
+msgid "May"
+msgstr "Aymay"
+
+#: localization.py:262
+msgid "June"
+msgstr "Unejay"
+
+#: localization.py:263
+msgid "July"
+msgstr "Ulyjay"
+
+#: localization.py:264
+msgid "August"
+msgstr "Augustway"
+
+#: localization.py:265
+msgid "September"
+msgstr "Eptembersay"
+
+#: localization.py:266
+msgid "October"
+msgstr "Octoberway"
+
+#: localization.py:267
+msgid "November"
+msgstr "Ovembernay"
+
+#: localization.py:268
+msgid "December"
+msgstr "Ecemberday"
+
+#: localization.py:273
+msgid "Jan"
+msgstr ""
+
+#: localization.py:274
+msgid "Feb"
+msgstr ""
+
+#: localization.py:275
+msgid "Mar"
+msgstr ""
+
+#: localization.py:276
+msgid "Apr"
+msgstr ""
+
+#: localization.py:278
+msgid "Jun"
+msgstr ""
+
+#: localization.py:279
+msgid "Jul"
+msgstr ""
+
+#: localization.py:280
+msgid "Aug"
+msgstr ""
+
+#: localization.py:281
+msgid "Sep"
+msgstr ""
+
+#: localization.py:282
+msgid "Oct"
+msgstr ""
+
+#: localization.py:283
+msgid "Nov"
+msgstr ""
+
+#: localization.py:284
+msgid "Dec"
+msgstr ""
+
+#: mail.py:726 mail.py:755 mail.py:792
+msgid "Event cancelled"
+msgstr "Eventway ancelledcay"
+
+#: mail.py:727
+msgid "Event invitation: %(summary)s"
+msgstr "Eventway invitationway: %(summary)s"
+
+#: mail.py:736
+msgid "Event Invitation"
+msgstr "Eventway invitationway"
+
+#: mail.py:737
+msgid "Date"
+msgstr "Ateday"
+
+#: mail.py:738
+msgid "Time"
+msgstr "Imetay"
+
+#: mail.py:739
+msgid "Description"
+msgstr "Escriptionday"
+
+#: mail.py:740
+msgid "Organizer"
+msgstr "Organizerway"
+
+#: mail.py:741
+msgid "Attendees"
+msgstr "Attendeesway"
+
+#: mail.py:742
+msgid "Location"
+msgstr "Ocationlay"
+
+msgid "Duration"
+msgstr "Urationday"
+
+msgid "Occurs"
+msgstr "Occursway"
+
+msgid "(Repeating)"
+msgstr "(Epeatingray)"
+
+msgid "Once"
+msgstr "Onceway"
+
+
+msgid "1 day"
+msgstr "1 ayday"
+
+msgid "%(dayCount)d days"
+msgstr "%(dayCount)d aysday"
+
+msgid "1 hour"
+msgstr "1 ourhay"
+
+msgid "%(hourCount)d hours"
+msgstr "%(hourCount)d ourshay"
+
+msgid "1 minute"
+msgstr "1 inutemay"
+
+msgid "%(minuteCount)d minutes"
+msgstr "%(minuteCount)d inutesmay"
+
+msgid "1 second"
+msgstr "1 econdsay"
+
+msgid "%(secondCount)d seconds"
+msgstr "%(secondCount)d econdsay"
+

Modified: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/config.py
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/config.py	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/config.py	2008-11-03 17:01:16 UTC (rev 3310)
@@ -233,6 +233,8 @@
                 "Password"      : "",    # For account receving mail
             },
             "AddressPatterns"   : [],    # Reg-ex patterns to match iMIP-able calendar user addresses
+            "MailTemplatesDirectory": "/usr/share/caldavd/templates", # Directory containing HTML templates for email invitations (invite.html, cancel.html)
+            "MailIconsDirectory": "/usr/share/caldavd/images", # Directory containing date-specific icons for email invitations (cal-icon-mm-dd.tiff)
         },
 
     },
@@ -288,7 +290,17 @@
     "IdleConnectionTimeOut": 15,
     "UIDReservationTimeOut": 30 * 60,
 
+
     #
+    # Localization
+    #
+    "Localization" : {
+        "LocalesDirectory" : "/usr/share/caldavd/locales",
+        "Language" : "en",
+    },
+
+
+    #
     # Implementation details
     #
     #    The following are specific to how the server is built, and useful

Modified: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/ical.py
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/ical.py	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/ical.py	2008-11-03 17:01:16 UTC (rev 3310)
@@ -1255,6 +1255,25 @@
 
         return results
 
+    def getAllAttendeeProperties(self):
+        """
+        Yield all attendees as Property objects.  Works on either a VCALENDAR or
+        on a component.
+        @return: a generator yielding Property objects
+        """
+
+        # Extract appropriate sub-component if this is a VCALENDAR
+        if self.name() == "VCALENDAR":
+            for component in self.subcomponents():
+                if component.name() != "VTIMEZONE":
+                    for attendee in component.getAllAttendeeProperties():
+                        yield attendee
+        else:
+            # Find the primary subcomponent
+            for attendee in self.properties("ATTENDEE"):
+                yield attendee
+
+
     def getMaskUID(self):
         """
         Get the X-CALENDARSEREVR-MASK-UID value. Works on either a VCALENDAR or on a component.

Copied: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/localization.py (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/localization.py)
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/localization.py	                        (rev 0)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/localization.py	2008-11-03 17:01:16 UTC (rev 3310)
@@ -0,0 +1,332 @@
+##
+# Copyright (c) 2005-2008 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+"""
+Localization module
+
+How to use:
+
+    from __future__ import with_statement
+    from localization import translationTo
+
+    with translationTo('de'):
+        print _("Hello")
+        print _("The event will last %(days)d days") % { 'days' : 4 }
+
+    ... Hallo
+    ... Die Veranstaltung dauert 4 Tage
+
+Before you can actually get translated text, you need to:
+
+    1) Choose a "domain" for your code, such as 'calendarserver'
+    2) Run pygettext.py on your source to generate a <domain>.pot file.
+       pygettext.py scans the source for _( ) and copies those strings to the
+       .pot.
+    3) For each language, copy the .pot file to .po and give it to the person
+       who is doing the translation for editing
+    4) Run msgfmt.py on the translated .po to generate a binary .mo
+    5) Put the .mo into locales/<lang>/LC_MESSAGES/<domain>.mo
+
+The German .po file for the above example would look like:
+
+    msgid "Hello"
+    msgstr "Hallo"
+
+    msgid "The event will last %(days)d days"
+    msgstr "Die Veranstaltung dauert %(days)d Tage"
+
+The transationTo class automatically binds '_' to the appropriate translation
+function for the duration of the "with" context.  It's smart enough to allow
+nesting of "with" contexts, as in:
+
+    with translationTo('de'):
+        print _("Hello") # in German
+
+        with translationTo('fr'):
+            print _("Hello") # in French
+
+        print _("Hello") # in German
+
+If a translation file cannot be found for the specified language, it will fall
+back to 'en'.  If 'en' can't be found, gettext will raise IOError.
+
+If you use the with/as form, you will get an object that implements some
+helper methods for date formatting:
+
+    with translationTo('en') as trans:
+        print trans.dtDate(datetime.today())
+
+    ... Thursday, October 23, 2008
+
+    with translationTo('fr') as trans:
+        print trans.dtDate(datetime.today())
+
+    ... Jeudi, Octobre 23, 2008
+
+The .po files contain localizable strings for month and day names, as well as
+date format strings, in case a locale likes these values in a different order
+or with different punctuation.
+
+
+TODO: recurrence
+"""
+
+
+import gettext
+import inspect
+import datetime
+from twistedcaldav.config import config
+
+
+class translationTo(object):
+
+    translations = {}
+
+    def __init__(self, lang, domain='calendarserver', localeDir=None):
+
+        if localeDir is None:
+            localeDir = config.Localization["LocalesDirectory"]
+
+        # Cache gettext translation objects in class.translations
+        key = (lang, domain, localeDir)
+        self.translation = self.translations.get(key, None)
+        if self.translation is None:
+            self.translation = gettext.translation(domain=domain,
+                localedir=localeDir, languages=[lang, 'en'], fallback=True)
+            self.translations[key] = self.translation
+
+    def __enter__(self):
+        # Get the caller's globals so we can rebind their '_' to our translator
+        caller_globals = inspect.stack()[1][0].f_globals
+
+        # Store whatever '_' is already bound to so we can restore it later
+        if caller_globals.has_key('_'):
+            self.prev = caller_globals['_']
+
+        # Rebind '_' to our translator
+        caller_globals['_'] = self.translation.ugettext
+
+        # What we return here is accessible to the caller via the 'as' clause
+        return self
+
+    def __exit__(self, type, value, traceback):
+        # Restore '_' if it previously had a value
+        if hasattr(self, 'prev'):
+            inspect.stack()[1][0].f_globals['_'] = self.prev
+
+        # Don't swallow exceptions
+        return False
+
+    def date(self, component):
+        dtStart = component.propertyNativeValue("DTSTART")
+        return self.dtDate(dtStart)
+
+    def time(self, component):
+        """
+        Examples:
+
+        3:30 PM to 4:30 PM PDT
+        All day
+        3:30 PM PDT
+        3:30 PM PDT to 7:30 PM EDT
+
+        1 day
+        2 days
+        1 day 1 hour
+        1 day 4 hours 18 minutes
+        """
+
+        # Bind to '_' so pygettext.py will pick this up for translation
+        _ = self.translation.ugettext
+
+        tzStart = tzEnd = None
+        dtStart = component.propertyNativeValue("DTSTART")
+        if isinstance(dtStart, datetime.datetime):
+            tzStart = dtStart.tzname()
+        else:
+            return ("", _("All day"))
+
+        # tzStart = component.getProperty("DTSTART").params().get("TZID", "UTC")
+
+        dtEnd = component.propertyNativeValue("DTEND")
+        if dtEnd:
+            if isinstance(dtEnd, datetime.datetime):
+                tzEnd = dtEnd.tzname()
+            # tzEnd = component.getProperty("DTEND").params().get("TZID", "UTC")
+            duration = dtEnd - dtStart
+        else:
+            tzEnd = tzStart
+            duration = component.propertyNativeValue("DURATION")
+            if duration:
+                dtEnd = dtStart + duration
+            else:
+                if isinstance(dtStart, datetime.date):
+                    dtEnd = None
+                    duration = datetime.timedelta(days=1)
+                else:
+                    dtEnd = dtStart + datetime.timedelta(days=1)
+                    dtEnd.hour = dtEnd.minute = dtEnd.second = 0
+                    duration = dtEnd - dtStart
+
+        if dtStart == dtEnd:
+            return (self.dtTime(dtStart), "")
+
+        return (
+            _("%(startTime)s to %(endTime)s")
+            % {
+                'startTime'      : self.dtTime(dtStart,
+                                    includeTimezone=(tzStart != tzEnd)),
+                'endTime'        : self.dtTime(dtEnd),
+            },
+            self.dtDuration(duration)
+        )
+
+
+    def dtDate(self, val):
+        # Bind to '_' so pygettext.py will pick this up for translation
+        _ = self.translation.ugettext
+
+        return (
+            _("%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d")
+            % {
+                'dayName'    : _(daysFull[val.weekday()]),
+                'monthName'  : _(monthsFull[val.month]),
+                'dayNumber'  : val.day,
+                'yearNumber' : val.year,
+            }
+        )
+
+    def dtTime(self, val, includeTimezone=True):
+        if not isinstance(val, (datetime.datetime, datetime.time)):
+            return ""
+
+        # Bind to '_' so pygettext.py will pick this up for translation
+        _ = self.translation.ugettext
+
+        ampm = _("AM") if val.hour < 12 else _("PM")
+        hour12 = val.hour % 12
+        if hour12 == 0:
+            hour12 = 12
+
+        result = (
+            _("%(hour12Number)d:%(minuteNumber)02d %(ampm)s")
+            % {
+                'hour24Number' : val.hour, # 0-23
+                'hour12Number' : hour12, # 1-12
+                'minuteNumber' : val.minute, # 0-59
+                'ampm'         : _(ampm),
+            }
+        )
+
+        if includeTimezone and val.tzname():
+            result += " %s" % (val.tzname())
+
+        return result
+
+    def dtDuration(self, val):
+
+        # Bind to '_' so pygettext.py will pick this up for translation
+        _ = self.translation.ugettext
+
+        parts = []
+
+        if val.days == 1:
+            parts.append(_("1 day"))
+        elif val.days > 1:
+            parts.append(_("%(dayCount)d days" %
+                { 'dayCount' : val.days }))
+
+        hours = val.seconds / 3600
+        minutes = divmod(val.seconds / 60, 60)[1]
+        seconds = divmod(val.seconds, 60)[1]
+
+        if hours == 1:
+            parts.append(_("1 hour"))
+        elif hours > 1:
+            parts.append(_("%(hourCount)d hours") %
+                { 'hourCount' : hours })
+
+        if minutes == 1:
+            parts.append(_("1 minute"))
+        elif minutes > 1:
+            parts.append(_("%(minuteCount)d minutes") %
+                { 'minuteCount' : minutes })
+
+        if seconds == 1:
+            parts.append(_("1 second"))
+        elif seconds > 1:
+            parts.append(_("%(secondCount)d seconds") %
+                { 'secondCount' : seconds })
+
+        return " ".join(parts)
+
+
+# The strings below are wrapped in _( ) for the benefit of pygettext.  We don't
+# actually want them translated until they're used.
+
+_ = lambda x: x
+
+daysFull = [
+    _("Monday"),
+    _("Tuesday"),
+    _("Wednesday"),
+    _("Thursday"),
+    _("Friday"),
+    _("Saturday"),
+    _("Sunday"),
+]
+
+daysAbbrev = [
+    _("Mon"),
+    _("Tue"),
+    _("Wed"),
+    _("Thu"),
+    _("Fri"),
+    _("Sun"),
+    _("Sat"),
+]
+
+monthsFull = [
+    "datetime.month is 1-based",
+    _("January"),
+    _("February"),
+    _("March"),
+    _("April"),
+    _("May"),
+    _("June"),
+    _("July"),
+    _("August"),
+    _("September"),
+    _("October"),
+    _("November"),
+    _("December"),
+]
+
+monthsAbbrev = [
+    "datetime.month is 1-based",
+    _("Jan"),
+    _("Feb"),
+    _("Mar"),
+    _("Apr"),
+    _("May"),
+    _("Jun"),
+    _("Jul"),
+    _("Aug"),
+    _("Sep"),
+    _("Oct"),
+    _("Nov"),
+    _("Dec"),
+]

Modified: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/mail.py
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/mail.py	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/mail.py	2008-11-03 17:01:16 UTC (rev 3310)
@@ -18,6 +18,7 @@
 Mail Gateway for Calendar Server
 
 """
+from __future__ import with_statement
 
 from email.mime.image import MIMEImage
 from email.mime.multipart import MIMEMultipart
@@ -41,7 +42,9 @@
 from twistedcaldav.log import Logger, LoggingMixIn
 from twistedcaldav.resource import CalDAVResource
 from twistedcaldav.scheduling.scheduler import IMIPScheduler
+from twistedcaldav.scheduling.cuaddress import normalizeCUAddr
 from twistedcaldav.sql import AbstractSQLDatabase
+from twistedcaldav.localization import translationTo
 
 from zope.interface import implements
 
@@ -260,6 +263,8 @@
     log.debug("Injecting to %s: %s %s" % (url, str(headers), data))
     factory = client.HTTPClientFactory(url, method='POST', headers=headers,
         postdata=data, agent="iMIP gateway")
+    factory.noisy = False
+
     if useSSL:
         reactor.connectSSL(host, port, factory, ssl.ClientContextFactory())
     else:
@@ -480,8 +485,9 @@
             # Compute token, add to db, generate email and send it
             calendar = ical.Component.fromString(request.content.read())
             headers = request.getAllHeaders()
+            language = config.Localization["Language"]
             self.mailer.outbound(headers['originator'], headers['recipient'],
-                calendar)
+                calendar, language=language)
 
             # TODO: what to return?
             return """
@@ -576,7 +582,7 @@
             # TODO: what to do in this case?
             pass
 
-        self.log_error("Mail gateway processing DSN %s" % (msgId,))
+        self.log_warn("Mail gateway processing DSN %s" % (msgId,))
         return fn(organizer, attendee, calendar, msgId)
 
     def processReply(self, msg, fn):
@@ -627,39 +633,63 @@
 
 
     def inbound(self, message, fn=injectMessage):
-        msg = email.message_from_string(message)
+        try:
+            msg = email.message_from_string(message)
 
-        isDSN, action, calBody = self.checkDSN(msg)
-        if isDSN:
-            if action == 'failed' and calBody:
-                # This is a DSN we can handle
-                return self.processDSN(calBody, msg['Message-ID'], fn)
-            else:
-                # It's a DSN without enough to go on
-                self.log_error("Mail gateway can't process DSN %s" % (msg['Message-ID'],))
-                return
+            isDSN, action, calBody = self.checkDSN(msg)
+            if isDSN:
+                if action == 'failed' and calBody:
+                    # This is a DSN we can handle
+                    return self.processDSN(calBody, msg['Message-ID'], fn)
+                else:
+                    # It's a DSN without enough to go on
+                    self.log_error("Mail gateway can't process DSN %s" % (msg['Message-ID'],))
+                    return
 
-        self.log_info("Mail gateway received message %s from %s to %s" %
-            (msg['Message-ID'], msg['From'], msg['To']))
+            self.log_info("Mail gateway received message %s from %s to %s" %
+                (msg['Message-ID'], msg['From'], msg['To']))
 
-        return self.processReply(msg, fn)
+            return self.processReply(msg, fn)
 
+        except Exception, e:
+            # Don't let a failure of any kind stop us
+            self.log_error("Failed to process message: %s" % (e,))
 
 
-    def outbound(self, organizer, attendee, calendar):
+
+
+    def outbound(self, organizer, attendee, calendar, language='en'):
         # create token, send email
         token = self.db.getToken(organizer, attendee)
         if token is None:
             token = self.db.createToken(organizer, attendee)
-            self.log_info("Mail gateway created token %s for %s (organizer) and %s (attendee)" % (token, organizer, attendee))
+            self.log_debug("Mail gateway created token %s for %s (organizer) and %s (attendee)" % (token, organizer, attendee))
         else:
-            self.log_info("Mail gateway reusing token %s for %s (organizer) and %s (attendee)" % (token, organizer, attendee))
+            self.log_debug("Mail gateway reusing token %s for %s (organizer) and %s (attendee)" % (token, organizer, attendee))
 
         settings = config.Scheduling['iMIP']['Sending']
         fullServerAddress = settings['Address']
         name, serverAddress = email.utils.parseaddr(fullServerAddress)
         pre, post = serverAddress.split('@')
         addressWithToken = "%s+%s@%s" % (pre, token, post)
+
+        attendees = []
+        for attendeeProp in calendar.getAllAttendeeProperties():
+            params = attendeeProp.params()
+            cutype = params.get('CUTYPE', (None,))[0]
+            if cutype == "INDIVIDUAL":
+                cn = params.get("CN", (None,))[0]
+                cuaddr = normalizeCUAddr(attendeeProp.value())
+                if cuaddr.startswith("mailto:"):
+                    mailto = cuaddr[7:]
+                    if not cn:
+                        cn = mailto
+                else:
+                    mailto = None
+
+                if cn or mailto:
+                    attendees.append( (cn, mailto) )
+
         calendar.getOrganizerProperty().setValue("mailto:%s" %
             (addressWithToken,))
 
@@ -667,29 +697,34 @@
         if organizerAttendee is not None:
             organizerAttendee.setValue("mailto:%s" % (addressWithToken,))
 
-        msgId, message = self._generateTemplateMessage(calendar, organizer)
 
         # The email's From will include the organizer's real name email
         # address if available.  Otherwise it will be the server's email
         # address (without # + addressing)
         if organizer.startswith("mailto:"):
-            fromAddr = organizer[7:]
+            orgEmail = fromAddr = organizer[7:]
         else:
             fromAddr = serverAddress
-        cn = calendar.getOrganizerProperty().params().get('CN',
-            ['Calendar Server'])[0]
+            orgEmail = None
+        cn = calendar.getOrganizerProperty().params().get('CN', (None,))[0]
+        if cn is None:
+            cn = 'Calendar Server'
+            orgCN = orgEmail
+        else:
+            orgCN = cn
         formattedFrom = "%s <%s>" % (cn, fromAddr)
-        message = message.replace("${fromaddress}", formattedFrom)
 
         # Reply-to address will be the server+token address
-        message = message.replace("${replytoaddress}", addressWithToken)
 
         toAddr = attendee
         if not attendee.startswith("mailto:"):
             raise ValueError("ATTENDEE address '%s' must be mailto: for iMIP operation." % (attendee,))
         attendee = attendee[7:]
-        message = message.replace("${toaddress}", attendee)
 
+        msgId, message = self.generateEmail(calendar, orgEmail, orgCN,
+            attendees, formattedFrom, addressWithToken, attendee,
+            language=language)
+
         self.log_debug("Sending: %s" % (message,))
         def _success(result, msgId, fromAddr, toAddr):
             self.log_info("Mail gateway sent message %s from %s to %s" %
@@ -706,57 +741,181 @@
         deferred.addErrback(_failure, msgId, fromAddr, toAddr)
 
 
-    def _generateTemplateMessage(self, calendar, organizer):
+    def generateEmail(self, calendar, orgEmail, orgCN, attendees, fromAddress,
+        replyToAddress, toAddress, language='en'):
 
-        title, summary = self._generateCalendarSummary(calendar, organizer)
+        details = self.getEventDetails(calendar, language=language)
 
-        msg = MIMEMultipart()
-        msg["From"] = "${fromaddress}"
-        msg["Reply-To"] = "${replytoaddress}"
-        msg["To"] = "${toaddress}"
-        msg["Date"] = rfc822date()
-        msgId = messageid()
-        msg["Message-ID"] = msgId
+        iconDir = config.Scheduling["iMIP"]["MailIconsDirectory"].rstrip("/")
+        iconName = "cal-icon-%02d-%02d.tiff" % (details['month'],
+            details['day'])
+        iconPath = os.path.join(iconDir, iconName)
 
-        msgAlt = MIMEMultipart("alternative")
-        msg.attach(msgAlt)
+        with translationTo(language):
+            msg = MIMEMultipart()
+            msg["From"] = fromAddress
+            msg["Reply-To"] = replyToAddress
+            msg["To"] = toAddress
+            msg["Date"] = rfc822date()
+            msgId = messageid()
+            msg["Message-ID"] = msgId
 
-        # plain text version
-        if calendar.propertyValue("METHOD") == "CANCEL":
-            msg["Subject"] = "Event cancelled"
-            plainText = u"An event has been cancelled.  Click the link below.\n"
-        else:
-            msg["Subject"] = "Event invitation: %s" % (title,)
-            plainText = u"You've been invited to the following event:  %s To accept or decline this invitation, click the link below.\n" % (summary,)
+            cancelled = (calendar.propertyValue("METHOD") == "CANCEL")
+            formatString = (_("Event cancelled: %(summary)s") if cancelled else
+                _("Event invitation: %(summary)s"))
+            details['subject'] = msg['Subject'] = formatString % {
+                'summary' : details['summary']
+            }
 
-        msgPlain = MIMEText(plainText.encode("UTF-8"), "plain", "UTF-8")
-        msgAlt.attach(msgPlain)
+            msgAlt = MIMEMultipart("alternative")
+            msg.attach(msgAlt)
 
-        # html version
-        msgHtmlRelated = MIMEMultipart("related", type="text/html")
-        msgAlt.attach(msgHtmlRelated)
-        htmlText = u"""
-<html><body><div>
-<img src="cid:ical.jpg">
-%s
-</div></body></html>
-""" % plainText
+            # Get localized labels
+            details['inviteLabel'] = _("Event Invitation")
+            details['dateLabel'] = _("Date")
+            details['timeLabel'] = _("Time")
+            details['durationLabel'] = _("Duration")
+            details['recurrenceLabel'] = _("Occurs")
+            details['descLabel'] = _("Description")
+            details['orgLabel'] = _("Organizer")
+            details['attLabel'] = _("Attendees")
+            details['locLabel'] = _("Location")
+
+
+            plainAttendeeList = []
+            for cn, mailto in attendees:
+                if cn:
+                    plainAttendeeList.append(cn if not mailto else
+                        "%s <%s>" % (cn, mailto))
+                elif mailto:
+                    plainAttendeeList.append("<%s>" % (mailto,))
+
+            details['plainAttendees'] = ", ".join(plainAttendeeList)
+
+            details['plainOrganizer'] = (orgCN if not orgEmail else
+                "%s <%s>" % (orgCN, orgEmail))
+
+            # plain text version
+            if cancelled:
+                plainTemplate = u"""%(subject)s
+
+%(orgLabel)s: %(plainOrganizer)s
+%(dateLabel)s: %(dateInfo)s %(recurrenceInfo)s
+%(timeLabel)s: %(timeInfo)s %(durationInfo)s
+"""
+            else:
+                plainTemplate = u"""%(subject)s
+
+%(orgLabel)s: %(plainOrganizer)s
+%(locLabel)s: %(location)s
+%(dateLabel)s: %(dateInfo)s %(recurrenceInfo)s
+%(timeLabel)s: %(timeInfo)s %(durationInfo)s
+%(descLabel)s: %(description)s
+%(attLabel)s: %(plainAttendees)s
+"""
+
+            plainText = plainTemplate % details
+
+            msgPlain = MIMEText(plainText.encode("UTF-8"), "plain", "UTF-8")
+            msgAlt.attach(msgPlain)
+
+            # html version
+            msgHtmlRelated = MIMEMultipart("related", type="text/html")
+            msgAlt.attach(msgHtmlRelated)
+
+
+            htmlAttendees = []
+            for cn, mailto in attendees:
+                if mailto:
+                    htmlAttendees.append('<a href="mailto:%s">%s</a>' %
+                        (mailto, cn))
+                else:
+                    htmlAttendees.append(cn)
+
+            details['htmlAttendees'] = ", ".join(htmlAttendees)
+
+            if orgEmail:
+                details['htmlOrganizer'] = '<a href="mailto:%s">%s</a>' % (
+                    orgEmail, orgCN)
+            else:
+                details['htmlOrganizer'] = orgCN
+
+            details['iconName'] = iconName
+
+            templateDir = config.Scheduling["iMIP"]["MailTemplatesDirectory"].rstrip("/")
+            templateName = "cancel.html" if cancelled else "invite.html"
+            templatePath = os.path.join(templateDir, templateName)
+
+            if not os.path.exists(templatePath):
+                # Fall back to built-in simple templates:
+                if cancelled:
+
+                    htmlTemplate = u"""<html>
+    <body><div>
+
+    <h1>%(subject)s</h1>
+    <p>
+    <h3>%(orgLabel)s:</h3> %(htmlOrganizer)s
+    </p>
+    <p>
+    <h3>%(dateLabel)s:</h3> %(dateInfo)s %(recurrenceInfo)s
+    </p>
+    <p>
+    <h3>%(timeLabel)s:</h3> %(timeInfo)s %(durationInfo)s
+    </p>
+
+    """
+
+                else:
+
+                    htmlTemplate = u"""<html>
+    <body><div>
+    <p>%(inviteLabel)s</p>
+
+    <h1>%(summary)s</h1>
+    <p>
+    <h3>%(orgLabel)s:</h3> %(htmlOrganizer)s
+    </p>
+    <p>
+    <h3>%(locLabel)s:</h3> %(location)s
+    </p>
+    <p>
+    <h3>%(dateLabel)s:</h3> %(dateInfo)s %(recurrenceInfo)s
+    </p>
+    <p>
+    <h3>%(timeLabel)s:</h3> %(timeInfo)s %(durationInfo)s
+    </p>
+    <p>
+    <h3>%(descLabel)s:</h3> %(description)s
+    </p>
+    <p>
+    <h3>%(attLabel)s:</h3> %(htmlAttendees)s
+    </p>
+
+    """
+            else: # HTML template file exists
+
+                with open(templatePath) as templateFile:
+                    htmlTemplate = templateFile.read()
+
+            htmlText = htmlTemplate % details
+
         msgHtml = MIMEText(htmlText.encode("UTF-8"), "html", "UTF-8")
         msgHtmlRelated.attach(msgHtml)
 
         # an image for html version
-        imageName = "ical.jpg"
-        imageFile = open(os.path.join(os.path.dirname(__file__),
-            "images", "mail", imageName))
-        msgImage = MIMEImage(imageFile.read(),
-            _subtype='jpeg;x-apple-mail-type=stationery;name="%s"' %
-            (imageName,))
-        imageFile.close()
-        msgImage.add_header("Content-ID", "<%s>" % (imageName,))
-        msgImage.add_header("Content-Disposition", "inline;filename=%s" %
-            (imageName,))
-        msgHtmlRelated.attach(msgImage)
+        if os.path.exists(iconPath) and htmlTemplate.find("cid:%(iconName)s") != -1:
 
+            with open(iconPath) as iconFile:
+                msgIcon = MIMEImage(iconFile.read(),
+                    _subtype='tiff;x-apple-mail-type=stationery;name="%s"' %
+                    (iconName,))
+
+            msgIcon.add_header("Content-ID", "<%s>" % (iconName,))
+            msgIcon.add_header("Content-Disposition", "inline;filename=%s" %
+                (iconName,))
+            msgHtmlRelated.attach(msgIcon)
+
         # the icalendar attachment
         self.log_debug("Mail gateway sending calendar body: %s" % (str(calendar)))
         msgIcal = MIMEText(str(calendar), "calendar", "UTF-8")
@@ -769,135 +928,55 @@
         return msgId, msg.as_string()
 
 
-    def _generateCalendarSummary(self, calendar, organizer):
+    def getEventDetails(self, calendar, language='en'):
 
         # Get the most appropriate component
         component = calendar.masterComponent()
         if component is None:
             component = calendar.mainComponent(True)
 
-        organizerProp = component.getOrganizerProperty()
-        if "CN" in organizerProp.params():
-            organizer = "%s <%s>" % (organizerProp.params()["CN"][0],
-                organizer,)
+        results = { }
 
-        if calendar.propertyValue("METHOD") == "CANCEL":
-            dtinfo = ""
-        else:
-            dtinfo = self._getDateTimeInfo(component)
+        dtStart = component.propertyNativeValue("DTSTART")
+        results['month'] = dtStart.month
+        results['day'] = dtStart.day
 
         summary = component.propertyValue("SUMMARY")
         if summary is None:
             summary = ""
+        results['summary'] = summary
 
         description = component.propertyValue("DESCRIPTION")
         if description is None:
             description = ""
+        results['description'] = description
 
-        return summary, """
+        location = component.propertyValue("LOCATION")
+        if location is None:
+            location = ""
+        results['location'] = location
 
-Summary: %s
-Organizer: %s
-%sDescription: %s
+        with translationTo(language) as trans:
+            results['dateInfo'] = trans.date(component)
+            results['timeInfo'], duration = trans.time(component)
+            results['durationInfo'] = "(%s)" % (duration,) if duration else ""
 
-""" % (summary, organizer, dtinfo, description,)
-
-    def _getDateTimeInfo(self, component):
-
-        dtstart = component.propertyNativeValue("DTSTART")
-        tzid_start = component.getProperty("DTSTART").params().get("TZID", "UTC")
-
-        dtend = component.propertyNativeValue("DTEND")
-        if dtend:
-            tzid_end = component.getProperty("DTEND").params().get("TZID", "UTC")
-            duration = dtend - dtstart
-        else:
-            duration = component.propertyNativeValue("DURATION")
-            if duration:
-                dtend = dtstart + duration
-                tzid_end = tzid_start
+            for propertyName in ("RRULE", "RDATE", "EXRULE", "EXDATE",
+                "RECURRENCE-ID"):
+                if component.hasProperty(propertyName):
+                    results['recurrenceInfo'] = _("(Repeating)")
+                    break
             else:
-                if isinstance(dtstart, datetime.date):
-                    dtend = None
-                    duration = datetime.timedelta(days=1)
-                else:
-                    dtend = dtstart + datetime.timedelta(days=1)
-                    dtend.hour = dtend.minute = dtend.second = 0
-                    duration = dtend - dtstart
-        result = "Starts:      %s\n" % (self._getDateTimeText(dtstart, tzid_start),)
-        if dtend is not None:
-            result += "Ends:        %s\n" % (self._getDateTimeText(dtend, tzid_end),)
-        result += "Duration:    %s\n" % (self._getDurationText(duration),)
+                results['recurrenceInfo'] = ""
 
-        if not isinstance(dtstart, datetime.datetime):
-            result += "All Day\n"
+        return results
 
-        for property_name in ("RRULE", "RDATE", "EXRULE", "EXDATE", "RECURRENCE-ID",):
-            if component.hasProperty(property_name):
-                result += "Recurring\n"
-                break
 
-        return result
 
-    def _getDateTimeText(self, dtvalue, tzid):
 
-        if isinstance(dtvalue, datetime.datetime):
-            timeformat = "%A, %B %e, %Y %I:%M %p"
-        elif isinstance(dtvalue, datetime.date):
-            timeformat = "%A, %B %e, %Y"
-            tzid = ""
-        if tzid:
-            tzid = " (%s)" % (tzid,)
 
-        return "%s%s" % (dtvalue.strftime(timeformat), tzid,)
 
-    def _getDurationText(self, duration):
 
-        result = ""
-        if duration.days > 0:
-            result += "%d %s" % (
-                duration.days,
-                self._pluralize(duration.days, "day", "days")
-            )
-
-        hours = duration.seconds / 3600
-        minutes = divmod(duration.seconds / 60, 60)[1]
-        seconds = divmod(duration.seconds, 60)[1]
-
-        if hours > 0:
-            if result:
-                result += ", "
-            result += "%d %s" % (
-                hours,
-                self._pluralize(hours, "hour", "hours")
-            )
-
-        if minutes > 0:
-            if result:
-                result += ", "
-            result += "%d %s" % (
-                minutes,
-                self._pluralize(minutes, "minute", "minutes")
-            )
-
-        if seconds > 0:
-            if result:
-                result += ", "
-            result += "%d %s" % (
-                seconds,
-                self._pluralize(seconds, "second", "seconds")
-            )
-
-        return result
-
-    def _pluralize(self, number, unit1, unitS):
-        return unit1 if number == 1 else unitS
-
-
-
-
-
-
 #
 # POP3
 #
@@ -972,6 +1051,7 @@
             from twisted.internet import reactor
         self.reactor = reactor
         self.nextPoll = None
+        self.noisy = False
 
     def retry(self, connector=None):
         # TODO: if connector is None:
@@ -1147,6 +1227,7 @@
         if reactor is None:
             from twisted.internet import reactor
         self.reactor = reactor
+        self.noisy = False
 
 
     def handleMessage(self, message):

Deleted: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.mo
===================================================================
(Binary files differ)

Copied: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.mo (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.mo)
===================================================================
(Binary files differ)

Deleted: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po
===================================================================
--- CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -1,249 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR ORGANIZATION
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-
-
-#: localization.py:171
-msgid "All day"
-msgstr ""
-
-#: localization.py:177
-msgid "%(startTime)s to %(endTime)s"
-msgstr ""
-
-#: localization.py:191
-msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-msgstr ""
-
-#: localization.py:207
-msgid "AM"
-msgstr ""
-
-#: localization.py:207
-msgid "PM"
-msgstr ""
-
-#: localization.py:213
-msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
-msgstr ""
-
-#: localization.py:236
-msgid "Monday"
-msgstr ""
-
-#: localization.py:237
-msgid "Tuesday"
-msgstr ""
-
-#: localization.py:238
-msgid "Wednesday"
-msgstr ""
-
-#: localization.py:239
-msgid "Thursday"
-msgstr ""
-
-#: localization.py:240
-msgid "Friday"
-msgstr ""
-
-#: localization.py:241
-msgid "Saturday"
-msgstr ""
-
-#: localization.py:242
-msgid "Sunday"
-msgstr ""
-
-#: localization.py:246
-msgid "Mon"
-msgstr ""
-
-#: localization.py:247
-msgid "Tue"
-msgstr ""
-
-#: localization.py:248
-msgid "Wed"
-msgstr ""
-
-#: localization.py:249
-msgid "Thu"
-msgstr ""
-
-#: localization.py:250
-msgid "Fri"
-msgstr ""
-
-#: localization.py:251
-msgid "Sun"
-msgstr ""
-
-#: localization.py:252
-msgid "Sat"
-msgstr ""
-
-#: localization.py:257
-msgid "January"
-msgstr ""
-
-#: localization.py:258
-msgid "February"
-msgstr ""
-
-#: localization.py:259
-msgid "March"
-msgstr ""
-
-#: localization.py:260
-msgid "April"
-msgstr ""
-
-#: localization.py:261 localization.py:277
-msgid "May"
-msgstr ""
-
-#: localization.py:262
-msgid "June"
-msgstr ""
-
-#: localization.py:263
-msgid "July"
-msgstr ""
-
-#: localization.py:264
-msgid "August"
-msgstr ""
-
-#: localization.py:265
-msgid "September"
-msgstr ""
-
-#: localization.py:266
-msgid "October"
-msgstr ""
-
-#: localization.py:267
-msgid "November"
-msgstr ""
-
-#: localization.py:268
-msgid "December"
-msgstr ""
-
-#: localization.py:273
-msgid "Jan"
-msgstr ""
-
-#: localization.py:274
-msgid "Feb"
-msgstr ""
-
-#: localization.py:275
-msgid "Mar"
-msgstr ""
-
-#: localization.py:276
-msgid "Apr"
-msgstr ""
-
-#: localization.py:278
-msgid "Jun"
-msgstr ""
-
-#: localization.py:279
-msgid "Jul"
-msgstr ""
-
-#: localization.py:280
-msgid "Aug"
-msgstr ""
-
-#: localization.py:281
-msgid "Sep"
-msgstr ""
-
-#: localization.py:282
-msgid "Oct"
-msgstr ""
-
-#: localization.py:283
-msgid "Nov"
-msgstr ""
-
-#: localization.py:284
-msgid "Dec"
-msgstr ""
-
-#: mail.py:726 mail.py:755 mail.py:792
-msgid "Event cancelled"
-msgstr ""
-
-#: mail.py:727
-msgid "Event invitation: %(summary)s"
-msgstr ""
-
-#: mail.py:736
-msgid "Event Invitation"
-msgstr ""
-
-#: mail.py:737
-msgid "Date"
-msgstr ""
-
-#: mail.py:738
-msgid "Time"
-msgstr ""
-
-#: mail.py:739
-msgid "Description"
-msgstr ""
-
-#: mail.py:740
-msgid "Organizer"
-msgstr ""
-
-#: mail.py:741
-msgid "Attendees"
-msgstr ""
-
-#: mail.py:742
-msgid "Location"
-msgstr ""
-
-
-msgid "1 day"
-msgstr
-
-msgid "%(dayCount)d days"
-msgstr
-
-msgid "1 hour"
-
-msgid "%(hourCount)d hours"
-msgstr
-
-msgid "1 minute"
-msgstr
-
-msgid "%(minuteCount)d minutes"
-msgstr
-
-msgid "1 second"
-msgstr
-
-msgid "%(secondCount)d seconds"
-msgstr
-

Copied: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po)
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po	                        (rev 0)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/en/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -0,0 +1,249 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: localization.py:171
+msgid "All day"
+msgstr ""
+
+#: localization.py:177
+msgid "%(startTime)s to %(endTime)s"
+msgstr ""
+
+#: localization.py:191
+msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+msgstr ""
+
+#: localization.py:207
+msgid "AM"
+msgstr ""
+
+#: localization.py:207
+msgid "PM"
+msgstr ""
+
+#: localization.py:213
+msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
+msgstr ""
+
+#: localization.py:236
+msgid "Monday"
+msgstr ""
+
+#: localization.py:237
+msgid "Tuesday"
+msgstr ""
+
+#: localization.py:238
+msgid "Wednesday"
+msgstr ""
+
+#: localization.py:239
+msgid "Thursday"
+msgstr ""
+
+#: localization.py:240
+msgid "Friday"
+msgstr ""
+
+#: localization.py:241
+msgid "Saturday"
+msgstr ""
+
+#: localization.py:242
+msgid "Sunday"
+msgstr ""
+
+#: localization.py:246
+msgid "Mon"
+msgstr ""
+
+#: localization.py:247
+msgid "Tue"
+msgstr ""
+
+#: localization.py:248
+msgid "Wed"
+msgstr ""
+
+#: localization.py:249
+msgid "Thu"
+msgstr ""
+
+#: localization.py:250
+msgid "Fri"
+msgstr ""
+
+#: localization.py:251
+msgid "Sun"
+msgstr ""
+
+#: localization.py:252
+msgid "Sat"
+msgstr ""
+
+#: localization.py:257
+msgid "January"
+msgstr ""
+
+#: localization.py:258
+msgid "February"
+msgstr ""
+
+#: localization.py:259
+msgid "March"
+msgstr ""
+
+#: localization.py:260
+msgid "April"
+msgstr ""
+
+#: localization.py:261 localization.py:277
+msgid "May"
+msgstr ""
+
+#: localization.py:262
+msgid "June"
+msgstr ""
+
+#: localization.py:263
+msgid "July"
+msgstr ""
+
+#: localization.py:264
+msgid "August"
+msgstr ""
+
+#: localization.py:265
+msgid "September"
+msgstr ""
+
+#: localization.py:266
+msgid "October"
+msgstr ""
+
+#: localization.py:267
+msgid "November"
+msgstr ""
+
+#: localization.py:268
+msgid "December"
+msgstr ""
+
+#: localization.py:273
+msgid "Jan"
+msgstr ""
+
+#: localization.py:274
+msgid "Feb"
+msgstr ""
+
+#: localization.py:275
+msgid "Mar"
+msgstr ""
+
+#: localization.py:276
+msgid "Apr"
+msgstr ""
+
+#: localization.py:278
+msgid "Jun"
+msgstr ""
+
+#: localization.py:279
+msgid "Jul"
+msgstr ""
+
+#: localization.py:280
+msgid "Aug"
+msgstr ""
+
+#: localization.py:281
+msgid "Sep"
+msgstr ""
+
+#: localization.py:282
+msgid "Oct"
+msgstr ""
+
+#: localization.py:283
+msgid "Nov"
+msgstr ""
+
+#: localization.py:284
+msgid "Dec"
+msgstr ""
+
+#: mail.py:726 mail.py:755 mail.py:792
+msgid "Event cancelled"
+msgstr ""
+
+#: mail.py:727
+msgid "Event invitation: %(summary)s"
+msgstr ""
+
+#: mail.py:736
+msgid "Event Invitation"
+msgstr ""
+
+#: mail.py:737
+msgid "Date"
+msgstr ""
+
+#: mail.py:738
+msgid "Time"
+msgstr ""
+
+#: mail.py:739
+msgid "Description"
+msgstr ""
+
+#: mail.py:740
+msgid "Organizer"
+msgstr ""
+
+#: mail.py:741
+msgid "Attendees"
+msgstr ""
+
+#: mail.py:742
+msgid "Location"
+msgstr ""
+
+
+msgid "1 day"
+msgstr
+
+msgid "%(dayCount)d days"
+msgstr
+
+msgid "1 hour"
+
+msgid "%(hourCount)d hours"
+msgstr
+
+msgid "1 minute"
+msgstr
+
+msgid "%(minuteCount)d minutes"
+msgstr
+
+msgid "1 second"
+msgstr
+
+msgid "%(secondCount)d seconds"
+msgstr
+

Deleted: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.mo
===================================================================
(Binary files differ)

Copied: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.mo (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.mo)
===================================================================
(Binary files differ)

Deleted: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po
===================================================================
--- CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po	2008-11-03 17:00:02 UTC (rev 3309)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -1,250 +0,0 @@
-# Pig Latin Translation
-# Copyright (C) YEAR ORGANIZATION
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-
-
-#: localization.py:171
-msgid "All day"
-msgstr "Allway ayday"
-
-#: localization.py:177
-msgid "%(startTime)s to %(endTime)s"
-msgstr "%(startTime)s otay %(endTime)s"
-
-#: localization.py:191
-msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-msgstr "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
-
-#: localization.py:207
-msgid "AM"
-msgstr "AMWAY"
-
-#: localization.py:207
-msgid "PM"
-msgstr "PMAY"
-
-#: localization.py:213
-msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
-msgstr "%(hour24Number)02d:%(minuteNumber)02d"
-
-#: localization.py:236
-msgid "Monday"
-msgstr "Ondaymay"
-
-#: localization.py:237
-msgid "Tuesday"
-msgstr "Uesdaytay"
-
-#: localization.py:238
-msgid "Wednesday"
-msgstr "Ednesdayway"
-
-#: localization.py:239
-msgid "Thursday"
-msgstr "Ursdaythay"
-
-#: localization.py:240
-msgid "Friday"
-msgstr "Idayfray"
-
-#: localization.py:241
-msgid "Saturday"
-msgstr "Aturdaysay"
-
-#: localization.py:242
-msgid "Sunday"
-msgstr "Undaysay"
-
-#: localization.py:246
-msgid "Mon"
-msgstr ""
-
-#: localization.py:247
-msgid "Tue"
-msgstr ""
-
-#: localization.py:248
-msgid "Wed"
-msgstr ""
-
-#: localization.py:249
-msgid "Thu"
-msgstr ""
-
-#: localization.py:250
-msgid "Fri"
-msgstr ""
-
-#: localization.py:251
-msgid "Sun"
-msgstr ""
-
-#: localization.py:252
-msgid "Sat"
-msgstr ""
-
-#: localization.py:257
-msgid "January"
-msgstr "Anuaryjay"
-
-#: localization.py:258
-msgid "February"
-msgstr "Ebruaryfay"
-
-#: localization.py:259
-msgid "March"
-msgstr "Archmay"
-
-#: localization.py:260
-msgid "April"
-msgstr "Aprilway"
-
-#: localization.py:261 localization.py:277
-msgid "May"
-msgstr "Aymay"
-
-#: localization.py:262
-msgid "June"
-msgstr "Unejay"
-
-#: localization.py:263
-msgid "July"
-msgstr "Ulyjay"
-
-#: localization.py:264
-msgid "August"
-msgstr "Augustway"
-
-#: localization.py:265
-msgid "September"
-msgstr "Eptembersay"
-
-#: localization.py:266
-msgid "October"
-msgstr "Octoberway"
-
-#: localization.py:267
-msgid "November"
-msgstr "Ovembernay"
-
-#: localization.py:268
-msgid "December"
-msgstr "Ecemberday"
-
-#: localization.py:273
-msgid "Jan"
-msgstr ""
-
-#: localization.py:274
-msgid "Feb"
-msgstr ""
-
-#: localization.py:275
-msgid "Mar"
-msgstr ""
-
-#: localization.py:276
-msgid "Apr"
-msgstr ""
-
-#: localization.py:278
-msgid "Jun"
-msgstr ""
-
-#: localization.py:279
-msgid "Jul"
-msgstr ""
-
-#: localization.py:280
-msgid "Aug"
-msgstr ""
-
-#: localization.py:281
-msgid "Sep"
-msgstr ""
-
-#: localization.py:282
-msgid "Oct"
-msgstr ""
-
-#: localization.py:283
-msgid "Nov"
-msgstr ""
-
-#: localization.py:284
-msgid "Dec"
-msgstr ""
-
-#: mail.py:726 mail.py:755 mail.py:792
-msgid "Event cancelled"
-msgstr "Eventway ancelledcay"
-
-#: mail.py:727
-msgid "Event invitation: %(summary)s"
-msgstr "Eventway invitationway: %(summary)s"
-
-#: mail.py:736
-msgid "Event Invitation"
-msgstr "Eventway invitationway"
-
-#: mail.py:737
-msgid "Date"
-msgstr "Ateday"
-
-#: mail.py:738
-msgid "Time"
-msgstr "Imetay"
-
-#: mail.py:739
-msgid "Description"
-msgstr "Escriptionday"
-
-#: mail.py:740
-msgid "Organizer"
-msgstr "Organizerway"
-
-#: mail.py:741
-msgid "Attendees"
-msgstr "Attendeesway"
-
-#: mail.py:742
-msgid "Location"
-msgstr "Ocationlay"
-
-
-msgid "1 day"
-msgstr "1 ayday"
-
-msgid "%(dayCount)d days"
-msgstr "%(dayCount)d aysday"
-
-msgid "1 hour"
-msgstr "1 ourhay"
-
-msgid "%(hourCount)d hours"
-msgstr "%(hourCount)d ourshay"
-
-msgid "1 minute"
-msgstr "1 inutemay"
-
-msgid "%(minuteCount)d minutes"
-msgstr "%(minuteCount)d inutesmay"
-
-msgid "1 second"
-msgstr "1 econdsay"
-
-msgid "%(secondCount)d seconds"
-msgstr "%(secondCount)d econdsay"
-

Copied: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po)
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po	                        (rev 0)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/data/locales/pig/LC_MESSAGES/calendarserver.po	2008-11-03 17:01:16 UTC (rev 3310)
@@ -0,0 +1,250 @@
+# Pig Latin Translation
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-10-24 15:03+PDT\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: localization.py:171
+msgid "All day"
+msgstr "Allway ayday"
+
+#: localization.py:177
+msgid "%(startTime)s to %(endTime)s"
+msgstr "%(startTime)s otay %(endTime)s"
+
+#: localization.py:191
+msgid "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+msgstr "%(dayName)s, %(monthName)s %(dayNumber)d, %(yearNumber)d"
+
+#: localization.py:207
+msgid "AM"
+msgstr "AMWAY"
+
+#: localization.py:207
+msgid "PM"
+msgstr "PMAY"
+
+#: localization.py:213
+msgid "%(hour12Number)d:%(minuteNumber)02d %(ampm)s"
+msgstr "%(hour24Number)02d:%(minuteNumber)02d"
+
+#: localization.py:236
+msgid "Monday"
+msgstr "Ondaymay"
+
+#: localization.py:237
+msgid "Tuesday"
+msgstr "Uesdaytay"
+
+#: localization.py:238
+msgid "Wednesday"
+msgstr "Ednesdayway"
+
+#: localization.py:239
+msgid "Thursday"
+msgstr "Ursdaythay"
+
+#: localization.py:240
+msgid "Friday"
+msgstr "Idayfray"
+
+#: localization.py:241
+msgid "Saturday"
+msgstr "Aturdaysay"
+
+#: localization.py:242
+msgid "Sunday"
+msgstr "Undaysay"
+
+#: localization.py:246
+msgid "Mon"
+msgstr ""
+
+#: localization.py:247
+msgid "Tue"
+msgstr ""
+
+#: localization.py:248
+msgid "Wed"
+msgstr ""
+
+#: localization.py:249
+msgid "Thu"
+msgstr ""
+
+#: localization.py:250
+msgid "Fri"
+msgstr ""
+
+#: localization.py:251
+msgid "Sun"
+msgstr ""
+
+#: localization.py:252
+msgid "Sat"
+msgstr ""
+
+#: localization.py:257
+msgid "January"
+msgstr "Anuaryjay"
+
+#: localization.py:258
+msgid "February"
+msgstr "Ebruaryfay"
+
+#: localization.py:259
+msgid "March"
+msgstr "Archmay"
+
+#: localization.py:260
+msgid "April"
+msgstr "Aprilway"
+
+#: localization.py:261 localization.py:277
+msgid "May"
+msgstr "Aymay"
+
+#: localization.py:262
+msgid "June"
+msgstr "Unejay"
+
+#: localization.py:263
+msgid "July"
+msgstr "Ulyjay"
+
+#: localization.py:264
+msgid "August"
+msgstr "Augustway"
+
+#: localization.py:265
+msgid "September"
+msgstr "Eptembersay"
+
+#: localization.py:266
+msgid "October"
+msgstr "Octoberway"
+
+#: localization.py:267
+msgid "November"
+msgstr "Ovembernay"
+
+#: localization.py:268
+msgid "December"
+msgstr "Ecemberday"
+
+#: localization.py:273
+msgid "Jan"
+msgstr ""
+
+#: localization.py:274
+msgid "Feb"
+msgstr ""
+
+#: localization.py:275
+msgid "Mar"
+msgstr ""
+
+#: localization.py:276
+msgid "Apr"
+msgstr ""
+
+#: localization.py:278
+msgid "Jun"
+msgstr ""
+
+#: localization.py:279
+msgid "Jul"
+msgstr ""
+
+#: localization.py:280
+msgid "Aug"
+msgstr ""
+
+#: localization.py:281
+msgid "Sep"
+msgstr ""
+
+#: localization.py:282
+msgid "Oct"
+msgstr ""
+
+#: localization.py:283
+msgid "Nov"
+msgstr ""
+
+#: localization.py:284
+msgid "Dec"
+msgstr ""
+
+#: mail.py:726 mail.py:755 mail.py:792
+msgid "Event cancelled"
+msgstr "Eventway ancelledcay"
+
+#: mail.py:727
+msgid "Event invitation: %(summary)s"
+msgstr "Eventway invitationway: %(summary)s"
+
+#: mail.py:736
+msgid "Event Invitation"
+msgstr "Eventway invitationway"
+
+#: mail.py:737
+msgid "Date"
+msgstr "Ateday"
+
+#: mail.py:738
+msgid "Time"
+msgstr "Imetay"
+
+#: mail.py:739
+msgid "Description"
+msgstr "Escriptionday"
+
+#: mail.py:740
+msgid "Organizer"
+msgstr "Organizerway"
+
+#: mail.py:741
+msgid "Attendees"
+msgstr "Attendeesway"
+
+#: mail.py:742
+msgid "Location"
+msgstr "Ocationlay"
+
+
+msgid "1 day"
+msgstr "1 ayday"
+
+msgid "%(dayCount)d days"
+msgstr "%(dayCount)d aysday"
+
+msgid "1 hour"
+msgstr "1 ourhay"
+
+msgid "%(hourCount)d hours"
+msgstr "%(hourCount)d ourshay"
+
+msgid "1 minute"
+msgstr "1 inutemay"
+
+msgid "%(minuteCount)d minutes"
+msgstr "%(minuteCount)d inutesmay"
+
+msgid "1 second"
+msgstr "1 econdsay"
+
+msgid "%(secondCount)d seconds"
+msgstr "%(secondCount)d econdsay"
+

Copied: CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/test_localization.py (from rev 3309, CalendarServer/branches/users/sagen/localization-3280/twistedcaldav/test/test_localization.py)
===================================================================
--- CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/test_localization.py	                        (rev 0)
+++ CalendarServer/branches/users/sagen/localization-3308/twistedcaldav/test/test_localization.py	2008-11-03 17:01:16 UTC (rev 3310)
@@ -0,0 +1,137 @@
+##
+# Copyright (c) 2008 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from __future__ import with_statement
+
+from twisted.trial.unittest import TestCase
+from twistedcaldav.localization import translationTo
+from twistedcaldav.ical import Component
+from datetime import datetime, time
+import os
+
+def getComp(str):
+    calendar = Component.fromString(str)
+    comp = calendar.masterComponent()
+    if comp is None:
+        comp = calendar.mainComponent(True)
+    return comp
+
+data = (
+    ('1-hour-long-morning', getComp('BEGIN:VCALENDAR\r\nVERSION:2.0\r\nCALSCALE:GREGORIAN\r\nMETHOD:REQUEST\r\nPRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN\r\nBEGIN:VTIMEZONE\r\nTZID:US/Pacific\r\nBEGIN:STANDARD\r\nDTSTART:20071104T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\r\nTZNAME:PST\r\nTZOFFSETFROM:-0700\r\nTZOFFSETTO:-0800\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nDTSTART:20070311T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\r\nTZNAME:PDT\r\nTZOFFSETFROM:-0800\r\nTZOFFSETTO:-0700\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:C7C037CC-1485-461B-8866-777C662C5930\r\nDTSTART;TZID=US/Pacific:20081025T091500\r\nDTEND;TZID=US/Pacific:20081025T101501\r\nATTENDEE;CN=test at systemcall.com;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSV\r\n P=TRUE:mailto:test at systemcall.com\r\nATTENDEE;CN=Test User;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:testuser@\r\n example.com\r\nCREATED:20081024T181749Z\r\nDTSTAMP:20081024T183142Z\r\nORGANIZER;CN=Test User:mailto:testuser at ex
 ample.com\r\nSEQUENCE:5\r\nSUMMARY:testing\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n')),
+
+    ('2-hour-long-evening', getComp('BEGIN:VCALENDAR\r\nVERSION:2.0\r\nCALSCALE:GREGORIAN\r\nMETHOD:REQUEST\r\nPRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN\r\nBEGIN:VTIMEZONE\r\nTZID:US/Pacific\r\nBEGIN:STANDARD\r\nDTSTART:20071104T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\r\nTZNAME:PST\r\nTZOFFSETFROM:-0700\r\nTZOFFSETTO:-0800\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nDTSTART:20070311T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\r\nTZNAME:PDT\r\nTZOFFSETFROM:-0800\r\nTZOFFSETTO:-0700\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:C7C037CC-1485-461B-8866-777C662C5930\r\nDTSTART;TZID=US/Pacific:20081025T131500\r\nDTEND;TZID=US/Pacific:20081025T151502\r\nATTENDEE;CN=test at systemcall.com;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSV\r\n P=TRUE:mailto:test at systemcall.com\r\nATTENDEE;CN=Test User;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:testuser@\r\n example.com\r\nCREATED:20081024T181749Z\r\nDTSTAMP:20081024T183142Z\r\nORGANIZER;CN=Test User:mailto:testuser at ex
 ample.com\r\nSEQUENCE:5\r\nSUMMARY:testing\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n')),
+
+    ('3-hour-long-cross-noon', getComp('BEGIN:VCALENDAR\r\nVERSION:2.0\r\nCALSCALE:GREGORIAN\r\nMETHOD:REQUEST\r\nPRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN\r\nBEGIN:VTIMEZONE\r\nTZID:US/Pacific\r\nBEGIN:STANDARD\r\nDTSTART:20071104T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\r\nTZNAME:PST\r\nTZOFFSETFROM:-0700\r\nTZOFFSETTO:-0800\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nDTSTART:20070311T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\r\nTZNAME:PDT\r\nTZOFFSETFROM:-0800\r\nTZOFFSETTO:-0700\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:C7C037CC-1485-461B-8866-777C662C5930\r\nDTSTART;TZID=US/Pacific:20081025T110500\r\nDTEND;TZID=US/Pacific:20081025T141500\r\nATTENDEE;CN=test at systemcall.com;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSV\r\n P=TRUE:mailto:test at systemcall.com\r\nATTENDEE;CN=Test User;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:testuser@\r\n example.com\r\nCREATED:20081024T181749Z\r\nDTSTAMP:20081024T183142Z\r\nORGANIZER;CN=Test User:mailto:testuser
 @example.com\r\nSEQUENCE:5\r\nSUMMARY:testing\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n')),
+
+    ('all-day', getComp('BEGIN:VCALENDAR\r\nVERSION:2.0\r\nCALSCALE:GREGORIAN\r\nMETHOD:REQUEST\r\nPRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN\r\nBEGIN:VTIMEZONE\r\nTZID:US/Pacific\r\nBEGIN:STANDARD\r\nDTSTART:20071104T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\r\nTZNAME:PST\r\nTZOFFSETFROM:-0700\r\nTZOFFSETTO:-0800\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nDTSTART:20070311T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\r\nTZNAME:PDT\r\nTZOFFSETFROM:-0800\r\nTZOFFSETTO:-0700\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:C7C037CC-1485-461B-8866-777C662C5930\r\nDTSTART;TZID=US/Pacific:20081025\r\nATTENDEE;CN=test at systemcall.com;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSV\r\n P=TRUE:mailto:test at systemcall.com\r\nATTENDEE;CN=Test User;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:testuser@\r\n example.com\r\nCREATED:20081024T181749Z\r\nDTSTAMP:20081024T183142Z\r\nORGANIZER;CN=Test User:mailto:testuser at example.com\r\nSEQUENCE:5\r\nSUMMARY:testing\r\nTRANSP:OPAQUE\
 r\nEND:VEVENT\r\nEND:VCALENDAR\r\n')),
+
+    ('instantaneous', getComp('BEGIN:VCALENDAR\r\nVERSION:2.0\r\nCALSCALE:GREGORIAN\r\nMETHOD:REQUEST\r\nPRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN\r\nBEGIN:VTIMEZONE\r\nTZID:US/Pacific\r\nBEGIN:STANDARD\r\nDTSTART:20071104T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\r\nTZNAME:PST\r\nTZOFFSETFROM:-0700\r\nTZOFFSETTO:-0800\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nDTSTART:20070311T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\r\nTZNAME:PDT\r\nTZOFFSETFROM:-0800\r\nTZOFFSETTO:-0700\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:C7C037CC-1485-461B-8866-777C662C5930\r\nDTSTART;TZID=US/Pacific:20081025T131500\r\nDTEND;TZID=US/Pacific:20081025T131500\r\nATTENDEE;CN=test at systemcall.com;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSV\r\n P=TRUE:mailto:test at systemcall.com\r\nATTENDEE;CN=Test User;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:testuser@\r\n example.com\r\nCREATED:20081024T181749Z\r\nDTSTAMP:20081024T183142Z\r\nORGANIZER;CN=Test User:mailto:testuser at example.
 com\r\nSEQUENCE:5\r\nSUMMARY:testing\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n')),
+
+    ('cross-timezone', getComp('BEGIN:VCALENDAR\r\nVERSION:2.0\r\nCALSCALE:GREGORIAN\r\nMETHOD:REQUEST\r\nPRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN\r\nBEGIN:VTIMEZONE\r\nTZID:US/Pacific\r\nBEGIN:STANDARD\r\nDTSTART:20071104T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\r\nTZNAME:PST\r\nTZOFFSETFROM:-0700\r\nTZOFFSETTO:-0800\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nDTSTART:20070311T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\r\nTZNAME:PDT\r\nTZOFFSETFROM:-0800\r\nTZOFFSETTO:-0700\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID:US/Eastern\r\nBEGIN:STANDARD\r\nDTSTART:20071104T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\r\nTZNAME:EST\r\nTZOFFSETFROM:-0400\r\nTZOFFSETTO:-0500\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nDTSTART:20070311T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\r\nTZNAME:EDT\r\nTZOFFSETFROM:-0500\r\nTZOFFSETTO:-0400\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:C7C037CC-1485-461B-8866-777C662C5930\r\nDTSTART;TZID=US/Pacific:
 20081025T110500\r\nDTEND;TZID=US/Eastern:20081025T181500\r\nATTENDEE;CN=test at systemcall.com;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSV\r\n P=TRUE:mailto:test at systemcall.com\r\nATTENDEE;CN=Test User;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:testuser@\r\n example.com\r\nCREATED:20081024T181749Z\r\nDTSTAMP:20081024T183142Z\r\nORGANIZER;CN=Test User:mailto:testuser at example.com\r\nSEQUENCE:5\r\nSUMMARY:testing\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n')),
+
+
+)
+
+localeDir = os.path.join(os.path.dirname(__file__), "data", "locales")
+
+class LocalizationTests(TestCase):
+
+    def test_BasicStringLocalization(self):
+
+        with translationTo('pig', localeDir=localeDir):
+
+            self.assertEquals(_("All day"), "Allway ayday")
+
+            self.assertEquals(_("%(startTime)s to %(endTime)s") %
+                { 'startTime' : 'a', 'endTime' : 'b' },
+                "a otay b"
+            )
+
+    def test_TimeFormattingAMPM(self):
+
+        with translationTo('en', localeDir=localeDir) as t:
+
+            self.assertEquals(t.dtTime(time(0,0)), "12:00 AM")
+            self.assertEquals(t.dtTime(time(12,0)), "12:00 PM")
+            self.assertEquals(t.dtTime(time(23,59)), "11:59 PM")
+            self.assertEquals(t.dtTime(time(6,5)), "6:05 AM")
+            self.assertEquals(t.dtTime(time(16,5)), "4:05 PM")
+
+    def test_TimeFormatting24Hour(self):
+
+        with translationTo('pig', localeDir=localeDir) as t:
+
+            self.assertEquals(t.dtTime(time(0,0)), "00:00")
+            self.assertEquals(t.dtTime(time(12,0)), "12:00")
+            self.assertEquals(t.dtTime(time(23,59)), "23:59")
+            self.assertEquals(t.dtTime(time(6,5)), "06:05")
+            self.assertEquals(t.dtTime(time(16,5)), "16:05")
+
+    def test_CalendarFormatting(self):
+
+        with translationTo('en', localeDir=localeDir) as t:
+
+            comp = data[0][1]
+            self.assertEquals(t.date(comp), "Saturday, October 25, 2008")
+            self.assertEquals(t.time(comp),
+                (u'9:15 AM to 10:15 AM PDT', u'1 hour 1 second'))
+
+            comp = data[1][1]
+            self.assertEquals(t.time(comp),
+                (u'1:15 PM to 3:15 PM PDT', u'2 hours 2 seconds'))
+
+            comp = data[2][1]
+            self.assertEquals(t.time(comp),
+                (u'11:05 AM to 2:15 PM PDT', u'3 hours 10 minutes'))
+
+            comp = data[3][1]
+            self.assertEquals(t.time(comp),
+                ("", u'All day'))
+
+            comp = data[4][1]
+            self.assertEquals(t.time(comp),
+                (u'1:15 PM PDT', ""))
+
+            comp = data[5][1]
+            self.assertEquals(t.time(comp),
+                (u'11:05 AM PDT to 6:15 PM EDT', u'4 hours 10 minutes'))
+
+        with translationTo('pig', localeDir=localeDir) as t:
+
+            comp = data[0][1]
+            self.assertEquals(t.date(comp), 'Aturdaysay, Octoberway 25, 2008')
+            self.assertEquals(t.time(comp),
+                (u'09:15 otay 10:15 PDT', u'1 ourhay 1 econdsay'))
+
+            comp = data[1][1]
+            self.assertEquals(t.time(comp),
+                (u'13:15 otay 15:15 PDT', u'2 ourshay 2 econdsay'))
+
+            comp = data[2][1]
+            self.assertEquals(t.time(comp),
+                (u'11:05 otay 14:15 PDT', u'3 ourshay 10 inutesmay'))
+
+            comp = data[3][1]
+            self.assertEquals(t.time(comp),
+                ("", u'Allway ayday'))
+
+            comp = data[4][1]
+            self.assertEquals(t.time(comp),
+                (u'13:15 PDT', ""))
+
+            comp = data[5][1]
+            self.assertEquals(t.time(comp),
+                (u'11:05 PDT otay 18:15 EDT', u'4 ourshay 10 inutesmay'))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081103/acfa350f/attachment-0001.html>


More information about the calendarserver-changes mailing list