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:
@@ -24,6 +24,7 @@ struct FrontendSettings {
|
||||
|
||||
Theme theme = Theme::Dark;
|
||||
WindowIcon icon = WindowIcon::Rpog;
|
||||
std::string language = "en";
|
||||
|
||||
static Theme themeFromString(std::string inString);
|
||||
static const char* themeToString(Theme theme);
|
||||
|
||||
@@ -45,6 +45,8 @@ class ConfigWindow : public QDialog {
|
||||
void setTheme(FrontendSettings::Theme theme);
|
||||
void setIcon(FrontendSettings::WindowIcon icon);
|
||||
|
||||
QComboBox* createLanguageSelect();
|
||||
|
||||
public:
|
||||
ConfigWindow(ConfigCallback configCallback, MainWindowCallback windowCallback, const EmulatorConfig& config, QWidget* parent = nullptr);
|
||||
~ConfigWindow();
|
||||
|
||||
@@ -126,6 +126,7 @@ class MainWindow : public QMainWindow {
|
||||
void setupControllerSensors(SDL_GameController* controller);
|
||||
void sendMessage(const EmulatorMessage& message);
|
||||
void dispatchMessage(const EmulatorMessage& message);
|
||||
void loadTranslation();
|
||||
|
||||
// Tracks whether we are using an OpenGL-backed renderer or a Vulkan-backed renderer
|
||||
bool usingGL = false;
|
||||
|
||||
Reference in New Issue
Block a user