Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.14] Fix poor translation strings for blacklisted error reason strings #7452

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,19 +436,21 @@ bool ProcessDirectoryJob::handleExcluded(const QString &path, const Entries &ent
item->_errorString = tr("The filename cannot be encoded on your file system.");
break;
case CSYNC_FILE_EXCLUDE_SERVER_BLACKLISTED:
item->_errorString = tr("The filename is blacklisted on the server.");
const auto errorString = tr("The filename is blacklisted on the server.");
QString reasonString;
if (hasForbiddenFilename) {
item->_errorString += tr(" Reason: the entire filename is forbidden.");
reasonString = tr("Reason: the entire filename is forbidden.");
}
if (hasForbiddenBasename) {
item->_errorString += tr(" Reason: the filename has a forbidden base name (filename start).");
reasonString = tr("Reason: the filename has a forbidden base name (filename start).");
}
if (hasForbiddenExtension) {
item->_errorString += tr(" Reason: the file has a forbidden extension (.%1).").arg(extension);
reasonString = tr("Reason: the file has a forbidden extension (.%1).").arg(extension);
}
if (containsForbiddenCharacters) {
item->_errorString += tr(" Reason: the filename contains a forbidden character (%1).").arg(forbiddenCharMatch);
reasonString = tr("Reason: the filename contains a forbidden character (%1).").arg(forbiddenCharMatch);
}
item->_errorString = reasonString.isEmpty() ? errorString : QString("%1 %2").arg(errorString, reasonString);
item->_status = SyncFileItem::FileNameInvalidOnServer;
break;
}
Expand Down
Loading