Add few missing tr() string wrappers (#3204)

This commit is contained in:
Anton Kochkov 2023-07-07 09:24:19 +08:00 committed by GitHub
parent 61710535bf
commit b757f85350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 16 deletions

View File

@ -38,17 +38,17 @@ bool Basefind::setOptions(const RzBaseFindOpt *opts)
mutex.unlock();
if (options.start_address >= options.end_address) {
qWarning() << "Start address is >= end address";
qWarning() << tr("Start address is >= end address");
return false;
} else if (options.alignment < RZ_BASEFIND_BASE_ALIGNMENT) {
qWarning() << "Alignment must be at least "
qWarning() << tr("Alignment must be at least ")
<< QString::asprintf("0x%x", RZ_BASEFIND_BASE_ALIGNMENT);
return false;
} else if (options.min_score < 1) {
qWarning() << "Min score must be at least 1";
qWarning() << tr("Min score must be at least 1");
return false;
} else if (options.min_string_len < 1) {
qWarning() << "Min string length must be at least 1";
qWarning() << tr("Min string length must be at least 1");
return false;
}
return true;

View File

@ -271,7 +271,7 @@ void CutterCore::loadCutterRC()
if (!cutterRCFileInfo.exists() || !cutterRCFileInfo.isFile()) {
continue;
}
qInfo() << "Loading initialization file from " << cutterRCFilePath;
qInfo() << tr("Loading initialization file from ") << cutterRCFilePath;
rz_core_cmd_file(core, cutterRCFilePath.toUtf8().constData());
}
}
@ -284,7 +284,7 @@ void CutterCore::loadDefaultCutterRC()
if (!cutterRCFileInfo.exists() || !cutterRCFileInfo.isFile()) {
return;
}
qInfo() << "Loading initialization file from " << cutterRCFilePath;
qInfo() << tr("Loading initialization file from ") << cutterRCFilePath;
rz_core_cmd_file(core, cutterRCFilePath.toUtf8().constData());
}
@ -4553,7 +4553,7 @@ char *CutterCore::getTextualGraphAt(RzCoreGraphType type, RzCoreGraphFormat form
rz_graph_free(graph);
if (!string) {
qWarning() << "Failed to generate graph";
qWarning() << tr("Failed to generate graph");
}
return string;
@ -4571,9 +4571,9 @@ void CutterCore::writeGraphvizGraphToFile(QString path, QString format, RzCoreGr
if (!rz_core_graph_write(core, address, type, filepath)) {
if (address == RVA_INVALID) {
qWarning() << "Cannot get global graph";
qWarning() << tr("Cannot get global graph");
} else {
qWarning() << "Cannot get graph at " << RzAddressString(address);
qWarning() << tr("Cannot get graph at ") << RzAddressString(address);
}
}
}

View File

@ -271,7 +271,7 @@ void MainWindow::initUI()
readSettings();
// Display tooltip for the Analyze Program action
ui->actionAnalyze->setToolTip("Analyze the program using Rizin's \"aaa\" command");
ui->actionAnalyze->setToolTip(tr("Analyze the program using Rizin's \"aaa\" command"));
ui->menuFile->setToolTipsVisible(true);
}
@ -1768,7 +1768,7 @@ void MainWindow::on_actionExport_as_code_triggered()
QFile file(dialog.selectedFiles()[0]);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
qWarning() << "Can't open file";
qWarning() << tr("Can't open file");
return;
}

View File

@ -173,7 +173,7 @@ void Dashboard::on_certificateButton_clicked()
dialog.setMinimumSize(QSize(900, 600));
dialog.setMaximumSize(QSize(900, 600));
dialog.setSizeGripEnabled(false);
dialog.setWindowTitle("Certificates");
dialog.setWindowTitle(tr("Certificates"));
dialog.exec();
}

View File

@ -438,7 +438,7 @@ void GraphView::saveAsSvg(QString path)
generator.setFileName(path);
generator.setSize(QSize(width, height));
generator.setViewBox(QRect(0, 0, width, height));
generator.setTitle("Cutter graph export");
generator.setTitle(tr("Cutter graph export"));
QPainter p;
p.begin(&generator);
paint(p, QPoint(0, 0), QRect(0, 0, width, height), 1.0, false);

View File

@ -322,12 +322,12 @@ void SearchWidget::updatePlaceholderText(int index)
void SearchWidget::disableSearch()
{
ui->searchButton->setEnabled(false);
ui->searchButton->setText("Searching...");
ui->searchButton->setText(tr("Searching..."));
qApp->processEvents();
}
void SearchWidget::enableSearch()
{
ui->searchButton->setEnabled(true);
ui->searchButton->setText("Search");
ui->searchButton->setText(tr("Search"));
}

View File

@ -164,7 +164,7 @@ bool SectionsProxyModel::lessThan(const QModelIndex &left, const QModelIndex &ri
SectionsWidget::SectionsWidget(MainWindow *main) : ListDockWidget(main)
{
setObjectName("SectionsWidget");
setWindowTitle(QStringLiteral("Sections"));
setWindowTitle(tr("Sections"));
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
sectionsRefreshDeferrer = createRefreshDeferrer([this]() { refreshSections(); });