From ed0442744a8fa079fb9df0816293cd226f5fb3f8 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Thu, 17 Sep 2015 16:14:00 +0200 Subject: [PATCH] Fix traslations not loading --- src/datautils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/datautils.cpp b/src/datautils.cpp index 2274f7f..82fb53f 100644 --- a/src/datautils.cpp +++ b/src/datautils.cpp @@ -85,17 +85,17 @@ QString DataUtils::formatDateTime(const QDateTime &dt) { QString s; int f = 60; if (seconds < f) { - s = qApp->tr("Just now"); + s = qApp->translate("DataUtils", "Just now"); } else if (seconds < (f *= 60)) { - s = qApp->tr("%n minute(s) ago", "", seconds / 60); + s = qApp->translate("DataUtils", "%n minute(s) ago", "", seconds / 60); } else if (seconds < (f *= 24)) { - s = qApp->tr("%n hour(s) ago", "", seconds / (60*60)); + s = qApp->translate("DataUtils", "%n hour(s) ago", "", seconds / (60*60)); } else if (seconds < (f *= 7)) { - s = qApp->tr("%n day(s) ago", "", seconds / (60*60*24)); + s = qApp->translate("DataUtils", "%n day(s) ago", "", seconds / (60*60*24)); } else if (seconds < (f = 60*60*24*30)) { - s = qApp->tr("%n weeks(s) ago", "", seconds / (60*60*24*7)); + s = qApp->translate("DataUtils", "%n weeks(s) ago", "", seconds / (60*60*24*7)); } else if (seconds < (f = 60*60*24*365)) { - s = qApp->tr("%n month(s) ago", "", seconds / (60*60*24*30)); + s = qApp->translate("DataUtils", "%n month(s) ago", "", seconds / (60*60*24*30)); } else { s = dt.date().toString(Qt::DefaultLocaleShortDate); } -- 2.39.5