QDate.toString() output is not correctly translated under Ubuntu 12.04 (french)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qt4-x11 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Please find informations on the upstream bug tracker:
https:/
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:
if (!qtTranslator.
qWarning() << "ERROR";
qApp-
QLocale:
QDate dt = QDate::
qWarning() << "DOES NOT WORK: "
<< "dt.toString" << dt.toString(
<< "\nDOES NOT WORK: "
<< "locale tostring" << QLocale:
qWarning() << "WORKS FINE"
<< QLocale(
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"