Skip to content
Snippets Groups Projects
Verified Commit 497774d6 authored by Joe Donofry's avatar Joe Donofry
Browse files

Fix linting

parent b875a8de
No related branches found
No related tags found
No related merge requests found
...@@ -95,29 +95,36 @@ messageDescription(const QString &username = "", ...@@ -95,29 +95,36 @@ messageDescription(const QString &username = "",
using Encrypted = mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>; using Encrypted = mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>;
// Sometimes the verb form of sent changes in some languages depending on the actor. // Sometimes the verb form of sent changes in some languages depending on the actor.
auto remoteSent = auto remoteSent = QCoreApplication::translate(
QCoreApplication::translate("message-description: ", "sent", "For when you are the sender"); "message-description: ", "sent", "For when you are the sender");
auto localSent = auto localSent = QCoreApplication::translate(
QCoreApplication::translate("message-description:", "sent", "For when someone else is the sender"); "message-description:", "sent", "For when someone else is the sender");
QString sentVerb = isLocal ? localSent : remoteSent; QString sentVerb = isLocal ? localSent : remoteSent;
if (std::is_same<T, AudioItem>::value || std::is_same<T, Audio>::value) { if (std::is_same<T, AudioItem>::value || std::is_same<T, Audio>::value) {
return QCoreApplication::translate("message-description sent:", "%1 an audio clip").arg(sentVerb); return QCoreApplication::translate("message-description sent:", "%1 an audio clip")
.arg(sentVerb);
} else if (std::is_same<T, ImageItem>::value || std::is_same<T, Image>::value) { } else if (std::is_same<T, ImageItem>::value || std::is_same<T, Image>::value) {
return QCoreApplication::translate("message-description sent:", "%1 an image").arg(sentVerb); return QCoreApplication::translate("message-description sent:", "%1 an image")
.arg(sentVerb);
} else if (std::is_same<T, FileItem>::value || std::is_same<T, File>::value) { } else if (std::is_same<T, FileItem>::value || std::is_same<T, File>::value) {
return QCoreApplication::translate("message-description sent:", "%1 a file").arg(sentVerb); return QCoreApplication::translate("message-description sent:", "%1 a file")
.arg(sentVerb);
} else if (std::is_same<T, VideoItem>::value || std::is_same<T, Video>::value) { } else if (std::is_same<T, VideoItem>::value || std::is_same<T, Video>::value) {
return QCoreApplication::translate("message-description sent:", "%1 a video clip").arg(sentVerb); return QCoreApplication::translate("message-description sent:", "%1 a video clip")
.arg(sentVerb);
} else if (std::is_same<T, StickerItem>::value || std::is_same<T, Sticker>::value) { } else if (std::is_same<T, StickerItem>::value || std::is_same<T, Sticker>::value) {
return QCoreApplication::translate("message-description sent:", "%1 a sticker").arg(sentVerb); return QCoreApplication::translate("message-description sent:", "%1 a sticker")
.arg(sentVerb);
} else if (std::is_same<T, Notice>::value) { } else if (std::is_same<T, Notice>::value) {
return QCoreApplication::translate("message-description sent:", "%1 a notification").arg(sentVerb); return QCoreApplication::translate("message-description sent:", "%1 a notification")
.arg(sentVerb);
} else if (std::is_same<T, Text>::value) { } else if (std::is_same<T, Text>::value) {
return QString(": %1").arg(body); return QString(": %1").arg(body);
} else if (std::is_same<T, Emote>::value) { } else if (std::is_same<T, Emote>::value) {
return QString("* %1 %2").arg(username).arg(body); return QString("* %1 %2").arg(username).arg(body);
} else if (std::is_same<T, Encrypted>::value) { } else if (std::is_same<T, Encrypted>::value) {
return QCoreApplication::translate("message-description sent:", "%1 an encrypted message") return QCoreApplication::translate("message-description sent:",
"%1 an encrypted message")
.arg(sentVerb); .arg(sentVerb);
} else { } else {
return QCoreApplication::translate("utils", "Unknown Message Type"); return QCoreApplication::translate("utils", "Unknown Message Type");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment