Improve folder encryption dialog info boxes
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 9 Dec 2022 22:22:30 +0000 (23:22 +0100)
committerClaudio Cambra <claudio.cambra@gmail.com>
Tue, 13 Dec 2022 12:27:56 +0000 (13:27 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/socketapi/socketapi.cpp

index 56fb934a86fde4dcecd3ebf0f0bb38588cc122ef..10166399b49792e6197974edbbe5ad06aca41133 100644 (file)
@@ -546,13 +546,14 @@ void SocketApi::processEncryptRequest(const QString &localFile)
     connect(job, &OCC::EncryptFolderJob::finished, this, [fileData, job](const int status) {
         if (status == OCC::EncryptFolderJob::Error) {
             const int ret = QMessageBox::critical(nullptr,
-                                                  tr("Failed to encrypt folder at \"%1\"").arg(fileData.folderRelativePath),
-                                                  tr("Server replied with error: %1").arg(job->errorString()));
+                                                  tr("Failed to encrypt folder"),
+                                                  tr("Could not encrypt the following folder: \"%1\". \n\n"
+                                                     "Server replied with error: %2").arg(fileData.folderRelativePath, job->errorString()));
             Q_UNUSED(ret)
         } else {
             const int ret = QMessageBox::information(nullptr,
-                                                     tr("Folder at \"%1\" encrypted successfully").arg(fileData.folderRelativePath),
-                                                     {});
+                                                     tr("Folder encrypted successfully").arg(fileData.folderRelativePath),
+                                                     tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath));
             Q_UNUSED(ret)
         }
     });