Improve error messages around draft attachments

pull/232/head
Francis Lachapelle 2017-01-06 16:12:42 -05:00
parent 5ec7ad54bb
commit 8404de758b
4 changed files with 10 additions and 4 deletions

View File

@ -646,7 +646,7 @@ static NSString *userAgent = nil;
if (!message)
{
error = [NSException exceptionWithHTTPStatus: 500 /* Server Error */
reason: @"message too big"];
reason: @"Message is too big"];
return error;
}

View File

@ -119,9 +119,12 @@
/* Authentication failed */
"Wrong username or password." = "Wrong username or password.";
/* Error message display bellow search field when the search string has less than the required number of characters */
/* Error message displayed bellow search field when the search string has less than the required number of characters */
"Enter at least %{minimumSearchLength} characters" = "Enter at least %{minimumSearchLength} characters";
/* Error message displayed when a file upload exceeds WOMaxUploadSize */
"File size upload limit reached" = "File size upload limit reached";
/* Toggle visibility (ex: mail account in left navigation menu) */
"Toggle visibility" = "Toggle visibility";

View File

@ -321,6 +321,7 @@
/* Error when uploading a file attachment */
"Error while uploading the file \"%{0}\":" = "Error while uploading the file \"%{0}\":";
"There is an active file upload. Closing the window will interrupt it." = "There is an active file upload. Closing the window will interrupt it.";
"Message is too big" = "Message is too big";
/* Appears while sending the message */
"Sending" = "Sending";

View File

@ -52,9 +52,11 @@
onErrorItem: function(item, response, status, headers) {
$mdToast.show(
$mdToast.simple()
.content(l('Error while uploading the file \"%{0}\":', item.file.name))
.content(l('Error while uploading the file \"%{0}\":', item.file.name) +
' ' + (response.message? l(response.message) : ''))
.position('top right')
.hideDelay(3000));
.action(l('OK'))
.hideDelay(false));
this.removeFromQueue(item);
//console.debug(item); console.debug('error = ' + JSON.stringify(response, undefined, 2));
}