未验证 提交 ef6f94e1 编写于 作者: J Jim 提交者: GitHub

Merge pull request #3038 from khng300/platform-x11-locale-detect-fixes

UI: Fix GetPreferredLocales locale detection
......@@ -72,6 +72,7 @@ string GetDefaultVideoSavePath()
vector<string> GetPreferredLocales()
{
setlocale(LC_ALL, "");
vector<string> matched;
string messages = setlocale(LC_MESSAGES, NULL);
if (!messages.size() || messages == "C" || messages == "POSIX")
return {};
......@@ -85,10 +86,10 @@ vector<string> GetPreferredLocales()
return {locale};
if (locale.substr(0, 2) == messages.substr(0, 2))
return {locale};
matched.push_back(locale);
}
return {};
return matched;
}
bool IsAlwaysOnTop(QWidget *window)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册