Skip to content
Snippets Groups Projects
Commit 3e085c86 authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Make strings in about dialog translatable by arg()'ifying them.

Reviewed-By: Ossi
parent 7b24a593
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <QtCore/QDate> #include <QtCore/QDate>
#include <QtCore/QFile> #include <QtCore/QFile>
#include <QtCore/QSysInfo>
#include <QtGui/QDialogButtonBox> #include <QtGui/QDialogButtonBox>
#include <QtGui/QGridLayout> #include <QtGui/QGridLayout>
...@@ -62,26 +63,28 @@ VersionDialog::VersionDialog(QWidget *parent) ...@@ -62,26 +63,28 @@ VersionDialog::VersionDialog(QWidget *parent)
QString version = QLatin1String(IDE_VERSION_LONG); QString version = QLatin1String(IDE_VERSION_LONG);
version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate); version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate);
const QString description = tr( QString ideRev;
"<h3>Qt Creator %1</h3>"
"Based on Qt %2<br/>"
"<br/>"
"Built on " __DATE__ " at " __TIME__ "<br />"
#ifdef IDE_REVISION #ifdef IDE_REVISION
"From revision %5<br/>" //: This gets conditionally inserted as argument %8 into the description string.
ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(IDE_REVISION_STR).left(10));
#endif #endif
const QString description = tr(
"<h3>Qt Creator %1</h3>"
"Based on Qt %2 (%3 bit)<br/>"
"<br/>" "<br/>"
"Built on %4 at %5<br />"
"<br/>" "<br/>"
"Copyright 2008-%3 %4. All rights reserved.<br/>" "%8"
"<br/>"
"Copyright 2008-%6 %7. All rights reserved.<br/>"
"<br/>" "<br/>"
"The program is provided AS IS with NO WARRANTY OF ANY KIND, " "The program is provided AS IS with NO WARRANTY OF ANY KIND, "
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
"PARTICULAR PURPOSE.<br/>") "PARTICULAR PURPOSE.<br/>")
.arg(version, QLatin1String(QT_VERSION_STR), QLatin1String(IDE_YEAR), (QLatin1String(IDE_AUTHOR)) .arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
#ifdef IDE_REVISION QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
, QString(IDE_REVISION_STR).left(10) (QLatin1String(IDE_AUTHOR)), ideRev);
#endif
);
QLabel *copyRightLabel = new QLabel(description); QLabel *copyRightLabel = new QLabel(description);
copyRightLabel->setWordWrap(true); copyRightLabel->setWordWrap(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment