Skip to content

Commit

Permalink
invalid item name warning: use file or folder when appropriate
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Apr 26, 2024
1 parent 810d8f1 commit acb8e03
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 acb8e03

Please sign in to comment.