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})); process.setCommand(storage->adbCommand({"forward", port, adbArg}));
}; };
const auto onForwardPortDone = [storage, port, portType](DoneWith result) { const auto onForwardPortDone = [storage, port, portType](DoneWith result) {
if (result == DoneWith::Success) if (result == DoneWith::Success) {
storage->m_afterFinishAdbCommands.push_back("forward --remove " + port); 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)); storage->m_glue->setFinished(Tr::tr("Failed to forward %1 debugging ports.").arg(portType));
}
}; };
return Group { return Group {

View File

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

View File

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

View File

@@ -56,7 +56,7 @@ ClangToolsCompilationDb::ClangToolsCompilationDb(ClangToolType toolType)
d->readyAndUpToDate = success; d->readyAndUpToDate = success;
if (success) { if (success) {
Core::MessageManager::writeSilently( 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())); .arg(d->toolName(), d->dir.path().toUserOutput()));
} else { } else {
Core::MessageManager::writeDisrupting( Core::MessageManager::writeDisrupting(
@@ -106,7 +106,7 @@ void ClangToolsCompilationDb::Private::generate()
generatorWatcher.cancel(); generatorWatcher.cancel();
Core::MessageManager::writeSilently( 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())); .arg(clangToolName(toolType), dir.path().toUserOutput()));
const auto getCompilerOptionsBuilder = [this](const ProjectPart &pp) { const auto getCompilerOptionsBuilder = [this](const ProjectPart &pp) {

View File

@@ -1139,7 +1139,7 @@ QWidget *Editor::toolBar()
QAction *setUrlAction = new QAction(); QAction *setUrlAction = new QAction();
setUrlAction->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon()); 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] { connect(setUrlAction, &QAction::triggered, this, [this] {
bool ok; bool ok;
QString text = QInputDialog::getText( QString text = QInputDialog::getText(

View File

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

View File

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

View File

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

View File

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

View File

@@ -998,7 +998,8 @@ QString ToolchainBundle::displayName() const
name.append(' ').append(Abi::toString(abi.wordWidth())); name.append(' ').append(Abi::toString(abi.wordWidth()));
if (!cmd.exists()) if (!cmd.exists())
return name; 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 ToolchainBundle::Valid ToolchainBundle::validity() const

View File

@@ -151,6 +151,7 @@ void ToolchainConfigWidget::setupCompilerPathChoosers()
bundle().forEach<Toolchain>([&](const Toolchain &tc) { bundle().forEach<Toolchain>([&](const Toolchain &tc) {
const QString name = !nameLabelString.isEmpty() const QString name = !nameLabelString.isEmpty()
? nameLabelString ? nameLabelString
//: %1 = programming language
: Tr::tr("%1 compiler path").arg( : Tr::tr("%1 compiler path").arg(
ToolchainManager::displayNameOfLanguageId(tc.language())); ToolchainManager::displayNameOfLanguageId(tc.language()));
const auto commandChooser = new PathChooser(this); 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 { model->setDataAccessor([](const Interpreter &interpreter, int column, int role) -> QVariant {
if (interpreter.id == "none") { if (interpreter.id == "none") {
if (role == Qt::DisplayRole) if (role == Qt::DisplayRole)
return Tr::tr("none"); return Tr::tr("None");
if (role == KitAspect::IsNoneRole) if (role == KitAspect::IsNoneRole)
return true; return true;
return {}; return {};