[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Tue Apr 5 20:10:29 CEST 2005
CVS commit by staikos:
make it a bit easier to translate, format the date properly
M +7 -7 kstdebug.cpp 1.20
--- kdeextragear-2/kst/kst/kstdebug.cpp #1.19:1.20
@@ -25,4 +25,5 @@
#include <kapplication.h>
#include <kdebug.h>
+#include <kglobal.h>
#include <klocale.h>
@@ -110,13 +111,13 @@ QString KstDebug::label(LogLevel level)
switch (level) {
case Notice:
- return i18n("Notice");
+ return i18n("log level notice", "Notice");
case Warning:
- return i18n("Warning");
+ return i18n("log level warning", "Warning");
case Error:
- return i18n("Error");
+ return i18n("log level error", "Error");
case Debug:
- return i18n("Debug");
+ return i18n("log level debug", "Debug");
default:
- return i18n("Other");
+ return i18n("log level other", "Other");
}
}
@@ -125,9 +126,8 @@ QString KstDebug::label(LogLevel level)
QString KstDebug::text() {
QMutexLocker ml(&_lock);
- // FIXME: this must be hard to internationalize
QString body = i18n("Kst version %1\n\n\nKst log:\n").arg(KSTVERSION);
for (unsigned i = 0; i < _messages.count(); i++ ) {
- body += i18n("%1 %2: %3\n").arg(_messages[i].date.toString()).arg(label(_messages[i].level)).arg(_messages[i].msg);
+ body += i18n("date leveltext: message", "%1 %2: %3\n").arg(KGlobal::locale()->formatDateTime(_messages[i].date)).arg(label(_messages[i].level)).arg(_messages[i].msg);
}
More information about the Kst
mailing list