forked from qt-creator/qt-creator
VcsPlugins: Use multi-arg for strings
Change-Id: I8c1c62e3d2f98781ff1468b44ad11640b873695d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -1548,7 +1548,7 @@ void ClearCasePluginPrivate::vcsDescribe(const FilePath &source, const QString &
|
|||||||
QString description;
|
QString description;
|
||||||
const QString relPath = QDir::toNativeSeparators(QDir(topLevel.toString())
|
const QString relPath = QDir::toNativeSeparators(QDir(topLevel.toString())
|
||||||
.relativeFilePath(source.toString()));
|
.relativeFilePath(source.toString()));
|
||||||
const QString id = QString::fromLatin1("%1@@%2").arg(relPath).arg(changeNr);
|
const QString id = QString::fromLatin1("%1@@%2").arg(relPath, changeNr);
|
||||||
|
|
||||||
QTextCodec *codec = VcsBaseEditor::getCodec(source.toString());
|
QTextCodec *codec = VcsBaseEditor::getCodec(source.toString());
|
||||||
const CommandResult result = runCleartool(topLevel, {"describe", id}, RunFlags::None, codec);
|
const CommandResult result = runCleartool(topLevel, {"describe", id}, RunFlags::None, codec);
|
||||||
|
@@ -588,8 +588,7 @@ void SideDiffEditorWidget::paintEvent(QPaintEvent *e)
|
|||||||
if (!fileInfo.fileName.isEmpty()) {
|
if (!fileInfo.fileName.isEmpty()) {
|
||||||
const QString fileNameText = fileInfo.typeInfo.isEmpty()
|
const QString fileNameText = fileInfo.typeInfo.isEmpty()
|
||||||
? fileInfo.fileName
|
? fileInfo.fileName
|
||||||
: tr("[%1] %2").arg(fileInfo.typeInfo)
|
: tr("[%1] %2").arg(fileInfo.typeInfo, fileInfo.fileName);
|
||||||
.arg(fileInfo.fileName);
|
|
||||||
paintSeparator(painter, m_fileLineForeground,
|
paintSeparator(painter, m_fileLineForeground,
|
||||||
fileNameText, currentBlock, top);
|
fileNameText, currentBlock, top);
|
||||||
}
|
}
|
||||||
|
@@ -1200,7 +1200,7 @@ void GitClient::archive(const FilePath &workingDirectory, QString commit)
|
|||||||
FilePath archiveName = FileUtils::getSaveFilePath(
|
FilePath archiveName = FileUtils::getSaveFilePath(
|
||||||
nullptr,
|
nullptr,
|
||||||
Tr::tr("Generate %1 archive").arg(repoName),
|
Tr::tr("Generate %1 archive").arg(repoName),
|
||||||
repoDirectory.pathAppended(QString("../%1-%2").arg(repoName).arg(commit.left(8))),
|
repoDirectory.pathAppended(QString("../%1-%2").arg(repoName, commit.left(8))),
|
||||||
filters.keys().join(";;"),
|
filters.keys().join(";;"),
|
||||||
&selectedFilter);
|
&selectedFilter);
|
||||||
if (archiveName.isEmpty())
|
if (archiveName.isEmpty())
|
||||||
@@ -3671,7 +3671,7 @@ void GitClient::addChangeActions(QMenu *menu, const QString &source, const QStri
|
|||||||
} else {
|
} else {
|
||||||
const FilePath filePath = FilePath::fromString(source);
|
const FilePath filePath = FilePath::fromString(source);
|
||||||
if (!filePath.isDir()) {
|
if (!filePath.isDir()) {
|
||||||
menu->addAction(Tr::tr("Sh&ow file \"%1\" on revision %2").arg(filePath.fileName()).arg(change),
|
menu->addAction(Tr::tr("Sh&ow file \"%1\" on revision %2").arg(filePath.fileName(), change),
|
||||||
[workingDir, change, source] {
|
[workingDir, change, source] {
|
||||||
m_instance->openShowEditor(workingDir, change, source);
|
m_instance->openShowEditor(workingDir, change, source);
|
||||||
});
|
});
|
||||||
@@ -3756,7 +3756,7 @@ IEditor *GitClient::openShowEditor(const FilePath &workingDirectory, const QStri
|
|||||||
const QString documentId = QLatin1String(Git::Constants::GIT_PLUGIN)
|
const QString documentId = QLatin1String(Git::Constants::GIT_PLUGIN)
|
||||||
+ QLatin1String(".GitShow.") + topLevelString
|
+ QLatin1String(".GitShow.") + topLevelString
|
||||||
+ QLatin1String(".") + relativePath;
|
+ QLatin1String(".") + relativePath;
|
||||||
QString title = Tr::tr("Git Show %1:%2").arg(ref).arg(relativePath);
|
QString title = Tr::tr("Git Show %1:%2").arg(ref, relativePath);
|
||||||
IEditor *editor = EditorManager::openEditorWithContents(Id(), &title, content, documentId,
|
IEditor *editor = EditorManager::openEditorWithContents(Id(), &title, content, documentId,
|
||||||
EditorManager::DoNotSwitchToDesignMode);
|
EditorManager::DoNotSwitchToDesignMode);
|
||||||
editor->document()->setTemporary(true);
|
editor->document()->setTemporary(true);
|
||||||
|
@@ -133,14 +133,11 @@ void VcsConfigurationPage::initializePage()
|
|||||||
|
|
||||||
d->m_versionControl = VcsManager::versionControl(Id::fromString(vcsId));
|
d->m_versionControl = VcsManager::versionControl(Id::fromString(vcsId));
|
||||||
if (!d->m_versionControl) {
|
if (!d->m_versionControl) {
|
||||||
emit reportError(
|
const QString values = Utils::transform(VcsManager::versionControls(),
|
||||||
//: Do not translate "VcsConfiguration", because it is the id of a page.
|
[](const IVersionControl *vc) { return vc->id().toString(); }).join(", ");
|
||||||
tr("\"vcsId\" (\"%1\") is invalid for \"VcsConfiguration\" page. "
|
//: Do not translate "VcsConfiguration", because it is the id of a page.
|
||||||
"Possible values are: %2.")
|
emit reportError(tr("\"vcsId\" (\"%1\") is invalid for \"VcsConfiguration\" page. "
|
||||||
.arg(vcsId)
|
"Possible values are: %2.").arg(vcsId, values));
|
||||||
.arg(QStringList(Utils::transform(VcsManager::versionControls(), [](const IVersionControl *vc) {
|
|
||||||
return vc->id().toString();
|
|
||||||
})).join(QLatin1String(", "))));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user