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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 1656 additions and 7 deletions

View file

@ -141,6 +141,7 @@ void EmulatorConfig::load() {
frontendSettings.theme = FrontendSettings::themeFromString(toml::find_or<std::string>(ui, "Theme", "dark"));
frontendSettings.icon = FrontendSettings::iconFromString(toml::find_or<std::string>(ui, "WindowIcon", "rpog"));
frontendSettings.language = toml::find_or<std::string>(ui, "Language", "en");
}
}
}
@ -202,6 +203,7 @@ void EmulatorConfig::save() {
data["UI"]["Theme"] = std::string(FrontendSettings::themeToString(frontendSettings.theme));
data["UI"]["WindowIcon"] = std::string(FrontendSettings::iconToString(frontendSettings.icon));
data["UI"]["Language"] = frontendSettings.language;
std::ofstream file(path, std::ios::out);
file << data;