Qt: Add translation support (#664)

* Translation PoC

* i18n but better

* More Greek translation

* Add proper translation UI

* Linux CI: Install qt6-tools-dev
This commit is contained in:
wheremyfoodat
2024-12-04 21:08:33 +02:00
committed by GitHub
parent 28461a1d44
commit bfdc6f0240
11 changed files with 1656 additions and 7 deletions

View File

@@ -14,6 +14,9 @@
#include "version.hpp"
MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent), keyboardMappings(InputMappings::defaultKeyboardMappings()) {
emu = new Emulator();
loadTranslation();
setWindowTitle(tr("Alber"));
// Enable drop events for loading ROMs
@@ -75,7 +78,6 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent)
auto aboutAction = aboutMenu->addAction(tr("About Panda3DS"));
connect(aboutAction, &QAction::triggered, this, &MainWindow::showAboutMenu);
emu = new Emulator();
emu->setOutputSize(screen->surfaceWidth, screen->surfaceHeight);
// Set up misc objects
@@ -678,4 +680,4 @@ void MainWindow::setupControllerSensors(SDL_GameController* controller) {
if (haveAccelerometer) {
SDL_GameControllerSetSensorEnabled(controller, SDL_SENSOR_ACCEL, SDL_TRUE);
}
}
}