#include "version.h"
#include "support/filetools.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
#include "support/Package.h"
+#include <QDate>
#include <QtCore>
#include <QtGui>
+using namespace lyx::support;
using lyx::support::package;
using lyx::support::makeDisplayPath;
namespace lyx {
namespace frontend {
+
+static QDate release_date()
+{
+ return QDate::fromString(QString(lyx_release_date), Qt::ISODate);
+}
+
+
static QString credits()
{
QString res;
} else {
file.open(QIODevice::ReadOnly);
QTextStream ts(&file);
+ ts.setCodec("UTF-8");
QString line;
do {
line = ts.readLine();
if (line.startsWith("@b"))
out << "<b>" << line.mid(2) << "</b>";
- else if (line.startsWith("@i"))
+ else if (line.startsWith("@i")) {
+ if (line.startsWith("@iE-mail")) {
+ // unmask email
+ line.replace(QString(" () "), QString("@"));
+ line.replace(QString(" ! "), QString("."));
+ }
out << "<i>" << line.mid(2) << "</i>";
- else
+ } else
out << line;
out << "<br>";
} while (!line.isNull());
static QString copyright()
{
- return qt_("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2008 LyX Team");
+ QString release_year = release_date().toString("yyyy");
+ docstring copy_message =
+ bformat(_("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995--%1$s LyX Team"),
+ qstring_to_ucs4(release_year));
+ return toqstr(copy_message);
}
static QString version()
{
+ QString loc_release_date;
+ QDate date = release_date();
+ if (date.isValid()) {
+ QLocale loc;
+ loc_release_date = loc.toString(date, QLocale::LongFormat);
+ } else {
+ if (QString(lyx_release_date) == "not released yet")
+ loc_release_date = qt_("not released yet");
+ else
+ loc_release_date = toqstr(lyx_release_date);
+ }
+ docstring version_date =
+ bformat(_("LyX Version %1$s\n(%2$s)"),
+ from_ascii(lyx_version),
+ qstring_to_ucs4(loc_release_date))+"\n\n";
QString res;
QTextStream out(&res);
- out << qt_("LyX Version ");
- out << lyx_version;
- out << " (";
- out << lyx_release_date;
- out << ")\n";
+ out << toqstr(version_date);
out << qt_("Library directory: ");
out << toqstr(makeDisplayPath(package().system_support().absFilename()));
out << "\n";
} // namespace frontend
} // namespace lyx
-#include "GuiAbout_moc.cpp"
+#include "moc_GuiAbout.cpp"