diff --git a/ChangeLog b/ChangeLog index 2078ce707..1907ca606 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-07-20 Francis Lachapelle + + * UI/MailPartViewers/UIxMailPartHTMLViewer.m + (-startElement:namespace:rawName:attributes:): don't skip "mailto:" + href. + + * SoObjects/Appointments/SOGoAptMailReceipt.m (aptSummary-): new + method that returns a properly formatted string of the event title + with respect to the current operation (creation/deletion/update). + 2012-07-18 Ludovic Marcotte * SoObjects/Appointments/SOGoAppointmentObject.m @@ -114,7 +124,7 @@ when modifying their own calendars or when someone else to it. These defaults are over-writable by users from their calendar properties window. - * Implemented the code related to the two new defaults together with a + * Implemented the code related to the two new defaults together with a third option - which is to notify a specific person when one modifies his/her calendar. This commit is partial as more testing is required and some code changes to trigger the right notifications. diff --git a/SoObjects/Appointments/English.lproj/Localizable.strings b/SoObjects/Appointments/English.lproj/Localizable.strings index 9d73efbc0..22106a1b9 100644 --- a/SoObjects/Appointments/English.lproj/Localizable.strings +++ b/SoObjects/Appointments/English.lproj/Localizable.strings @@ -8,13 +8,9 @@ vtodo_class1 = "(Private task)"; vtodo_class2 = "(Confidential task)"; /* Receipts */ -"Title:" = "Title:"; -"Start:" = "Start:"; -"End:" = "End:"; -"Location:" = "Location:"; -"Receipt: event was created" = "Receipt: event was created"; -"Receipt: event was deleted" = "Receipt: event was deleted"; -"Receipt: event was updated" = "Receipt: event was updated"; +"The event \"%{Summary}\" was created" = "The event \"%{Summary}\" was created"; +"The event \"%{Summary}\" was deleted" = "The event \"%{Summary}\" was deleted"; +"The event \"%{Summary}\" was updated" = "The event \"%{Summary}\" was updated"; "The following attendees(s) were notified:" = "The following attendees(s) were notified:"; "The following attendees(s) were added:" = "The following attendees(s) were added:"; "The following attendees(s) were removed:" = "The following attendees(s) were removed:"; diff --git a/SoObjects/Appointments/French.lproj/Localizable.strings b/SoObjects/Appointments/French.lproj/Localizable.strings index eca257736..7d9a84de3 100644 --- a/SoObjects/Appointments/French.lproj/Localizable.strings +++ b/SoObjects/Appointments/French.lproj/Localizable.strings @@ -8,25 +8,16 @@ vtodo_class1 = "(Tâche privée)"; vtodo_class2 = "(Tâche confidentielle)"; /* Receipts */ -"Title:" = "Titre :"; -"Start:" = "Début :"; -"End:" = "Fin :"; - -"Receipt: users invited to a meeting" = "Acc. de réception : vous avez ajouté des participants à une réunion"; -"You have invited the following attendees(s):" = "Vous avez invité les personnes suivantes :"; -"... to attend the following event:" = "... à participer à cette réunion :"; - -"Receipt: invitation updated" = "Acc. de réception : invitation mise à jour"; -"The following attendees(s):" = "Les participants suivants :"; -"... have been notified of the changes to the following event:" = "... ont été avisés des changements apportés à cette réunion :"; - -"Receipt: attendees removed from an event" = "Acc. de réception: invitations annulées"; -"You have removed the following attendees(s):" = "Les utilisateurs suivants :"; -"... from the following event:" = "... ne sont plus invités à cette réunion :"; +"The event \"%{Summary}\" was created" = "L'événement «%{Summary}» a été créé"; +"The event \"%{Summary}\" was deleted" = "L'événement «%{Summary}» a été effacé"; +"The event \"%{Summary}\" was updated" = "L'événement «%{Summary}» a été modifié"; +"The following attendees(s) were notified:" = "Les invités suivants ont été avisés :"; +"The following attendees(s) were added:" = "Les invités suivants ont été ajoutés :"; +"The following attendees(s) were removed:" = "Les invités suivants ont été supprimés :"; /* IMIP messages */ -"startDate_label" = "Du :"; -"endDate_label" = "au :"; +"startDate_label" = "Début :"; +"endDate_label" = "Fin :"; "due_label" = "Fin prévue :"; "location_label" = "Lieu :"; "summary_label" = "Titre :"; @@ -67,4 +58,5 @@ vtodo_class2 = "(Tâche confidentielle)"; = "%{Attendee} %{SentByText}choisit de reporter sa décision par rapport à votre invitation."; /* Resources */ -"Maximum number of simultaneous bookings (%{NumberOfSimultaneousBookings}) reached for resource \"%{Cn} %{SystemEmail}\". The conflicting event is \"%{EventTitle}\", and starts on %{StartDate}." = "Le nombre maximal de réservations simultanées (%{NumberOfSimultaneousBookings}) est atteint pour la ressource «%{Cn} %{SystemEmail}». L'événement en conflit est «%{EventTitle}» et débute le %{StartDate}."; \ No newline at end of file +"Cannot access resource: \"%{Cn} %{SystemEmail}\"" = "Impossible d'accéder à la ressource suivante: \"%{Cn} %{SystemEmail}\""; +"Maximum number of simultaneous bookings (%{NumberOfSimultaneousBookings}) reached for resource \"%{Cn} %{SystemEmail}\". The conflicting event is \"%{EventTitle}\", and starts on %{StartDate}." = "Le nombre maximal de réservations simultanées (%{NumberOfSimultaneousBookings}) est atteint pour la ressource «%{Cn} %{SystemEmail}». L'événement en conflit est «%{EventTitle}» et débute le %{StartDate}."; diff --git a/SoObjects/Appointments/SOGoAptMailReceipt.h b/SoObjects/Appointments/SOGoAptMailReceipt.h index 8c4d613f2..c5c909635 100644 --- a/SoObjects/Appointments/SOGoAptMailReceipt.h +++ b/SoObjects/Appointments/SOGoAptMailReceipt.h @@ -47,7 +47,8 @@ - (void) setDeletedAttendees: (NSArray *) theAttendees; - (void) setUpdatedAttendees: (NSArray *) theAttendees; - (void) setOperation: (SOGoEventOperation) theOperation; -- (NSString *) subject; + +- (NSString *) aptSummary; @end diff --git a/SoObjects/Appointments/SOGoAptMailReceipt.m b/SoObjects/Appointments/SOGoAptMailReceipt.m index 7998f3739..1431b218d 100644 --- a/SoObjects/Appointments/SOGoAptMailReceipt.m +++ b/SoObjects/Appointments/SOGoAptMailReceipt.m @@ -4,6 +4,7 @@ * * Author: Wolfgang Sourdeau * Ludovic Marcotte + * Francis Lachapelle * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +32,7 @@ #import #import +#import #import #import #import @@ -138,25 +140,37 @@ static NSCharacterSet *wsSet = nil; operation = theOperation; } -- (NSString *) subject +- (NSString *) aptSummary { NSString *s; + + if (!values) + [self setupValues]; + switch (operation) { case EventCreated: - s = [self labelForKey: @"Receipt: event was created" inContext: context]; + s = [self labelForKey: @"The event \"%{Summary}\" was created" + inContext: context]; break; case EventDeleted: - s = [self labelForKey: @"Receipt: event was deleted" inContext: context]; + s = [self labelForKey: @"The event \"%{Summary}\" was deleted" + inContext: context]; break; case EventUpdated: default: - s = [self labelForKey: @"Receipt: event was updated" inContext: context]; + s = [self labelForKey: @"The event \"%{Summary}\" was updated" + inContext: context]; } - return [[s stringByTrimmingCharactersInSet: wsSet] asQPSubjectString: @"utf-8"]; + return [values keysWithFormat: s]; +} + +- (NSString *) getSubject +{ + return [[[self aptSummary] stringByTrimmingCharactersInSet: wsSet] asQPSubjectString: @"utf-8"]; } - (NSString *) _formattedUserDate: (NSCalendarDate *) date diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 20b0ea0e4..910c78b9b 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -1015,7 +1015,7 @@ mailDate = [[NSCalendarDate date] rfc822DateString]; [headerMap setObject: mailDate forKey: @"date"]; - [headerMap setObject: [page subject] forKey: @"subject"]; + [headerMap setObject: [page getSubject] forKey: @"subject"]; [headerMap setObject: @"1.0" forKey: @"MIME-Version"]; [headerMap setObject: @"text/html; charset=utf-8" forKey: @"content-type"]; diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 331a77e47..53404fa7d 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -468,6 +468,7 @@ static NSData* _sanitizeContent(NSData *theData) value = [_attributes valueAtIndex: count]; skipAttribute = ([value rangeOfString: @"://"].location == NSNotFound + && ![value hasPrefix: @"mailto:"] && ![value hasPrefix: @"#"]); } else diff --git a/UI/Templates/Appointments/SOGoAptMailReceipt.wox b/UI/Templates/Appointments/SOGoAptMailReceipt.wox index e3b206817..957ca8fc4 100644 --- a/UI/Templates/Appointments/SOGoAptMailReceipt.wox +++ b/UI/Templates/Appointments/SOGoAptMailReceipt.wox @@ -7,52 +7,48 @@ xmlns:rsrc="OGo:url" xmlns:label="OGo:label"> - -
- - -
- - - - -
- - -
- - -
- - - - - - -
- - - - - - -
- - - - - - -
- + + + + +
+

+ +
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+
+
+