Fix some translated strings

Change-Id: I7ffcad62b31e6236dba5fc2116afa297ffcef0a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Eike Ziller
2024-10-24 10:33:34 +02:00
parent 7d29505828
commit 9879446548
12 changed files with 32 additions and 25 deletions

View File

@@ -309,10 +309,12 @@ static ExecutableItem removeForwardPortRecipe(RunnerStorage *storage, const QStr
process.setCommand(storage->adbCommand({"forward", port, adbArg}));
};
const auto onForwardPortDone = [storage, port, portType](DoneWith result) {
if (result == DoneWith::Success)
if (result == DoneWith::Success) {
storage->m_afterFinishAdbCommands.push_back("forward --remove " + port);
else
} else {
//: %1 = QML/JDB/C++
storage->m_glue->setFinished(Tr::tr("Failed to forward %1 debugging ports.").arg(portType));
}
};
return Group {

View File

@@ -359,7 +359,7 @@ IssuesWidget::IssuesWidget(QWidget *parent)
QPalette palette = Utils::creatorTheme()->palette();
palette.setColor(QPalette::Text, Utils::creatorColor(Theme::TextColorError));
m_errorEdit->setPalette(palette);
QPushButton *openPref = new QPushButton(Tr::tr("Open Preferences"), errorWidget);
QPushButton *openPref = new QPushButton(Tr::tr("Open Preferences..."), errorWidget);
connect(openPref, &QPushButton::clicked,
this, []{ ICore::showOptionsDialog("Axivion.Settings.General"); });
using namespace Layouting;

View File

@@ -272,8 +272,9 @@ bool AxivionSettings::updateDashboardServers(const QList<AxivionServer> &other,
const LoopList iterator(keysToRemove);
const auto onDeleteKeySetup = [iterator](CredentialQuery &query) {
MessageManager::writeSilently(Tr::tr("Axivion: Deleting Api token for %1 as respective "
"dashboard server was removed.").arg(*iterator));
MessageManager::writeSilently(Tr::tr("Axivion: Deleting API token for %1 as respective "
"dashboard server was removed.")
.arg(*iterator));
query.setOperation(CredentialOperation::Delete);
query.setService(s_axivionKeychainService);
query.setKey(*iterator);

View File

@@ -56,7 +56,7 @@ ClangToolsCompilationDb::ClangToolsCompilationDb(ClangToolType toolType)
d->readyAndUpToDate = success;
if (success) {
Core::MessageManager::writeSilently(
Tr::tr("Compilation database for %1 successfully generated at %2.")
Tr::tr("Compilation database for %1 successfully generated at \"%2\".")
.arg(d->toolName(), d->dir.path().toUserOutput()));
} else {
Core::MessageManager::writeDisrupting(
@@ -106,7 +106,7 @@ void ClangToolsCompilationDb::Private::generate()
generatorWatcher.cancel();
Core::MessageManager::writeSilently(
Tr::tr("Generating compilation database for %1 at %2 ...")
Tr::tr("Generating compilation database for %1 at \"%2\" ...")
.arg(clangToolName(toolType), dir.path().toUserOutput()));
const auto getCompilerOptionsBuilder = [this](const ProjectPart &pp) {

View File

@@ -1139,7 +1139,7 @@ QWidget *Editor::toolBar()
QAction *setUrlAction = new QAction();
setUrlAction->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon());
setUrlAction->setToolTip(Tr::tr("Change backend URL"));
setUrlAction->setToolTip(Tr::tr("Change backend URL."));
connect(setUrlAction, &QAction::triggered, this, [this] {
bool ok;
QString text = QInputDialog::getText(

View File

@@ -251,15 +251,15 @@ QString IVersionControl::modificationToText(const IVersionControl::FileState &st
using CIVF = Core::IVersionControl::FileState;
switch (state) {
case CIVF::AddedState:
return Tr::tr("Version control state: added");
return Tr::tr("Version control state: added.");
case CIVF::ModifiedState:
return Tr::tr("Version control state: modified");
return Tr::tr("Version control state: modified.");
case CIVF::DeletedState:
return Tr::tr("Version control state: deleted");
return Tr::tr("Version control state: deleted.");
case CIVF::RenamedState:
return Tr::tr("Version control state: renamed");
return Tr::tr("Version control state: renamed.");
case CIVF::UnmanagedState:
return Tr::tr("Version control state: untracked");
return Tr::tr("Version control state: untracked.");
default:
return {};
}

View File

@@ -1655,8 +1655,9 @@ void DebuggerPluginPrivate::attachToLastCore()
LastCore lastCore = getLastCore();
QGuiApplication::restoreOverrideCursor();
if (!lastCore) {
AsynchronousMessageBox::warning(Tr::tr("Warning"),
Tr::tr("coredumpctl did not find any cores created by systemd-coredump"));
AsynchronousMessageBox::warning(
Tr::tr("Warning"),
Tr::tr("coredumpctl did not find any cores created by systemd-coredump."));
return;
}

View File

@@ -379,7 +379,7 @@ public:
&LuaPlugin::onEditorOpened);
ActionBuilder(this, Id(ACTION_SCRIPTS_BASE).withSuffix("current"))
.setText(Tr::tr("Run current Script"))
.setText(Tr::tr("Run Current Script"))
.addOnTriggered([]() {
if (auto textEditor = TextEditor::BaseTextEditor::currentTextEditor()) {
const FilePath path = textEditor->document()->filePath();
@@ -449,8 +449,8 @@ public:
auto menu = container->menu();
menu->setTitle(script.baseName());
ActionBuilder(this, base)
.setText(Tr::tr("%1").arg(script.baseName()))
.setToolTip(Tr::tr("Run script '%1'").arg(script.toUserOutput()))
.setText(script.baseName())
.setToolTip(Tr::tr("Run script \"%1\"").arg(script.toUserOutput()))
.addOnTriggered([script]() { runScript(script); });
connect(menu->addAction(Tr::tr("Run")), &QAction::triggered, this, [script]() {
runScript(script);
@@ -481,7 +481,7 @@ public:
if (content) {
Lua::runScript(QString::fromUtf8(*content), script.fileName());
} else {
MessageManager::writeFlashing(Tr::tr("Failed to read script %1: %2")
MessageManager::writeFlashing(Tr::tr("Failed to read script \"%1\": %2")
.arg(script.toUserOutput())
.arg(content.error()));
}

View File

@@ -2546,10 +2546,11 @@ FilePairs ProjectExplorerPlugin::renameFiles(
}
QString renamedOnlyString;
if (!renamedOnly.isEmpty()) {
renamedOnlyString = Tr::tr(
"<br>The following files were renamed, but their project files could not "
"be updated accordingly: %1")
.arg(pathsAsHtmlList(renamedOnly));
renamedOnlyString
= "<br>"
+ Tr::tr("The following files were renamed, but their project files could not "
"be updated accordingly: %1")
.arg(pathsAsHtmlList(renamedOnly));
}
QTimer::singleShot(
0, m_instance, [message = QString(failedRenamingsString + renamedOnlyString)] {

View File

@@ -998,7 +998,8 @@ QString ToolchainBundle::displayName() const
name.append(' ').append(Abi::toString(abi.wordWidth()));
if (!cmd.exists())
return name;
return Tr::tr("%1 at %2").arg(name, cmd.toUserOutput());
//: toolchain 'name' at 'path'
return Tr::tr("%1 at \"%2\"").arg(name, cmd.toUserOutput());
}
ToolchainBundle::Valid ToolchainBundle::validity() const

View File

@@ -151,6 +151,7 @@ void ToolchainConfigWidget::setupCompilerPathChoosers()
bundle().forEach<Toolchain>([&](const Toolchain &tc) {
const QString name = !nameLabelString.isEmpty()
? nameLabelString
//: %1 = programming language
: Tr::tr("%1 compiler path").arg(
ToolchainManager::displayNameOfLanguageId(tc.language()));
const auto commandChooser = new PathChooser(this);

View File

@@ -1174,7 +1174,7 @@ Utils::ListModel<ProjectExplorer::Interpreter> *createInterpreterModel(QObject *
model->setDataAccessor([](const Interpreter &interpreter, int column, int role) -> QVariant {
if (interpreter.id == "none") {
if (role == Qt::DisplayRole)
return Tr::tr("none");
return Tr::tr("None");
if (role == KitAspect::IsNoneRole)
return true;
return {};