Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add few missing tr() string wrappers #3204

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/core/Basefind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/core/Cutter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand All @@ -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());
}

Expand Down Expand Up @@ -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;
Expand All @@ -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);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/Dashboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/GraphView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/SearchWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
2 changes: 1 addition & 1 deletion src/widgets/SectionsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); });
Expand Down