Improve error messages around draft attachments

This commit is contained in:
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) if (!message)
{ {
error = [NSException exceptionWithHTTPStatus: 500 /* Server Error */ error = [NSException exceptionWithHTTPStatus: 500 /* Server Error */
reason: @"message too big"]; reason: @"Message is too big"];
return error; return error;
} }

View file

@ -119,9 +119,12 @@
/* Authentication failed */ /* Authentication failed */
"Wrong username or password." = "Wrong username or password."; "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"; "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 (ex: mail account in left navigation menu) */
"Toggle visibility" = "Toggle visibility"; "Toggle visibility" = "Toggle visibility";

View file

@ -321,6 +321,7 @@
/* Error when uploading a file attachment */ /* Error when uploading a file attachment */
"Error while uploading the file \"%{0}\":" = "Error while uploading the file \"%{0}\":"; "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."; "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 */ /* Appears while sending the message */
"Sending" = "Sending"; "Sending" = "Sending";

View file

@ -52,9 +52,11 @@
onErrorItem: function(item, response, status, headers) { onErrorItem: function(item, response, status, headers) {
$mdToast.show( $mdToast.show(
$mdToast.simple() $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') .position('top right')
.hideDelay(3000)); .action(l('OK'))
.hideDelay(false));
this.removeFromQueue(item); this.removeFromQueue(item);
//console.debug(item); console.debug('error = ' + JSON.stringify(response, undefined, 2)); //console.debug(item); console.debug('error = ' + JSON.stringify(response, undefined, 2));
} }