mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
Partially revert fb7ba92f6 and split the Chinese locales into 3.
Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong). Closes #3262.
This commit is contained in:
@@ -339,18 +339,7 @@ void Application::initializeTranslation()
|
||||
QString locale = pref->getLocale();
|
||||
|
||||
if (locale.isEmpty()) {
|
||||
QLocale systemLocale = QLocale::system();
|
||||
// Check if Chinese and act according to script instead of country
|
||||
if (systemLocale.language() == QLocale::Chinese) {
|
||||
if (systemLocale.script() == QLocale::SimplifiedHanScript)
|
||||
locale = "zh_Hans";
|
||||
else
|
||||
locale = "zh_Hant";
|
||||
}
|
||||
else {
|
||||
locale = systemLocale.name();
|
||||
}
|
||||
|
||||
locale = QLocale::system().name();
|
||||
pref->setLocale(locale);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user