From: znek Date: Wed, 20 Jul 2005 13:22:22 +0000 (+0000) Subject: Not-so-clever solution for SOGo bug #1460. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a829c41447e622252f8ee60b5472abbda2492429;p=scalable-opengroupware.org Not-so-clever solution for SOGo bug #1460. git-svn-id: http://svn.opengroupware.org/SOGo/trunk@848 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/Main/ChangeLog b/SOGo/Main/ChangeLog index 276417fa..ef09b095 100644 --- a/SOGo/Main/ChangeLog +++ b/SOGo/Main/ChangeLog @@ -2,6 +2,8 @@ * v0.9.35 + * README: updated with new default description + * SOGoUserHomePage.wox: in case user is not authorized to change the internet access flag, the rendered text is different now diff --git a/SOGo/Main/README b/SOGo/Main/README index 287be76c..a1972b4f 100644 --- a/SOGo/Main/README +++ b/SOGo/Main/README @@ -13,6 +13,9 @@ Setup Defaults ======== + SOGoDefaultLanguage - string - currently used for selecting the language of + the mail templates. Default is "French". + SOGoCrashOnSessionCreate - bool - crash the server if a session is created => useful for debugging diff --git a/SOGo/SOGo.xcodeproj/project.pbxproj b/SOGo/SOGo.xcodeproj/project.pbxproj index cf4c8d13..57d74924 100644 --- a/SOGo/SOGo.xcodeproj/project.pbxproj +++ b/SOGo/SOGo.xcodeproj/project.pbxproj @@ -91,9 +91,7 @@ AD2FA8730883B9FE009A91E7 /* SOGoAptMailNotification.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailNotification.m; sourceTree = ""; tabWidth = 2; }; AD2FA8740883B9FE009A91E7 /* SOGoAptMailNotification.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoAptMailNotification.h; sourceTree = ""; tabWidth = 2; }; AD2FA8DB0883CCF0009A91E7 /* SOGoAptMailInvitation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailInvitation.m; sourceTree = ""; }; - AD2FA8DC0883CD12009A91E7 /* SOGoAptMailInvitation.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailInvitation.wo; sourceTree = ""; }; AD2FA9C50883F922009A91E7 /* SOGoAptMailUpdate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailUpdate.m; sourceTree = ""; }; - AD2FA9C60883F92C009A91E7 /* SOGoAptMailUpdate.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailUpdate.wo; sourceTree = ""; }; AD2FAA4708840BB8009A91E7 /* common.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 5; path = common.make; sourceTree = ""; }; AD2FAA81088417AB009A91E7 /* AgenorUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = AgenorUserDefaults.h; sourceTree = ""; }; AD2FAA82088417AB009A91E7 /* AgenorUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = AgenorUserDefaults.m; sourceTree = ""; }; @@ -105,6 +103,16 @@ AD3D63CE088D5EB000CBB51B /* calendar.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = calendar.css; sourceTree = ""; }; AD3D63CF088D5EB000CBB51B /* UIxAppointmentEditor.js */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.javascript; path = UIxAppointmentEditor.js; sourceTree = ""; }; AD3D63D0088D5EB000CBB51B /* UIxContactEditor.js */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.javascript; path = UIxContactEditor.js; sourceTree = ""; }; + AD3D643B088D725D00CBB51B /* SOGoContext.h */ = {isa = PBXFileReference; fileEncoding = 12; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoContext.h; sourceTree = ""; tabWidth = 2; }; + AD3D643C088D725D00CBB51B /* SOGoContext.m */ = {isa = PBXFileReference; fileEncoding = 12; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = SOGoContext.m; sourceTree = ""; tabWidth = 2; }; + AD3D66D8088E7FAD00CBB51B /* SOGoAptMailEnglishDeletion.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishDeletion.wo; sourceTree = ""; }; + AD3D66DC088E7FAD00CBB51B /* SOGoAptMailEnglishInvitation.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishInvitation.wo; sourceTree = ""; }; + AD3D66E0088E7FAD00CBB51B /* SOGoAptMailEnglishRemoval.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishRemoval.wo; sourceTree = ""; }; + AD3D66E4088E7FAD00CBB51B /* SOGoAptMailEnglishUpdate.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishUpdate.wo; sourceTree = ""; }; + AD3D66E8088E7FAD00CBB51B /* SOGoAptMailFrenchDeletion.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchDeletion.wo; sourceTree = ""; }; + AD3D66EC088E7FAD00CBB51B /* SOGoAptMailFrenchInvitation.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchInvitation.wo; sourceTree = ""; }; + AD3D66F0088E7FAD00CBB51B /* SOGoAptMailFrenchRemoval.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchRemoval.wo; sourceTree = ""; }; + AD3D66F4088E7FAD00CBB51B /* SOGoAptMailFrenchUpdate.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchUpdate.wo; sourceTree = ""; }; AD494C6206F5EA6600E51EC9 /* UIxContactSelector.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxContactSelector.m; sourceTree = ""; }; AD494C8E06F606F900E51EC9 /* UIxContactsSelectionView.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxContactsSelectionView.m; sourceTree = ""; }; AD494D1806F6EB3A00E51EC9 /* SOGoMailAccount.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoMailAccount.h; sourceTree = ""; }; @@ -246,9 +254,7 @@ ADA63206071330AE0058C21C /* SOGoAppointment+UIx.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = "SOGoAppointment+UIx.m"; sourceTree = ""; }; ADAD40CA0769FFD000AAD24E /* UIxCalInlineAptView.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxCalInlineAptView.m; sourceTree = ""; }; ADB742000887C90200AC849E /* SOGoAptMailRemoval.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailRemoval.m; sourceTree = ""; }; - ADB742040887C93100AC849E /* SOGoAptMailRemoval.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailRemoval.wo; sourceTree = ""; }; ADB7420B0887C94C00AC849E /* SOGoAptMailDeletion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailDeletion.m; sourceTree = ""; }; - ADB7420C0887C95A00AC849E /* SOGoAptMailDeletion.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailDeletion.wo; sourceTree = ""; }; ADB79CAD07D4BF1600CA782A /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 8; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; ADB7A0FC07D6389500CA782A /* NSObject+AptComparison.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = "NSObject+AptComparison.h"; sourceTree = ""; }; ADB7A0FD07D6389500CA782A /* NSObject+AptComparison.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = "NSObject+AptComparison.m"; sourceTree = ""; }; @@ -603,7 +609,8 @@ isa = PBXGroup; children = ( AD2FA8DB0883CCF0009A91E7 /* SOGoAptMailInvitation.m */, - AD2FA8DC0883CD12009A91E7 /* SOGoAptMailInvitation.wo */, + AD3D66DC088E7FAD00CBB51B /* SOGoAptMailEnglishInvitation.wo */, + AD3D66EC088E7FAD00CBB51B /* SOGoAptMailFrenchInvitation.wo */, ); name = SOGoAptMailInvitation; sourceTree = ""; @@ -612,7 +619,8 @@ isa = PBXGroup; children = ( AD2FA9C50883F922009A91E7 /* SOGoAptMailUpdate.m */, - AD2FA9C60883F92C009A91E7 /* SOGoAptMailUpdate.wo */, + AD3D66E4088E7FAD00CBB51B /* SOGoAptMailEnglishUpdate.wo */, + AD3D66F4088E7FAD00CBB51B /* SOGoAptMailFrenchUpdate.wo */, ); name = SOGoAptMailUpdate; sourceTree = ""; @@ -922,7 +930,8 @@ isa = PBXGroup; children = ( ADB742000887C90200AC849E /* SOGoAptMailRemoval.m */, - ADB742040887C93100AC849E /* SOGoAptMailRemoval.wo */, + AD3D66E0088E7FAD00CBB51B /* SOGoAptMailEnglishRemoval.wo */, + AD3D66F0088E7FAD00CBB51B /* SOGoAptMailFrenchRemoval.wo */, ); name = SOGoAptMailRemoval; sourceTree = ""; @@ -931,7 +940,8 @@ isa = PBXGroup; children = ( ADB7420B0887C94C00AC849E /* SOGoAptMailDeletion.m */, - ADB7420C0887C95A00AC849E /* SOGoAptMailDeletion.wo */, + AD3D66D8088E7FAD00CBB51B /* SOGoAptMailEnglishDeletion.wo */, + AD3D66E8088E7FAD00CBB51B /* SOGoAptMailFrenchDeletion.wo */, ); name = SOGoAptMailDeletion; sourceTree = ""; @@ -1147,6 +1157,8 @@ AD85C72907C4E8740036AC7A /* NSString+iCal.h */, AD751DFF087E7EDF004EE381 /* WOContext+Agenor.h */, AD751E00087E7EDF004EE381 /* WOContext+Agenor.m */, + AD3D643B088D725D00CBB51B /* SOGoContext.h */, + AD3D643C088D725D00CBB51B /* SOGoContext.m */, ); name = Classes; sourceTree = ""; diff --git a/SOGo/SoObjects/Appointments/ChangeLog b/SOGo/SoObjects/Appointments/ChangeLog index 808afb03..6e066473 100644 --- a/SOGo/SoObjects/Appointments/ChangeLog +++ b/SOGo/SoObjects/Appointments/ChangeLog @@ -1,3 +1,22 @@ +2005-07-20 Marcus Mueller + + * v0.9.48 + + * SOGoAptMailInvitation.m, SOGoAptMailUpdate.m, SOGoAptMailDeletion.m, + SOGoAptMailRemoval.m: updated to contain new classes for additional + languages + + * SOGoAptMailInvitation.wo, SOGoAptMailUpdate.wo, + SOGoAptMailDeletion.wo, SOGoAptMailRemoval.wo: replaced with language + dependend counterparts + + * SOGoAptMail{English,French}Invitation.wo, + SOGoAptMail{English,French}Update.wo, + SOGoAptMail{English,French}Deletion.wo, + SOGoAptMail{English,French}Removal.wo: new language dependend + templates. Please note that due to an unresolved bug we cannot use + the standard WO lookup mechanism here. + 2005-07-15 Marcus Mueller * v0.9.47 diff --git a/SOGo/SoObjects/Appointments/GNUmakefile b/SOGo/SoObjects/Appointments/GNUmakefile index ec0e8ad0..93af7f7a 100644 --- a/SOGo/SoObjects/Appointments/GNUmakefile +++ b/SOGo/SoObjects/Appointments/GNUmakefile @@ -6,6 +6,8 @@ WOBUNDLE_NAME = Appointments Appointments_PRINCIPAL_CLASS = SOGoAppointmentsProduct +# Appointments_LANGUAGES = English French + Appointments_OBJC_FILES = \ Product.m \ \ @@ -24,11 +26,15 @@ Appointments_RESOURCE_FILES += \ Version \ product.plist \ -Appointments_COMPONENTS += \ - SOGoAptMailInvitation.wo \ - SOGoAptMailUpdate.wo \ - SOGoAptMailRemoval.wo \ - SOGoAptMailDeletion.wo \ +Appointments_COMPONENTS += \ + SOGoAptMailEnglishInvitation.wo \ + SOGoAptMailFrenchInvitation.wo \ + SOGoAptMailEnglishUpdate.wo \ + SOGoAptMailFrenchUpdate.wo \ + SOGoAptMailEnglishRemoval.wo \ + SOGoAptMailFrenchRemoval.wo \ + SOGoAptMailEnglishDeletion.wo \ + SOGoAptMailFrenchDeletion.wo \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/wobundle.make diff --git a/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m b/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m index f250fe8b..7c1779f8 100644 --- a/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m @@ -60,8 +60,10 @@ static id parser = nil; static SaxObjectDecoder *sax = nil; static NGLogger *logger = nil; static NSTimeZone *MET = nil; +static NSString *mailTemplateDefaultLanguage = nil; + (void)initialize { + NSUserDefaults *ud; NGLoggerManager *lm; SaxXMLReaderFactory *factory; static BOOL didInit = NO; @@ -85,6 +87,12 @@ static NSTimeZone *MET = nil; [parser setErrorHandler:sax]; MET = [[NSTimeZone timeZoneWithAbbreviation:@"MET"] retain]; + + ud = [NSUserDefaults standardUserDefaults]; + mailTemplateDefaultLanguage = [[ud stringForKey:@"SOGoDefaultLanguage"] + retain]; + if (!mailTemplateDefaultLanguage) + mailTemplateDefaultLanguage = @"French"; } - (void)dealloc { @@ -564,9 +572,6 @@ static NSTimeZone *MET = nil; /* get WOApplication instance */ app = [WOApplication application]; - /* create page name */ - pageName = [NSString stringWithFormat:@"SOGoAptMail%@", _pageName]; - /* generate dynamic message content */ count = [_attendees count]; @@ -593,8 +598,13 @@ static NSTimeZone *MET = nil; recipient = [attendee rfc822Email]; } + /* create page name */ + // TODO: select user's default language? + pageName = [NSString stringWithFormat:@"SOGoAptMail%@%@", + mailTemplateDefaultLanguage, + _pageName]; /* construct message content */ - p = [app pageWithName:pageName]; + p = [app pageWithName:pageName inContext:[WOContext context]]; [p setNewApt:_newApt]; [p setOldApt:_oldApt]; [p setHomePageURL:[self homePageURLForPerson:attendee]]; diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailDeletion.m b/SOGo/SoObjects/Appointments/SOGoAptMailDeletion.m index c422c94f..dec1e8c0 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailDeletion.m +++ b/SOGo/SoObjects/Appointments/SOGoAptMailDeletion.m @@ -21,13 +21,18 @@ #include "SOGoAptMailNotification.h" -@interface SOGoAptMailDeletion : SOGoAptMailNotification +@interface SOGoAptMailEnglishDeletion : SOGoAptMailNotification { - } +@end +@implementation SOGoAptMailEnglishDeletion @end -@implementation SOGoAptMailDeletion +@interface SOGoAptMailFrenchDeletion : SOGoAptMailNotification +{ +} +@end +@implementation SOGoAptMailFrenchDeletion @end diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailDeletion.wo/SOGoAptMailDeletion.html b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishDeletion.wo/SOGoAptMailEnglishDeletion.html similarity index 100% rename from SOGo/SoObjects/Appointments/SOGoAptMailDeletion.wo/SOGoAptMailDeletion.html rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishDeletion.wo/SOGoAptMailEnglishDeletion.html diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailDeletion.wo/SOGoAptMailDeletion.wod b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishDeletion.wo/SOGoAptMailEnglishDeletion.wod similarity index 100% rename from SOGo/SoObjects/Appointments/SOGoAptMailDeletion.wo/SOGoAptMailDeletion.wod rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishDeletion.wo/SOGoAptMailEnglishDeletion.wod diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.html b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishInvitation.wo/SOGoAptMailEnglishInvitation.html similarity index 100% rename from SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.html rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishInvitation.wo/SOGoAptMailEnglishInvitation.html diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.wod b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishInvitation.wo/SOGoAptMailEnglishInvitation.wod similarity index 100% rename from SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.wod rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishInvitation.wo/SOGoAptMailEnglishInvitation.wod diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailRemoval.wo/SOGoAptMailRemoval.html b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishRemoval.wo/SOGoAptMailEnglishRemoval.html similarity index 100% rename from SOGo/SoObjects/Appointments/SOGoAptMailRemoval.wo/SOGoAptMailRemoval.html rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishRemoval.wo/SOGoAptMailEnglishRemoval.html diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailRemoval.wo/SOGoAptMailRemoval.wod b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishRemoval.wo/SOGoAptMailEnglishRemoval.wod similarity index 100% rename from SOGo/SoObjects/Appointments/SOGoAptMailRemoval.wo/SOGoAptMailRemoval.wod rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishRemoval.wo/SOGoAptMailEnglishRemoval.wod diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.html b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.html similarity index 71% rename from SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.html rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.html index 8a8544cf..e6763c8e 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.html +++ b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.html @@ -1,4 +1,4 @@ -<#IsSubject>Apt for the <#OldAptStartDate /> at <#OldAptStartTime /> changed +<#IsSubject>*E* Apt for the <#OldAptStartDate /> at <#OldAptStartTime /> changed <#IsBody> This appointment, previously set for <#OldAptStartDate /> at <#OldAptStartTime /> is now scheduled for <#NewAptStartDate /> at <#NewAptStartTime /> diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.wod b/SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.wod similarity index 100% rename from SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.wod rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.wod diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.html b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.html new file mode 100644 index 00000000..cea93f0d --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.html @@ -0,0 +1,4 @@ +<#IsSubject>Appointment <#AptStartDate /> at <#AptStartTime /> has been canceled +<#IsBody> +The appointment at <#AptStartDate /> <#AptStartTime /> has been cancelled by <#Organizer />. + \ No newline at end of file diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.wod b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.wod new file mode 100644 index 00000000..3e37496c --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.wod @@ -0,0 +1,34 @@ +AptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +AptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.html b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.html new file mode 100644 index 00000000..edb87f43 --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.html @@ -0,0 +1,7 @@ +<#IsSubject>Apt le <#AptStartDate /> at <#AptStartTime /> +<#IsBody> +You're invited by <#Organizer /> to a meeting. +<#HasHomePageURL> +Please make a decision for this invitation at <#HomePageURL />. + + \ No newline at end of file diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.wod b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.wod new file mode 100644 index 00000000..3e37496c --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.wod @@ -0,0 +1,34 @@ +AptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +AptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.html b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.html new file mode 100644 index 00000000..32fdc262 --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.html @@ -0,0 +1,4 @@ +<#IsSubject>Removed from appointment <#AptStartDate /> at <#AptStartTime /> +<#IsBody> +You have been removed by <#Organizer /> from the appointment scheduled at <#AptStartDate /> <#AptStartTime />. + \ No newline at end of file diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.wod b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.wod new file mode 100644 index 00000000..3e37496c --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.wod @@ -0,0 +1,34 @@ +AptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +AptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.html b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.html new file mode 100644 index 00000000..983e0403 --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.html @@ -0,0 +1,8 @@ +<#IsSubject>*French* Apt le <#OldAptStartDate /> at <#OldAptStartTime /> changed +<#IsBody> +Le appointment, previously set for <#OldAptStartDate /> +at <#OldAptStartTime /> is now scheduled for <#NewAptStartDate /> at <#NewAptStartTime /> +<#HasHomePageURL> +Please make a decision for these new settings at <#HomePageURL />. + + \ No newline at end of file diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.wod b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.wod new file mode 100644 index 00000000..3dccef2a --- /dev/null +++ b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.wod @@ -0,0 +1,46 @@ +OldAptStartDate: WOString { + value = oldStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +OldAptStartTime: WOString { + value = oldStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +NewAptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +NewAptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.m b/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.m index 4a0b6718..64f8a8b7 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.m +++ b/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.m @@ -21,13 +21,18 @@ #include "SOGoAptMailNotification.h" -@interface SOGoAptMailInvitation : SOGoAptMailNotification +@interface SOGoAptMailEnglishInvitation : SOGoAptMailNotification { - } +@end +@implementation SOGoAptMailEnglishInvitation @end -@implementation SOGoAptMailInvitation +@interface SOGoAptMailFrenchInvitation : SOGoAptMailNotification +{ +} +@end +@implementation SOGoAptMailFrenchInvitation @end diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailNotification.h b/SOGo/SoObjects/Appointments/SOGoAptMailNotification.h index 4829e0ae..99330d74 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailNotification.h +++ b/SOGo/SoObjects/Appointments/SOGoAptMailNotification.h @@ -22,11 +22,15 @@ #ifndef __Appointments_SOGoAptMailNotification_H_ #define __Appointments_SOGoAptMailNotification_H_ -#include +#include -@class NSString; +@class NSString, NSTimeZone, NSCalendarDate; -@interface SOGoAptMailNotification : WOComponent +/* + * NOTE: We inherit from SoComponent in order to get the correct + * resourceManager required for this product + */ +@interface SOGoAptMailNotification : SoComponent { id oldApt; id newApt; diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m b/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m index cbf6c372..0e1ecc81 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m +++ b/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m @@ -121,9 +121,18 @@ static NSTimeZone *MET = nil; /* Generate Response */ - (NSString *)getSubject { + NSString *subject; + [self setIsSubject:YES]; - return [[[self generateResponse] contentAsString] - stringByTrimmingCharactersInSet:wsSet]; + subject = [[[self generateResponse] contentAsString] + stringByTrimmingCharactersInSet:wsSet]; + if (!subject) { + [self errorWithFormat:@"Failed to properly generate subject! Please check " + @"template for component '%@'!", + [self name]]; + subject = @"ERROR: missing subject!"; + } + return subject; } - (NSString *)getBody { diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailRemoval.m b/SOGo/SoObjects/Appointments/SOGoAptMailRemoval.m index 04019371..d10493f8 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailRemoval.m +++ b/SOGo/SoObjects/Appointments/SOGoAptMailRemoval.m @@ -21,13 +21,18 @@ #include "SOGoAptMailNotification.h" -@interface SOGoAptMailRemoval : SOGoAptMailNotification +@interface SOGoAptMailEnglishRemoval : SOGoAptMailNotification { - } +@end +@implementation SOGoAptMailEnglishRemoval @end -@implementation SOGoAptMailRemoval +@interface SOGoAptMailFrenchRemoval : SOGoAptMailNotification +{ +} +@end +@implementation SOGoAptMailFrenchRemoval @end diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.m b/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.m index fcbfaac2..21f1d7d0 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.m +++ b/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.m @@ -21,13 +21,18 @@ #include "SOGoAptMailNotification.h" -@interface SOGoAptMailUpdate : SOGoAptMailNotification +@interface SOGoAptMailEnglishUpdate : SOGoAptMailNotification { - } +@end +@implementation SOGoAptMailEnglishUpdate @end -@implementation SOGoAptMailUpdate +@interface SOGoAptMailFrenchUpdate : SOGoAptMailNotification +{ +} +@end +@implementation SOGoAptMailFrenchUpdate @end diff --git a/SOGo/SoObjects/Appointments/Version b/SOGo/SoObjects/Appointments/Version index 3ffdde30..e5dcf616 100644 --- a/SOGo/SoObjects/Appointments/Version +++ b/SOGo/SoObjects/Appointments/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=47 +SUBMINOR_VERSION:=48 # v0.9.42 requires libSOGo v0.9.54 # v0.9.32 requires libGDLContentStore v4.5.26 diff --git a/SOGo/UI/SOGoUI/ChangeLog b/SOGo/UI/SOGoUI/ChangeLog index bca45658..7eb34548 100644 --- a/SOGo/UI/SOGoUI/ChangeLog +++ b/SOGo/UI/SOGoUI/ChangeLog @@ -1,3 +1,8 @@ +2005-07-20 Marcus Mueller + + * UIxComponent.m: changed language lookup to meet the status quo + (v0.9.32) + 2005-07-18 Helge Hess * UIxComponent.m: minor code reorgs (v0.9.31) diff --git a/SOGo/UI/SOGoUI/UIxComponent.m b/SOGo/UI/SOGoUI/UIxComponent.m index 87dfae95..29bd0708 100644 --- a/SOGo/UI/SOGoUI/UIxComponent.m +++ b/SOGo/UI/SOGoUI/UIxComponent.m @@ -350,7 +350,6 @@ static BOOL uixDebugEnabled = NO; - (NSString *)labelForKey:(NSString *)_str { WOResourceManager *rm; NSArray *languages; - WOContext *ctx; NSString *label; NSString *lKey, *lTable, *lVal; NSRange r; @@ -360,10 +359,7 @@ static BOOL uixDebugEnabled = NO; /* lookup languages */ - ctx = [self context]; - languages = [ctx hasSession] - ? [[ctx session] languages] - : [[ctx request] browserLanguages]; + languages = [[self context] resourceLookupLanguages]; /* find resource manager */ diff --git a/SOGo/UI/SOGoUI/Version b/SOGo/UI/SOGoUI/Version index 598e4e75..9aa7948b 100644 --- a/SOGo/UI/SOGoUI/Version +++ b/SOGo/UI/SOGoUI/Version @@ -1,5 +1,5 @@ # version file -SUBMINOR_VERSION:=31 +SUBMINOR_VERSION:=32 # v0.9.18 requires NGExtensions v4.5.136