mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-02 08:59:45 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user