misc: Polish localization updates

This commit is contained in:
Marcin Mitura 2024-11-21 12:59:19 +01:00
parent 5054827441
commit 742a66e35f
6 changed files with 1897 additions and 1530 deletions

View File

@ -61,7 +61,11 @@ void TrophyUI::Draw() {
GetColorU32(ImVec4{0.7f}));
ImGui::Indent(60);
}
TextWrapped("Trophy earned!\n%s", trophy_name.c_str());
TextWrapped(QString(QObject::tr("Trophy earned!\n%1"))
.arg(QString::fromStdString(trophy_name))
.toStdString()
.c_str());
}
End();

View File

@ -3,8 +3,10 @@
#pragma once
#include <filesystem>
#include <string>
#include <variant>
#include <QObject>
#include <queue>
#include "common/fixed_value.h"
@ -15,9 +17,11 @@
namespace Libraries::NpTrophy {
class TrophyUI final : public ImGui::Layer {
public:
TrophyUI(const std::filesystem::path& trophyIconPath, const std::string& trophyName);
// Ensure that TrophyUI is a QObject-derived class
class TrophyUI final : public QObject, public ImGui::Layer {
Q_OBJECT // This is the necessary macro for Qt's meta-object system
public
: TrophyUI(const std::filesystem::path& trophyIconPath, const std::string& trophyName);
~TrophyUI() override;
void Finish();
@ -37,4 +41,4 @@ struct TrophyInfo {
void AddTrophyToQueue(const std::filesystem::path& trophyIconPath, const std::string& trophyName);
}; // namespace Libraries::NpTrophy
} // namespace Libraries::NpTrophy

View File

@ -4,16 +4,16 @@
#pragma once
#include <QDialog>
#include "common/config.h"
#include "common/path_util.h"
class QLineEdit;
class GameInstallDialog final : public QDialog {
public:
GameInstallDialog();
~GameInstallDialog();
Q_OBJECT // Necessary macro for QObject-derived classes using Qt's meta-object system
public : GameInstallDialog();
~GameInstallDialog() override;
private slots:
void BrowseGamesDirectory();
@ -28,4 +28,4 @@ private:
private:
QLineEdit* m_gamesDirectory;
QLineEdit* m_addonsDirectory;
};
};

View File

@ -749,6 +749,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
tr("PKG and Game versions match: ") + pkg_app_version +
"\n" + tr("Would you like to overwrite?")));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
msgBox.setButtonText(QMessageBox::No, tr("No"));
msgBox.setDefaultButton(QMessageBox::No);
} else if (pkgD < appD) {
msgBox.setText(QString(tr("Patch detected!") + "\n" +
@ -757,6 +759,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
game_app_version + "\n" +
tr("Would you like to overwrite?")));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
msgBox.setButtonText(QMessageBox::No, tr("No"));
msgBox.setDefaultButton(QMessageBox::No);
} else {
msgBox.setText(QString(tr("Patch detected!") + "\n" +
@ -764,6 +768,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
tr("Would you like to install Patch: ") +
pkg_app_version + " ?"));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
msgBox.setButtonText(QMessageBox::No, tr("No"));
msgBox.setDefaultButton(QMessageBox::No);
}
int result = msgBox.exec();
@ -781,6 +787,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
addonMsgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
addonMsgBox.setDefaultButton(QMessageBox::No);
addonMsgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
addonMsgBox.setButtonText(QMessageBox::No, tr("No"));
int result = addonMsgBox.exec();
if (result == QMessageBox::Yes) {
game_update_path = addon_extract_path;
@ -792,6 +800,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
"\n\n" + tr("Would you like to overwrite?")));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
msgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
msgBox.setButtonText(QMessageBox::No, tr("No"));
int result = msgBox.exec();
if (result == QMessageBox::Yes) {
game_update_path = addon_extract_path;
@ -803,6 +813,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
msgBox.setText(QString(tr("Game already installed") + "\n" + gameDirPath + "\n" +
tr("Would you like to overwrite?")));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setButtonText(QMessageBox::Yes, tr("Yes"));
msgBox.setButtonText(QMessageBox::No, tr("No"));
msgBox.setDefaultButton(QMessageBox::No);
int result = msgBox.exec();
if (result == QMessageBox::Yes) {

View File

@ -15,37 +15,37 @@
#include "settings_dialog.h"
#include "ui_settings_dialog.h"
QStringList languageNames = {"Arabic",
"Czech",
"Danish",
"Dutch",
"English (United Kingdom)",
"English (United States)",
"Finnish",
"French (Canada)",
"French (France)",
"German",
"Greek",
"Hungarian",
"Indonesian",
"Italian",
"Japanese",
"Korean",
"Norwegian (Bokmaal)",
"Polish",
"Portuguese (Brazil)",
"Portuguese (Portugal)",
"Romanian",
"Russian",
"Simplified Chinese",
"Spanish (Latin America)",
"Spanish (Spain)",
"Swedish",
"Thai",
"Traditional Chinese",
"Turkish",
"Ukrainian",
"Vietnamese"};
QStringList languageNames = {QObject::tr("Arabic"),
QObject::tr("Czech"),
QObject::tr("Danish"),
QObject::tr("Dutch"),
QObject::tr("English (United Kingdom)"),
QObject::tr("English (United States)"),
QObject::tr("Finnish"),
QObject::tr("French (Canada)"),
QObject::tr("French (France)"),
QObject::tr("German"),
QObject::tr("Greek"),
QObject::tr("Hungarian"),
QObject::tr("Indonesian"),
QObject::tr("Italian"),
QObject::tr("Japanese"),
QObject::tr("Korean"),
QObject::tr("Norwegian (Bokmaal)"),
QObject::tr("Polish"),
QObject::tr("Portuguese (Brazil)"),
QObject::tr("Portuguese (Portugal)"),
QObject::tr("Romanian"),
QObject::tr("Russian"),
QObject::tr("Simplified Chinese"),
QObject::tr("Spanish (Latin America)"),
QObject::tr("Spanish (Spain)"),
QObject::tr("Swedish"),
QObject::tr("Thai"),
QObject::tr("Traditional Chinese"),
QObject::tr("Turkish"),
QObject::tr("Ukrainian"),
QObject::tr("Vietnamese")};
const QVector<int> languageIndexes = {21, 23, 14, 6, 18, 1, 12, 22, 2, 4, 25, 24, 29, 5, 0, 9,
15, 16, 17, 7, 26, 8, 11, 20, 3, 13, 27, 10, 19, 30, 28};
@ -60,7 +60,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
ui->buttonBox->button(QDialogButtonBox::StandardButton::Close)->setFocus();
// Add list of available GPUs
ui->graphicsAdapterBox->addItem("Auto Select"); // -1, auto selection
ui->graphicsAdapterBox->addItem(tr("Auto Select")); // -1, auto selection
for (const auto& device : physical_devices) {
ui->graphicsAdapterBox->addItem(device);
}

File diff suppressed because it is too large Load Diff