mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-12 06:55:26 +00:00
Monotone-Parent: c982aaa9740225283281797deea837869cd14b36
Monotone-Revision: 54dfcd97cab5ce72c0aceaae23ebf28c39d50601 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-22T15:11:41 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
2007-08-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoCalendarComponent.m
|
||||
([SOGoCalendarComponent
|
||||
-sendEMailUsingTemplateNamed:_pageNameforOldObject:_oldObjectandNewObject:_newObjecttoAttendees:_attendees]):
|
||||
now use a template based on the language returned from the
|
||||
SOGoUser object.
|
||||
|
||||
* SoObjects/Mailer/SOGoMailEnglishForward.m: new module containing
|
||||
a subclass of SOGoMailForward for English locale.
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#import "iCalEntityObject+SOGo.h"
|
||||
#import "SOGoCalendarComponent.h"
|
||||
|
||||
static NSString *mailTemplateDefaultLanguage = nil;
|
||||
static BOOL sendEMailNotifications = NO;
|
||||
|
||||
@implementation SOGoCalendarComponent
|
||||
@@ -62,11 +61,6 @@ static BOOL sendEMailNotifications = NO;
|
||||
didInit = YES;
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
mailTemplateDefaultLanguage = [[ud stringForKey:@"SOGoDefaultLanguage"]
|
||||
retain];
|
||||
if (!mailTemplateDefaultLanguage)
|
||||
mailTemplateDefaultLanguage = @"English";
|
||||
|
||||
sendEMailNotifications
|
||||
= [ud boolForKey: @"SOGoAppointmentSendEMailNotifications"];
|
||||
}
|
||||
@@ -337,7 +331,7 @@ static BOOL sendEMailNotifications = NO;
|
||||
WOApplication *app;
|
||||
unsigned i, count;
|
||||
iCalPerson *attendee;
|
||||
NSString *recipient;
|
||||
NSString *recipient, *language;
|
||||
SOGoAptMailNotification *p;
|
||||
NSString *mailDate, *subject, *text, *header;
|
||||
NGMutableHashMap *headerMap;
|
||||
@@ -380,12 +374,13 @@ static BOOL sendEMailNotifications = NO;
|
||||
else
|
||||
recipient = email;
|
||||
|
||||
language = [[context activeUser] language];
|
||||
#warning this could be optimized in a class hierarchy common with the \
|
||||
SOGoObject's acl notification mechanism
|
||||
/* create page name */
|
||||
// TODO: select user's default language?
|
||||
pageName = [NSString stringWithFormat: @"SOGoAptMail%@%@",
|
||||
mailTemplateDefaultLanguage,
|
||||
language,
|
||||
_pageName];
|
||||
/* construct message content */
|
||||
p = [app pageWithName: pageName inContext: context];
|
||||
|
||||
Reference in New Issue
Block a user