forked from qt-creator/qt-creator
Coco: Fix translatable strings
Style fixes Change-Id: Ic910223da2961be46fa4683e0af37132f60f5396 Reviewed-by: Markus Redeker <markus.redeker@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -98,7 +98,7 @@ QWidget *CocoBuildStep::createConfigWidget()
|
||||
void CocoBuildStep::updateDisplay()
|
||||
{
|
||||
if (!cocoSettings().isValid()) {
|
||||
setSummaryText("<i>" + Tr::tr("Coco Code Coverage: No working Coco installation") + "</i>");
|
||||
setSummaryText("<i>" + Tr::tr("Coco Code Coverage: No working Coco installation.") + "</i>");
|
||||
emit setButtonState(false);
|
||||
return;
|
||||
}
|
||||
@@ -106,10 +106,10 @@ void CocoBuildStep::updateDisplay()
|
||||
m_valid = m_buildSettings->validSettings();
|
||||
|
||||
if (m_valid) {
|
||||
setSummaryText("<b>" + Tr::tr("Coco Code Coverage: Enabled") + "</b>");
|
||||
setSummaryText("<b>" + Tr::tr("Coco Code Coverage: Enabled.") + "</b>");
|
||||
emit setButtonState(true, Tr::tr("Disable Coverage"));
|
||||
} else {
|
||||
setSummaryText(Tr::tr("Coco Code Coverage: Disabled"));
|
||||
setSummaryText(Tr::tr("Coco Code Coverage: Disabled."));
|
||||
// m_reconfigureButton->setText(Tr::tr("Enable Coverage"));
|
||||
emit setButtonState(true, Tr::tr("Enable Coverage"));
|
||||
}
|
||||
|
@@ -176,9 +176,9 @@ void CocoCMakeSettings::writeToolchainFile(const QString &internalPath)
|
||||
if (internalContent == currentContent)
|
||||
return;
|
||||
|
||||
logSilently(Tr::tr("Overwrite file %1").arg(maybeQuote(toolchainNative)));
|
||||
logSilently(Tr::tr("Overwrite file \"%1\".").arg(toolchainNative));
|
||||
} else
|
||||
logSilently(Tr::tr("Write file %1").arg(maybeQuote(toolchainNative)));
|
||||
logSilently(Tr::tr("Write file \"%1\".").arg(toolchainNative));
|
||||
|
||||
QFile out{toolchainNative};
|
||||
QTC_CHECK(out.open(QIODeviceBase::WriteOnly));
|
||||
|
@@ -44,7 +44,7 @@ CocoProjectWidget::CocoProjectWidget(Project *project, BuildConfiguration *build
|
||||
m_coverageGroupbox
|
||||
= {groupChecker(m_coverageGroupBoxEnabled.groupChecker()),
|
||||
Column{
|
||||
Row{Tr::tr("CoverageScanner Options"), st, docLink},
|
||||
Row{Tr::tr("CoverageScanner options:"), st, docLink},
|
||||
m_optionEdit,
|
||||
Row{PushButton{
|
||||
text(Tr::tr("Exclude File...")),
|
||||
@@ -109,7 +109,7 @@ void CocoProjectWidget::reloadSettings()
|
||||
m_configerrorLabel.setVisible(!valid);
|
||||
if (!valid) {
|
||||
m_configerrorLabel.setText(
|
||||
Tr::tr("Coco is not installed correctly: \"%1\"").arg(cocoSettings().errorMessage()));
|
||||
Tr::tr("Coco is not installed correctly: %1").arg(cocoSettings().errorMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ void CocoProjectWidget::buildSystemUpdated(ProjectExplorer::BuildSystem *bs)
|
||||
|
||||
if (m_buildConfigurationName != newBuildConfigurationName) {
|
||||
m_buildConfigurationName = newBuildConfigurationName;
|
||||
logSilently(Tr::tr("Build Configuration changed to %1.").arg(newBuildConfigurationName));
|
||||
logSilently(Tr::tr("Build Configuration changed to \"%1\".").arg(newBuildConfigurationName));
|
||||
reloadSettings();
|
||||
} else if (m_configState == configRunning)
|
||||
setState(configDone);
|
||||
@@ -142,7 +142,7 @@ void CocoProjectWidget::configurationErrorOccurred(const QString &error)
|
||||
// The variable error seems to contain no usable information.
|
||||
setMessageLabel(
|
||||
Utils::InfoLabel::Error,
|
||||
Tr::tr("Error when configuring with <i>%1</i>. "
|
||||
Tr::tr("Error when configuring with \"%1\". "
|
||||
"Check General Messages for more information.")
|
||||
.arg(m_buildSettings->featureFilenName()));
|
||||
setState(configDone);
|
||||
@@ -255,7 +255,7 @@ void Internal::CocoProjectWidget::onCoverageGroupBoxClicked()
|
||||
void CocoProjectWidget::onSaveButtonClicked()
|
||||
{
|
||||
if (m_configState == configRunning) {
|
||||
logSilently(Tr::tr("Stop re-configuring"));
|
||||
logSilently(Tr::tr("Stop re-configuring."));
|
||||
m_buildSettings->stopReconfigure();
|
||||
setState(configEdited);
|
||||
return;
|
||||
@@ -265,11 +265,11 @@ void CocoProjectWidget::onSaveButtonClicked()
|
||||
QString tweaks = m_tweaksEdit();
|
||||
clearMessageLabel();
|
||||
|
||||
logSilently(Tr::tr("Write file \"%1\"").arg(m_buildSettings->featureFilePath()));
|
||||
logSilently(Tr::tr("Write file \"%1\".").arg(m_buildSettings->featureFilePath()));
|
||||
m_buildSettings->write(options, tweaks);
|
||||
|
||||
if (m_buildSettings->needsReconfigure()) {
|
||||
logSilently(Tr::tr("Re-configure"));
|
||||
logSilently(Tr::tr("Re-configure."));
|
||||
setState(configRunning);
|
||||
m_buildSettings->reconfigure();
|
||||
} else
|
||||
@@ -279,7 +279,7 @@ void CocoProjectWidget::onSaveButtonClicked()
|
||||
void CocoProjectWidget::onRevertButtonClicked()
|
||||
{
|
||||
clearMessageLabel();
|
||||
logSilently(Tr::tr("Reload file \"%1\"").arg(m_buildSettings->featureFilePath()));
|
||||
logSilently(Tr::tr("Reload file \"%1\".").arg(m_buildSettings->featureFilePath()));
|
||||
reloadSettings();
|
||||
}
|
||||
|
||||
|
@@ -158,7 +158,7 @@ QString CocoQMakeSettings::configChanges() const
|
||||
+ tableRow(
|
||||
Tr::tr("Build environment: "),
|
||||
maybeQuote(QString(featuresVar) + "=" + projectDirectory()))
|
||||
+ tableRow(Tr::tr("Feature File: "), maybeQuote(featureFilePath())) + "</tbody></table>";
|
||||
+ tableRow(Tr::tr("Feature file: "), maybeQuote(featureFilePath())) + "</tbody></table>";
|
||||
}
|
||||
|
||||
QString CocoQMakeSettings::projectDirectory() const
|
||||
|
@@ -119,12 +119,12 @@ bool CocoSettings::verifyCocoDirectory(const FilePath &cocoDir)
|
||||
proc.start();
|
||||
|
||||
if (!proc.waitForStarted()) {
|
||||
logError(Tr::tr("Error: Coveragescanner at \"%1\" did not start.").arg(coveragescanner));
|
||||
logError(Tr::tr("Error: CoverageScanner at \"%1\" did not start.").arg(coveragescanner));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!proc.waitForFinished()) {
|
||||
logError(Tr::tr("Error: Coveragescanner at \"%1\" did not finish.").arg(coveragescanner));
|
||||
logError(Tr::tr("Error: CoverageScanner at \"%1\" did not finish.").arg(coveragescanner));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ bool CocoSettings::verifyCocoDirectory(const FilePath &cocoDir)
|
||||
return true;
|
||||
} else {
|
||||
logError(
|
||||
Tr::tr("Error: Coveragescanner at \"%1\" did not run correctly.").arg(coveragescanner));
|
||||
Tr::tr("Error: CoverageScanner at \"%1\" did not run correctly.").arg(coveragescanner));
|
||||
for (const QString &l : lines) {
|
||||
logSilently(l);
|
||||
}
|
||||
|
Reference in New Issue
Block a user