From 3fddf69958c4692fbeee6e004c6e3a01f873e6ad Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Fri, 6 Mar 2020 13:43:05 -0500 Subject: [PATCH 1/7] Don't request access to the user's home directory --- io.github.NhekoReborn.Nheko.json | 1 - 1 file changed, 1 deletion(-) diff --git a/io.github.NhekoReborn.Nheko.json b/io.github.NhekoReborn.Nheko.json index b444e507..c042854f 100644 --- a/io.github.NhekoReborn.Nheko.json +++ b/io.github.NhekoReborn.Nheko.json @@ -10,7 +10,6 @@ "rename-appdata-file": "nheko.appdata.xml", "finish-args": [ "--device=dri", - "--filesystem=home", "--share=ipc", "--share=network", "--socket=pulseaudio", From 50eec6a96ba71604577fd16bd21cc968a1998c07 Mon Sep 17 00:00:00 2001 From: "DeepBlueV7.X" Date: Wed, 4 Mar 2020 23:30:03 +0000 Subject: [PATCH 2/7] Translated using Weblate (German) Currently translated at 68.4% (165 of 241 strings) Translation: Nheko/nheko Translate-URL: http://weblate.nheko.im/projects/nheko/nheko-master/de/ --- resources/langs/nheko_de.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 8a982f5e..41e518b0 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -6,13 +6,13 @@ Failed to invite user: %1 - + Nutzer konnte nicht eingeladen werden: %1 Invited user: %1 - + Eingeladener Benutzer: %1 @@ -482,7 +482,7 @@ -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted - -- verschlüsselter Event (keine Schlüssel zur Entschlüsselung gefunden) -- + -- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) -- @@ -506,7 +506,7 @@ -- Encrypted Event (Unknown event type) -- Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - -- verschlüsselter Event (Unbekannter Eventtyp) -- + -- Verschlüsseltes Event (Unbekannter Eventtyp) -- From a071f55c7bfd1ea19de50a2466c854b664d6ea44 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 8 Mar 2020 14:39:01 +0100 Subject: [PATCH 3/7] Fix images without size --- resources/qml/delegates/ImageMessage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml index 65e1c454..229f8f09 100644 --- a/resources/qml/delegates/ImageMessage.qml +++ b/resources/qml/delegates/ImageMessage.qml @@ -3,7 +3,7 @@ import QtQuick 2.6 import im.nheko 1.0 Item { - property double tempWidth: Math.min(parent ? parent.width : undefined, model.data.width) + property double tempWidth: Math.min(parent ? parent.width : undefined, model.data.width < 1 ? parent.width : model.data.width) property double tempHeight: tempWidth * model.data.proportionalHeight property bool tooHigh: tempHeight > timelineRoot.height / 2 From 69a50c15c75fc9159bb607ed04edfed69bb92e59 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 8 Mar 2020 15:26:52 +0100 Subject: [PATCH 4/7] Reduce times we read upload data --- src/ChatPage.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index 698a4ae2..029444a3 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -307,16 +307,16 @@ ChatPage::ChatPage(QSharedPointer userSettings, QWidget *parent) QString mimeClass, const QString &fn, const std::optional &related) { - QMimeDatabase db; - QMimeType mime = db.mimeTypeForData(dev.data()); - if (!dev->open(QIODevice::ReadOnly)) { emit uploadFailed( QString("Error while reading media: %1").arg(dev->errorString())); return; } - auto bin = dev->peek(dev->size()); + auto bin = dev->readAll(); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForData(bin); + auto payload = std::string(bin.data(), bin.size()); std::optional encryptedFile; if (cache::isRoomEncrypted(current_room_.toStdString())) { @@ -328,10 +328,9 @@ ChatPage::ChatPage(QSharedPointer userSettings, QWidget *parent) QSize dimensions; QString blurhash; if (mimeClass == "image") { - dimensions = QImageReader(dev.data()).size(); - QImage img; img.loadFromData(bin); + dimensions = img.size(); if (img.height() > 200 && img.width() > 360) img = img.scaled(360, 200, Qt::KeepAspectRatioByExpanding); std::vector data; From 0f1a352dd7945b6a685d70a39eead409f6ee2215 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 10 Mar 2020 00:30:45 +0100 Subject: [PATCH 5/7] Make buttons hideable via setting, button contents can still be accessed via context menu --- resources/langs/nheko_de.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_el.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_en.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_fi.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_fr.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_ja.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_nl.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_pl.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_ru.ts | 38 +++++++++++++++++++++------------- resources/langs/nheko_zh_CN.ts | 38 +++++++++++++++++++++------------- resources/qml/Avatar.qml | 7 ------- resources/qml/TimelineRow.qml | 38 +++++++++++----------------------- resources/qml/TimelineView.qml | 19 +++++++++++++++++ src/UserSettingsPage.cpp | 12 +++++++++++ src/UserSettingsPage.h | 9 ++++++++ 15 files changed, 292 insertions(+), 173 deletions(-) diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 41e518b0..5251742f 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 Nutzer konnte nicht eingeladen werden: %1 - + Invited user: %1 Eingeladener Benutzer: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. Medienupload fehlgeschlagen. Bitte versuche es erneut. - + Failed to restore OLM account. Please login again. Wiederherstellung des OLM Accounts fehlgeschlagen. Bitte logge dich erneut ein. @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted -- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) -- @@ -672,7 +672,7 @@ TimelineRow - + Reply Antworten @@ -685,7 +685,12 @@ TimelineView - + + Reply + Antworten + + + Read receipts Lesebestätigungen @@ -715,7 +720,7 @@ Kein Raum geöffnet - + Close Schließen @@ -777,7 +782,7 @@ UserSettingsPage - + Minimize to tray Ins Benachrichtigungsfeld minimieren @@ -798,6 +803,11 @@ + Show buttons in timeline + + + + Typing notifications Schreibbenachrichtigungen @@ -847,7 +857,7 @@ Gerätefingerabdruck - + Session Keys Sitzungsschlüssel @@ -867,22 +877,22 @@ VERSCHLÜSSELUNG - + GENERAL ALLGEMEINES - + INTERFACE - + Emoji Font Family - + Open Sessions File Öffne Sessions Datei diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 0398f066..0f75ca9f 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted @@ -672,7 +672,7 @@ TimelineRow - + Reply @@ -685,7 +685,12 @@ TimelineView - + + Reply + + + + Read receipts @@ -715,7 +720,7 @@ - + Close @@ -777,7 +782,7 @@ UserSettingsPage - + Minimize to tray Ελαχιστοποίηση @@ -798,6 +803,11 @@ + Show buttons in timeline + + + + Typing notifications @@ -847,7 +857,7 @@ - + Session Keys @@ -867,22 +877,22 @@ - + GENERAL ΓΕΝΙΚΑ - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index 638e0a89..f01bd5d0 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 Failed to invite user: %1 - + Invited user: %1 Invited user: %1 @@ -50,12 +50,12 @@ Unbanned user: %1 - + Failed to upload media. Please try again. Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. Failed to restore OLM account. Please login again. @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted -- Encrypted Event (No keys found for decryption) -- @@ -672,7 +672,7 @@ TimelineRow - + Reply Reply @@ -685,7 +685,12 @@ TimelineView - + + Reply + Reply + + + Read receipts Read receipts @@ -715,7 +720,7 @@ No room open - + Close Close @@ -777,7 +782,7 @@ UserSettingsPage - + Minimize to tray Minimize to tray @@ -798,6 +803,11 @@ + Show buttons in timeline + + + + Typing notifications Typing notifications @@ -847,7 +857,7 @@ Device Fingerprint - + Session Keys Session Keys @@ -867,22 +877,22 @@ ENCRYPTION - + GENERAL GENERAL - + INTERFACE - + Emoji Font Family - + Open Sessions File Open Sessions File diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index bf7dd6f0..5cc9b9fe 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. OLM-tilin palauttaminen epäonnistui. Ole hyvä ja kirjaudu sisään uudelleen. @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted -- Salattu viesti (salauksen purkuavaimia ei löydetty) -- @@ -672,7 +672,7 @@ TimelineRow - + Reply @@ -685,7 +685,12 @@ TimelineView - + + Reply + + + + Read receipts Lukukuittaukset @@ -715,7 +720,7 @@ - + Close Sulje @@ -777,7 +782,7 @@ UserSettingsPage - + Minimize to tray Pienennä ilmoitusalueelle @@ -798,6 +803,11 @@ + Show buttons in timeline + + + + Typing notifications Kirjoitusilmoitukset @@ -847,7 +857,7 @@ Laitteen sormenjälki - + Session Keys Istunnon avaimet @@ -867,22 +877,22 @@ SALAUS - + GENERAL YLEISET ASETUKSET - + INTERFACE - + Emoji Font Family - + Open Sessions File Avaa Istuntoavaintiedosto diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index 19236b11..7af4f89e 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. @@ -480,7 +480,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted @@ -673,7 +673,7 @@ TimelineRow - + Reply @@ -686,7 +686,12 @@ TimelineView - + + Reply + + + + Read receipts Accusés de lecture @@ -716,7 +721,7 @@ - + Close @@ -778,7 +783,7 @@ UserSettingsPage - + Minimize to tray Réduire à la barre des tâches @@ -799,6 +804,11 @@ + Show buttons in timeline + + + + Typing notifications Notifications d'écriture @@ -848,7 +858,7 @@ - + Session Keys @@ -868,22 +878,22 @@ - + GENERAL GÉNÉRAL - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts index c0891f1f..8ee5a053 100644 --- a/resources/langs/nheko_ja.ts +++ b/resources/langs/nheko_ja.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 ユーザーを招待できませんでした: %1 - + Invited user: %1 招待されたユーザー: %1 @@ -50,12 +50,12 @@ 永久追放を解除されたユーザー: %1 - + Failed to upload media. Please try again. メディアをアップロードできませんでした。やり直して下さい。 - + Failed to restore OLM account. Please login again. OLMアカウントを復元できませんでした。もう一度ログインして下さい。 @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted -- 暗号化イベント (復号鍵が見つかりません) -- @@ -671,7 +671,7 @@ TimelineRow - + Reply 返信 @@ -684,7 +684,12 @@ TimelineView - + + Reply + 返信 + + + Read receipts 開封確認 @@ -714,7 +719,7 @@ 部屋が開いていません - + Close 閉じる @@ -776,7 +781,7 @@ UserSettingsPage - + Minimize to tray トレイへ最小化 @@ -797,6 +802,11 @@ + Show buttons in timeline + + + + Typing notifications 入力状態の通知 @@ -846,7 +856,7 @@ デバイスの指紋 - + Session Keys セッション鍵 @@ -866,22 +876,22 @@ 暗号化 - + GENERAL 全般 - + INTERFACE - + Emoji Font Family - + Open Sessions File セッションファイルを開く diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index 3cb64e6c..b07971bc 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted @@ -672,7 +672,7 @@ TimelineRow - + Reply @@ -685,7 +685,12 @@ TimelineView - + + Reply + + + + Read receipts Leesbevestigingen @@ -715,7 +720,7 @@ - + Close @@ -777,7 +782,7 @@ UserSettingsPage - + Minimize to tray Minimaliseren naar systeemvak @@ -798,6 +803,11 @@ + Show buttons in timeline + + + + Typing notifications Meldingen bij typen van berichten @@ -847,7 +857,7 @@ - + Session Keys @@ -867,22 +877,22 @@ - + GENERAL ALGEMEEN - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index f6764e82..f28164dc 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. Nie udało się przywrócić konta OLM. Spróbuj zalogować się ponownie. @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted @@ -673,7 +673,7 @@ TimelineRow - + Reply @@ -686,7 +686,12 @@ TimelineView - + + Reply + + + + Read receipts Potwierdzenia przeczytania @@ -716,7 +721,7 @@ - + Close @@ -778,7 +783,7 @@ UserSettingsPage - + Minimize to tray Zminimalizuj do paska zadań @@ -799,6 +804,11 @@ + Show buttons in timeline + + + + Typing notifications Powiadomienia o pisaniu @@ -848,7 +858,7 @@ Odcisk palca urządzenia - + Session Keys @@ -868,22 +878,22 @@ SZYFROWANIE - + GENERAL OGÓLNE - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index a2c8c951..8dde197e 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. Не удалось восстановить учетную запись OLM. Пожалуйста, войдите снова. @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted @@ -673,7 +673,7 @@ TimelineRow - + Reply @@ -686,7 +686,12 @@ TimelineView - + + Reply + + + + Read receipts Подтверждать прочтение @@ -716,7 +721,7 @@ - + Close Закрыть @@ -778,7 +783,7 @@ UserSettingsPage - + Minimize to tray Сворачивать в системную панель @@ -799,6 +804,11 @@ + Show buttons in timeline + + + + Typing notifications Сообщать о наборе сообщения @@ -848,7 +858,7 @@ Отпечаток устройства - + Session Keys Ключи сеанса @@ -868,22 +878,22 @@ ШИФРОВАНИЕ - + GENERAL ГЛАВНОЕ - + INTERFACE - + Emoji Font Family - + Open Sessions File Открыть файл сеансов diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 0ed3153e..3b7138bb 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -4,13 +4,13 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. 恢复 OLM 账户失败。请重新登录。 @@ -479,7 +479,7 @@ TimelineModel - + -- Encrypted Event (No keys found for decryption) -- Placeholder, when the message was not decrypted yet or can't be decrypted @@ -671,7 +671,7 @@ TimelineRow - + Reply @@ -684,7 +684,12 @@ TimelineView - + + Reply + + + + Read receipts 阅读回执 @@ -714,7 +719,7 @@ - + Close @@ -776,7 +781,7 @@ UserSettingsPage - + Minimize to tray 最小化至托盘 @@ -797,6 +802,11 @@ + Show buttons in timeline + + + + Typing notifications 打字通知 @@ -846,7 +856,7 @@ 设备指纹 - + Session Keys 会话密钥 @@ -866,22 +876,22 @@ 加密 - + GENERAL 通用 - + INTERFACE - + Emoji Font Family - + Open Sessions File 打开会话文件 diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index 0a53eac9..54875f9f 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -1,6 +1,5 @@ import QtQuick 2.6 import QtGraphicalEffects 1.0 -import Qt.labs.settings 1.0 Rectangle { id: avatar @@ -8,12 +7,6 @@ Rectangle { height: 48 radius: settings.avatar_circles ? height/2 : 3 - Settings { - id: settings - category: "user" - property bool avatar_circles: true - } - property alias url: img.source property string displayName diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index 2984844f..a9ae5f5c 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml @@ -8,36 +8,21 @@ import im.nheko 1.0 import "./delegates" MouseArea { - id: rowArea - anchors.left: parent.left anchors.right: parent.right height: row.height - - hoverEnabled: true - preventStealing: true propagateComposedEvents: true - acceptedButtons: Qt.NoButton + preventStealing: true - property bool showButtons: false - - Timer { - running: rowArea.containsMouse - interval: 150 - onTriggered: rowArea.state = "showButtons" + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: { + if (mouse.button === Qt.RightButton) + messageContextMenu.show(model.id, model.type, row) + } + onPressAndHold: { + if (mouse.source === Qt.MouseEventNotSynthesized) + messageContextMenu.show(model.id, model.type, row) } - - states: [ - State { - name: "hideButtons" - when: !rowArea.containsMouse - PropertyChanges { target: rowArea; showButtons: false; } - }, - State { - name: "showButtons" - PropertyChanges { target: rowArea; showButtons: true; } - } - ] RowLayout { id: row @@ -70,7 +55,7 @@ MouseArea { } ImageButton { - visible: rowArea.showButtons + visible: timelineSettings.buttons Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 width: 16 @@ -86,7 +71,7 @@ MouseArea { onClicked: chat.model.replyAction(model.id) } ImageButton { - visible: rowArea.showButtons + visible: timelineSettings.buttons Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 width: 16 @@ -125,6 +110,7 @@ MouseArea { id: ma anchors.fill: parent hoverEnabled: true + propagateComposedEvents: true } ToolTip.visible: ma.containsMouse diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 46cf484b..5612b04c 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 import QtGraphicalEffects 1.0 import QtQuick.Window 2.2 +import Qt.labs.settings 1.0 import im.nheko 1.0 @@ -14,6 +15,18 @@ Item { property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive property int avatarSize: 40 + Settings { + id: settings + category: "user" + property bool avatar_circles: true + } + + Settings { + id: timelineSettings + category: "user/timeline" + property bool buttons: true + } + Menu { id: messageContextMenu palette: colors @@ -28,6 +41,10 @@ Item { property string eventId property int eventType + MenuItem { + text: qsTr("Reply") + onClicked: chat.model.replyAction(messageContextMenu.eventId) + } MenuItem { text: qsTr("Read receipts") onTriggered: chat.model.readReceiptsAction(messageContextMenu.eventId) @@ -212,6 +229,7 @@ Item { anchors.fill: parent onClicked: chat.model.openUserProfile(modelData.userId) cursorShape: Qt.PointingHandCursor + propagateComposedEvents: true } } @@ -225,6 +243,7 @@ Item { anchors.fill: parent onClicked: chat.model.openUserProfile(section.split(" ")[0]) cursorShape: Qt.PointingHandCursor + propagateComposedEvents: true } } } diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 2cac783c..930b1b7b 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -55,6 +55,7 @@ UserSettings::load() hasDesktopNotifications_ = settings.value("user/desktop_notifications", true).toBool(); isStartInTrayEnabled_ = settings.value("user/window/start_in_tray", false).toBool(); isGroupViewEnabled_ = settings.value("user/group_view", true).toBool(); + isButtonsInTimelineEnabled_ = settings.value("user/timeline/buttons", true).toBool(); isMarkdownEnabled_ = settings.value("user/markdown_enabled", true).toBool(); isTypingNotificationsEnabled_ = settings.value("user/typing_notifications", true).toBool(); isReadReceiptsEnabled_ = settings.value("user/read_receipts", true).toBool(); @@ -126,6 +127,10 @@ UserSettings::save() settings.setValue("start_in_tray", isStartInTrayEnabled_); settings.endGroup(); + settings.beginGroup("timeline"); + settings.setValue("buttons", isButtonsInTimelineEnabled_); + settings.endGroup(); + settings.setValue("avatar_circles", avatarCircles_); settings.setValue("font_size", baseFontSize_); @@ -190,6 +195,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge startInTrayToggle_ = new Toggle{this}; avatarCircles_ = new Toggle{this}; groupViewToggle_ = new Toggle{this}; + timelineButtonsToggle_ = new Toggle{this}; typingNotifications_ = new Toggle{this}; readReceipts_ = new Toggle{this}; markdownEnabled_ = new Toggle{this}; @@ -292,6 +298,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge formLayout_->addRow(new HorizontalLine{this}); boxWrap(tr("Circular Avatars"), avatarCircles_); boxWrap(tr("Group's sidebar"), groupViewToggle_); + boxWrap(tr("Show buttons in timeline"), timelineButtonsToggle_); boxWrap(tr("Typing notifications"), typingNotifications_); formLayout_->addRow(new HorizontalLine{this}); boxWrap(tr("Read receipts"), readReceipts_); @@ -394,6 +401,10 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge settings_->setTypingNotifications(!isDisabled); }); + connect(timelineButtonsToggle_, &Toggle::toggled, this, [this](bool isDisabled) { + settings_->setButtonsInTimeline(!isDisabled); + }); + connect(readReceipts_, &Toggle::toggled, this, [this](bool isDisabled) { settings_->setReadReceipts(!isDisabled); }); @@ -428,6 +439,7 @@ UserSettingsPage::showEvent(QShowEvent *) groupViewToggle_->setState(!settings_->isGroupViewEnabled()); avatarCircles_->setState(!settings_->isAvatarCirclesEnabled()); typingNotifications_->setState(!settings_->isTypingNotificationsEnabled()); + timelineButtonsToggle_->setState(!settings_->isButtonsInTimelineEnabled()); readReceipts_->setState(!settings_->isReadReceiptsEnabled()); markdownEnabled_->setState(!settings_->isMarkdownEnabled()); desktopNotifications_->setState(!settings_->hasDesktopNotifications()); diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h index a1b7b084..ca5a213c 100644 --- a/src/UserSettingsPage.h +++ b/src/UserSettingsPage.h @@ -87,6 +87,12 @@ public: save(); } + void setButtonsInTimeline(bool state) + { + isButtonsInTimelineEnabled_ = state; + save(); + } + void setDesktopNotifications(bool state) { hasDesktopNotifications_ = state; @@ -106,6 +112,7 @@ public: bool isAvatarCirclesEnabled() const { return avatarCircles_; } bool isMarkdownEnabled() const { return isMarkdownEnabled_; } bool isTypingNotificationsEnabled() const { return isTypingNotificationsEnabled_; } + bool isButtonsInTimelineEnabled() const { return isButtonsInTimelineEnabled_; } bool isReadReceiptsEnabled() const { return isReadReceiptsEnabled_; } bool hasDesktopNotifications() const { return hasDesktopNotifications_; } double fontSize() const { return baseFontSize_; } @@ -127,6 +134,7 @@ private: bool isGroupViewEnabled_; bool isMarkdownEnabled_; bool isTypingNotificationsEnabled_; + bool isButtonsInTimelineEnabled_; bool isReadReceiptsEnabled_; bool hasDesktopNotifications_; bool avatarCircles_; @@ -175,6 +183,7 @@ private: Toggle *trayToggle_; Toggle *startInTrayToggle_; Toggle *groupViewToggle_; + Toggle *timelineButtonsToggle_; Toggle *typingNotifications_; Toggle *readReceipts_; Toggle *markdownEnabled_; From 71ba8cb284669d3393f5b3ec4150815afbb43c78 Mon Sep 17 00:00:00 2001 From: Pushpam Choudhary Date: Thu, 12 Mar 2020 22:41:52 +0530 Subject: [PATCH 6/7] Add periods to terminate non-user messages in the timeline --- resources/langs/nheko_de.ts | 84 +++++++++++++++++----------------- resources/langs/nheko_el.ts | 76 +++++++++++++++--------------- resources/langs/nheko_en.ts | 84 +++++++++++++++++----------------- resources/langs/nheko_fi.ts | 80 ++++++++++++++++---------------- resources/langs/nheko_fr.ts | 76 +++++++++++++++--------------- resources/langs/nheko_ja.ts | 82 ++++++++++++++++----------------- resources/langs/nheko_nl.ts | 76 +++++++++++++++--------------- resources/langs/nheko_pl.ts | 76 +++++++++++++++--------------- resources/langs/nheko_ru.ts | 76 +++++++++++++++--------------- resources/langs/nheko_zh_CN.ts | 76 +++++++++++++++--------------- src/timeline/TimelineModel.cpp | 28 ++++++------ 11 files changed, 407 insertions(+), 407 deletions(-) diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 5251742f..df5f6f60 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - -- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) -- - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- Entschlüsselungsfehler (Fehler bei Kommunikation mit Datenbank) -- @@ -497,19 +491,7 @@ -- Entschlüsselungsfehler (Fehler bei Suche nach megolm Schlüsseln in Datenbank) -- - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - -- Entschlüsselungsfehler (%1) -- - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - -- Verschlüsseltes Event (Unbekannter Eventtyp) -- - - - + Message redaction failed: %1 Nachricht zurückziehen fehlgeschlagen: %1 @@ -533,53 +515,71 @@ Save file Datei speichern + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + -- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) -- + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + -- Entschlüsselungsfehler (%1) -- + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + -- Verschlüsseltes Event (Unbekannter Eventtyp) -- + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - - %1%2 tippt - %1 und %2 tippen + + + - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -634,11 +634,16 @@ - Unbanned %1 - Hat die Verbannung von %1 zurückgezogen. + Unbanned %1. + Hat die Verbannung von %1. zurückgezogen. - + + %1 was banned. + + + + %1 redacted their knock. %1 hat das Anklopfen zurückgezogen. @@ -654,12 +659,7 @@ %1 hat den Raum verlassen. - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 0f75ca9f..674d9c4f 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -497,19 +491,7 @@ - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - - - - + Message redaction failed: %1 @@ -533,9 +515,27 @@ Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) @@ -544,42 +544,42 @@ - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -634,11 +634,16 @@ - Unbanned %1 + Unbanned %1. - + + %1 was banned. + + + + %1 redacted their knock. @@ -654,12 +659,7 @@ - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index f01bd5d0..a7dbf47a 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - -- Encrypted Event (No keys found for decryption) -- - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- Decryption Error (failed to communicate with DB) -- @@ -497,19 +491,7 @@ -- Decryption Error (failed to retrieve megolm keys from db) -- - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - -- Decryption Error (%1) -- - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - -- Encrypted Event (Unknown event type) -- - - - + Message redaction failed: %1 Message redaction failed: %1 @@ -533,53 +515,71 @@ Save file Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + -- Encrypted Event (No keys found for decryption) -- + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + -- Decryption Error (%1) -- + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + -- Encrypted Event (Unknown event type) -- + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - - %1%2 is typing - %1 and %2 are typing + + + - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -634,11 +634,16 @@ - Unbanned %1 - Unbanned %1. + Unbanned %1. + Unbanned %1.. - + + %1 was banned. + + + + %1 redacted their knock. %1 redacted their knock. @@ -654,12 +659,7 @@ %1 left after having already left! - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index 5cc9b9fe..568dd711 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - -- Salattu viesti (salauksen purkuavaimia ei löydetty) -- - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- Virhe purkaessa salausta (tietokannan kanssa kommunikointi epäonnistui) -- @@ -497,19 +491,7 @@ -- Virhe purkaessa salausta (megolm-avaimien hakeminen tietokannasta epäonnistui) -- - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - -- Virhe purkaessa salausta (%1) -- - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - -- Salattu viesti (tuntematon viestityyppi) -- - - - + Message redaction failed: %1 Viestin poisto epäonnistui: %1 @@ -533,53 +515,71 @@ Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + -- Salattu viesti (salauksen purkuavaimia ei löydetty) -- + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + -- Virhe purkaessa salausta (%1) -- + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + -- Salattu viesti (tuntematon viestityyppi) -- + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - %1%2 kirjoittaa - %1 ja %2 kirjoittavat + + - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -634,11 +634,16 @@ - Unbanned %1 + Unbanned %1. - + + %1 was banned. + + + + %1 redacted their knock. @@ -654,12 +659,7 @@ - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index 7af4f89e..13e61b32 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -480,13 +480,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -498,19 +492,7 @@ - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - - - - + Message redaction failed: %1 @@ -534,9 +516,27 @@ Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) @@ -545,42 +545,42 @@ - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -635,11 +635,16 @@ - Unbanned %1 + Unbanned %1. - + + %1 was banned. + + + + %1 redacted their knock. @@ -655,12 +660,7 @@ - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts index 8ee5a053..12bfa5cd 100644 --- a/resources/langs/nheko_ja.ts +++ b/resources/langs/nheko_ja.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - -- 暗号化イベント (復号鍵が見つかりません) -- - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- 復号エラー (データベースと通信できませんでした) -- @@ -497,19 +491,7 @@ -- 復号エラー (データベースからmegolm鍵を取得できませんでした) -- - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - -- 復号エラー (%1) -- - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - -- 暗号化イベント (不明なイベント型です) -- - - - + Message redaction failed: %1 メッセージを編集できませんでした: %1 @@ -533,52 +515,70 @@ Save file ファイルを保存 + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + -- 暗号化イベント (復号鍵が見つかりません) -- + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + -- 復号エラー (%1) -- + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + -- 暗号化イベント (不明なイベント型です) -- + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - - %1%2が入力しています + + - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -633,11 +633,16 @@ - Unbanned %1 - %1の永久追放を解除しました + Unbanned %1. + %1.の永久追放を解除しました - + + %1 was banned. + + + + %1 redacted their knock. %1がノックを編集しました。 @@ -653,12 +658,7 @@ 退出済みの%1が退出しました! - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index b07971bc..7b60b1e6 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -497,19 +491,7 @@ - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - - - - + Message redaction failed: %1 @@ -533,9 +515,27 @@ Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) @@ -544,42 +544,42 @@ - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -634,11 +634,16 @@ - Unbanned %1 + Unbanned %1. - + + %1 was banned. + + + + %1 redacted their knock. @@ -654,12 +659,7 @@ - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index f28164dc..f1facfa8 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -497,19 +491,7 @@ - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - - - - + Message redaction failed: %1 Redagowanie wiadomości nie powiodło się: %1 @@ -533,9 +515,27 @@ Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) @@ -545,42 +545,42 @@ - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -635,11 +635,16 @@ - Unbanned %1 + Unbanned %1. - + + %1 was banned. + + + + %1 redacted their knock. @@ -655,12 +660,7 @@ - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index 8dde197e..9ccb94ee 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -497,19 +491,7 @@ - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - - - - + Message redaction failed: %1 Ошибка редактирования сообщения: %1 @@ -533,9 +515,27 @@ Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) @@ -545,42 +545,42 @@ - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -635,11 +635,16 @@ - Unbanned %1 + Unbanned %1. - + + %1 was banned. + + + + %1 redacted their knock. @@ -655,12 +660,7 @@ - - %1 was banned - - - - + Reason: %1 diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 3b7138bb..7403c37e 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -479,13 +479,7 @@ TimelineModel - - -- Encrypted Event (No keys found for decryption) -- - Placeholder, when the message was not decrypted yet or can't be decrypted - - - - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -497,19 +491,7 @@ - - -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1 - - - - - -- Encrypted Event (Unknown event type) -- - Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet - - - - + Message redaction failed: %1 删除消息失败:%1 @@ -533,9 +515,27 @@ Save file + + + -- Encrypted Event (No keys found for decryption) -- + Placeholder, when the message was not decrypted yet or can't be decrypted. + + + + + -- Decryption Error (%1) -- + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + + + + + -- Encrypted Event (Unknown event type) -- + Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet. + + - - %1 and %2 are typing + + %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) @@ -543,42 +543,42 @@ - %1 opened the room to the public + %1 opened the room to the public. - %1 made this room require and invitation to join + %1 made this room require and invitation to join. - %1 made the room open to guests + %1 made the room open to guests. - %1 has closed the room to guest access + %1 has closed the room to guest access. - %1 made the room history world readable. Events may be now read by non-joined people + %1 made the room history world readable. Events may be now read by non-joined people. - %1 set the room history visible to members from this point on + %1 set the room history visible to members from this point on. - %1 set the room history visible to members since they were invited + %1 set the room history visible to members since they were invited. - %1 set the room history visible to members since they joined the room + %1 set the room history visible to members since they joined the room. @@ -633,11 +633,16 @@ - Unbanned %1 + Unbanned %1. - + + %1 was banned. + + + + %1 redacted their knock. @@ -653,12 +658,7 @@ - - %1 was banned - - - - + Reason: %1 diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index e1d2e822..ec98da23 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -716,7 +716,7 @@ TimelineModel::decryptEvent(const mtx::events::EncryptedEvent &users, QColor bg) { QString temp = - tr("%1 and %2 are typing", + tr("%1 and %2 are typing.", "Multiple users are typing. First argument is a comma separated list of potentially " "multiple users. Second argument is the last user of that list. (If only one user is " "typing, %1 is empty. You should still use it in your string though to silence Qt " @@ -1494,9 +1494,9 @@ TimelineModel::formatJoinRuleEvent(QString id) switch (event->content.join_rule) { case mtx::events::state::JoinRule::Public: - return tr("%1 opened the room to the public").arg(name); + return tr("%1 opened the room to the public.").arg(name); case mtx::events::state::JoinRule::Invite: - return tr("%1 made this room require and invitation to join").arg(name); + return tr("%1 made this room require and invitation to join.").arg(name); default: // Currently, knock and private are reserved keywords and not implemented in Matrix. return ""; @@ -1519,9 +1519,9 @@ TimelineModel::formatGuestAccessEvent(QString id) switch (event->content.guest_access) { case mtx::events::state::AccessState::CanJoin: - return tr("%1 made the room open to guests").arg(name); + return tr("%1 made the room open to guests.").arg(name); case mtx::events::state::AccessState::Forbidden: - return tr("%1 has closed the room to guest access").arg(name); + return tr("%1 has closed the room to guest access.").arg(name); default: return ""; } @@ -1545,16 +1545,16 @@ TimelineModel::formatHistoryVisibilityEvent(QString id) switch (event->content.history_visibility) { case mtx::events::state::Visibility::WorldReadable: return tr("%1 made the room history world readable. Events may be now read by " - "non-joined people") + "non-joined people.") .arg(name); case mtx::events::state::Visibility::Shared: - return tr("%1 set the room history visible to members from this point on") + return tr("%1 set the room history visible to members from this point on.") .arg(name); case mtx::events::state::Visibility::Invited: - return tr("%1 set the room history visible to members since they were invited") + return tr("%1 set the room history visible to members since they were invited.") .arg(name); case mtx::events::state::Visibility::Joined: - return tr("%1 set the room history visible to members since they joined the room") + return tr("%1 set the room history visible to members since they joined the room.") .arg(name); default: return ""; @@ -1661,7 +1661,7 @@ TimelineModel::formatMemberEvent(QString id) else rendered = tr("Kicked %1.").arg(name); } else if (prevEvent->content.membership == Membership::Ban) { - rendered = tr("Unbanned %1").arg(name); + rendered = tr("Unbanned %1.").arg(name); } else if (prevEvent->content.membership == Membership::Knock) { if (event->state_key == event->sender) rendered = tr("%1 redacted their knock.").arg(name); @@ -1675,7 +1675,7 @@ TimelineModel::formatMemberEvent(QString id) break; case Membership::Ban: - rendered = tr("%1 was banned").arg(name); + rendered = tr("%1 was banned.").arg(name); break; case Membership::Knock: rendered = tr("%1 knocked.").arg(name); From 93bcdbed2d9cf84a36070736e60a90fb965d2e96 Mon Sep 17 00:00:00 2001 From: Pushpam Choudhary Date: Fri, 13 Mar 2020 03:27:29 +0530 Subject: [PATCH 7/7] Update minor fixes in translations as requested --- resources/langs/nheko_de.ts | 10 +++++----- resources/langs/nheko_el.ts | 2 +- resources/langs/nheko_en.ts | 10 +++++----- resources/langs/nheko_fi.ts | 8 ++++---- resources/langs/nheko_fr.ts | 2 +- resources/langs/nheko_ja.ts | 8 ++++---- resources/langs/nheko_nl.ts | 2 +- resources/langs/nheko_pl.ts | 2 +- resources/langs/nheko_ru.ts | 2 +- resources/langs/nheko_zh_CN.ts | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index df5f6f60..cfc58189 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. -- Entschlüsselungsfehler (%1) -- @@ -537,9 +537,9 @@ %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - - - + + %1%2 tippt + %1 und %2 tippen @@ -635,7 +635,7 @@ Unbanned %1. - Hat die Verbannung von %1. zurückgezogen. + Hat die Verbannung von %1 zurückgezogen. diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 674d9c4f..0d374cf5 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index a7dbf47a..c97a4ac2 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. -- Decryption Error (%1) -- @@ -537,9 +537,9 @@ %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - - - + + %1%2 is typing + %1 and %2 are typing @@ -635,7 +635,7 @@ Unbanned %1. - Unbanned %1.. + Unbanned %1. diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index 568dd711..8659d560 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. -- Virhe purkaessa salausta (%1) -- @@ -537,9 +537,9 @@ %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - - - + + %1%2 kirjoittaa + %1 ja %2 kirjoittavat diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index 13e61b32..6efe8252 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -525,7 +525,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts index 12bfa5cd..05528a42 100644 --- a/resources/langs/nheko_ja.ts +++ b/resources/langs/nheko_ja.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. -- 復号エラー (%1) -- @@ -537,8 +537,8 @@ %1 and %2 are typing. Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.) - - + + %1%2が入力しています @@ -634,7 +634,7 @@ Unbanned %1. - %1.の永久追放を解除しました + %1 の永久追放を解除しました。 diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index 7b60b1e6..79e82714 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index f1facfa8..774868db 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index 9ccb94ee..0dce43f5 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1. diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 7403c37e..8bd4c750 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -524,7 +524,7 @@ -- Decryption Error (%1) -- - Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1. + Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed as %1.