use system locale
This commit is contained in:
parent
3eca1736d5
commit
ee8e8a4fa8
1 changed files with 6 additions and 7 deletions
|
|
@ -569,14 +569,13 @@ void App::initLocale() {
|
||||||
QString locale;
|
QString locale;
|
||||||
|
|
||||||
// Use english. This default translator is used if there are no found translations in others loads
|
// Use english. This default translator is used if there are no found translations in others loads
|
||||||
mLocale = QLocale(QLocale::French);
|
mLocale = QLocale(QLocale::English);
|
||||||
if (!installLocale(*this, *mDefaultTranslatorCore, mLocale)) qFatal("Unable to install default translator.");
|
if (!installLocale(*this, *mDefaultTranslatorCore, mLocale)) qFatal("Unable to install default translator.");
|
||||||
|
|
||||||
|
// if (installLocale(*this, *mTranslatorCore, getLocale())) {
|
||||||
if (installLocale(*this, *mTranslatorCore, getLocale())) {
|
// qDebug() << "installed locale" << getLocale().name();
|
||||||
qDebug() << "installed locale" << getLocale().name();
|
// return;
|
||||||
return;
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
// Try to use system locale.
|
// Try to use system locale.
|
||||||
// #ifdef Q_OS_MACOS
|
// #ifdef Q_OS_MACOS
|
||||||
|
|
@ -1211,7 +1210,7 @@ void App::setSysTrayIcon() {
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
void App::setLocale(QString configLocale) {
|
void App::setLocale(QString configLocale) {
|
||||||
if (configLocale.isEmpty()) mLocale = QLocale(configLocale);
|
if (!configLocale.isEmpty()) mLocale = QLocale(configLocale);
|
||||||
else mLocale = QLocale(QLocale::system().name());
|
else mLocale = QLocale(QLocale::system().name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue