fix auto locale detection (#308)

Current implementation QLocale::system.language() will not correctly
differs Simplified Chinese with Traditional Chinese, which is causing
problems to load translations for zh_TW. This fix the problem by
following the documentation here:
https://doc.qt.io/qt-5/qtranslator.html#load-1
This commit is contained in:
Jiachen Yang
2018-08-12 18:39:42 +09:00
committed by Dharkael
parent 8d782c2c47
commit 59d88dd2de

View File

@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) {
QStringList trPaths = PathInfo::translationsPaths();
for (const QString &path: trPaths) {
bool match = translator.load(QLocale::system().language(),
bool match = translator.load(QLocale(),
"Internationalization", "_",
path);
if (match) {