See Changelog

Monotone-Parent: c3a22a583cea706854120e86a951cb29014d4b87
Monotone-Revision: 33b0351ec935bf11e615865737fa2434e2208e1b

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2010-11-10T20:12:18
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2010-11-10 20:12:18 +00:00
parent 1f64efe08a
commit 3608035caa
16 changed files with 129 additions and 20 deletions
+12 -4
View File
@@ -580,6 +580,7 @@ static NSArray *infoKeys = nil;
SOGoDraftObject *co;
NSDictionary *jsonResponse;
NSException *error;
NSMutableArray *errorMsg;
co = [self clientObject];
@@ -594,10 +595,17 @@ static NSArray *infoKeys = nil;
}
if (error)
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
@"failure", @"status",
[error reason], @"message",
nil];
{
// Only the first line is translated
errorMsg = [NSMutableArray arrayWithArray: [[error reason] componentsSeparatedByString: @"\n"]];
[errorMsg replaceObjectAtIndex: 0
withObject: [self labelForKey: [errorMsg objectAtIndex: 0]]];
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
@"failure", @"status",
[errorMsg componentsJoinedByString: @"\n"],
@"message",
nil];
}
else
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
@"success", @"status",