Skip to content

Commit 5fea156

Browse files
Remove path from error widgets and update traduction. (#240)
* Remove path from error widgets and update traduction. * Replace CPPUNIT_ASSERT by CPPUNIT_ASSERT_EQUAL * Revert "Replace CPPUNIT_ASSERT by CPPUNIT_ASSERT_EQUAL" This reverts commit 4b570a6. * Update src/gui/parametersdialog.cpp Co-authored-by: Luc Guyot <[email protected]> * Update src/gui/parametersdialog.cpp Co-authored-by: Luc Guyot <[email protected]> * Update src/gui/parametersdialog.cpp Co-authored-by: Luc Guyot <[email protected]> --------- Co-authored-by: Luc Guyot <[email protected]>
1 parent 51cad52 commit 5fea156

File tree

5 files changed

+622
-619
lines changed

5 files changed

+622
-619
lines changed

src/gui/parametersdialog.cpp

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ void ParametersDialog::initUI() {
246246
QVBoxLayout *errorsHeaderVBox = new QVBoxLayout();
247247
errorsHeaderVBox->setContentsMargins(boxHMargin, boxVTMargin, boxHMargin, boxVBMargin);
248248
errorsHeaderVBox->setSpacing(boxVSpacing);
249-
//errorsHeaderWidget->setLayout(errorsHeaderVBox);
249+
// errorsHeaderWidget->setLayout(errorsHeaderVBox);
250250

251251
_sendLogsWidget = new ActionWidget(":/client/resources/icons/actions/help.svg", this);
252252
_sendLogsWidget->setObjectName("sendLogsWidget");
@@ -765,26 +765,26 @@ QString ParametersDialog::getCancelText(CancelType cancelType, const QString &pa
765765
"It will be restored to its original location.");
766766
}
767767
case CancelTypeAlreadyExistRemote: {
768-
return tr("\"%1\" already exists on remote kDrive. It is not synced because it has been blacklisted.").arg(path);
768+
return tr("This item already exists on remote kDrive. It is not synced because it has been blacklisted.");
769769
}
770770
case CancelTypeMoveToBinFailed: {
771-
return tr("Failed to move item \"%1\" to bin, it has been blacklisted.").arg(path);
771+
return tr("Failed to move this item to bin, it has been blacklisted.");
772772
}
773773
case CancelTypeAlreadyExistLocal: {
774-
return tr("\"%1\" already exists on local file system. It is not synced.").arg(path);
774+
return tr("This item already exists on local file system. It is not synced.");
775775
}
776776
case CancelTypeTmpBlacklisted: {
777-
return tr("Failed to synchronize item \"%1\". It has been temporarily blacklisted.<br>"
778-
"Another attempt to sync it will be done in one hour or on next application startup.")
779-
.arg(path);
777+
return tr(
778+
"Failed to synchronize this item. It has been temporarily blacklisted.<br>"
779+
"Another attempt to sync it will be done in one hour or on next application startup.");
780780
}
781781
case CancelTypeExcludedByTemplate: {
782-
return tr("The item \"%1\" has been excluded from sync by a custom template.<br>"
783-
"You can disable this type of notification from the Preferences")
784-
.arg(path);
782+
return tr(
783+
"This item has been excluded from sync by a custom template.<br>"
784+
"You can disable this type of notification from the Preferences");
785785
}
786786
case CancelTypeHardlink: {
787-
return tr("The item \"%1\" has been excluded from sync because it's an hard link").arg(path);
787+
return tr("This item has been excluded from sync because it is an hard link");
788788
}
789789
default: {
790790
break;
@@ -799,13 +799,15 @@ QString ParametersDialog::getCancelText(CancelType cancelType, const QString &pa
799799
QString ParametersDialog::getBackErrorText(const ErrorInfo &errorInfo) const noexcept {
800800
switch (errorInfo.exitCause()) {
801801
case ExitCauseHttpErrForbidden: {
802-
return tr("The operation performed on item is forbidden.<br>"
803-
"The file/directory has been temporarily blacklisted.");
802+
return tr(
803+
"The operation performed on item is forbidden.<br>"
804+
"The item has been temporarily blacklisted.");
804805
}
805806
case ExitCauseApiErr:
806807
case ExitCauseUploadNotTerminated: {
807-
return tr("The operation performed on this item failed.<br>"
808-
"The file/directory has been temporarily blacklisted.");
808+
return tr(
809+
"The operation performed on this item failed.<br>"
810+
"The item has been temporarily blacklisted.");
809811
}
810812
case ExitCauseFileTooBig: {
811813
return tr("The file is too large to be uploaded. It has been temporarily blacklisted.");
@@ -837,13 +839,13 @@ QString ParametersDialog::getErrorLevelNodeText(const ErrorInfo &errorInfo) cons
837839
switch (errorInfo.exitCode()) {
838840
case ExitCodeSystemError: {
839841
if (errorInfo.exitCause() == ExitCauseFileAccessError) {
840-
return tr("Can't access item %1.<br>"
841-
"Please fix the write permissions and restart the synchronization.")
842-
.arg(errorInfo.path());
842+
return tr(
843+
"Can't access item.<br>"
844+
"Please fix the write permissions and restart the synchronization.");
843845
}
844846

845847
if (errorInfo.exitCause() == ExitCauseMoveToTrashFailed) {
846-
return tr("Move to trash failed for item %1").arg(errorInfo.path());
848+
return tr("Move to trash failed.");
847849
}
848850
}
849851
case ExitCodeBackError: {

0 commit comments

Comments
 (0)