mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #6318 from JosJuice/qt-debugger-strings
Tweak Qt debugger strings to be more translation friendly
This commit is contained in:
@ -48,18 +48,25 @@ void NewBreakpointDialog::CreateWidgets()
|
||||
m_memory_box = new QGroupBox;
|
||||
m_memory_use_address = new QRadioButton(tr("Address"));
|
||||
m_memory_use_address->setChecked(true);
|
||||
// i18n: A range of memory addresses
|
||||
m_memory_use_range = new QRadioButton(tr("Range"));
|
||||
m_memory_address_from = new QLineEdit;
|
||||
m_memory_address_to = new QLineEdit;
|
||||
m_memory_address_from_label = new QLabel; // Set by OnAddressTypeChanged
|
||||
m_memory_address_to_label = new QLabel(tr("To:"));
|
||||
// i18n: This is a selectable condition when adding a breakpoint
|
||||
m_memory_on_read = new QRadioButton(tr("Read"));
|
||||
// i18n: This is a selectable condition when adding a breakpoint
|
||||
m_memory_on_write = new QRadioButton(tr("Write"));
|
||||
// i18n: This is a selectable condition when adding a breakpoint
|
||||
m_memory_on_read_and_write = new QRadioButton(tr("Read or Write"));
|
||||
m_memory_on_write->setChecked(true);
|
||||
m_memory_do_log = new QRadioButton(tr("Log"));
|
||||
// i18n: This is a selectable action when adding a breakpoint
|
||||
m_memory_do_log = new QRadioButton(tr("Write to Log"));
|
||||
// i18n: This is a selectable action when adding a breakpoint
|
||||
m_memory_do_break = new QRadioButton(tr("Break"));
|
||||
m_memory_do_log_and_break = new QRadioButton(tr("Log and Break"));
|
||||
// i18n: This is a selectable action when adding a breakpoint
|
||||
m_memory_do_log_and_break = new QRadioButton(tr("Write to Log and Break"));
|
||||
m_memory_do_log_and_break->setChecked(true);
|
||||
|
||||
auto* memory_layout = new QGridLayout;
|
||||
@ -70,11 +77,11 @@ void NewBreakpointDialog::CreateWidgets()
|
||||
memory_layout->addWidget(m_memory_address_from, 1, 1);
|
||||
memory_layout->addWidget(m_memory_address_to_label, 1, 2);
|
||||
memory_layout->addWidget(m_memory_address_to, 1, 3);
|
||||
memory_layout->addWidget(new QLabel(tr("On...")), 2, 0);
|
||||
memory_layout->addWidget(new QLabel(tr("Condition:")), 2, 0);
|
||||
memory_layout->addWidget(m_memory_on_read, 2, 1);
|
||||
memory_layout->addWidget(m_memory_on_write, 2, 2);
|
||||
memory_layout->addWidget(m_memory_on_read_and_write, 2, 3);
|
||||
memory_layout->addWidget(new QLabel(tr("Do...")), 3, 0);
|
||||
memory_layout->addWidget(new QLabel(tr("Action:")), 3, 0);
|
||||
memory_layout->addWidget(m_memory_do_log, 3, 1);
|
||||
memory_layout->addWidget(m_memory_do_break, 3, 2);
|
||||
memory_layout->addWidget(m_memory_do_log_and_break, 3, 3);
|
||||
@ -123,7 +130,7 @@ void NewBreakpointDialog::OnAddressTypeChanged()
|
||||
void NewBreakpointDialog::accept()
|
||||
{
|
||||
auto invalid_input = [this](QString field) {
|
||||
QMessageBox::critical(this, tr("Error"), tr("Bad input provided for %1 field").arg(field));
|
||||
QMessageBox::critical(this, tr("Error"), tr("Invalid input for the field \"%1\"").arg(field));
|
||||
};
|
||||
|
||||
bool instruction = m_instruction_bp->isChecked();
|
||||
@ -145,7 +152,7 @@ void NewBreakpointDialog::accept()
|
||||
|
||||
if (!good)
|
||||
{
|
||||
invalid_input(tr("address"));
|
||||
invalid_input(tr("Address"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -157,7 +164,7 @@ void NewBreakpointDialog::accept()
|
||||
|
||||
if (!good)
|
||||
{
|
||||
invalid_input(ranged ? tr("from") : tr("address"));
|
||||
invalid_input(ranged ? tr("From") : tr("Address"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -166,7 +173,7 @@ void NewBreakpointDialog::accept()
|
||||
u32 to = m_memory_address_to->text().toUInt(&good, 16);
|
||||
if (!good)
|
||||
{
|
||||
invalid_input(tr("to"));
|
||||
invalid_input(tr("To"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -83,14 +83,9 @@ void RegisterColumn::SetValue()
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
QMessageBox::critical(nullptr, QObject::tr("Invalid input"),
|
||||
QObject::tr("Bad input for field"));
|
||||
}
|
||||
QMessageBox::critical(nullptr, QObject::tr("Error"), QObject::tr("Invalid input provided"));
|
||||
else
|
||||
{
|
||||
m_set_register(value);
|
||||
}
|
||||
|
||||
RefreshValue();
|
||||
}
|
||||
|
@ -130,7 +130,9 @@ void RegisterWidget::ShowContextMenu()
|
||||
auto* view_hex = menu->addAction(tr("Hexadecimal"));
|
||||
auto* view_int = menu->addAction(tr("Signed Integer"));
|
||||
auto* view_uint = menu->addAction(tr("Unsigned Integer"));
|
||||
// i18n: A floating point number
|
||||
auto* view_float = menu->addAction(tr("Float"));
|
||||
// i18n: A double precision floating point number
|
||||
auto* view_double = menu->addAction(tr("Double"));
|
||||
|
||||
for (auto* action : {view_hex, view_int, view_uint, view_float, view_double})
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
WatchWidget::WatchWidget(QWidget* parent) : QDockWidget(parent)
|
||||
{
|
||||
// i18n: This kind of "watch" is used for watching emulated memory.
|
||||
// It's not related to timekeeping devices.
|
||||
setWindowTitle(tr("Watch"));
|
||||
setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||
|
||||
@ -105,8 +107,9 @@ void WatchWidget::Update()
|
||||
|
||||
m_table->setRowCount(size + 1);
|
||||
|
||||
m_table->setHorizontalHeaderLabels(
|
||||
{tr("Label"), tr("Address"), tr("Hexadecimal"), tr("Decimal"), tr("String")});
|
||||
m_table->setHorizontalHeaderLabels({tr("Label"), tr("Address"), tr("Hexadecimal"), tr("Decimal"),
|
||||
// i18n: Data type used in computing
|
||||
tr("String")});
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
@ -218,6 +221,8 @@ void WatchWidget::ShowContextMenu()
|
||||
|
||||
if (row >= 0)
|
||||
{
|
||||
// i18n: This kind of "watch" is used for watching emulated memory.
|
||||
// It's not related to timekeeping devices.
|
||||
AddAction(menu, tr("&Delete Watch"), this, [this, row] { DeleteWatch(row); });
|
||||
AddAction(menu, tr("&Add Memory Breakpoint"), this,
|
||||
[this, row] { AddWatchBreakpoint(row); });
|
||||
@ -280,7 +285,7 @@ void WatchWidget::OnItemChanged(QTableWidgetItem* item)
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Bad input provided"));
|
||||
QMessageBox::critical(this, tr("Error"), tr("Invalid input provided"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user