Skip to content

Commit

Permalink
Merge pull request #3604 from nextcloud/Valdnet-patch-3
Browse files Browse the repository at this point in the history
l10n: Replace apostrophe with double quotation
  • Loading branch information
allexzander authored Jul 30, 2021
2 parents 10b7907 + fc75b94 commit f02b8f4
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/common/filesystembase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,13 @@ bool FileSystem::moveToTrash(const QString &fileName, QString *errorString)
suffix_number++;
}
if (!file.rename(f.absoluteFilePath(), path + QString::number(suffix_number))) { // rename(file old path, file trash path)
*errorString = QCoreApplication::translate("FileSystem", "Could not move '%1' to '%2'")
*errorString = QCoreApplication::translate("FileSystem", R"(Could not move "%1" to "%1")")
.arg(f.absoluteFilePath(), path + QString::number(suffix_number));
return false;
}
} else {
if (!file.rename(f.absoluteFilePath(), trashFilePath + f.fileName())) { // rename(file old path, file trash path)
*errorString = QCoreApplication::translate("FileSystem", "Could not move '%1' to '%2'")
*errorString = QCoreApplication::translate("FileSystem", R"(Could not move "%1" to "%1")")
.arg(f.absoluteFilePath(), trashFilePath + f.fileName());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/authenticationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ AuthenticationDialog::AuthenticationDialog(const QString &realm, const QString &
{
setWindowTitle(tr("Authentication Required"));
auto *lay = new QVBoxLayout(this);
auto *label = new QLabel(tr("Enter username and password for '%1' at %2.").arg(realm, domain));
auto *label = new QLabel(tr("Enter username and password for \"%1\" at %2.").arg(realm, domain));
label->setTextFormat(Qt::PlainText);
lay->addWidget(label);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/cloudproviders/cloudproviderwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const Progr
// Build status details text
QString msg;
if (!progress._currentDiscoveredRemoteFolder.isEmpty()) {
msg = tr("Checking for changes in '%1'").arg(progress._currentDiscoveredRemoteFolder);
msg = tr("Checking for changes in \"%1\"").arg(progress._currentDiscoveredRemoteFolder);
} else if (progress.totalSize() == 0) {
qint64 currentFile = progress.currentFile();
qint64 totalFileCount = qMax(progress.totalFiles(), currentFile);
Expand Down
4 changes: 2 additions & 2 deletions src/gui/creds/flow2auth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void Flow2Auth::fetchNewToken(const TokenAction action)
errorReason = tr("Error returned from the server: <em>%1</em>")
.arg(errorFromJson.toHtmlEscaped());
} else if (reply->error() != QNetworkReply::NoError) {
errorReason = tr("There was an error accessing the 'token' endpoint: <br><em>%1</em>")
errorReason = tr("There was an error accessing the \"token\" endpoint: <br><em>%1</em>")
.arg(reply->errorString().toHtmlEscaped());
} else if (jsonParseError.error != QJsonParseError::NoError) {
errorReason = tr("Could not parse the JSON returned from the server: <br><em>%1</em>")
Expand Down Expand Up @@ -223,7 +223,7 @@ void Flow2Auth::slotPollTimerTimeout()
errorReason = tr("Error returned from the server: <em>%1</em>")
.arg(errorFromJson.toHtmlEscaped());
} else if (reply->error() != QNetworkReply::NoError) {
errorReason = tr("There was an error accessing the 'token' endpoint: <br><em>%1</em>")
errorReason = tr("There was an error accessing the \"token\" endpoint: <br><em>%1</em>")
.arg(reply->errorString().toHtmlEscaped());
} else if (jsonParseError.error != QJsonParseError::NoError) {
errorReason = tr("Could not parse the JSON returned from the server: <br><em>%1</em>")
Expand Down
2 changes: 1 addition & 1 deletion src/gui/creds/httpcredentialsgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void HttpCredentialsGui::showDialog()
}
if (!_fetchErrorString.isEmpty()) {
msg += QLatin1String("<br>")
+ tr("Reading from keychain failed with error: '%1'")
+ tr("Reading from keychain failed with error: \"%1\"")
.arg(Utility::escape(_fetchErrorString))
+ QLatin1String("<br>");
}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1252,12 +1252,12 @@ void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction dir, std::functio
return;
}

const QString msg = dir == SyncFileItem::Down ? tr("All files in the sync folder '%1' folder were deleted on the server.\n"
const QString msg = dir == SyncFileItem::Down ? tr("All files in the sync folder \"%1\" folder were deleted on the server.\n"
"These deletes will be synchronized to your local sync folder, making such files "
"unavailable unless you have a right to restore. \n"
"If you decide to restore the files, they will be re-synced with the server if you have rights to do so.\n"
"If you decide to delete the files, they will be unavailable to you, unless you are the owner.")
: tr("All the files in your local sync folder '%1' were deleted. These deletes will be "
: tr("All the files in your local sync folder \"%1\" were deleted. These deletes will be "
"synchronized with your server, making such files unavailable unless restored.\n"
"Are you sure you want to sync those actions with the server?\n"
"If this was an accident and you decide to keep your files, they will be re-synced from the server.");
Expand Down
2 changes: 1 addition & 1 deletion src/gui/folderman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ bool FolderMan::ensureJournalGone(const QString &journalDbFile)
while (QFile::exists(journalDbFile) && !QFile::remove(journalDbFile)) {
qCWarning(lcFolderMan) << "Could not remove old db file at" << journalDbFile;
int ret = QMessageBox::warning(nullptr, tr("Could not reset folder state"),
tr("An old sync journal '%1' was found, "
tr("An old sync journal \"%1\" was found, "
"but could not be removed. Please make sure "
"that no application is currently using it.")
.arg(QDir::fromNativeSeparators(QDir::cleanPath(journalDbFile))),
Expand Down
4 changes: 2 additions & 2 deletions src/gui/folderstatusmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,11 +970,11 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)

if (progress.status() == ProgressInfo::Discovery) {
if (!progress._currentDiscoveredRemoteFolder.isEmpty()) {
pi->_overallSyncString = tr("Checking for changes in remote '%1'").arg(progress._currentDiscoveredRemoteFolder);
pi->_overallSyncString = tr("Checking for changes in remote \"%1\"").arg(progress._currentDiscoveredRemoteFolder);
emit dataChanged(index(folderIndex), index(folderIndex), roles);
return;
} else if (!progress._currentDiscoveredLocalFolder.isEmpty()) {
pi->_overallSyncString = tr("Checking for changes in local '%1'").arg(progress._currentDiscoveredLocalFolder);
pi->_overallSyncString = tr("Checking for changes in local \"%1\"").arg(progress._currentDiscoveredLocalFolder);
emit dataChanged(index(folderIndex), index(folderIndex), roles);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/folderwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void FolderWizardRemotePath::slotAddRemoteFolder()
auto *dlg = new QInputDialog(this);

dlg->setWindowTitle(tr("Create Remote Folder"));
dlg->setLabelText(tr("Enter the name of the new folder to be created below '%1':")
dlg->setLabelText(tr("Enter the name of the new folder to be created below \"%1\":")
.arg(parent));
dlg->open(this, SLOT(slotCreateRemoteFolder(QString)));
dlg->setAttribute(Qt::WA_DeleteOnClose);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ignorelisteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ IgnoreListEditor::IgnoreListEditor(QWidget *parent)

ConfigFile cfgFile;
//FIXME This is not true. The entries are hardcoded below in setupTableReadOnlyItems
readOnlyTooltip = tr("This entry is provided by the system at '%1' "
readOnlyTooltip = tr("This entry is provided by the system at \"%1\" "
"and cannot be modified in this view.")
.arg(QDir::toNativeSeparators(cfgFile.excludeFile(ConfigFile::SystemScope)));

Expand Down
2 changes: 1 addition & 1 deletion src/gui/ignorelisttablewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void IgnoreListTableWidget::slotWriteIgnoreFile(const QString & file)
}
} else {
QMessageBox::warning(this, tr("Could not open file"),
tr("Cannot write changes to '%1'.").arg(file));
tr("Cannot write changes to \"%1\".").arg(file));
}
ignores.close(); //close the file before reloading stuff.

Expand Down
4 changes: 2 additions & 2 deletions src/gui/owncloudgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,10 @@ void ownCloudGui::slotUpdateProgress(const QString &folder, const ProgressInfo &
if (progress.status() == ProgressInfo::Discovery) {
#if 0
if (!progress._currentDiscoveredRemoteFolder.isEmpty()) {
_actionStatus->setText(tr("Checking for changes in remote '%1'")
_actionStatus->setText(tr("Checking for changes in remote \"%1\"")
.arg(progress._currentDiscoveredRemoteFolder));
} else if (!progress._currentDiscoveredLocalFolder.isEmpty()) {
_actionStatus->setText(tr("Checking for changes in local '%1'")
_actionStatus->setText(tr("Checking for changes in local \"%1\"")
.arg(progress._currentDiscoveredLocalFolder));
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/gui/owncloudsetupwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void OwncloudSetupWizard::slotAuthError()
return;
}
errorMsg = tr("The authenticated request to the server was redirected to "
"'%1'. The URL is bad, the server is misconfigured.")
"\"%1\". The URL is bad, the server is misconfigured.")
.arg(Utility::escape(redirectUrl.toString()));

// A 404 is actually a success: we were authorized to know that the folder does
Expand Down
2 changes: 1 addition & 1 deletion src/gui/shareusergroupwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void ShareUserGroupWidget::slotShareesReady()

_pi_sharee.stopAnimation();
if (_completerModel->rowCount() == 0) {
displayError(0, tr("No results for '%1'").arg(_completerModel->currentSearch()));
displayError(0, tr("No results for \"%1\"").arg(_completerModel->currentSearch()));
}

// if no rows are present in the model - complete() will hide the completer
Expand Down
4 changes: 2 additions & 2 deletions src/gui/wizard/owncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ void OwncloudAdvancedSetupPage::updateStatus()
if (_remoteFolder.isEmpty() || _remoteFolder == QLatin1String("/")) {
t = "";
} else {
t = Utility::escape(tr("%1 folder '%2' is synced to local folder '%3'")
t = Utility::escape(tr(R"(%1 folder "%2" is synced to local folder "%3")")
.arg(Theme::instance()->appName(), _remoteFolder,
QDir::toNativeSeparators(locFolder)));
_ui.rSyncEverything->setText(tr("Sync the folder '%1'").arg(_remoteFolder));
_ui.rSyncEverything->setText(tr("Sync the folder \"%1\"").arg(_remoteFolder));
}

const bool dirNotEmpty(QDir(locFolder).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).count() > 0);
Expand Down
4 changes: 2 additions & 2 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ bool ProcessDirectoryJob::handleExcluded(const QString &path, const QString &loc
}
}
if (invalid) {
item->_errorString = tr("File names containing the character '%1' are not supported on this file system.")
item->_errorString = tr("File names containing the character \"%1\" are not supported on this file system.")
.arg(QLatin1Char(invalid));
}
if (isInvalidPattern) {
Expand Down Expand Up @@ -1545,7 +1545,7 @@ DiscoverySingleDirectoryJob *ProcessDirectoryJob::startAsyncServerQuery()
emit this->finished();
} else {
// Fatal for the root job since it has no SyncFileItem, or for the network errors
emit _discoveryData->fatalError(tr("Server replied with an error while reading directory '%1' : %2")
emit _discoveryData->fatalError(tr("Server replied with an error while reading directory \"%1\" : %2")
.arg(_currentFolder._server, results.error().message));
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/libsync/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ bool FileSystem::removeRecursively(const QString &path, const std::function<void
onDeleted(di.filePath(), false);
} else {
if (errors) {
errors->append(QCoreApplication::translate("FileSystem", "Error removing '%1': %2")
errors->append(QCoreApplication::translate("FileSystem", "Error removing \"%1\": %2")
.arg(QDir::toNativeSeparators(di.filePath()), removeError));
}
qCWarning(lcFileSystem) << "Error removing " << di.filePath() << ':' << removeError;
Expand All @@ -171,7 +171,7 @@ bool FileSystem::removeRecursively(const QString &path, const std::function<void
onDeleted(path, true);
} else {
if (errors) {
errors->append(QCoreApplication::translate("FileSystem", "Could not remove folder '%1'")
errors->append(QCoreApplication::translate("FileSystem", "Could not remove folder \"%1\"")
.arg(QDir::toNativeSeparators(path)));
}
qCWarning(lcFileSystem) << "Error removing folder" << path;
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void Logger::setLogFile(const QString &name)
if (!openSucceeded) {
locker.unlock(); // Just in case postGuiMessage has a qDebug()
postGuiMessage(tr("Error"),
QString(tr("<nobr>File '%1'<br/>cannot be opened for writing.<br/><br/>"
QString(tr("<nobr>File \"%1\"<br/>cannot be opened for writing.<br/><br/>"
"The log output can <b>not</b> be saved!</nobr>"))
.arg(name));
return;
Expand Down
4 changes: 2 additions & 2 deletions test/testremotediscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private slots:
auto oldRemoteState = fakeFolder.currentRemoteState();

QString errorFolder = "dav/files/admin/B";
QString fatalErrorPrefix = "Server replied with an error while reading directory 'B' : ";
QString fatalErrorPrefix = "Server replied with an error while reading directory \"B\" : ";
fakeFolder.setServerOverride([&](QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *)
-> QNetworkReply *{
if (req.attribute(QNetworkRequest::CustomVerbAttribute) == "PROPFIND" && req.url().path().endsWith(errorFolder)) {
Expand Down Expand Up @@ -134,7 +134,7 @@ private slots:
// Check the same discovery error on the sync root
//
errorFolder = "dav/files/admin/";
fatalErrorPrefix = "Server replied with an error while reading directory '' : ";
fatalErrorPrefix = "Server replied with an error while reading directory \"\" : ";
errorSpy.clear();
QVERIFY(!fakeFolder.syncOnce());
QCOMPARE(errorSpy.size(), 1);
Expand Down

0 comments on commit f02b8f4

Please sign in to comment.