diff --git a/src/CutterApplication.cpp b/src/CutterApplication.cpp index fc71ba583..560b041c1 100644 --- a/src/CutterApplication.cpp +++ b/src/CutterApplication.cpp @@ -530,10 +530,10 @@ bool CutterApplication::parseCommandLineOptions() opts.fileOpenOptions.analysisCmd = {}; break; case AutomaticAnalysisLevel::AAA: - opts.fileOpenOptions.analysisCmd = { { "aaa", "Auto analysis" } }; + opts.fileOpenOptions.analysisCmd = { { "aaa", tr("Auto analysis") } }; break; case AutomaticAnalysisLevel::AAAA: - opts.fileOpenOptions.analysisCmd = { { "aaaa", "Auto analysis (experimental)" } }; + opts.fileOpenOptions.analysisCmd = { { "aaaa", tr("Auto analysis (experimental)") } }; break; } opts.fileOpenOptions.script = cmd_parser.value(scriptOption); diff --git a/src/dialogs/VersionInfoDialog.cpp b/src/dialogs/VersionInfoDialog.cpp index 9cd5e03c1..53e69b5c6 100644 --- a/src/dialogs/VersionInfoDialog.cpp +++ b/src/dialogs/VersionInfoDialog.cpp @@ -45,17 +45,17 @@ void VersionInfoDialog::fillVersionInfo() // Left tree QTreeWidgetItem *addrItemL = new QTreeWidgetItem(); - addrItemL->setText(0, "Address:"); + addrItemL->setText(0, tr("Address:")); addrItemL->setText(1, RzAddressString(sdb_num_get(sdb, "addr", 0))); ui->leftTreeWidget->addTopLevelItem(addrItemL); QTreeWidgetItem *offItemL = new QTreeWidgetItem(); - offItemL->setText(0, "Offset:"); + offItemL->setText(0, tr("Offset:")); offItemL->setText(1, RzAddressString(sdb_num_get(sdb, "offset", 0))); ui->leftTreeWidget->addTopLevelItem(offItemL); QTreeWidgetItem *entriesItemL = new QTreeWidgetItem(); - entriesItemL->setText(0, "Entries:"); + entriesItemL->setText(0, tr("Entries:")); const ut64 num_entries = sdb_num_get(sdb, "num_entries", 0); for (size_t i = 0; i < num_entries; ++i) { auto key = QString("entry%0").arg(i); @@ -76,17 +76,17 @@ void VersionInfoDialog::fillVersionInfo() // Right tree QTreeWidgetItem *addrItemR = new QTreeWidgetItem(); - addrItemR->setText(0, "Address:"); + addrItemR->setText(0, tr("Address:")); addrItemR->setText(1, RzAddressString(sdb_num_get(sdb, "addr", 0))); ui->rightTreeWidget->addTopLevelItem(addrItemR); QTreeWidgetItem *offItemR = new QTreeWidgetItem(); - offItemR->setText(0, "Offset:"); + offItemR->setText(0, tr("Offset:")); offItemR->setText(1, RzAddressString(sdb_num_get(sdb, "offset", 0))); ui->rightTreeWidget->addTopLevelItem(offItemR); QTreeWidgetItem *entriesItemR = new QTreeWidgetItem(); - entriesItemR->setText(0, "Entries:"); + entriesItemR->setText(0, tr("Entries:")); for (size_t num_version = 0;; num_version++) { auto path_version = QString("bin/cur/info/versioninfo/verneed/version%0").arg(num_version); diff --git a/src/dialogs/preferences/InitializationFileEditor.cpp b/src/dialogs/preferences/InitializationFileEditor.cpp index 6bd31c808..20fa01508 100644 --- a/src/dialogs/preferences/InitializationFileEditor.cpp +++ b/src/dialogs/preferences/InitializationFileEditor.cpp @@ -36,7 +36,7 @@ InitializationFileEditor::InitializationFileEditor(PreferencesDialog *dialog) .arg(QUrl::fromLocalFile(cutterRCDirectory.absolutePath()).toString(), cutterRCLocation.toHtmlEscaped())); - ui->executeNow->button(QDialogButtonBox::Retry)->setText("Execute"); + ui->executeNow->button(QDialogButtonBox::Retry)->setText(tr("Execute")); ui->ConfigFileEdit->clear(); if (cutterRCFileInfo.exists()) { QFile cutterRC(cutterRCLocation); diff --git a/src/tools/basefind/BaseFindDialog.cpp b/src/tools/basefind/BaseFindDialog.cpp index 17adc1330..2f8ff722b 100644 --- a/src/tools/basefind/BaseFindDialog.cpp +++ b/src/tools/basefind/BaseFindDialog.cpp @@ -16,7 +16,7 @@ BaseFindDialog::BaseFindDialog(QWidget *parent) : QDialog(parent), ui(new Ui::Ba ui->nCoresCombo->clear(); for (size_t i = n_cores; i > 0; i--) { if (n_cores == i) { - ui->nCoresCombo->addItem("All Cores"); + ui->nCoresCombo->addItem(tr("All Cores")); continue; } ui->nCoresCombo->addItem(QString::number(i)); diff --git a/src/widgets/BacktraceWidget.cpp b/src/widgets/BacktraceWidget.cpp index d4413c39f..5a18e2995 100644 --- a/src/widgets/BacktraceWidget.cpp +++ b/src/widgets/BacktraceWidget.cpp @@ -77,3 +77,8 @@ void BacktraceWidget::fontsUpdatedSlot() { viewBacktrace->setFont(Config()->getFont()); } + +QString BacktraceWidget::getWindowTitle() const +{ + return tr("Backtrace"); +} diff --git a/src/widgets/BreakpointWidget.cpp b/src/widgets/BreakpointWidget.cpp index 967e13a8d..12f848a72 100644 --- a/src/widgets/BreakpointWidget.cpp +++ b/src/widgets/BreakpointWidget.cpp @@ -293,3 +293,8 @@ void BreakpointWidget::editBreakpoint() } } } + +QString BreakpointWidget::getWindowTitle() const +{ + return tr("Breakpoints"); +} diff --git a/src/widgets/Dashboard.cpp b/src/widgets/Dashboard.cpp index 29a4317fc..805c84a3c 100644 --- a/src/widgets/Dashboard.cpp +++ b/src/widgets/Dashboard.cpp @@ -232,3 +232,8 @@ const char *Dashboard::setBoolText(bool value) { return value ? "True" : "False"; } + +QString Dashboard::getWindowTitle() const +{ + return tr("Dashboard"); +} diff --git a/src/widgets/Dashboard.h b/src/widgets/Dashboard.h index 758249d59..a0635e43f 100644 --- a/src/widgets/Dashboard.h +++ b/src/widgets/Dashboard.h @@ -35,6 +35,7 @@ private slots: void setPlainText(QLineEdit *textBox, const QString &text); void setRzBinInfo(const RzBinInfo *binInfo); const char *setBoolText(bool value); + QString getWindowTitle() const override; QWidget *hashesWidget = nullptr; }; diff --git a/src/widgets/EntrypointWidget.cpp b/src/widgets/EntrypointWidget.cpp index 5c78a3711..49e1a3f04 100644 --- a/src/widgets/EntrypointWidget.cpp +++ b/src/widgets/EntrypointWidget.cpp @@ -51,3 +51,8 @@ void EntrypointWidget::on_entrypointTreeWidget_itemDoubleClicked(QTreeWidgetItem EntrypointDescription ep = item->data(0, Qt::UserRole).value(); Core()->seekAndShow(ep.vaddr); } + +QString EntrypointWidget::getWindowTitle() const +{ + return tr("Entry Points"); +} diff --git a/src/widgets/FlagsWidget.cpp b/src/widgets/FlagsWidget.cpp index 75b72063b..ecfc9e1cf 100644 --- a/src/widgets/FlagsWidget.cpp +++ b/src/widgets/FlagsWidget.cpp @@ -282,3 +282,8 @@ void FlagsWidget::setScrollMode() { qhelpers::setVerticalScrollMode(ui->flagsTreeView); } + +QString FlagsWidget::getWindowTitle() const +{ + return tr("Flags"); +} diff --git a/src/widgets/FlirtWidget.cpp b/src/widgets/FlirtWidget.cpp index 874a63e3c..9e4432c59 100644 --- a/src/widgets/FlirtWidget.cpp +++ b/src/widgets/FlirtWidget.cpp @@ -185,4 +185,9 @@ void FlirtWidget::showItemContextMenu(const QPoint &pt) blockMenu->setTarget(entry); blockMenu->exec(this->mapToGlobal(pt)); } -} \ No newline at end of file +} + +QString FlirtWidget::getWindowTitle() const +{ + return tr("Signatures"); +} diff --git a/src/widgets/OverviewWidget.cpp b/src/widgets/OverviewWidget.cpp index e39dfcc18..931cf0036 100644 --- a/src/widgets/OverviewWidget.cpp +++ b/src/widgets/OverviewWidget.cpp @@ -5,8 +5,8 @@ OverviewWidget::OverviewWidget(MainWindow *main) : CutterDockWidget(main) { - setWindowTitle("Graph Overview"); - setObjectName("Graph Overview"); + setWindowTitle(tr("Graph Overview")); + setObjectName(tr("Graph Overview")); setAllowedAreas(Qt::AllDockWidgetAreas); graphView = new OverviewView(this); setWidget(graphView); diff --git a/src/widgets/ProcessesWidget.cpp b/src/widgets/ProcessesWidget.cpp index 0a45a98e5..893f33187 100644 --- a/src/widgets/ProcessesWidget.cpp +++ b/src/widgets/ProcessesWidget.cpp @@ -191,3 +191,8 @@ bool ProcessesFilterModel::filterAcceptsRow(int row, const QModelIndex &parent) return false; } + +QString ProcessesWidget::getWindowTitle() const +{ + return tr("Processes"); +} diff --git a/src/widgets/RegisterRefsWidget.cpp b/src/widgets/RegisterRefsWidget.cpp index c35e29364..889a44252 100644 --- a/src/widgets/RegisterRefsWidget.cpp +++ b/src/widgets/RegisterRefsWidget.cpp @@ -252,3 +252,8 @@ void RegisterRefsWidget::copyClip(int column) QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(value); } + +QString RegisterRefsWidget::getWindowTitle() const +{ + return tr("Register References"); +} diff --git a/src/widgets/RegistersWidget.cpp b/src/widgets/RegistersWidget.cpp index ad9482e1f..184c04c17 100644 --- a/src/widgets/RegistersWidget.cpp +++ b/src/widgets/RegistersWidget.cpp @@ -116,3 +116,9 @@ void RegistersWidget::openContextMenu(QPoint point, QString address) addressContextMenu.setTarget(address.toULongLong(nullptr, 16)); addressContextMenu.exec(point); } + + +QString RegistersWidget::getWindowTitle() const +{ + return tr("Registers"); +} diff --git a/src/widgets/RizinGraphWidget.cpp b/src/widgets/RizinGraphWidget.cpp index 380657ee1..b2e4bc0cb 100644 --- a/src/widgets/RizinGraphWidget.cpp +++ b/src/widgets/RizinGraphWidget.cpp @@ -133,3 +133,8 @@ void GenericRizinGraphView::loadCurrentGraph() center(); } } + +QString GenericRizinGraphView::getWindowTitle() const +{ + return tr("Rizin Graphs"); +} diff --git a/src/widgets/SearchWidget.cpp b/src/widgets/SearchWidget.cpp index 86242dd68..7948221a0 100644 --- a/src/widgets/SearchWidget.cpp +++ b/src/widgets/SearchWidget.cpp @@ -331,3 +331,8 @@ void SearchWidget::enableSearch() ui->searchButton->setEnabled(true); ui->searchButton->setText(tr("Search")); } + +QString SearchWidget::getWindowTitle() const +{ + return tr("Search"); +} diff --git a/src/widgets/SegmentsWidget.cpp b/src/widgets/SegmentsWidget.cpp index 526aaea62..8a7f6ab95 100644 --- a/src/widgets/SegmentsWidget.cpp +++ b/src/widgets/SegmentsWidget.cpp @@ -167,3 +167,8 @@ void SegmentsWidget::refreshSegments() qhelpers::adjustColumns(ui->treeView, SegmentsModel::ColumnCount, 0); } + +QString SegmentsWidget::getWindowTitle() const +{ + return tr("Segments"); +} diff --git a/src/widgets/StackWidget.cpp b/src/widgets/StackWidget.cpp index 71b66fe49..9088b3b70 100644 --- a/src/widgets/StackWidget.cpp +++ b/src/widgets/StackWidget.cpp @@ -255,3 +255,8 @@ Qt::ItemFlags StackModel::flags(const QModelIndex &index) const return QAbstractTableModel::flags(index); } } + +QString StackWidget::getWindowTitle() const +{ + return tr("Stack"); +} diff --git a/src/widgets/StringsWidget.cpp b/src/widgets/StringsWidget.cpp index ab71211ad..ebab008b1 100644 --- a/src/widgets/StringsWidget.cpp +++ b/src/widgets/StringsWidget.cpp @@ -273,3 +273,8 @@ void StringsWidget::on_actionCopy() QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(index.data().toString()); } + +QString StringsWidget::getWindowTitle() const +{ + return tr("Strings"); +} diff --git a/src/widgets/TypesWidget.cpp b/src/widgets/TypesWidget.cpp index c31a50d64..d3cae933f 100644 --- a/src/widgets/TypesWidget.cpp +++ b/src/widgets/TypesWidget.cpp @@ -366,3 +366,8 @@ void TypesWidget::typeItemDoubleClicked(const QModelIndex &index) dialog.setTypeName(t.type); dialog.exec(); } + +QString TypesWidget::getWindowTitle() const +{ + return tr("Types"); +} diff --git a/src/widgets/VisualNavbar.cpp b/src/widgets/VisualNavbar.cpp index 53d938265..c5d58fc50 100644 --- a/src/widgets/VisualNavbar.cpp +++ b/src/widgets/VisualNavbar.cpp @@ -39,8 +39,8 @@ VisualNavbar::VisualNavbar(MainWindow *main, QWidget *parent) /* QComboBox *addsCombo = new QComboBox(); addsCombo->addItem(""); - addsCombo->addItem("Entry points"); - addsCombo->addItem("Marks"); + addsCombo->addItem(tr("Entry points")); + addsCombo->addItem(tr("Marks")); */ addWidget(this->graphicsView); // addWidget(addsCombo);