summary refs log tree commit diff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.nheko.im>2019-07-28 15:11:26 -0400
committerWeblate <noreply@weblate.nheko.im>2019-07-28 15:11:26 -0400
commite3d69957d391acfec8be84bda9a94e20ee615c40 (patch)
treea9e91e2d5dd422bfecf71bd757b651ad136d7e5b /src/Utils.cpp
parentTranslated using Weblate (Finnish) (diff)
parentAdd 'and' to typing display (diff)
downloadnheko-e3d69957d391acfec8be84bda9a94e20ee615c40.tar.xz
Merge branch '0.7.0-dev' of github.com:Nheko-Reborn/nheko into 0.7.0-dev
Fix merge conflicts with weblate translation files.
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp

index d6b092b1..a3c15c96 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -99,13 +99,13 @@ utils::descriptiveTime(const QDateTime &then) const auto days = then.daysTo(now); if (days == 0) - return then.toString("HH:mm"); + return then.time().toString(Qt::DefaultLocaleShortDate); else if (days < 2) - return QString("Yesterday"); - else if (days < 365) - return then.toString("dd/MM"); + return QString(QCoreApplication::translate("descriptiveTime", "Yesterday")); + else if (days < 7) + return then.toString("dddd"); - return then.toString("dd/MM/yy"); + return then.date().toString(Qt::DefaultLocaleShortDate); } DescInfo @@ -147,7 +147,7 @@ utils::getMessageDescription(const TimelineEvent &event, DescInfo info; if (sender == localUser) - info.username = "You"; + info.username = QCoreApplication::translate("utils", "You"); else info.username = username; @@ -366,16 +366,16 @@ utils::getQuoteBody(const RelatedInfo &related) return markdownToHtml(related.quoted_body); } case MsgType::File: { - return QString("sent a file."); + return QString(QCoreApplication::translate("utils", "sent a file.")); } case MsgType::Image: { - return QString("sent an image."); + return QString(QCoreApplication::translate("utils", "sent an image.")); } case MsgType::Audio: { - return QString("sent an audio file."); + return QString(QCoreApplication::translate("utils", "sent an audio file.")); } case MsgType::Video: { - return QString("sent a video"); + return QString(QCoreApplication::translate("utils", "sent a video")); } default: { return related.quoted_body;