Commit ee8e8a4f authored by Gaëlle Braud's avatar Gaëlle Braud
Browse files

use system locale

1 merge request!1372English translation + use system locale to determine linphone language
Pipeline #92488 passed with stages
in 57 minutes and 47 seconds
Showing with 6 additions and 7 deletions
......@@ -569,14 +569,13 @@ void App::initLocale() {
QString locale;
// 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, *mTranslatorCore, getLocale())) {
qDebug() << "installed locale" << getLocale().name();
return;
}
// if (installLocale(*this, *mTranslatorCore, getLocale())) {
// qDebug() << "installed locale" << getLocale().name();
// return;
// }
// Try to use system locale.
// #ifdef Q_OS_MACOS
......@@ -1211,7 +1210,7 @@ void App::setSysTrayIcon() {
//-----------------------------------------------------------
void App::setLocale(QString configLocale) {
if (configLocale.isEmpty()) mLocale = QLocale(configLocale);
if (!configLocale.isEmpty()) mLocale = QLocale(configLocale);
else mLocale = QLocale(QLocale::system().name());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment