Skip to content

Commit

Permalink
Merge pull request #6602 from nextcloud/bugfix/clarifyInvalidFileName…
Browse files Browse the repository at this point in the history
…sWarning

invalid item name warning: use file or folder when appropriate
  • Loading branch information
claucambra authored Apr 28, 2024
2 parents 95c7deb + 7262d11 commit 6a6d92d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,13 @@ bool ProcessDirectoryJob::handleExcluded(const QString &path, const Entries &ent
break;
}
}
const auto itemTypeName = (isDirectory ? tr("Folder", "name of folder entity to use when warning about invalid name") : tr("File", "name of folder entity to use when warning about invalid name"));
if (invalid) {
item->_errorString = tr("File names containing the character \"%1\" are not supported on this file system.").arg(QLatin1Char(invalid));
item->_errorString = tr("%1 name containing the character \"%2\" is not supported on this file system.", "folder or file impossible to sync due to an invalid name, placeholders will be file or folder and the invalid character").arg(itemTypeName, QChar(invalid));
} else if (isInvalidPattern) {
item->_errorString = tr("File name contains at least one invalid character");
item->_errorString = tr("%1 name contains at least one invalid character").arg(itemTypeName);
} else {
item->_errorString = tr("The file name is a reserved name on this file system.");
item->_errorString = tr("%1 name is a reserved name on this file system.").arg(itemTypeName);
}
}
item->_status = SyncFileItem::FileNameInvalid;
Expand Down

0 comments on commit 6a6d92d

Please sign in to comment.