diff --git a/Source/Core/DolphinQt/CheatsManager.cpp b/Source/Core/DolphinQt/CheatsManager.cpp index 1b626b968b..7c3e51a482 100644 --- a/Source/Core/DolphinQt/CheatsManager.cpp +++ b/Source/Core/DolphinQt/CheatsManager.cpp @@ -648,7 +648,7 @@ void CheatsManager::Update() return; } - m_result_label->setText(tr("%1 Match(es)").arg(m_results.size())); + m_result_label->setText(tr("%n Match(es)", "", static_cast(m_results.size()))); m_match_table->setRowCount(static_cast(m_results.size())); if (m_results.empty()) diff --git a/Source/Core/DolphinQt/ConvertDialog.cpp b/Source/Core/DolphinQt/ConvertDialog.cpp index 9be6d1bca1..b7bf614291 100644 --- a/Source/Core/DolphinQt/ConvertDialog.cpp +++ b/Source/Core/DolphinQt/ConvertDialog.cpp @@ -412,9 +412,9 @@ void ConvertDialog::Convert() if (m_files.size() > 1) { + // i18n: %1 is a filename. progress_dialog.GetRaw()->setLabelText( - tr("Converting...") + QLatin1Char{'\n'} + - QFileInfo(QString::fromStdString(original_path)).fileName()); + tr("Converting...\n%1").arg(QFileInfo(QString::fromStdString(original_path)).fileName())); } std::unique_ptr blob_reader; diff --git a/Source/Core/DolphinQt/GBAWidget.cpp b/Source/Core/DolphinQt/GBAWidget.cpp index 1fc16d091f..93a9eef17d 100644 --- a/Source/Core/DolphinQt/GBAWidget.cpp +++ b/Source/Core/DolphinQt/GBAWidget.cpp @@ -353,7 +353,7 @@ void GBAWidget::contextMenuEvent(QContextMenuEvent* event) disconnect_action->setChecked(!m_force_disconnect); connect(disconnect_action, &QAction::triggered, this, &GBAWidget::ToggleDisconnect); - auto* load_action = new QAction(tr("L&oad ROM"), menu); + auto* load_action = new QAction(tr("L&oad ROM..."), menu); load_action->setEnabled(CanControlCore()); connect(load_action, &QAction::triggered, this, &GBAWidget::LoadROM); @@ -361,7 +361,7 @@ void GBAWidget::contextMenuEvent(QContextMenuEvent* event) unload_action->setEnabled(CanControlCore() && m_core_info.has_rom); connect(unload_action, &QAction::triggered, this, &GBAWidget::UnloadROM); - auto* card_action = new QAction(tr("&Scan e-Reader Card(s)"), menu); + auto* card_action = new QAction(tr("&Scan e-Reader Card(s)..."), menu); card_action->setEnabled(CanControlCore() && m_core_info.has_ereader); connect(card_action, &QAction::triggered, this, &GBAWidget::PromptForEReaderCards); @@ -370,10 +370,10 @@ void GBAWidget::contextMenuEvent(QContextMenuEvent* event) connect(reset_action, &QAction::triggered, this, &GBAWidget::ResetCore); auto* state_menu = new QMenu(tr("Save State"), menu); - auto* import_action = new QAction(tr("&Import State"), state_menu); + auto* import_action = new QAction(tr("&Import State..."), state_menu); import_action->setEnabled(CanControlCore()); connect(import_action, &QAction::triggered, this, [this] { DoState(false); }); - auto* export_state = new QAction(tr("&Export State"), state_menu); + auto* export_state = new QAction(tr("&Export State..."), state_menu); connect(export_state, &QAction::triggered, this, [this] { DoState(true); }); auto* mute_action = new QAction(tr("&Mute"), menu); diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index cd566b7624..8a687cef47 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -255,8 +255,10 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters, Settings::Instance().RefreshWidgetVisibility(); if (!ResourcePack::Init()) + { ModalMessageBox::critical(this, tr("Error"), - tr("Error occured while loading some texture packs")); + tr("Error occurred while loading some texture packs")); + } for (auto& pack : ResourcePack::GetPacks()) { @@ -1377,16 +1379,15 @@ bool MainWindow::NetPlayJoin() { if (Core::IsRunning()) { - ModalMessageBox::critical( - nullptr, QObject::tr("Error"), - QObject::tr("Can't start a NetPlay Session while a game is still running!")); + ModalMessageBox::critical(nullptr, tr("Error"), + tr("Can't start a NetPlay Session while a game is still running!")); return false; } if (m_netplay_dialog->isVisible()) { - ModalMessageBox::critical(nullptr, QObject::tr("Error"), - QObject::tr("A NetPlay Session is already in progress!")); + ModalMessageBox::critical(nullptr, tr("Error"), + tr("A NetPlay Session is already in progress!")); return false; } @@ -1445,16 +1446,15 @@ bool MainWindow::NetPlayHost(const UICommon::GameFile& game) { if (Core::IsRunning()) { - ModalMessageBox::critical( - nullptr, QObject::tr("Error"), - QObject::tr("Can't start a NetPlay Session while a game is still running!")); + ModalMessageBox::critical(nullptr, tr("Error"), + tr("Can't start a NetPlay Session while a game is still running!")); return false; } if (m_netplay_dialog->isVisible()) { - ModalMessageBox::critical(nullptr, QObject::tr("Error"), - QObject::tr("A NetPlay Session is already in progress!")); + ModalMessageBox::critical(nullptr, tr("Error"), + tr("A NetPlay Session is already in progress!")); return false; } @@ -1478,9 +1478,8 @@ bool MainWindow::NetPlayHost(const UICommon::GameFile& game) if (!Settings::Instance().GetNetPlayServer()->is_connected) { ModalMessageBox::critical( - nullptr, QObject::tr("Failed to open server"), - QObject::tr( - "Failed to listen on port %1. Is another instance of the NetPlay server running?") + nullptr, tr("Failed to open server"), + tr("Failed to listen on port %1. Is another instance of the NetPlay server running?") .arg(host_port)); NetPlayQuit(); return false; diff --git a/Source/Core/DolphinQt/ResourcePackManager.cpp b/Source/Core/DolphinQt/ResourcePackManager.cpp index 8f7e0dd360..ed067ab5cd 100644 --- a/Source/Core/DolphinQt/ResourcePackManager.cpp +++ b/Source/Core/DolphinQt/ResourcePackManager.cpp @@ -108,13 +108,14 @@ void ResourcePackManager::RepopulateTable() for (int i = 0; i < size; i++) { const auto& pack = ResourcePack::GetPacks()[size - 1 - i]; - auto* manifest = pack.GetManifest(); + const auto* manifest = pack.GetManifest(); + const auto& authors = manifest->GetAuthors(); auto* logo_item = new QTableWidgetItem; auto* name_item = new QTableWidgetItem(QString::fromStdString(manifest->GetName())); auto* version_item = new QTableWidgetItem(QString::fromStdString(manifest->GetVersion())); - auto* author_item = new QTableWidgetItem( - QString::fromStdString(manifest->GetAuthors().value_or("Unknown author"))); + auto* author_item = + new QTableWidgetItem(authors ? QString::fromStdString(*authors) : tr("Unknown author")); auto* description_item = new QTableWidgetItem(QString::fromStdString(manifest->GetDescription().value_or(""))); auto* website_item =