Capitalize sync instruction strings returned by Progress::asActionString.
authorCamila Ayres <hello@camilasan.com>
Mon, 29 Jul 2024 15:51:55 +0000 (17:51 +0200)
committerCamila Ayres <hello@camilasan.com>
Mon, 29 Jul 2024 18:06:32 +0000 (20:06 +0200)
Signed-off-by: Camila Ayres <hello@camilasan.com>
src/gui/folderstatusmodel.cpp
src/libsync/progressdispatcher.cpp

index 1c38cb59f2b3c19f57219cdc772718afbc7bd2ef..7cec18b5c157974db02e06604eba47baf631b083 100644 (file)
@@ -1057,23 +1057,16 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)
 
     QString fileProgressString;
     if (ProgressInfo::isSizeDependent(curItem)) {
-        //quint64 estimatedBw = progress.fileProgress(curItem).estimatedBandwidth;
         if (estimatedUpBw || estimatedDownBw) {
-            /*
-            //: Example text: "uploading foobar.png (1MB of 2MB) time left 2 minutes at a rate of 24Kb/s"
-            fileProgressString = tr("%1 %2 (%3 of %4) %5 left at a rate of %6/s")
-                .arg(kindString, itemFileName, s1, s2,
-                    Utility::durationToDescriptiveString(progress.fileProgress(curItem).estimatedEta),
-                    Utility::octetsToString(estimatedBw) );
-            */
+            //: Example text: "Uploading foobar.png (1MB of 2MB) time left 2 minutes at a rate of 24Kb/s"
             //: Example text: "Syncing 'foo.txt', 'bar.txt'"
             fileProgressString = tr("Syncing %1").arg(allFilenames);
             if (estimatedDownBw > 0) {
                 fileProgressString.append(tr(", "));
 // ifdefs: https://github.com/owncloud/client/issues/3095#issuecomment-128409294
 #ifdef Q_OS_WIN
-                //: Example text: "download 24Kb/s"   (%1 is replaced by 24Kb (translated))
-                fileProgressString.append(tr("download %1/s").arg(Utility::octetsToString(estimatedDownBw)));
+                //: Example text: "Download 24Kb/s"   (%1 is replaced by 24Kb (translated))
+                fileProgressString.append(tr("Download %1/s").arg(Utility::octetsToString(estimatedDownBw)));
 #else
                 fileProgressString.append(tr("\u2193 %1/s")
                                               .arg(Utility::octetsToString(estimatedDownBw)));
@@ -1082,21 +1075,21 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)
             if (estimatedUpBw > 0) {
                 fileProgressString.append(tr(", "));
 #ifdef Q_OS_WIN
-                //: Example text: "upload 24Kb/s"   (%1 is replaced by 24Kb (translated))
-                fileProgressString.append(tr("upload %1/s").arg(Utility::octetsToString(estimatedUpBw)));
+                //: Example text: "Upload 24Kb/s"   (%1 is replaced by 24Kb (translated))
+                fileProgressString.append(tr("Upload %1/s").arg(Utility::octetsToString(estimatedUpBw)));
 #else
                 fileProgressString.append(tr("\u2191 %1/s")
                                               .arg(Utility::octetsToString(estimatedUpBw)));
 #endif
             }
         } else {
-            //: Example text: "uploading foobar.png (2MB of 2MB)"
+            //: Example text: "Uploading foobar.png (2MB of 2MB)"
             fileProgressString = tr("%1 %2 (%3 of %4)").arg(kindString, itemFileName,
                                                             Utility::octetsToString(curItemProgress),
                                                             Utility::octetsToString(curItem._size));
         }
     } else if (!kindString.isEmpty()) {
-        //: Example text: "uploading foobar.png"
+        //: Example text: "Uploading foobar.png"
         fileProgressString = tr("%1 %2").arg(kindString, itemFileName);
     }
     subFolderProgress->_progressString = fileProgressString;
@@ -1139,7 +1132,7 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)
         }
     } else if (totalFileCount > 0 && currentFile > 0) {
         // Don't attempt to estimate the time left if there is no kb to transfer.
-        overallSyncString = tr("%1 file %2 of %3").arg(kindString).arg(currentFile).arg(totalFileCount);
+        overallSyncString = tr("File %1 of %2").arg(currentFile).arg(totalFileCount);
     }
     subFolderProgress->_overallSyncString = overallSyncString;
 
index ec189b1c970322d3a2575514de7982121fd211a1..b656d6adadbe0ac187620203760e03089b42a5d6 100644 (file)
@@ -74,23 +74,23 @@ QString Progress::asActionString(const SyncFileItem &item)
     case CSYNC_INSTRUCTION_NEW:
     case CSYNC_INSTRUCTION_TYPE_CHANGE:
         if (item._direction != SyncFileItem::Up)
-            return QCoreApplication::translate("progress", "downloading");
+            return QCoreApplication::translate("progress", "Downloading");
         else
-            return QCoreApplication::translate("progress", "uploading");
+            return QCoreApplication::translate("progress", "Uploading");
     case CSYNC_INSTRUCTION_REMOVE:
-        return QCoreApplication::translate("progress", "deleting");
+        return QCoreApplication::translate("progress", "Deleting");
     case CSYNC_INSTRUCTION_EVAL_RENAME:
     case CSYNC_INSTRUCTION_RENAME:
-        return QCoreApplication::translate("progress", "moving");
+        return QCoreApplication::translate("progress", "Moving");
     case CSYNC_INSTRUCTION_IGNORE:
-        return QCoreApplication::translate("progress", "ignoring");
+        return QCoreApplication::translate("progress", "Ignoring");
     case CSYNC_INSTRUCTION_STAT_ERROR:
     case CSYNC_INSTRUCTION_ERROR:
-        return QCoreApplication::translate("progress", "error");
+        return QCoreApplication::translate("progress", "Error");
     case CSYNC_INSTRUCTION_UPDATE_METADATA:
-        return QCoreApplication::translate("progress", "updating local metadata");
+        return QCoreApplication::translate("progress", "Updating local metadata");
     case CSYNC_INSTRUCTION_UPDATE_VFS_METADATA:
-        return QCoreApplication::translate("progress", "updating local virtual files metadata");
+        return QCoreApplication::translate("progress", "Updating local virtual files metadata");
     case CSYNC_INSTRUCTION_NONE:
     case CSYNC_INSTRUCTION_EVAL:
         break;