diff --git a/configure.ac b/configure.ac index 8ae4fd1d26..65052e8a6b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,8 @@ dnl Process with autoconf to generate configure script -*- sh -*- AC_INIT(LyX,2.0.0svn,[lyx-devel@lists.lyx.org],[lyx]) -AC_SUBST(LYX_DATE, ["Sat, Nov 15, 2008"]) +# Use ISO format only. The frontend needs to parse this +AC_SUBST(LYX_DATE, ["2008-11-15"]) AC_PREREQ(2.52) AC_CONFIG_SRCDIR(src/main.cpp) AC_CONFIG_HEADERS([config.h]) diff --git a/src/frontends/qt4/GuiAbout.cpp b/src/frontends/qt4/GuiAbout.cpp index 4925a3f436..7c9c38aa03 100644 --- a/src/frontends/qt4/GuiAbout.cpp +++ b/src/frontends/qt4/GuiAbout.cpp @@ -16,11 +16,15 @@ #include "version.h" #include "support/filetools.h" +#include "support/gettext.h" +#include "support/lstrings.h" #include "support/Package.h" +#include #include #include +using namespace lyx::support; using lyx::support::package; using lyx::support::makeDisplayPath; @@ -28,6 +32,13 @@ 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; @@ -61,7 +72,11 @@ static QString credits() 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); } @@ -79,13 +94,18 @@ static QString disclaimer() static QString version() { + QLocale loc; + QString loc_release_date = + loc.toString(release_date(), QLocale::LongFormat); + if (lyx_release_date == "not released yet") + loc_release_date = qt_("not released yet"); + docstring version_date = + bformat(_("LyX Version %1$s\n(%2$s)\n\n"), + from_ascii(lyx_version), + qstring_to_ucs4(loc_release_date)); 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";