diff options
-rw-r--r-- | CHANGELOG.md | 9 | ||||
-rw-r--r-- | resources/langs/nheko_de.ts | 61 | ||||
-rw-r--r-- | resources/langs/nheko_el.ts | 53 | ||||
-rw-r--r-- | resources/langs/nheko_en.ts | 61 | ||||
-rw-r--r-- | resources/langs/nheko_fi.ts | 61 | ||||
-rw-r--r-- | resources/langs/nheko_fr.ts | 53 | ||||
-rw-r--r-- | resources/langs/nheko_nl.ts | 53 | ||||
-rw-r--r-- | resources/langs/nheko_pl.ts | 53 | ||||
-rw-r--r-- | resources/langs/nheko_ru.ts | 53 | ||||
-rw-r--r-- | resources/langs/nheko_zh_CN.ts | 53 | ||||
-rw-r--r-- | src/Utils.h | 53 |
11 files changed, 532 insertions, 31 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9df96e65..55e59332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,22 @@ ### [0.7.0] -- Unreleased +0.7.0 *requires* mtxclient 0.3.0. Make sure you compile against 0.3.0 +if you do not use the mtxclient bundled with nheko. + #### Features - Make nheko session import / export format match riot. Fixes #48 (WIP) - Implement proper replies (WIP) +- Add .well-known support for auto-completing homeserver information +- Add mentions viewer so you can see all the messages you have been mentioned in (WIP) +- Add emoji font selection preference #### Improvements - Add dedicated reply button to Timeline items. Add button for other options so that right click isn't always required. +- Fix various things with regards to emoji rendering and the emoji picker (WIP) +- Lots and lots and lots of localization updates. +- Additional tweaks to the system theme ## [0.6.4] - 2019-05-22 diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 84c712ba..2099d059 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -962,13 +962,13 @@ Medien-Größe: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> - <translation>Die ausgewählte Datei ist keine Bilddatei</translation> + <source>The selected file is not an image</source> + <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> - <translation>Fehler beim lesen der Datei: %1</translation> + <source>Error while reading file: %1</source> + <translation type="unfinished"></translation> </message> <message> <location line="+35"/> @@ -1052,6 +1052,7 @@ Medien-Größe: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1075,5 +1076,57 @@ Medien-Größe: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index ead1ed69..c8805905 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -1050,6 +1050,7 @@ Media size: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1073,5 +1074,57 @@ Media size: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index 298abfc7..5dcb4f61 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -962,13 +962,13 @@ Media size: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> - <translation>The selected media is not an image</translation> + <source>The selected file is not an image</source> + <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> - <translation>Error while reading media: %1</translation> + <source>Error while reading file: %1</source> + <translation type="unfinished"></translation> </message> <message> <location line="+35"/> @@ -1052,6 +1052,7 @@ Media size: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1075,5 +1076,57 @@ Media size: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index 718f1084..86374eb4 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -962,13 +962,13 @@ Median koko: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> - <translation>Valittu tiedosto ei ole kuva</translation> + <source>The selected file is not an image</source> + <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> - <translation>Virhe lukiessa tiedostoa: %1</translation> + <source>Error while reading file: %1</source> + <translation type="unfinished"></translation> </message> <message> <location line="+35"/> @@ -1052,6 +1052,7 @@ Median koko: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1075,5 +1076,57 @@ Median koko: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index 9c7f25c6..100b78aa 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -1053,6 +1053,7 @@ Taille du média : %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1076,5 +1077,57 @@ Taille du média : %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index dbf81401..59642683 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -1052,6 +1052,7 @@ Mediagrootte: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1075,5 +1076,57 @@ Mediagrootte: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index f4cbfd56..74d08608 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -1056,6 +1056,7 @@ Rozmiar multimediów: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1079,5 +1080,57 @@ Rozmiar multimediów: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index f31b23cf..b2b18ee3 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -1055,6 +1055,7 @@ Media size: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1078,5 +1079,57 @@ Media size: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 8da7c475..772b32d2 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -1060,6 +1060,7 @@ Media size: %2 <name>utils</name> <message> <location filename="../../src/Utils.cpp" line="+46"/> + <location filename="../../src/Utils.h" line="+141"/> <source>You</source> <translation type="unfinished"></translation> </message> @@ -1083,5 +1084,57 @@ Media size: %2 <source>sent a video</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/Utils.h" line="-45"/> + <source>sent</source> + <comment>For when you are the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>sent</source> + <comment>For when someone else is the sender</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>%1 an audio clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 an image</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a video clip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a sticker</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>%1 a notification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>%1 an encrypted message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Unknown Message Type</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/src/Utils.h b/src/Utils.h index 756dc1e3..d2aa6d93 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -9,6 +9,7 @@ #include "timeline/widgets/ImageItem.h" #include "timeline/widgets/VideoItem.h" +#include <QCoreApplication> #include <QDateTime> #include <QPixmap> #include <mtx/events/collections.hpp> @@ -79,7 +80,9 @@ event_body(const mtx::events::collections::TimelineEvents &event); //! Match widgets/events with a description message. template<class T> QString -messageDescription(const QString &username = "", const QString &body = "") +messageDescription(const QString &username = "", + const QString &body = "", + const bool isLocal = false) { using Audio = mtx::events::RoomEvent<mtx::events::msg::Audio>; using Emote = mtx::events::RoomEvent<mtx::events::msg::Emote>; @@ -91,24 +94,34 @@ messageDescription(const QString &username = "", const QString &body = "") using Video = mtx::events::RoomEvent<mtx::events::msg::Video>; using Encrypted = mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>; - if (std::is_same<T, AudioItem>::value || std::is_same<T, Audio>::value) - return QString("sent an audio clip"); - else if (std::is_same<T, ImageItem>::value || std::is_same<T, Image>::value) - return QString("sent an image"); - else if (std::is_same<T, FileItem>::value || std::is_same<T, File>::value) - return QString("sent a file"); - else if (std::is_same<T, VideoItem>::value || std::is_same<T, Video>::value) - return QString("sent a video clip"); - else if (std::is_same<T, StickerItem>::value || std::is_same<T, Sticker>::value) - return QString("sent a sticker"); - else if (std::is_same<T, Notice>::value) - return QString("sent a notification"); - else if (std::is_same<T, Text>::value) + // Sometimes the verb form of sent changes in some languages depending on the actor. + auto remoteSent = + QCoreApplication::translate("utils", "sent", "For when you are the sender"); + auto localSent = + QCoreApplication::translate("utils", "sent", "For when someone else is the sender"); + QString sentVerb = isLocal ? localSent : remoteSent; + if (std::is_same<T, AudioItem>::value || std::is_same<T, Audio>::value) { + return QCoreApplication::translate("utils", "%1 an audio clip").arg(sentVerb); + } else if (std::is_same<T, ImageItem>::value || std::is_same<T, Image>::value) { + return QCoreApplication::translate("utils", "%1 an image").arg(sentVerb); + } else if (std::is_same<T, FileItem>::value || std::is_same<T, File>::value) { + return QCoreApplication::translate("utils", "%1 a file").arg(sentVerb); + } else if (std::is_same<T, VideoItem>::value || std::is_same<T, Video>::value) { + return QCoreApplication::translate("utils", "%1 a video clip").arg(sentVerb); + } else if (std::is_same<T, StickerItem>::value || std::is_same<T, Sticker>::value) { + return QCoreApplication::translate("utils", "%1 a sticker").arg(sentVerb); + } else if (std::is_same<T, Notice>::value) { + return QCoreApplication::translate("utils", "%1 a notification").arg(sentVerb); + } else if (std::is_same<T, Text>::value) { 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); - else if (std::is_same<T, Encrypted>::value) - return QString("sent an encrypted message"); + } else if (std::is_same<T, Encrypted>::value) { + return QCoreApplication::translate("utils", "%1 an encrypted message") + .arg(sentVerb); + } else { + return QCoreApplication::translate("utils", "Unknown Message Type"); + } } template<class T, class Event> @@ -129,10 +142,12 @@ createDescriptionInfo(const Event &event, const QString &localUser, const QStrin return DescInfo{ QString::fromStdString(msg.event_id), - isEmote ? "" : (sender == localUser ? "You" : username), + isEmote ? "" + : (sender == localUser ? QCoreApplication::translate("utils", "You") : username), sender, (isText || isEmote) - ? messageDescription<T>(username, QString::fromStdString(msg.content.body).trimmed()) + ? messageDescription<T>( + username, QString::fromStdString(msg.content.body).trimmed(), sender == localUser) : QString(" %1").arg(messageDescription<T>()), utils::descriptiveTime(ts), ts}; |