marinofaggiana 4 anni fa
parent
commit
192ceb68de

+ 3 - 4
iOSClient/Networking/CCNetworking.m

@@ -422,11 +422,10 @@
     
     if (downloadTask == nil) {
         
-        NSString *sessionError = [NSString stringWithFormat:@"It is not possible downlod the file %@", metadata.fileNameView];
+        [[NCManageDatabase sharedInstance] setMetadataSession:nil sessionError:NSLocalizedString(@"_not_possible_download_", nil) sessionSelector:nil sessionTaskIdentifier:k_taskIdentifierDone status:k_metadataStatusDownloadError predicate:[NSPredicate predicateWithFormat:@"ocId == %@", metadata.ocId]];
         
-        [[NCManageDatabase sharedInstance] setMetadataSession:nil sessionError:sessionError sessionSelector:nil sessionTaskIdentifier:k_taskIdentifierDone status:k_metadataStatusDownloadError predicate:[NSPredicate predicateWithFormat:@"ocId == %@", metadata.ocId]];
-        
-        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_downloadedFile object:nil userInfo:@{@"metadata": metadata, @"selector": metadata.sessionSelector, @"errorCode": @(k_CCErrorInternalError), @"errorDescription": sessionError}];
+        NSString *errorDescription = [NSString stringWithFormat:@"%@ %@", NSLocalizedString(@"_not_possible_download_", nil), metadata.fileNameView];
+        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_downloadedFile object:nil userInfo:@{@"metadata": metadata, @"selector": metadata.sessionSelector, @"errorCode": @(k_CCErrorInternalError), @"errorDescription": errorDescription}];
         
     } else {
         

+ 2 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -774,6 +774,8 @@
 "_error_json_decoding_"                 = "Serious internal error in decoding metadata (The data couldn’t be read because it isn’t in the correct format.)";
 "_error_check_remote_user_"             = "Server responded with error, password re-entry is required";
 "_request_entity_too_large_"            = "The file is too large";
+"_not_possible_download_"               = "It is not possible downlod the file";
+"_not_possible_upload_"                 = "It is not possible upload the file";
 
 // QRCode