From 37bede461b4c128831085c6c071b26876b69e3e7 Mon Sep 17 00:00:00 2001 From: John Gibbon Date: Thu, 5 Nov 2020 14:05:33 +0100 Subject: [PATCH 1/2] differentiate between simple/normal messages --- harbour-fernschreiber.pro | 2 + qml/components/MessageListViewItem.qml | 391 +++++++++++++++++++ qml/components/MessageListViewItemSimple.qml | 53 +++ qml/pages/ChatPage.qml | 380 +----------------- 4 files changed, 456 insertions(+), 370 deletions(-) create mode 100644 qml/components/MessageListViewItem.qml create mode 100644 qml/components/MessageListViewItemSimple.qml diff --git a/harbour-fernschreiber.pro b/harbour-fernschreiber.pro index 9cdc842..3e22d53 100644 --- a/harbour-fernschreiber.pro +++ b/harbour-fernschreiber.pro @@ -40,6 +40,8 @@ DISTFILES += qml/harbour-fernschreiber.qml \ qml/components/ImagePreview.qml \ qml/components/InReplyToRow.qml \ qml/components/LocationPreview.qml \ + qml/components/MessageListViewItem.qml \ + qml/components/MessageListViewItemSimple.qml \ qml/components/PollPreview.qml \ qml/components/StickerPicker.qml \ qml/components/PhotoTextsListItem.qml \ diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml new file mode 100644 index 0000000..caf33f6 --- /dev/null +++ b/qml/components/MessageListViewItem.qml @@ -0,0 +1,391 @@ +/* + Copyright (C) 2020 Sebastian J. Wolf and other contributors + + This file is part of Fernschreiber. + + Fernschreiber is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Fernschreiber is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Fernschreiber. If not, see . +*/ +import QtQuick 2.6 +import Sailfish.Silica 1.0 +import "../js/twemoji.js" as Emoji +import "../js/functions.js" as Functions + +ListItem { + id: messageListItem + contentHeight: messageBackground.height + Theme.paddingMedium + property variant myMessage: display + property variant userInformation: tdLibWrapper.getUserInformation(display.sender_user_id) + property Page page: chatPage + + property bool isOwnMessage: chatPage.myUserId === display.sender_user_id + property string extraContentComponentName: typeof display.content !== "undefined" + && chatView.contentComponentNames.hasOwnProperty(display.content['@type']) ? + chatView.contentComponentNames[display.content['@type']] : "" + menu: ContextMenu { + MenuItem { + onClicked: { + newMessageInReplyToRow.inReplyToMessage = display; + newMessageTextField.focus = true; + } + text: qsTr("Reply to Message") + } + MenuItem { + onClicked: { + newMessageColumn.editMessageId = display.id; + newMessageTextField.text = Functions.getMessageText(display, false, false); + newMessageTextField.focus = true; + } + text: qsTr("Edit Message") + visible: display.can_be_edited + } + MenuItem { + onClicked: { + Clipboard.text = Functions.getMessageText(display, true, false); + } + text: qsTr("Copy Message to Clipboard") + } + MenuItem { + onClicked: { + var chatId = chatInformation.id; + var messageId = display.id; + Remorse.itemAction(messageListItem, qsTr("Message deleted"), function() { tdLibWrapper.deleteMessages(chatId, [ messageId]); }) + } + text: qsTr("Delete Message") + visible: display.can_be_deleted_for_all_users || (display.can_be_deleted_only_for_self && display.chat_id === chatPage.myUserId) + } + } + + Connections { + target: chatModel + onUnreadCountUpdated: { + messageBackground.color = index > ( chatView.count - unreadCount - 1 ) ? Theme.secondaryHighlightColor : Theme.secondaryColor; + messageBackground.opacity = index > ( chatView.count - unreadCount - 1 ) ? 0.5 : 0.2; + } + onNewMessageReceived: { + messageBackground.color = index > ( chatView.count - chatInformation.unreadCount - 1 ) ? Theme.secondaryHighlightColor : Theme.secondaryColor; + messageBackground.opacity = index > ( chatView.count - chatInformation.unreadCount - 1 ) ? 0.5 : 0.2; + } + + onLastReadSentMessageUpdated: { + console.log("[ChatModel] Messages in this chat were read, new last read: " + lastReadSentIndex + ", updating description for index " + index + ", status: " + (index <= lastReadSentIndex)); + messageDateText.text = getMessageStatusText(display, index, lastReadSentIndex, messageDateText.useElapsed); + } + onMessageUpdated: { + if (index === modelIndex) { + console.log("[ChatModel] This message was updated, index " + index + ", updating content..."); + messageDateText.text = getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed); + messageText.text = Emoji.emojify(Functions.getMessageText(display, false, messageListItem.isOwnMessage), messageText.font.pixelSize); + if(locationPreviewLoader.active && locationPreviewLoader.status === Loader.Ready) { + locationPreviewLoader.item.locationData = display.content.location; + locationPreviewLoader.item.updatePicture() + } + } + } + } + + Connections { + target: tdLibWrapper + onReceivedMessage: { + if (messageId === display.reply_to_message_id.toString()) { + messageInReplyToRow.inReplyToMessage = message; + messageInReplyToRow.visible = true; + } + } + } + + Component.onCompleted: { + delegateComponentLoadingTimer.start(); + } + + Timer { + id: delegateComponentLoadingTimer + interval: 500 + repeat: false + running: false + onTriggered: { + if (typeof display.content !== "undefined") { + if (messageListItem.extraContentComponentName !== "") { + extraContentLoader.setSource( + "../components/" +messageListItem.extraContentComponentName +".qml", + { + messageListItem: messageListItem + }) + } else { + if (typeof display.content.web_page !== "undefined") { // only in messageText + webPagePreviewLoader.active = true; + } + } + } + } + } + + Row { + id: messageTextRow + spacing: Theme.paddingSmall + width: parent.width - ( 2 * Theme.horizontalPageMargin ) + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + Loader { + id: profileThumbnailLoader + active: (( chatPage.isBasicGroup || chatPage.isSuperGroup ) && !chatPage.isChannel) + asynchronous: true + width: active ? Theme.itemSizeSmall : 0 + height: active ? Theme.itemSizeSmall : 0 + anchors.bottom: parent.bottom + anchors.bottomMargin: Theme.paddingSmall + sourceComponent: Component { + ProfileThumbnail { + id: messagePictureThumbnail + photoData: (typeof messageListItem.userInformation.profile_photo !== "undefined") ? messageListItem.userInformation.profile_photo.small : "" + replacementStringHint: userText.text + width: visible ? Theme.itemSizeSmall : 0 + height: visible ? Theme.itemSizeSmall : 0 + visible: ( chatPage.isBasicGroup || chatPage.isSuperGroup ) && !chatPage.isChannel + MouseArea { + anchors.fill: parent + onClicked: { + tdLibWrapper.createPrivateChat(messageListItem.userInformation.id); + } + } + } + } + } + + Item { + id: messageTextItem + + width: parent.width - profileThumbnailLoader.width - Theme.paddingSmall + height: messageBackground.height + + Rectangle { + id: messageBackground + anchors { + left: parent.left + leftMargin: messageListItem.isOwnMessage ? 2 * Theme.horizontalPageMargin : 0 + right: parent.right + rightMargin: messageListItem.isOwnMessage ? 0 : 2 * Theme.horizontalPageMargin + verticalCenter: parent.verticalCenter + } + height: messageTextColumn.height + ( 2 * Theme.paddingMedium ) + + color: index > ( chatView.count - chatInformation.unread_count - 1 ) ? Theme.secondaryHighlightColor : Theme.secondaryColor + radius: parent.width / 50 + opacity: index > ( chatView.count - chatInformation.unread_count - 1 ) ? 0.5 : 0.2 + visible: appSettings.showStickersAsImages || display.content['@type'] !== "messageSticker" + Behavior on color { ColorAnimation { duration: 200 } } + Behavior on opacity { FadeAnimation {} } + } + + Column { + id: messageTextColumn + + spacing: Theme.paddingSmall + + width: messageBackground.width - Theme.horizontalPageMargin + anchors.centerIn: messageBackground + + Component.onCompleted: { + if (display.reply_to_message_id !== 0) { + tdLibWrapper.getMessage(chatInformation.id, display.reply_to_message_id); + } + } + + + Text { + id: userText + + width: parent.width + text: !messageListItem.isOwnMessage ? Emoji.emojify(Functions.getUserName(messageListItem.userInformation), font.pixelSize) : qsTr("You") + font.pixelSize: Theme.fontSizeExtraSmall + font.weight: Font.ExtraBold + color: messageListItem.isOwnMessage ? Theme.highlightColor : Theme.primaryColor + maximumLineCount: 1 + elide: Text.ElideRight + textFormat: Text.StyledText + horizontalAlignment: messageListItem.isOwnMessage ? Text.AlignRight : Text.AlignLeft + visible: ( chatPage.isBasicGroup || chatPage.isSuperGroup ) && !chatPage.isChannel + MouseArea { + anchors.fill: parent + onClicked: { + tdLibWrapper.createPrivateChat(messageListItem.userInformation.id); + } + } + } + + InReplyToRow { + id: messageInReplyToRow + myUserId: chatPage.myUserId + visible: false + } + + Loader { + id: forwardedInformationLoader + active: typeof display.forward_info !== "undefined" + asynchronous: true + width: parent.width + // height: active ? ( item ? item.height : Theme.itemSizeExtraSmall ) : 0 + sourceComponent: Component { + Row { + id: forwardedMessageInformationRow + spacing: Theme.paddingSmall + width: parent.width + + Component.onCompleted: { + if (display.forward_info.origin["@type"] === "messageForwardOriginChannel") { + var otherChatInformation = tdLibWrapper.getChat(display.forward_info.origin.chat_id); + forwardedThumbnail.photoData = (typeof otherChatInformation.photo !== "undefined") ? otherChatInformation.photo.small : ""; + forwardedChannelText.text = Emoji.emojify(otherChatInformation.title, Theme.fontSizeExtraSmall); + } else if (display.forward_info.origin["@type"] === "messageForwardOriginUser") { + var otherUserInformation = tdLibWrapper.getUserInformation(display.forward_info.origin.sender_user_id); + forwardedThumbnail.photoData = (typeof otherUserInformation.profile_photo !== "undefined") ? otherUserInformation.profile_photo.small : ""; + forwardedChannelText.text = Emoji.emojify(Functions.getUserName(otherUserInformation), Theme.fontSizeExtraSmall); + } else { + forwardedThumbnail.photoData = ""; + forwardedChannelText.text = Emoji.emojify(display.forward_info.origin.sender_user_name, Theme.fontSizeExtraSmall); + } + } + + ProfileThumbnail { + id: forwardedThumbnail + replacementStringHint: forwardedChannelText.text + width: Theme.itemSizeExtraSmall + height: Theme.itemSizeExtraSmall + } + + Column { + spacing: Theme.paddingSmall + width: parent.width + Text { + font.pixelSize: Theme.fontSizeExtraSmall + color: Theme.primaryColor + width: parent.width + font.italic: true + elide: Text.ElideRight + textFormat: Text.StyledText + text: qsTr("Forwarded Message") + onTruncatedChanged: { + // There is obviously a bug in QML in truncating text with images. + // We simply remove Emojis then... + if (truncated) { + text = text.replace(/\]+\/\>/g, ""); + } + } + } + Text { + id: forwardedChannelText + font.pixelSize: Theme.fontSizeExtraSmall + color: Theme.primaryColor + width: parent.width + font.bold: true + elide: Text.ElideRight + textFormat: Text.StyledText + text: Emoji.emojify(forwardedMessageInformationRow.otherChatInformation.title, font.pixelSize) + onTruncatedChanged: { + // There is obviously a bug in QML in truncating text with images. + // We simply remove Emojis then... + if (truncated) { + text = text.replace(/\]+\/\>/g, ""); + } + } + } + } + + + } + } + } + + Text { + id: messageText + width: parent.width + text: Emoji.emojify(Functions.getMessageText(display, false, messageListItem.isOwnMessage), font.pixelSize) + font.pixelSize: Theme.fontSizeSmall + color: messageListItem.isOwnMessage ? Theme.highlightColor : Theme.primaryColor + wrapMode: Text.Wrap + textFormat: Text.StyledText + onLinkActivated: { + Functions.handleLink(link); + } + horizontalAlignment: messageListItem.isOwnMessage ? Text.AlignRight : Text.AlignLeft + linkColor: Theme.highlightColor + visible: (text !== "") + } + + Loader { + id: webPagePreviewLoader + active: false + asynchronous: true + width: parent.width + height: typeof display.content.web_page !== "undefined" ? ( (parent.width * 2 / 3) + (6 * Theme.fontSizeExtraSmall) + ( 7 * Theme.paddingSmall) ) : 0 + + sourceComponent: Component { + id: webPagePreviewComponent + WebPagePreview { + id: webPagePreview + + onImplicitHeightChanged: { + webPagePreviewLoader.height = webPagePreview.implicitHeight; + } + + webPageData: display.content.web_page + width: parent.width + } + } + } + Loader { + id: extraContentLoader + width: parent.width + asynchronous: true + property int heightPreset: messageListItem.extraContentComponentName !== "" ? chatView.getContentComponentHeight(messageListItem.extraContentComponentName, display.content, width) : 0 + height: item ? item.height : heightPreset + } + + Timer { + id: messageDateUpdater + interval: 60000 + running: true + repeat: true + onTriggered: { + messageDateText.text = getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed); + } + } + + + Text { + width: parent.width + + property bool useElapsed: true + + id: messageDateText + font.pixelSize: Theme.fontSizeTiny + color: messageListItem.isOwnMessage ? Theme.secondaryHighlightColor : Theme.secondaryColor + horizontalAlignment: messageListItem.isOwnMessage ? Text.AlignRight : Text.AlignLeft + text: getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed) + MouseArea { + anchors.fill: parent + onClicked: { + messageDateText.useElapsed = !messageDateText.useElapsed; + messageDateText.text = getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed); + } + } + } + + } + + } + + } + +} diff --git a/qml/components/MessageListViewItemSimple.qml b/qml/components/MessageListViewItemSimple.qml new file mode 100644 index 0000000..5d86162 --- /dev/null +++ b/qml/components/MessageListViewItemSimple.qml @@ -0,0 +1,53 @@ +/* + Copyright (C) 2020 Sebastian J. Wolf and other contributors + + This file is part of Fernschreiber. + + Fernschreiber is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Fernschreiber is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Fernschreiber. If not, see . +*/ +import QtQuick 2.6 +import Sailfish.Silica 1.0 +import "../js/twemoji.js" as Emoji +import "../js/functions.js" as Functions + +Item { + id: messageListItem + property variant myMessage: display + property variant userInformation: tdLibWrapper.getUserInformation(myMessage.sender_user_id) + property bool isOwnMessage: chatPage.myUserId === myMessage.sender_user_id + height: backgroundRectangle.height + Theme.paddingMedium + + Rectangle { + id: backgroundRectangle + anchors.centerIn: parent + height: messageText.height + Theme.paddingMedium * 2 + width: Math.min(messageText.implicitWidth, messageText.contentWidth) + Theme.paddingMedium * 2 + color: Theme.rgba(Theme.secondaryColor, 0.1) + radius: parent.width / 50 + } + Text { + id: messageText + width: parent.width - Theme.paddingMedium * 4 - Theme.horizontalPageMargin * 2 + anchors.centerIn: parent + color: Theme.highlightColor + horizontalAlignment: Text.AlignHCenter + font.pixelSize: Theme.fontSizeExtraSmall + text: "" + (!messageListItem.isOwnMessage ? Emoji.emojify(Functions.getUserName(messageListItem.userInformation), font.pixelSize) : qsTr("You")) + " " + Emoji.emojify(Functions.getMessageText(messageListItem.myMessage, false, messageListItem.isOwnMessage), font.pixelSize) + textFormat: Text.RichText + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + onLinkActivated: { + Functions.handleLink(link); + } + } +} diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml index 41f7901..ca84b30 100644 --- a/qml/pages/ChatPage.qml +++ b/qml/pages/ChatPage.qml @@ -572,379 +572,19 @@ Page { } } - delegate: ListItem { - id: messageListItem - contentHeight: messageBackground.height + Theme.paddingMedium - contentWidth: parent.width - - property variant myMessage: display - property variant userInformation: tdLibWrapper.getUserInformation(display.sender_user_id) - property Page page: chatPage - - property bool isOwnMessage: chatPage.myUserId === display.sender_user_id - property string extraContentComponentName: typeof display.content !== "undefined" - && chatView.contentComponentNames.hasOwnProperty(display.content['@type']) ? - chatView.contentComponentNames[display.content['@type']] : "" - menu: ContextMenu { - MenuItem { - onClicked: { - newMessageInReplyToRow.inReplyToMessage = display; - newMessageTextField.focus = true; - } - text: qsTr("Reply to Message") - } - MenuItem { - onClicked: { - newMessageColumn.editMessageId = display.id; - newMessageTextField.text = Functions.getMessageText(display, false, false); - newMessageTextField.focus = true; - } - text: qsTr("Edit Message") - visible: display.can_be_edited - } - MenuItem { - onClicked: { - Clipboard.text = Functions.getMessageText(display, true, false); - } - text: qsTr("Copy Message to Clipboard") - } - MenuItem { - onClicked: { - var chatId = chatInformation.id; - var messageId = display.id; - Remorse.itemAction(messageListItem, qsTr("Message deleted"), function() { tdLibWrapper.deleteMessages(chatId, [ messageId]); }) - } - text: qsTr("Delete Message") - visible: display.can_be_deleted_for_all_users || (display.can_be_deleted_only_for_self && display.chat_id === chatPage.myUserId) - } + property var simpleDelegateMessages: ["messageBasicGroupChatCreate", "messageChatAddMembers", "messageChatChangePhoto", "messageChatChangeTitle", "messageChatDeleteMember", "messageChatDeletePhoto", "messageChatJoinByLink", "messageChatSetTtl", "messageChatUpgradeFrom", "messageChatUpgradeTo", "messageCustomServiceAction", "messagePinMessage", "messageScreenshotTaken", "messageSupergroupChatCreate", "messageUnsupported"] + delegate: Loader { + width: chatView.width + Component { + id: messageListViewItemComponent + MessageListViewItem {} } - - Connections { - target: chatModel - onUnreadCountUpdated: { - messageBackground.color = index > ( chatView.count - unreadCount - 1 ) ? Theme.secondaryHighlightColor : Theme.secondaryColor; - messageBackground.opacity = index > ( chatView.count - unreadCount - 1 ) ? 0.5 : 0.2; - } - onNewMessageReceived: { - messageBackground.color = index > ( chatView.count - chatInformation.unreadCount - 1 ) ? Theme.secondaryHighlightColor : Theme.secondaryColor; - messageBackground.opacity = index > ( chatView.count - chatInformation.unreadCount - 1 ) ? 0.5 : 0.2; - } - - onLastReadSentMessageUpdated: { - console.log("[ChatModel] Messages in this chat were read, new last read: " + lastReadSentIndex + ", updating description for index " + index + ", status: " + (index <= lastReadSentIndex)); - messageDateText.text = getMessageStatusText(display, index, lastReadSentIndex, messageDateText.useElapsed); - } - onMessageUpdated: { - if (index === modelIndex) { - console.log("[ChatModel] This message was updated, index " + index + ", updating content..."); - messageDateText.text = getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed); - messageText.text = Emoji.emojify(Functions.getMessageText(display, false, messageListItem.isOwnMessage), messageText.font.pixelSize); - if(locationPreviewLoader.active && locationPreviewLoader.status === Loader.Ready) { - locationPreviewLoader.item.locationData = display.content.location; - locationPreviewLoader.item.updatePicture() - } - } - } + Component { + id: messageListViewItemSimpleComponent + MessageListViewItemSimple {} } - - Connections { - target: tdLibWrapper - onReceivedMessage: { - if (messageId === display.reply_to_message_id.toString()) { - messageInReplyToRow.inReplyToMessage = message; - messageInReplyToRow.visible = true; - } - } - } - - Component.onCompleted: { - delegateComponentLoadingTimer.start(); - } - - Timer { - id: delegateComponentLoadingTimer - interval: 500 - repeat: false - running: false - onTriggered: { - if (typeof display.content !== "undefined") { - if (messageListItem.extraContentComponentName !== "") { - extraContentLoader.setSource( - "../components/" +messageListItem.extraContentComponentName +".qml", - { - messageListItem: messageListItem - }) - } else { - if (typeof display.content.web_page !== "undefined") { // only in messageText - webPagePreviewLoader.active = true; - } - } - } - } - } - - - Row { - id: messageTextRow - spacing: Theme.paddingSmall - width: parent.width - ( 2 * Theme.horizontalPageMargin ) - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - - Loader { - id: profileThumbnailLoader - active: (( chatPage.isBasicGroup || chatPage.isSuperGroup ) && !chatPage.isChannel) - asynchronous: true - width: active ? Theme.itemSizeSmall : 0 - height: active ? Theme.itemSizeSmall : 0 - anchors.bottom: parent.bottom - anchors.bottomMargin: Theme.paddingSmall - sourceComponent: Component { - ProfileThumbnail { - id: messagePictureThumbnail - photoData: (typeof messageListItem.userInformation.profile_photo !== "undefined") ? messageListItem.userInformation.profile_photo.small : "" - replacementStringHint: userText.text - width: visible ? Theme.itemSizeSmall : 0 - height: visible ? Theme.itemSizeSmall : 0 - visible: ( chatPage.isBasicGroup || chatPage.isSuperGroup ) && !chatPage.isChannel - MouseArea { - anchors.fill: parent - onClicked: { - tdLibWrapper.createPrivateChat(messageListItem.userInformation.id); - } - } - } - } - } - - Item { - id: messageTextItem - - width: parent.width - profileThumbnailLoader.width - Theme.paddingSmall - height: messageBackground.height - - Rectangle { - id: messageBackground - anchors { - left: parent.left - leftMargin: messageListItem.isOwnMessage ? 2 * Theme.horizontalPageMargin : 0 - right: parent.right - rightMargin: messageListItem.isOwnMessage ? 0 : 2 * Theme.horizontalPageMargin - verticalCenter: parent.verticalCenter - } - height: messageTextColumn.height + ( 2 * Theme.paddingMedium ) - - color: index > ( chatView.count - chatInformation.unread_count - 1 ) ? Theme.secondaryHighlightColor : Theme.secondaryColor - Behavior on color { ColorAnimation { duration: 200 } } - Behavior on opacity { FadeAnimation {} } - radius: parent.width / 50 - opacity: index > ( chatView.count - chatInformation.unread_count - 1 ) ? 0.5 : 0.2 - visible: appSettings.showStickersAsImages || display.content['@type'] !== "messageSticker" - } - - Column { - id: messageTextColumn - - spacing: Theme.paddingSmall - - width: messageBackground.width - Theme.horizontalPageMargin - anchors.centerIn: messageBackground - - Component.onCompleted: { - if (display.reply_to_message_id !== 0) { - tdLibWrapper.getMessage(chatInformation.id, display.reply_to_message_id); - } - } - - - Text { - id: userText - - width: parent.width - text: !messageListItem.isOwnMessage ? Emoji.emojify(Functions.getUserName(messageListItem.userInformation), font.pixelSize) : qsTr("You") - font.pixelSize: Theme.fontSizeExtraSmall - font.weight: Font.ExtraBold - color: messageListItem.isOwnMessage ? Theme.highlightColor : Theme.primaryColor - maximumLineCount: 1 - elide: Text.ElideRight - textFormat: Text.StyledText - horizontalAlignment: messageListItem.isOwnMessage ? Text.AlignRight : Text.AlignLeft - visible: ( chatPage.isBasicGroup || chatPage.isSuperGroup ) && !chatPage.isChannel - MouseArea { - anchors.fill: parent - onClicked: { - tdLibWrapper.createPrivateChat(messageListItem.userInformation.id); - } - } - } - - InReplyToRow { - id: messageInReplyToRow - myUserId: chatPage.myUserId - visible: false - } - - Loader { - id: forwardedInformationLoader - active: typeof display.forward_info !== "undefined" - asynchronous: true - width: parent.width -// height: active ? ( item ? item.height : Theme.itemSizeExtraSmall ) : 0 - sourceComponent: Component { - Row { - id: forwardedMessageInformationRow - spacing: Theme.paddingSmall - width: parent.width - - Component.onCompleted: { - if (display.forward_info.origin["@type"] === "messageForwardOriginChannel") { - var otherChatInformation = tdLibWrapper.getChat(display.forward_info.origin.chat_id); - forwardedThumbnail.photoData = (typeof otherChatInformation.photo !== "undefined") ? otherChatInformation.photo.small : ""; - forwardedChannelText.text = Emoji.emojify(otherChatInformation.title, Theme.fontSizeExtraSmall); - } else if (display.forward_info.origin["@type"] === "messageForwardOriginUser") { - var otherUserInformation = tdLibWrapper.getUserInformation(display.forward_info.origin.sender_user_id); - forwardedThumbnail.photoData = (typeof otherUserInformation.profile_photo !== "undefined") ? otherUserInformation.profile_photo.small : ""; - forwardedChannelText.text = Emoji.emojify(Functions.getUserName(otherUserInformation), Theme.fontSizeExtraSmall); - } else { - forwardedThumbnail.photoData = ""; - forwardedChannelText.text = Emoji.emojify(display.forward_info.origin.sender_user_name, Theme.fontSizeExtraSmall); - } - } - - ProfileThumbnail { - id: forwardedThumbnail - replacementStringHint: forwardedChannelText.text - width: Theme.itemSizeExtraSmall - height: Theme.itemSizeExtraSmall - } - - Column { - spacing: Theme.paddingSmall - width: parent.width - Text { - font.pixelSize: Theme.fontSizeExtraSmall - color: Theme.primaryColor - width: parent.width - font.italic: true - elide: Text.ElideRight - textFormat: Text.StyledText - text: qsTr("Forwarded Message") - onTruncatedChanged: { - // There is obviously a bug in QML in truncating text with images. - // We simply remove Emojis then... - if (truncated) { - text = text.replace(/\]+\/\>/g, ""); - } - } - } - Text { - id: forwardedChannelText - font.pixelSize: Theme.fontSizeExtraSmall - color: Theme.primaryColor - width: parent.width - font.bold: true - elide: Text.ElideRight - textFormat: Text.StyledText - text: Emoji.emojify(forwardedMessageInformationRow.otherChatInformation.title, font.pixelSize) - onTruncatedChanged: { - // There is obviously a bug in QML in truncating text with images. - // We simply remove Emojis then... - if (truncated) { - text = text.replace(/\]+\/\>/g, ""); - } - } - } - } - - - } - } - } - - Text { - id: messageText - - width: parent.width - text: Emoji.emojify(Functions.getMessageText(display, false, messageListItem.isOwnMessage), font.pixelSize) - font.pixelSize: Theme.fontSizeSmall - color: messageListItem.isOwnMessage ? Theme.highlightColor : Theme.primaryColor - wrapMode: Text.Wrap - textFormat: Text.StyledText - onLinkActivated: { - Functions.handleLink(link); - } - horizontalAlignment: messageListItem.isOwnMessage ? Text.AlignRight : Text.AlignLeft - linkColor: Theme.highlightColor - visible: (text !== "") - } - - Loader { - id: webPagePreviewLoader - active: false - asynchronous: true - width: parent.width - height: typeof display.content.web_page !== "undefined" ? ( (parent.width * 2 / 3) + (6 * Theme.fontSizeExtraSmall) + ( 7 * Theme.paddingSmall) ) : 0 - - sourceComponent: Component { - id: webPagePreviewComponent - WebPagePreview { - id: webPagePreview - - onImplicitHeightChanged: { - webPagePreviewLoader.height = webPagePreview.implicitHeight; - } - - webPageData: display.content.web_page - width: parent.width - } - } - } - Loader { - id: extraContentLoader - width: parent.width - asynchronous: true - property int heightPreset: messageListItem.extraContentComponentName !== "" ? chatView.getContentComponentHeight(messageListItem.extraContentComponentName, display.content, width) : 0 - height: item ? item.height : heightPreset - } - - Timer { - id: messageDateUpdater - interval: 60000 - running: true - repeat: true - onTriggered: { - messageDateText.text = getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed); - } - } - - - Text { - width: parent.width - - property bool useElapsed: true - - id: messageDateText - font.pixelSize: Theme.fontSizeTiny - color: messageListItem.isOwnMessage ? Theme.secondaryHighlightColor : Theme.secondaryColor - horizontalAlignment: messageListItem.isOwnMessage ? Text.AlignRight : Text.AlignLeft - text: getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed) - MouseArea { - anchors.fill: parent - onClicked: { - messageDateText.useElapsed = !messageDateText.useElapsed; - messageDateText.text = getMessageStatusText(display, index, chatView.lastReadSentIndex, messageDateText.useElapsed); - } - } - } - - } - - } - - } - + sourceComponent: chatView.simpleDelegateMessages.indexOf(display.content['@type']) > -1 ? messageListViewItemSimpleComponent : messageListViewItemComponent } - VerticalScrollDecorator {} ViewPlaceholder { From 7d28f72e98abb97c11ca3c13e2184c277692766d Mon Sep 17 00:00:00 2001 From: John Gibbon Date: Thu, 5 Nov 2020 14:06:41 +0100 Subject: [PATCH 2/2] add some message type descriptions --- qml/js/functions.js | 38 ++- src/fernschreiberutils.cpp | 36 ++- translations/harbour-fernschreiber-de.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-es.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-fi.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-hu.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-it.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-pl.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-ru.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-sv.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber-zh_CN.ts | 270 +++++++++++++++++--- translations/harbour-fernschreiber.ts | 270 +++++++++++++++++--- 12 files changed, 2451 insertions(+), 323 deletions(-) diff --git a/qml/js/functions.js b/qml/js/functions.js index 681825b..30a5b59 100644 --- a/qml/js/functions.js +++ b/qml/js/functions.js @@ -109,9 +109,43 @@ function getMessageText(message, simple, myself) { } return simple ? (myself ? qsTr("sent a poll", "myself") : qsTr("sent a poll")) : ("" + qsTr("Poll") + ""); } - return qsTr("Unsupported message: %1").arg(message.content['@type'].substring(7)); -} + if (message.content['@type'] === 'messageBasicGroupChatCreate' || message.content['@type'] === 'messageSupergroupChatCreate') { + return myself ? qsTr("created this group", "myself") : qsTr("created this group"); + } + if (message.content['@type'] === 'messageChatChangePhoto') { + return myself ? qsTr("changed the chat photo", "myself") : qsTr("changed the chat photo"); + } + if (message.content['@type'] === 'messageChatDeletePhoto') { + return myself ? qsTr("deleted the chat photo", "myself") : qsTr("deleted the chat photo"); + } + if (message.content['@type'] === 'messageChatSetTtl') { + return myself ? qsTr("changed the secret chat TTL setting", "myself; TTL = Time To Live") : qsTr("changed the secret chat TTL setting", "TTL = Time To Live"); + } + if (message.content['@type'] === 'messageChatUpgradeFrom' || message.content['@type'] === 'messageChatUpgradeTo' ) { + return myself ? qsTr("upgraded this group to a supergroup", "myself") : qsTr("upgraded this group to a supergroup"); + } + if (message.content['@type'] === 'messageCustomServiceAction') { + return message.content.text; + } + if (message.content['@type'] === 'messagePinMessage') { + return myself ? qsTr("changed the pinned message", "myself") : qsTr("changed the pinned message"); + } + if (message.content['@type'] === 'messageExpiredPhoto') { + return myself ? qsTr("sent a self-destructing photo that is expired", "myself") : qsTr("sent a self-destructing photo that is expired"); + } + if (message.content['@type'] === 'messageExpiredVideo') { + return myself ? qsTr("sent a self-destructing video that is expired", "myself") : qsTr("sent a self-destructing video that is expired"); + } + if (message.content['@type'] === 'messageScreenshotTaken') { + return myself ? qsTr("created a screenshot in this chat", "myself") : qsTr("created a screenshot in this chat"); + } + if (message.content['@type'] === 'messageUnsupported') { + return myself ? qsTr("sent an unsupported message", "myself") : qsTr("sent an unsupported message"); + } + + return myself ? qsTr("sent an unsupported message: %1", "myself; %1 is message type").arg(message.content['@type'].substring(7)) : qsTr("sent an unsupported message: %1", "%1 is message type").arg(message.content['@type'].substring(7)); +} function getChatPartnerStatusText(statusType, was_online) { switch(statusType) { case "userStatusEmpty": diff --git a/src/fernschreiberutils.cpp b/src/fernschreiberutils.cpp index 99c05e6..26a7e93 100644 --- a/src/fernschreiberutils.cpp +++ b/src/fernschreiberutils.cpp @@ -60,5 +60,39 @@ QString FernschreiberUtils::getMessageShortText(const QVariantMap &messageConten } return myself ? tr("sent a poll", "myself") : tr("sent a poll"); } - return tr("Unsupported message: %1").arg(contentType.mid(7)); + if (contentType == "messageBasicGroupChatCreate" || contentType == "messageSupergroupChatCreate") { + return myself ? tr("created this group", "myself") : tr("created this group"); + } + if (contentType == "messageChatChangePhoto") { + return myself ? tr("changed the chat photo", "myself") : tr("changed the chat photo"); + } + if (contentType == "messageChatDeletePhoto") { + return myself ? tr("deleted the chat photo", "myself") : tr("deleted the chat photo"); + } + if (contentType == "messageChatSetTtl") { + return myself ? tr("changed the secret chat TTL setting", "myself") : tr("changed the secret chat TTL setting"); + } + if (contentType == "messageChatUpgradeFrom" || contentType == "messageChatUpgradeTo") { + return myself ? tr("upgraded this group to a supergroup", "myself") : tr("upgraded this group to a supergroup"); + } + if (contentType == "messageCustomServiceAction") { + return messageContent.value("text").toString(); + } + if (contentType == "messagePinMessage") { + return myself ? tr("changed the pinned message", "myself") : tr("changed the pinned message"); + } + if (contentType == "messageExpiredPhoto") { + return myself ? tr("sent a self-destructing photo that is expired", "myself") : tr("sent a self-destructing photo that is expired"); + } + if (contentType == "messageExpiredVideo") { + return myself ? tr("sent a self-destructing video that is expired", "myself") : tr("sent a self-destructing video that is expired"); + } + if (contentType == "messageScreenshotTaken") { + return myself ? tr("created a screenshot in this chat", "myself") : tr("created a screenshot in this chat"); + } + if (contentType == "messageUnsupported") { + return myself ? tr("sent an unsupported message", "myself") : tr("sent an unsupported message"); + } + + return myself ? tr("sent an unsupported message: %1", "myself").arg(contentType.mid(7)) : tr("sent an unsupported message: %1").arg(contentType.mid(7)); } diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts index 7aebd6d..f90ac96 100644 --- a/translations/harbour-fernschreiber-de.ts +++ b/translations/harbour-fernschreiber-de.ts @@ -257,14 +257,6 @@ %1 subscribers %1 Abonnenten - - Reply to Message - Auf Nachricht antworten - - - You - Sie - Loading messages... Lade Nachrichten... @@ -281,34 +273,18 @@ Edit Message Nachricht bearbeiten - - Copy Message to Clipboard - Nachricht in die Zwischenablage kopieren - edited bearbeitet - - Delete Message - Nachricht löschen - Uploading... Lade hoch... - - Forwarded Message - Weitergeleitete Nachricht - This chat is empty. Dieser Chat ist leer. - - Message deleted - Nachricht gelöscht - CoverPage @@ -519,10 +495,6 @@ left this chat hat diesen Chat verlassen - - Unsupported message: %1 - Nicht unterstützte Nachricht: %1 - Sticker: %1 Sticker: %1 @@ -568,6 +540,105 @@ sent a quiz hat ein Quiz geschickt + + created this group + myself + haben diese Gruppe erstellt + + + created this group + hat diese Gruppe erstellt + + + changed the chat photo + myself + haben das Chatbild geändert + + + changed the chat photo + hat das Chatbild geändert + + + deleted the chat photo + myself + haben das Chatbild gelöscht + + + deleted the chat photo + hat das Chatbild gelöscht + + + changed the secret chat TTL setting + myself + haben die TTL-Einstellung des geheimen Chats geändert + + + changed the secret chat TTL setting + hat die TTL-Einstellung des geheimen Chats geändert + + + upgraded this group to a supergroup + myself + haben die Gruppe zu einer Supergruppe erweitert + + + changed the pinned message + myself + haben die angeheftete Nachricht geändert + + + changed the pinned message + hat die angeheftete Nachricht geändert + + + created a screenshot in this chat + myself + haben ein Bildschirmfoto dieses Chats erstellt + + + created a screenshot in this chat + hat ein Bildschirmfoto dieses Chats erstellt + + + sent an unsupported message + myself + haben eine nicht unterstützte Nachricht gesendet + + + sent an unsupported message + hat eine nicht unterstützte Nachricht gesendet + + + sent an unsupported message: %1 + hat eine nicht unterstützte Nachricht geschickt: %1 + + + upgraded this group to a supergroup + hat die Gruppe zu einer Supergruppe erweitert + + + sent a self-destructing photo that is expired + myself + haben ein selbstzerstörendes Bild gesendet, das abgelaufen ist + + + sent a self-destructing video that is expired + myself + haben ein selbstzerstörendes Video gesendet, das abgelaufen ist + + + sent a self-destructing video that is expired + haben ein selbstzerstörendes Video gesendet, das abgelaufen ist + + + sent an unsupported message: %1 + myself + haben eine nicht unterstützte Nachricht geschickt: %1 + + + sent a self-destructing photo that is expired + hat ein selbstzerstörendes Bild gesendet, das abgelaufen ist + ImagePage @@ -661,6 +732,44 @@ Installieren Sie Pure Maps, um diesen Ort zu erkunden. + + MessageListViewItem + + Reply to Message + Auf Nachricht antworten + + + Edit Message + Nachricht bearbeiten + + + Copy Message to Clipboard + Nachricht in die Zwischenablage kopieren + + + Message deleted + Nachricht gelöscht + + + Delete Message + Nachricht löschen + + + You + Sie + + + Forwarded Message + Weitergeleitete Nachricht + + + + MessageListViewItemSimple + + You + Sie + + NotificationManager @@ -990,10 +1099,6 @@ Animation: %1 Animation: %1 - - Unsupported message: %1 - Nicht unterstützte Nachricht: %1 - Document: %1 Dokument: %1 @@ -1214,5 +1319,106 @@ Poll Umfrage + + created this group + myself + haben diese Gruppe erstellt + + + created this group + hat diese Gruppe erstellt + + + changed the chat photo + myself + haben das Chatbild geändert + + + changed the chat photo + hat das Chatbild geändert + + + deleted the chat photo + myself + haben das Chatbild gelöscht + + + deleted the chat photo + hat das Chatbild gelöscht + + + changed the secret chat TTL setting + myself; TTL = Time To Live + haben die TTL-Einstellung des geheimen Chats geändert + + + changed the secret chat TTL setting + TTL = Time To Live + hat die TTL-Einstellung des geheimen Chats geändert + + + upgraded this group to a supergroup + myself + haben die Gruppe zu einer Supergruppe erweitert + + + changed the pinned message + myself + haben die angeheftete Nachricht geändert + + + changed the pinned message + hat die angeheftete Nachricht geändert + + + created a screenshot in this chat + myself + haben ein Bildschirmfoto dieses Chats erstellt + + + created a screenshot in this chat + hat ein Bildschirmfoto dieses Chats erstellt + + + sent an unsupported message + myself + haben eine nicht unterstützte Nachricht geschickt + + + sent an unsupported message + hat eine nicht unterstützte Nachricht geschickt + + + sent an unsupported message: %1 + myself; %1 is message type + haben eine nicht unterstützte Nachricht geschickt: %1 + + + sent an unsupported message: %1 + %1 is message type + hat eine nicht unterstützte Nachricht geschickt: %1 + + + upgraded this group to a supergroup + hat die Gruppe zu einer Supergruppe erweitert + + + sent a self-destructing photo that is expired + myself + haben ein selbstzerstörendes Bild gesendet, das abgelaufen ist + + + sent a self-destructing photo that is expired + hat ein selbstzerstörendes Bild gesendet, das abgelaufen ist + + + sent a self-destructing video that is expired + myself + haben ein selbstzerstörendes Video gesendet, das abgelaufen ist + + + sent a self-destructing video that is expired + hat ein selbstzerstörendes Bild gesendet, das abgelaufen ist + diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts index ac5d8f9..a29fdb0 100644 --- a/translations/harbour-fernschreiber-es.ts +++ b/translations/harbour-fernschreiber-es.ts @@ -257,14 +257,6 @@ %1 subscribers %1 suscriptores - - Reply to Message - Responder - - - You - usted - Loading messages... Cargando mensajes... @@ -285,30 +277,14 @@ edited editado - - Delete Message - Borrar - Uploading... Subiendo... - - Forwarded Message - Mensaje reenviado - This chat is empty. Esta charla está vacía. - - Message deleted - Mensaje borrado - - - Copy Message to Clipboard - Copiar mensaje - CoverPage @@ -519,10 +495,6 @@ left this chat dejó esta charla - - Unsupported message: %1 - Mensaje no soportado: %1 - Sticker: %1 Pegatina: %1 @@ -568,6 +540,105 @@ sent a quiz envió un cuestionario + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ Instalar Pure Maps para inspeccionar esta ubicación. + + MessageListViewItem + + Reply to Message + Responder + + + Edit Message + Editar + + + Copy Message to Clipboard + Copiar mensaje + + + Message deleted + Mensaje borrado + + + Delete Message + Borrar + + + You + Usted + + + Forwarded Message + Mensaje reenviado + + + + MessageListViewItemSimple + + You + Usted + + NotificationManager @@ -984,10 +1093,6 @@ Animation: %1 Animación: %1 - - Unsupported message: %1 - Mensaje no soportado: %1 - Document: %1 Documento: %1 @@ -1208,5 +1313,106 @@ Poll Encuesta + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts index d18dc12..ba5be31 100644 --- a/translations/harbour-fernschreiber-fi.ts +++ b/translations/harbour-fernschreiber-fi.ts @@ -257,14 +257,6 @@ %1 subscribers %1 tilaajaa - - Reply to Message - Vastaa viestiin - - - You - Sinä - Loading messages... Ladataan viestejä... @@ -285,30 +277,14 @@ edited muokattu - - Delete Message - Poista viesti - Uploading... Lähetetään... - - Forwarded Message - Välitetty viesti - This chat is empty. Tämä keskustelu on tyhjä. - - Message deleted - - - - Copy Message to Clipboard - - CoverPage @@ -538,10 +514,6 @@ left this chat poistui keskustelusta - - Unsupported message: %1 - Viestityyppiä ei tueta: %1 - changed the chat title myself @@ -569,6 +541,105 @@ sent a quiz + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -662,6 +733,44 @@ Asenna Pure Maps tarkastellaksesi sijaintia. + + MessageListViewItem + + Reply to Message + Vastaa viestiin + + + Edit Message + Muokkaa viestiä + + + Copy Message to Clipboard + + + + Message deleted + + + + Delete Message + Poista viesti + + + You + Sinä + + + Forwarded Message + Välitetty viesti + + + + MessageListViewItemSimple + + You + Sinä + + NotificationManager @@ -991,10 +1100,6 @@ Animation: %1 Animaatio: %1 - - Unsupported message: %1 - Viestityyppiä ei tueta: %1 - Document: %1 Dokumentti: %1 @@ -1215,5 +1320,106 @@ Poll + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts index 4c81b7f..b38cea6 100644 --- a/translations/harbour-fernschreiber-hu.ts +++ b/translations/harbour-fernschreiber-hu.ts @@ -257,14 +257,6 @@ %1 subscribers %1 feliratkozott - - Reply to Message - Válasz az üzenetre - - - You - Te - Loading messages... Üzenetek betöltése... @@ -285,30 +277,14 @@ edited Szerkesztett - - Delete Message - Üzenet törlése - Uploading... - - Forwarded Message - - This chat is empty. - - Message deleted - - - - Copy Message to Clipboard - - CoverPage @@ -519,10 +495,6 @@ left this chat kilépett a csevegésből - - Unsupported message: %1 - Nem támogatott üzenet: %1 - Sticker: %1 Matrica: %1 @@ -568,6 +540,105 @@ sent a quiz + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ + + MessageListViewItem + + Reply to Message + Válasz az üzenetre + + + Edit Message + Üzenet szerkesztése + + + Copy Message to Clipboard + + + + Message deleted + + + + Delete Message + Üzenet törlése + + + You + Te + + + Forwarded Message + + + + + MessageListViewItemSimple + + You + Te + + NotificationManager @@ -984,10 +1093,6 @@ Animation: %1 Animáció: %1 - - Unsupported message: %1 - Nem támogatott üzenet: %1 - Document: %1 Dokument: %1 @@ -1208,5 +1313,106 @@ Poll + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts index 22e660f..2d38521 100644 --- a/translations/harbour-fernschreiber-it.ts +++ b/translations/harbour-fernschreiber-it.ts @@ -257,14 +257,6 @@ %1 subscribers %1 abbonati - - Reply to Message - Rispondi al messaggio - - - You - Tu - Unmute Chat Riattiva suoni chat @@ -281,14 +273,6 @@ edited modificato - - Delete Message - Cancella messaggio - - - Forwarded Message - Messaggio inoltrato - This chat is empty. Questa chat è vuota. @@ -301,14 +285,6 @@ Uploading... Carica... - - Message deleted - Messaggio cancellato - - - Copy Message to Clipboard - Copia messaggio nella clipboard - CoverPage @@ -519,10 +495,6 @@ left this chat ha lasciato questa chat - - Unsupported message: %1 - Messaggio non supportato: %1 - Sticker: %1 Sticker: %1 @@ -568,6 +540,105 @@ sent a quiz ha inviato un quiz + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ Installa Pure Maps per conoscere questo luogo. + + MessageListViewItem + + Reply to Message + Rispondi al messaggio + + + Edit Message + Modifica messaggio + + + Copy Message to Clipboard + Copia messaggio nella clipboard + + + Message deleted + Messaggio cancellato + + + Delete Message + Cancella messaggio + + + You + Tu + + + Forwarded Message + Messaggio inoltrato + + + + MessageListViewItemSimple + + You + Tu + + NotificationManager @@ -990,10 +1099,6 @@ Animation: %1 Animazione: %1 - - Unsupported message: %1 - Messaggio non supportato: %1 - Document: %1 Documento: %1 @@ -1214,5 +1319,106 @@ Poll Sondaggio + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts index 0ffe8c4..54337f9 100644 --- a/translations/harbour-fernschreiber-pl.ts +++ b/translations/harbour-fernschreiber-pl.ts @@ -257,14 +257,6 @@ %1 subscribers %1 subskrybentów - - Reply to Message - Odpowiedz na wiadomość - - - You - Ty - Loading messages... Ładowanie wiadomości... @@ -285,30 +277,14 @@ edited edytowana - - Delete Message - Usuń wiadomość - Uploading... - - Forwarded Message - - This chat is empty. - - Message deleted - - - - Copy Message to Clipboard - - CoverPage @@ -519,10 +495,6 @@ left this chat opuścił ten czat - - Unsupported message: %1 - Nieobsługiwana wiadomość: %1 - Sticker: %1 Naklejka: %1 @@ -568,6 +540,105 @@ sent a quiz + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ Zainstaluj Pure Maps, aby sprawdzić tę lokalizację. + + MessageListViewItem + + Reply to Message + Odpowiedz na wiadomość + + + Edit Message + Edytuj widomość + + + Copy Message to Clipboard + + + + Message deleted + + + + Delete Message + Usuń wiadomość + + + You + Ty + + + Forwarded Message + + + + + MessageListViewItemSimple + + You + Ty + + NotificationManager @@ -996,10 +1105,6 @@ Animation: %1 Animacja: %1 - - Unsupported message: %1 - Nieobsługiwana wiadomość: %1 - Document: %1 Dokument: %1 @@ -1220,5 +1325,106 @@ Poll + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts index 9985b86..375e63f 100644 --- a/translations/harbour-fernschreiber-ru.ts +++ b/translations/harbour-fernschreiber-ru.ts @@ -257,14 +257,6 @@ %1 subscribers %1 подписчиков - - Reply to Message - Ответить - - - You - Вы - Loading messages... Загрузка сообщений... @@ -285,30 +277,14 @@ edited изменено - - Delete Message - Удалить - Uploading... Отправка... - - Forwarded Message - Пересланное сообщение - This chat is empty. - - Message deleted - - - - Copy Message to Clipboard - - CoverPage @@ -519,10 +495,6 @@ left this chat покунул(а) чат - - Unsupported message: %1 - Не поддерживается: %1 - Sticker: %1 Стикер: %1 @@ -568,6 +540,105 @@ sent a quiz + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ Для просмотра карты, установите Pure Maps. + + MessageListViewItem + + Reply to Message + Ответить + + + Edit Message + Редактировать + + + Copy Message to Clipboard + + + + Message deleted + + + + Delete Message + Удалить + + + You + Вы + + + Forwarded Message + Пересланное сообщение + + + + MessageListViewItemSimple + + You + Вы + + NotificationManager @@ -996,10 +1105,6 @@ Animation: %1 Анимация: %1 - - Unsupported message: %1 - Не поддерживается: %1 - Document: %1 Документ: %1 @@ -1220,5 +1325,106 @@ Poll + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts index 5ed63b3..8fedd0a 100644 --- a/translations/harbour-fernschreiber-sv.ts +++ b/translations/harbour-fernschreiber-sv.ts @@ -257,14 +257,6 @@ %1 subscribers %1 prenumerant(er) - - Reply to Message - Svara på meddelandet - - - You - Du - Loading messages... Läser in meddelanden... @@ -285,30 +277,14 @@ edited redigerade - - Delete Message - Ta bort meddelandet - Uploading... Ladda upp... - - Forwarded Message - Vidarebefordrat meddelande - This chat is empty. Denna chatt är tom. - - Message deleted - - - - Copy Message to Clipboard - - CoverPage @@ -519,10 +495,6 @@ left this chat lämnade denna chatt - - Unsupported message: %1 - Mededelande som inte stöds: %1 - Sticker: %1 Dekal: %1 @@ -568,6 +540,105 @@ sent a poll skickade en omröstning + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ Installera Pure Maps för att inspektera den här platsen. + + MessageListViewItem + + Reply to Message + Svara på meddelandet + + + Edit Message + Redigera meddelandet + + + Copy Message to Clipboard + + + + Message deleted + + + + Delete Message + Ta bort meddelandet + + + You + Du + + + Forwarded Message + Vidarebefordrat meddelande + + + + MessageListViewItemSimple + + You + Du + + NotificationManager @@ -990,10 +1099,6 @@ Animation: %1 Animering: %1 - - Unsupported message: %1 - Meeddelande som inte stöds: %1 - Document: %1 Dokument: %1 @@ -1214,5 +1319,106 @@ Poll + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts index 5325eb2..0da104e 100644 --- a/translations/harbour-fernschreiber-zh_CN.ts +++ b/translations/harbour-fernschreiber-zh_CN.ts @@ -257,14 +257,6 @@ %1 subscribers %1 位订阅者 - - Reply to Message - 回复该消息 - - - You - - Loading messages... 正在加载消息… @@ -285,30 +277,14 @@ edited 已编辑 - - Delete Message - 删除消息 - Uploading... 正在上传… - - Forwarded Message - 转发消息 - This chat is empty. - - Message deleted - - - - Copy Message to Clipboard - - CoverPage @@ -519,10 +495,6 @@ left this chat 离开此对话 - - Unsupported message: %1 - 未读消息: %1 - Sticker: %1 表情贴图: %1 @@ -568,6 +540,105 @@ sent a quiz + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ 安装 Pure Maps 以插入位置 + + MessageListViewItem + + Reply to Message + 回复该消息 + + + Edit Message + 编辑消息 + + + Copy Message to Clipboard + + + + Message deleted + + + + Delete Message + 删除消息 + + + You + + + + Forwarded Message + 转发消息 + + + + MessageListViewItemSimple + + You + + + NotificationManager @@ -984,10 +1093,6 @@ Animation: %1 动画: %1 - - Unsupported message: %1 - 未读消息: %1 - Document: %1 文档: %1 @@ -1208,5 +1313,106 @@ Poll + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts index 8f38b08..0668c88 100644 --- a/translations/harbour-fernschreiber.ts +++ b/translations/harbour-fernschreiber.ts @@ -257,14 +257,6 @@ %1 subscribers - - Reply to Message - - - - You - - Loading messages... @@ -285,30 +277,14 @@ edited - - Delete Message - - Uploading... - - Forwarded Message - - This chat is empty. - - Message deleted - - - - Copy Message to Clipboard - - CoverPage @@ -519,10 +495,6 @@ left this chat - - Unsupported message: %1 - - Sticker: %1 @@ -568,6 +540,105 @@ sent a quiz + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself + + + + changed the secret chat TTL setting + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + + + + sent an unsupported message: %1 + myself + + + + sent a self-destructing photo that is expired + + ImagePage @@ -661,6 +732,44 @@ + + MessageListViewItem + + Reply to Message + + + + Edit Message + + + + Copy Message to Clipboard + + + + Message deleted + + + + Delete Message + + + + You + + + + Forwarded Message + + + + + MessageListViewItemSimple + + You + + + NotificationManager @@ -984,10 +1093,6 @@ Animation: %1 - - Unsupported message: %1 - - Document: %1 @@ -1208,5 +1313,106 @@ Poll + + created this group + myself + + + + created this group + + + + changed the chat photo + myself + + + + changed the chat photo + + + + deleted the chat photo + myself + + + + deleted the chat photo + + + + changed the secret chat TTL setting + myself; TTL = Time To Live + + + + changed the secret chat TTL setting + TTL = Time To Live + + + + upgraded this group to a supergroup + myself + + + + changed the pinned message + myself + + + + changed the pinned message + + + + created a screenshot in this chat + myself + + + + created a screenshot in this chat + + + + sent an unsupported message + myself + + + + sent an unsupported message + + + + sent an unsupported message: %1 + myself; %1 is message type + + + + sent an unsupported message: %1 + %1 is message type + + + + upgraded this group to a supergroup + + + + sent a self-destructing photo that is expired + myself + + + + sent a self-destructing photo that is expired + + + + sent a self-destructing video that is expired + myself + + + + sent a self-destructing video that is expired + +