mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07: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:
parent
6dd3795b7a
commit
61705fdd42
9 changed files with 6537 additions and 38 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue