Commit 5aa1aea6 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Attempt to fix UI translations broken.

CCBUG: 424967
parent 66fdf2e0
......@@ -23,10 +23,10 @@ auto LocaleHandling::setLocale(const QString &lcName) -> QString
auto *result = setlocale(LC_ALL, locale.toStdString().c_str());
auto *result = std::setlocale(LC_ALL, locale.toStdString().c_str());
auto *result = std::setlocale(LC_NUMERIC, locale.toStdString().c_str());
if (result != nullptr) {
::qputenv("LC_ALL", locale.toStdString().c_str());
::qputenv("LC_NUMERIC", locale.toStdString().c_str());
newLocale = locale;
......@@ -40,12 +40,12 @@ auto LocaleHandling::setLocale(const QString &lcName) -> QString
void LocaleHandling::resetLocale()
setlocale(LC_ALL, "C");
setlocale(LC_NUMERIC, "C");
std::setlocale(LC_ALL, "C");
std::setlocale(LC_NUMERIC, "C");
::qputenv("LC_ALL", "C");
qDebug() << "LC_ALL reset to C";
::qputenv("LC_NUMERIC", "C");
qDebug() << "LC_NUMERIC reset to C";
QPair<QLocale, LocaleHandling::MatchType> LocaleHandling::getQLocaleForDecimalPoint(const QString &requestedLocale, const QString &decimalPoint)
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