mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-18 00:49:32 -04:00
Fix loadTranslation for QT 6 older than 6.7 (#2200)
* language fix for QT pre 6.7 haha funny number * be more explicit * make clang-format happy
This commit is contained in:
parent
176cd5cf14
commit
28960bf166
1 changed files with 8 additions and 1 deletions
|
|
@ -4091,7 +4091,14 @@ void GMainWindow::LoadTranslation() {
|
|||
// selected language option? Current behaviour is better than the issue it fixes,
|
||||
// but not ideal.
|
||||
if (UISettings::values.language.isEmpty()) {
|
||||
const auto languages = QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore);
|
||||
QStringList languages;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
languages = QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore);
|
||||
#else
|
||||
languages = QLocale::system().uiLanguages();
|
||||
for (auto& lang : languages)
|
||||
lang.replace(u'-', u'_');
|
||||
#endif
|
||||
for (const auto& lang : languages) {
|
||||
// If the first language found is English, no need to install any translation
|
||||
if (lang == lang_en) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue