[Bug 993956] [NEW] QDate.toString() output is not correctly translated under Ubuntu 12.04 (french)
Eric Maeker
eric.maeker at free.fr
Thu May 3 12:54:00 UTC 2012
Public bug reported:
Please find informations on the upstream bug tracker:
https://bugreports.qt-project.org/browse/QTBUG-25646
Duplicated Description
The QDate.toString() is not translated in french using this code.
#include <QTranslator>
#include <QApplication>
#include <QLibraryInfo>
#include <QDate>
#include <QLocale>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator qtTranslator;
qWarning() << "system locale" << QLocale::system().name() << "app locale" << QLocale().name();
if (!qtTranslator.load("qt_fr_FR",// + QLocale().name().left(2),
QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
qWarning() << "ERROR";
qApp->installTranslator(&qtTranslator);
QLocale::setDefault(QLocale::French);
QDate dt = QDate::currentDate();
qWarning() << "DOES NOT WORK: "
<< "dt.toString" << dt.toString(QLocale().dateFormat())
<< "\nDOES NOT WORK: "
<< "locale tostring" << QLocale::system().toString(dt);
qWarning() << "WORKS FINE"
<< QLocale().toString(dt);
return a.exec();
}
Output under Ubuntu 12.04 is:
system locale "fr_FR" app locale "fr_FR"
DOES NOT WORK: dt.toString "Thursday, 3 May 2012"
DOES NOT WORK: locale tostring "Thursday, 3 May 2012"
WORKS FINE "jeudi 3 mai 2012"
Output under MacOs is:
system locale "fr_FR" app locale "fr_FR"
WORKS FINE: dt.toString "jeudi 3 mai 2012"
WORKS FINE: locale tostring "jeudi 03 mai 2012"
WORKS FINE "jeudi 3 mai 2012"
** Affects: qt4-x11 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in Ubuntu.
https://bugs.launchpad.net/bugs/993956
Title:
QDate.toString() output is not correctly translated under Ubuntu 12.04
(french)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/993956/+subscriptions
More information about the kubuntu-bugs
mailing list