Project Explorer: Fix UI text

Use book-style capitalization for dialog and button labels.

Change-Id: I2c074d83d6a95ad348daacabd561c758e0a493f8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Leena Miettinen
2019-06-25 08:48:29 +02:00
parent 73f3291c6d
commit 77f1a5963d
6 changed files with 15 additions and 15 deletions

View File

@@ -421,7 +421,7 @@ void EnvironmentWidget::amendPathList(const PathListModifier &modifier)
{
const QString varName = d->m_model->indexToVariable(d->m_environmentView->currentIndex());
const QString dir = QDir::toNativeSeparators(
QFileDialog::getExistingDirectory(this, tr("Choose a directory")));
QFileDialog::getExistingDirectory(this, tr("Choose Directory")));
if (dir.isEmpty())
return;
QModelIndex index = d->m_model->variableToIndex(varName);

View File

@@ -104,7 +104,7 @@ public:
: QDialog(parent), m_view(new Utils::TreeView(this))
{
setWindowTitle(QCoreApplication::translate("ProjectExplorer::JsonWizard",
"Choose project file"));
"Choose Project File"));
const auto model = new ProjectFilesModel(candidates, this);
m_view->setSelectionMode(Utils::TreeView::ExtendedSelection);
m_view->setSelectionBehavior(Utils::TreeView::SelectRows);
@@ -121,7 +121,7 @@ public:
const auto layout = new QVBoxLayout(this);
layout->addWidget(new QLabel(QCoreApplication::translate("ProjectExplorer::JsonWizard",
"The project contains more than one project file. "
"Please select the one you would like to use.")));
"Select the one you would like to use.")));
layout->addWidget(m_view);
layout->addWidget(buttonBox);
}

View File

@@ -71,14 +71,14 @@ ParseIssuesDialog::ParseIssuesDialog(QWidget *parent) : QDialog(parent), d(new P
d->clearTasksCheckBox.setText(tr("Clear existing tasks"));
d->clearTasksCheckBox.setChecked(true);
const auto loadFileButton = new QPushButton(tr("Load from file..."));
const auto loadFileButton = new QPushButton(tr("Load from File..."));
connect(loadFileButton, &QPushButton::clicked, this, [this] {
const QString filePath = QFileDialog::getOpenFileName(this, tr("Choose File"));
if (filePath.isEmpty())
return;
QFile file(filePath);
if (!file.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, tr("Could not open file"),
QMessageBox::critical(this, tr("Could Not Open File"),
tr("Could not open file: \"%1\": %2")
.arg(filePath, file.errorString()));
return;
@@ -116,7 +116,7 @@ ParseIssuesDialog::ParseIssuesDialog(QWidget *parent) : QDialog(parent), d(new P
// TODO: Only very few parsers are available from a Kit (basically just the Toolchain one).
// If we introduced factories for IOutputParsers, we could offer the user
// to combine arbitrary parsers here.
const auto parserGroupBox = new QGroupBox(tr("Parsing options"));
const auto parserGroupBox = new QGroupBox(tr("Parsing Options"));
layout->addWidget(parserGroupBox);
const auto parserLayout = new QVBoxLayout(parserGroupBox);
const auto kitChooserWidget = new QWidget;
@@ -153,7 +153,7 @@ void ParseIssuesDialog::accept()
{
std::unique_ptr<IOutputParser> parser(d->kitChooser.currentKit()->createOutputParser());
if (!parser) {
QMessageBox::critical(this, tr("Cannot parse"), tr("Cannot parse: The chosen kit does "
QMessageBox::critical(this, tr("Cannot Parse"), tr("Cannot parse: The chosen kit does "
"not provide an output parser."));
return;
}

View File

@@ -661,7 +661,7 @@ void Project::changeRootProjectDirectory()
{
Utils::FilePath rootPath = Utils::FilePath::fromString(
QFileDialog::getExistingDirectory(Core::ICore::dialogParent(),
tr("Select The Root Directory"),
tr("Select the Root Directory"),
rootProjectDirectory().toString(),
QFileDialog::ShowDirsOnly
| QFileDialog::DontResolveSymlinks));
@@ -673,7 +673,7 @@ void Project::changeRootProjectDirectory()
}
/*!
Returns the common root directory that contains all files which belongs to a project.
Returns the common root directory that contains all files which belong to a project.
*/
Utils::FilePath Project::rootProjectDirectory() const
{

View File

@@ -3422,7 +3422,7 @@ void ProjectExplorerPluginPrivate::addExistingProjects()
QTC_ASSERT(projectNode, return);
const QString dir = directoryFor(currentNode);
QStringList subProjectFilePaths = QFileDialog::getOpenFileNames(
ICore::mainWindow(), tr("Please choose a project file"), dir,
ICore::mainWindow(), tr("Choose Project File"), dir,
projectNode->subProjectFileNamePatterns().join(";;"));
if (!ProjectTree::hasNode(projectNode))
return;

View File

@@ -457,7 +457,7 @@ public:
: m_buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
m_buttonGroup(new QButtonGroup(this))
{
setWindowTitle(tr("Please choose a drop action"));
setWindowTitle(tr("Choose Drop Action"));
const bool offerFileIo = !defaultTargetDir.isEmpty();
auto * const layout = new QVBoxLayout(this);
layout->addWidget(new QLabel(tr("You just dragged some files from one project node to "
@@ -469,8 +469,8 @@ public:
m_buttonGroup->addButton(moveButton, int(DropAction::Move));
layout->addWidget(moveButton);
if (offerFileIo) {
copyButton->setText(tr("Copy only the file references"));
moveButton->setText(tr("Move only the file references"));
copyButton->setText(tr("Copy Only File References"));
moveButton->setText(tr("Move Only File References"));
auto * const copyWithFilesButton
= new QRadioButton(tr("Copy file references and files"), this);
m_buttonGroup->addButton(copyWithFilesButton, int(DropAction::CopyWithFiles));
@@ -506,8 +506,8 @@ public:
}
});
} else {
copyButton->setText(tr("Copy the file references"));
moveButton->setText(tr("Move the file references"));
copyButton->setText(tr("Copy File References"));
moveButton->setText(tr("Move File References"));
moveButton->setChecked(true);
}
connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);