Merge pull request #10056 from lioncash/qtloc

DolphinQt: Minor localization changes
This commit is contained in:
JosJuice 2021-09-08 21:36:46 +02:00 committed by GitHub
commit 2a22367211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 24 deletions

View File

@ -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<int>(m_results.size())));
m_match_table->setRowCount(static_cast<int>(m_results.size()));
if (m_results.empty())

View File

@ -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<DiscIO::BlobReader> blob_reader;

View File

@ -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);

View File

@ -255,8 +255,10 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> 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;

View File

@ -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 =