diff --git a/ChangeLog.txt b/ChangeLog.txt index 783418f3e..a40ea60e4 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -4,7 +4,7 @@ Version 5.17.1, unreleased Default Qt Client -- +- Fixed language not set at first start Android Client - iOS Client diff --git a/Client/qtTeamTalk/mainwindow.cpp b/Client/qtTeamTalk/mainwindow.cpp index ec19ae0c8..a4690b7bf 100644 --- a/Client/qtTeamTalk/mainwindow.cpp +++ b/Client/qtTeamTalk/mainwindow.cpp @@ -628,7 +628,7 @@ void MainWindow::loadSettings() migrateSettings(); // Ask to set language at first start - if (!ttSettings->contains(SETTINGS_DISPLAY_LANGUAGE)) + if (ttSettings->value(SETTINGS_GENERAL_FIRSTSTART, SETTINGS_GENERAL_FIRSTSTART_DEFAULT).toBool()) { QLocale locale = QLocale::system(); QString languageCode = locale.name(); diff --git a/Client/qtTeamTalk/utilui.cpp b/Client/qtTeamTalk/utilui.cpp index 5aa27fac9..638c5a9af 100644 --- a/Client/qtTeamTalk/utilui.cpp +++ b/Client/qtTeamTalk/utilui.cpp @@ -103,35 +103,38 @@ void migrateSettings() #endif // Language files was renamed in 5.4 format - QString lc_code; - QString lang = ttSettings->value(SETTINGS_DISPLAY_LANGUAGE, SETTINGS_DISPLAY_LANGUAGE_DEFAULT).toString(); - if (lang == "Bulgarian") lc_code = "bg"; - else if (lang == "Chinese_Simplified") lc_code = "zh_CN"; - else if (lang == "Chinese_Traditional") lc_code = "zh_TW"; - else if (lang == "Croatian") lc_code = "hr"; - else if (lang == "Czech") lc_code = "cs"; - else if (lang == "Danish") lc_code = "da"; - else if (lang == "Dutch") lc_code = "nl"; - else if (lang == "English") lc_code = "en"; - else if (lang == "French") lc_code = "fr"; - else if (lang == "German") lc_code = "de"; - else if (lang == "Hebrew") lc_code = "he"; - else if (lang == "Hungarian") lc_code = "hu"; - else if (lang == "Indonesian") lc_code = "id"; - else if (lang == "Italian") lc_code = "it"; - else if (lang == "Korean") lc_code = "ko"; - else if (lang == "Persian") lc_code = "fa"; - else if (lang == "Polish") lc_code = "pl"; - else if (lang == "Portuguese_BR") lc_code = "pt_BR"; - else if (lang == "Portuguese_EU") lc_code = "pt_PT"; - else if (lang == "Russian") lc_code = "ru"; - else if (lang == "Slovak") lc_code = "sk"; - else if (lang == "Slovenian") lc_code = "sl"; - else if (lang == "Spanish") lc_code = "es"; - else if (lang == "Thai") lc_code = "th"; - else if (lang == "Turkish") lc_code = "tr"; - else if (lang == "Vietnamese") lc_code = "vi"; - ttSettings->setValue(SETTINGS_DISPLAY_LANGUAGE, lc_code); + if (ttSettings->contains(SETTINGS_DISPLAY_LANGUAGE)) + { + QString lc_code; + QString lang = ttSettings->value(SETTINGS_DISPLAY_LANGUAGE, SETTINGS_DISPLAY_LANGUAGE_DEFAULT).toString(); + if (lang == "Bulgarian") lc_code = "bg"; + else if (lang == "Chinese_Simplified") lc_code = "zh_CN"; + else if (lang == "Chinese_Traditional") lc_code = "zh_TW"; + else if (lang == "Croatian") lc_code = "hr"; + else if (lang == "Czech") lc_code = "cs"; + else if (lang == "Danish") lc_code = "da"; + else if (lang == "Dutch") lc_code = "nl"; + else if (lang == "English") lc_code = "en"; + else if (lang == "French") lc_code = "fr"; + else if (lang == "German") lc_code = "de"; + else if (lang == "Hebrew") lc_code = "he"; + else if (lang == "Hungarian") lc_code = "hu"; + else if (lang == "Indonesian") lc_code = "id"; + else if (lang == "Italian") lc_code = "it"; + else if (lang == "Korean") lc_code = "ko"; + else if (lang == "Persian") lc_code = "fa"; + else if (lang == "Polish") lc_code = "pl"; + else if (lang == "Portuguese_BR") lc_code = "pt_BR"; + else if (lang == "Portuguese_EU") lc_code = "pt_PT"; + else if (lang == "Russian") lc_code = "ru"; + else if (lang == "Slovak") lc_code = "sk"; + else if (lang == "Slovenian") lc_code = "sl"; + else if (lang == "Spanish") lc_code = "es"; + else if (lang == "Thai") lc_code = "th"; + else if (lang == "Turkish") lc_code = "tr"; + else if (lang == "Vietnamese") lc_code = "vi"; + ttSettings->setValue(SETTINGS_DISPLAY_LANGUAGE, lc_code); + } // Shortcuts changed in 5.4 format Hotkeys hks = HOTKEY_NONE;