]> err.no Git - scalable-opengroupware.org/commitdiff
Not-so-clever solution for SOGo bug #1460.
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 20 Jul 2005 13:22:22 +0000 (13:22 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 20 Jul 2005 13:22:22 +0000 (13:22 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@848 d1b88da0-ebda-0310-925b-ed51d893ca5b

32 files changed:
SOGo/Main/ChangeLog
SOGo/Main/README
SOGo/SOGo.xcodeproj/project.pbxproj
SOGo/SoObjects/Appointments/ChangeLog
SOGo/SoObjects/Appointments/GNUmakefile
SOGo/SoObjects/Appointments/SOGoAppointmentObject.m
SOGo/SoObjects/Appointments/SOGoAptMailDeletion.m
SOGo/SoObjects/Appointments/SOGoAptMailEnglishDeletion.wo/SOGoAptMailEnglishDeletion.html [moved from SOGo/SoObjects/Appointments/SOGoAptMailDeletion.wo/SOGoAptMailDeletion.html with 100% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailEnglishDeletion.wo/SOGoAptMailEnglishDeletion.wod [moved from SOGo/SoObjects/Appointments/SOGoAptMailDeletion.wo/SOGoAptMailDeletion.wod with 100% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailEnglishInvitation.wo/SOGoAptMailEnglishInvitation.html [moved from SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.html with 100% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailEnglishInvitation.wo/SOGoAptMailEnglishInvitation.wod [moved from SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.wod with 100% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailEnglishRemoval.wo/SOGoAptMailEnglishRemoval.html [moved from SOGo/SoObjects/Appointments/SOGoAptMailRemoval.wo/SOGoAptMailRemoval.html with 100% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailEnglishRemoval.wo/SOGoAptMailEnglishRemoval.wod [moved from SOGo/SoObjects/Appointments/SOGoAptMailRemoval.wo/SOGoAptMailRemoval.wod with 100% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.html [moved from SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.html with 71% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.wod [moved from SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.wod with 100% similarity]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.html [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.wod [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.html [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchInvitation.wo/SOGoAptMailFrenchInvitation.wod [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.html [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchRemoval.wo/SOGoAptMailFrenchRemoval.wod [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.html [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailFrenchUpdate.wo/SOGoAptMailFrenchUpdate.wod [new file with mode: 0644]
SOGo/SoObjects/Appointments/SOGoAptMailInvitation.m
SOGo/SoObjects/Appointments/SOGoAptMailNotification.h
SOGo/SoObjects/Appointments/SOGoAptMailNotification.m
SOGo/SoObjects/Appointments/SOGoAptMailRemoval.m
SOGo/SoObjects/Appointments/SOGoAptMailUpdate.m
SOGo/SoObjects/Appointments/Version
SOGo/UI/SOGoUI/ChangeLog
SOGo/UI/SOGoUI/UIxComponent.m
SOGo/UI/SOGoUI/Version

index 276417faf809beb2850f1d7e5069c6160537e0d6..ef09b095627efaf634934a99c9293dcb5f22657b 100644 (file)
@@ -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
 
index 287be76cef7854e48ded900d24768de3ea0c848f..a1972b4f468fc792c474f54e71da71463a0b4659 100644 (file)
@@ -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
 
index cf4c8d13404898dc502b08a08612ea2bf88e35a8..57d7492416248a6439b1c87f1966c2384d8b93d3 100644 (file)
@@ -91,9 +91,7 @@
                AD2FA8730883B9FE009A91E7 /* SOGoAptMailNotification.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailNotification.m; sourceTree = "<group>"; tabWidth = 2; };
                AD2FA8740883B9FE009A91E7 /* SOGoAptMailNotification.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoAptMailNotification.h; sourceTree = "<group>"; tabWidth = 2; };
                AD2FA8DB0883CCF0009A91E7 /* SOGoAptMailInvitation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailInvitation.m; sourceTree = "<group>"; };
-               AD2FA8DC0883CD12009A91E7 /* SOGoAptMailInvitation.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailInvitation.wo; sourceTree = "<group>"; };
                AD2FA9C50883F922009A91E7 /* SOGoAptMailUpdate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailUpdate.m; sourceTree = "<group>"; };
-               AD2FA9C60883F92C009A91E7 /* SOGoAptMailUpdate.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailUpdate.wo; sourceTree = "<group>"; };
                AD2FAA4708840BB8009A91E7 /* common.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 5; path = common.make; sourceTree = "<group>"; };
                AD2FAA81088417AB009A91E7 /* AgenorUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = AgenorUserDefaults.h; sourceTree = "<group>"; };
                AD2FAA82088417AB009A91E7 /* AgenorUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = AgenorUserDefaults.m; sourceTree = "<group>"; };
                AD3D63CE088D5EB000CBB51B /* calendar.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = calendar.css; sourceTree = "<group>"; };
                AD3D63CF088D5EB000CBB51B /* UIxAppointmentEditor.js */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.javascript; path = UIxAppointmentEditor.js; sourceTree = "<group>"; };
                AD3D63D0088D5EB000CBB51B /* UIxContactEditor.js */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.javascript; path = UIxContactEditor.js; sourceTree = "<group>"; };
+               AD3D643B088D725D00CBB51B /* SOGoContext.h */ = {isa = PBXFileReference; fileEncoding = 12; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoContext.h; sourceTree = "<group>"; tabWidth = 2; };
+               AD3D643C088D725D00CBB51B /* SOGoContext.m */ = {isa = PBXFileReference; fileEncoding = 12; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = SOGoContext.m; sourceTree = "<group>"; tabWidth = 2; };
+               AD3D66D8088E7FAD00CBB51B /* SOGoAptMailEnglishDeletion.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishDeletion.wo; sourceTree = "<group>"; };
+               AD3D66DC088E7FAD00CBB51B /* SOGoAptMailEnglishInvitation.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishInvitation.wo; sourceTree = "<group>"; };
+               AD3D66E0088E7FAD00CBB51B /* SOGoAptMailEnglishRemoval.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishRemoval.wo; sourceTree = "<group>"; };
+               AD3D66E4088E7FAD00CBB51B /* SOGoAptMailEnglishUpdate.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailEnglishUpdate.wo; sourceTree = "<group>"; };
+               AD3D66E8088E7FAD00CBB51B /* SOGoAptMailFrenchDeletion.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchDeletion.wo; sourceTree = "<group>"; };
+               AD3D66EC088E7FAD00CBB51B /* SOGoAptMailFrenchInvitation.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchInvitation.wo; sourceTree = "<group>"; };
+               AD3D66F0088E7FAD00CBB51B /* SOGoAptMailFrenchRemoval.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchRemoval.wo; sourceTree = "<group>"; };
+               AD3D66F4088E7FAD00CBB51B /* SOGoAptMailFrenchUpdate.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailFrenchUpdate.wo; sourceTree = "<group>"; };
                AD494C6206F5EA6600E51EC9 /* UIxContactSelector.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxContactSelector.m; sourceTree = "<group>"; };
                AD494C8E06F606F900E51EC9 /* UIxContactsSelectionView.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxContactsSelectionView.m; sourceTree = "<group>"; };
                AD494D1806F6EB3A00E51EC9 /* SOGoMailAccount.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoMailAccount.h; sourceTree = "<group>"; };
                ADA63206071330AE0058C21C /* SOGoAppointment+UIx.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = "SOGoAppointment+UIx.m"; sourceTree = "<group>"; };
                ADAD40CA0769FFD000AAD24E /* UIxCalInlineAptView.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxCalInlineAptView.m; sourceTree = "<group>"; };
                ADB742000887C90200AC849E /* SOGoAptMailRemoval.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailRemoval.m; sourceTree = "<group>"; };
-               ADB742040887C93100AC849E /* SOGoAptMailRemoval.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailRemoval.wo; sourceTree = "<group>"; };
                ADB7420B0887C94C00AC849E /* SOGoAptMailDeletion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailDeletion.m; sourceTree = "<group>"; };
-               ADB7420C0887C95A00AC849E /* SOGoAptMailDeletion.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailDeletion.wo; sourceTree = "<group>"; };
                ADB79CAD07D4BF1600CA782A /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 8; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
                ADB7A0FC07D6389500CA782A /* NSObject+AptComparison.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = "NSObject+AptComparison.h"; sourceTree = "<group>"; };
                ADB7A0FD07D6389500CA782A /* NSObject+AptComparison.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = "NSObject+AptComparison.m"; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                AD2FA8DB0883CCF0009A91E7 /* SOGoAptMailInvitation.m */,
-                               AD2FA8DC0883CD12009A91E7 /* SOGoAptMailInvitation.wo */,
+                               AD3D66DC088E7FAD00CBB51B /* SOGoAptMailEnglishInvitation.wo */,
+                               AD3D66EC088E7FAD00CBB51B /* SOGoAptMailFrenchInvitation.wo */,
                        );
                        name = SOGoAptMailInvitation;
                        sourceTree = "<group>";
                        isa = PBXGroup;
                        children = (
                                AD2FA9C50883F922009A91E7 /* SOGoAptMailUpdate.m */,
-                               AD2FA9C60883F92C009A91E7 /* SOGoAptMailUpdate.wo */,
+                               AD3D66E4088E7FAD00CBB51B /* SOGoAptMailEnglishUpdate.wo */,
+                               AD3D66F4088E7FAD00CBB51B /* SOGoAptMailFrenchUpdate.wo */,
                        );
                        name = SOGoAptMailUpdate;
                        sourceTree = "<group>";
                        isa = PBXGroup;
                        children = (
                                ADB742000887C90200AC849E /* SOGoAptMailRemoval.m */,
-                               ADB742040887C93100AC849E /* SOGoAptMailRemoval.wo */,
+                               AD3D66E0088E7FAD00CBB51B /* SOGoAptMailEnglishRemoval.wo */,
+                               AD3D66F0088E7FAD00CBB51B /* SOGoAptMailFrenchRemoval.wo */,
                        );
                        name = SOGoAptMailRemoval;
                        sourceTree = "<group>";
                        isa = PBXGroup;
                        children = (
                                ADB7420B0887C94C00AC849E /* SOGoAptMailDeletion.m */,
-                               ADB7420C0887C95A00AC849E /* SOGoAptMailDeletion.wo */,
+                               AD3D66D8088E7FAD00CBB51B /* SOGoAptMailEnglishDeletion.wo */,
+                               AD3D66E8088E7FAD00CBB51B /* SOGoAptMailFrenchDeletion.wo */,
                        );
                        name = SOGoAptMailDeletion;
                        sourceTree = "<group>";
                                AD85C72907C4E8740036AC7A /* NSString+iCal.h */,
                                AD751DFF087E7EDF004EE381 /* WOContext+Agenor.h */,
                                AD751E00087E7EDF004EE381 /* WOContext+Agenor.m */,
+                               AD3D643B088D725D00CBB51B /* SOGoContext.h */,
+                               AD3D643C088D725D00CBB51B /* SOGoContext.m */,
                        );
                        name = Classes;
                        sourceTree = "<group>";
index 808afb038b2d95dbf974ed7cad99a02f91805d99..6e06647386f7ea64d0f2203acb2e378c166d5454 100644 (file)
@@ -1,3 +1,22 @@
+2005-07-20  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * 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  <znek@mulle-kybernetik.com>
 
        * v0.9.47
index ec0e8ad059c22b597124a4ae930641e473417b0d..93af7f7a816df38ecde9f37f35b04f3c479faec5 100644 (file)
@@ -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
index f250fe8bec7555f69d6a4a66a8ba00dcd0a16323..7c1779f8d026742847a7504c85af5c14d7084f2d 100644 (file)
@@ -60,8 +60,10 @@ static id<NSObject,SaxXMLReader> 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]];
index c422c94f9929cd75a38286cc8fc3496f1215a83d..dec1e8c040f3bb21e7e5eb7cd7e8ee4730672878 100644 (file)
 
 #include "SOGoAptMailNotification.h"
 
-@interface SOGoAptMailDeletion : SOGoAptMailNotification
+@interface SOGoAptMailEnglishDeletion : SOGoAptMailNotification
 {
-
 }
+@end
 
+@implementation SOGoAptMailEnglishDeletion
 @end
 
-@implementation SOGoAptMailDeletion
+@interface SOGoAptMailFrenchDeletion : SOGoAptMailNotification
+{
+}
+@end
 
+@implementation SOGoAptMailFrenchDeletion
 @end
similarity index 71%
rename from SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.html
rename to SOGo/SoObjects/Appointments/SOGoAptMailEnglishUpdate.wo/SOGoAptMailEnglishUpdate.html
index 8a8544cf97ef7ede9dcf2d9d6c5638e92f6d78b9..e6763c8e8cd3cbb9ba127c5c9aa08dea5024c7f5 100644 (file)
@@ -1,4 +1,4 @@
-<#IsSubject>Apt for the <#OldAptStartDate /> at <#OldAptStartTime /> changed</#IsSubject>
+<#IsSubject>*E* Apt for the <#OldAptStartDate /> at <#OldAptStartTime /> changed</#IsSubject>
 <#IsBody>
 This appointment, previously set for <#OldAptStartDate /> 
 at <#OldAptStartTime /> is now scheduled for <#NewAptStartDate /> at <#NewAptStartTime />
diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.html b/SOGo/SoObjects/Appointments/SOGoAptMailFrenchDeletion.wo/SOGoAptMailFrenchDeletion.html
new file mode 100644 (file)
index 0000000..cea93f0
--- /dev/null
@@ -0,0 +1,4 @@
+<#IsSubject>Appointment <#AptStartDate /> at <#AptStartTime /> has been canceled</#IsSubject>
+<#IsBody>
+The appointment at <#AptStartDate /> <#AptStartTime /> has been cancelled by <#Organizer />.
+</#IsBody>
\ 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 (file)
index 0000000..3e37496
--- /dev/null
@@ -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 (file)
index 0000000..edb87f4
--- /dev/null
@@ -0,0 +1,7 @@
+<#IsSubject>Apt le <#AptStartDate /> at <#AptStartTime /></#IsSubject>
+<#IsBody>
+You're invited by <#Organizer /> to a meeting.
+<#HasHomePageURL>
+Please make a decision for this invitation at <#HomePageURL />.
+</#HasHomePageURL>
+</#IsBody>
\ 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 (file)
index 0000000..3e37496
--- /dev/null
@@ -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 (file)
index 0000000..32fdc26
--- /dev/null
@@ -0,0 +1,4 @@
+<#IsSubject>Removed from appointment <#AptStartDate /> at <#AptStartTime /></#IsSubject>
+<#IsBody>
+You have been removed by <#Organizer /> from the appointment scheduled at <#AptStartDate /> <#AptStartTime />.
+</#IsBody>
\ 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 (file)
index 0000000..3e37496
--- /dev/null
@@ -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 (file)
index 0000000..983e040
--- /dev/null
@@ -0,0 +1,8 @@
+<#IsSubject>*French* Apt le <#OldAptStartDate /> at <#OldAptStartTime /> changed</#IsSubject>
+<#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 />.
+</#HasHomePageURL>
+</#IsBody>
\ 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 (file)
index 0000000..3dccef2
--- /dev/null
@@ -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;
+}
index 4a0b67185126673cddff1e7146803e23e11fcf6b..64f8a8b7517b75ef05106627b77a3812de78b013 100644 (file)
 
 #include "SOGoAptMailNotification.h"
 
-@interface SOGoAptMailInvitation : SOGoAptMailNotification
+@interface SOGoAptMailEnglishInvitation : SOGoAptMailNotification
 {
-
 }
+@end
 
+@implementation SOGoAptMailEnglishInvitation
 @end
 
-@implementation SOGoAptMailInvitation
+@interface SOGoAptMailFrenchInvitation : SOGoAptMailNotification
+{
+}
+@end
 
+@implementation SOGoAptMailFrenchInvitation
 @end
index 4829e0aee9155919c0fd0cf2ae17701a67877067..99330d746cf502c6fd39b64a67a78dd234c78d5b 100644 (file)
 #ifndef        __Appointments_SOGoAptMailNotification_H_
 #define        __Appointments_SOGoAptMailNotification_H_
 
-#include <NGObjWeb/NGObjWeb.h>
+#include <NGObjWeb/SoComponent.h>
 
-@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;
index cbf6c372877d072f3ff3de4eebdacfc0dbef8d0c..0e1ecc8190bf20dec8b05021524294360ce5a515 100644 (file)
@@ -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 {
index 0401937149b484aaec2f5aaacbf2507cf35ba60c..d10493f811f1a6f07e92a5e991ef9cf5d8ad2678 100644 (file)
 
 #include "SOGoAptMailNotification.h"
 
-@interface SOGoAptMailRemoval : SOGoAptMailNotification
+@interface SOGoAptMailEnglishRemoval : SOGoAptMailNotification
 {
-
 }
+@end
 
+@implementation SOGoAptMailEnglishRemoval
 @end
 
-@implementation SOGoAptMailRemoval
+@interface SOGoAptMailFrenchRemoval : SOGoAptMailNotification
+{
+}
+@end
 
+@implementation SOGoAptMailFrenchRemoval
 @end
index fcbfaac23c853a9954fbb7a88905db6c38a49860..21f1d7d018037686cd0116384919f7f68074c6f9 100644 (file)
 
 #include "SOGoAptMailNotification.h"
 
-@interface SOGoAptMailUpdate : SOGoAptMailNotification
+@interface SOGoAptMailEnglishUpdate : SOGoAptMailNotification
 {
-
 }
+@end
 
+@implementation SOGoAptMailEnglishUpdate
 @end
 
-@implementation SOGoAptMailUpdate
+@interface SOGoAptMailFrenchUpdate : SOGoAptMailNotification
+{
+}
+@end
 
+@implementation SOGoAptMailFrenchUpdate
 @end
index 3ffdde307ac6dd6c3af1360a49895cf750423d53..e5dcf616a39ac41c5e143e9fb46f0874d2995f56 100644 (file)
@@ -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
index bca45658ef6e32a60794c27de3d625bf53ffe9f4..7eb3454870d7d24729d134ce1e9ad771a5edd38e 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-20  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * UIxComponent.m: changed language lookup to meet the status quo
+         (v0.9.32)
+
 2005-07-18  Helge Hess  <helge.hess@opengroupware.org>
 
        * UIxComponent.m: minor code reorgs (v0.9.31)
index 87dfae951dd7810f3327d488b34aac5a303cef58..29bd070899010ad70c557791a81ac2750f685b93 100644 (file)
@@ -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 */
     
index 598e4e7574fff6b066d7abefc3ab7db4e947eba5..9aa7948b2a53374e8bce1ca3a04f3e680ad51ed5 100644 (file)
@@ -1,5 +1,5 @@
 # version file
 
-SUBMINOR_VERSION:=31
+SUBMINOR_VERSION:=32
 
 # v0.9.18 requires NGExtensions v4.5.136