From d45eb28daaf7e5a1e2284bc539a07e262379dc2b Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Thu, 29 Oct 2020 22:39:43 +0100 Subject: [PATCH] Minor changes to poll display & translation adjustments --- qml/components/PollPreview.qml | 2 + qml/js/functions.js | 14 +-- translations/harbour-fernschreiber-it.ts | 106 +++++++++++------------ 3 files changed, 62 insertions(+), 60 deletions(-) diff --git a/qml/components/PollPreview.qml b/qml/components/PollPreview.qml index 37a7fd0..c4261e2 100644 --- a/qml/components/PollPreview.qml +++ b/qml/components/PollPreview.qml @@ -80,6 +80,7 @@ Item { visible: text !== "" text: Emoji.emojify(pollData.question, Theme.fontSizeSmall) wrapMode: Text.WrapAtWordBoundaryOrAnywhere + textFormat: Text.StyledText color: pollMessageComponent.isOwnMessage ? Theme.highlightColor : Theme.primaryColor } @@ -152,6 +153,7 @@ Item { Label { id: displayOptionLabel text: Emoji.emojify(modelData.text, Theme.fontSizeMedium) + textFormat: Text.StyledText wrapMode: Text.WrapAtWordBoundaryOrAnywhere anchors { diff --git a/qml/js/functions.js b/qml/js/functions.js index b62ffb9..ac5454c 100644 --- a/qml/js/functions.js +++ b/qml/js/functions.js @@ -98,16 +98,16 @@ function getMessageText(message, simple, myself) { return myself ? qsTr("changed the chat title to %1", "myself").arg(message.content.title) : qsTr("changed the chat title to %1").arg(message.content.title); } if (message.content['@type'] === 'messagePoll') { - if(message.content.poll.type['@type'] === "pollTypeQuiz") { - if(message.content.poll.is_anonymous) { - return myself ? qsTr("sent an anonymous quiz", "myself") : qsTr("sent an anonymous quiz"); + if (message.content.poll.type['@type'] === "pollTypeQuiz") { + if (message.content.poll.is_anonymous) { + return simple ? (myself ? qsTr("sent an anonymous quiz", "myself") : qsTr("sent an anonymous quiz")) : ""; } - return myself ? qsTr("sent a quiz", "myself") : qsTr("sent a quiz"); + return simple ? (myself ? qsTr("sent a quiz", "myself") : qsTr("sent a quiz")) : ""; } - if(message.content.poll.is_anonymous) { - return myself ? qsTr("sent an anonymous poll", "myself") : qsTr("sent an anonymous poll"); + if (message.content.poll.is_anonymous) { + return simple ? (myself ? qsTr("sent an anonymous poll", "myself") : qsTr("sent an anonymous poll")) : ""; } - return myself ? qsTr("sent a poll", "myself") : qsTr("sent a poll"); + return simple ? (myself ? qsTr("sent a poll", "myself") : qsTr("sent a poll")) : ""; } return qsTr("Unsupported message: %1").arg(message.content['@type'].substring(7)); } diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts index 73aa1d1..85ba27c 100644 --- a/translations/harbour-fernschreiber-it.ts +++ b/translations/harbour-fernschreiber-it.ts @@ -111,7 +111,7 @@ The Invite Link has been copied to the clipboard. - Il link d'invito è stato copiato nella clipboard + Il link d'invito è stato copiato nella clipboard. %1 members, %2 online @@ -142,7 +142,7 @@ There is no information text available, yet. - Attualmente non è disponibile nessuna informazione + Attualmente non è disponibile nessuna informazione. Chat Title @@ -261,10 +261,6 @@ You Tu - - Loading messages… - Carica messaggi… - Unmute Chat Riattiva suoni chat @@ -289,10 +285,6 @@ Delete Message Cancella messaggio - - Uploading… - Carica… - Forwarded Message Messaggio inoltrato @@ -301,6 +293,14 @@ This chat is empty. Questa chat è vuota. + + Loading messages... + Carica messaggi... + + + Uploading... + Carica... + CoverPage @@ -316,26 +316,10 @@ in in - - Waiting for network… - Attendo la rete… - - - Connecting to network… - Connetto alla rete… - - - Connecting to proxy… - Connetto al proxy… - Connected Connesso - - Updating content… - Aggiorna contenuti… - chat chat @@ -344,6 +328,22 @@ chats chat + + Waiting for network... + Attendo la rete... + + + Connecting to network... + Connetto alla rete... + + + Connecting to proxy... + Connetto al proxy... + + + Updating content... + Aggiorna contenuti... + DocumentPreview @@ -605,10 +605,6 @@ Please enter the code that you received: Inserisci il codice che hai ricevuto: - - Loading… - Carica… - Unable to authenticate you with the entered code. Autenticazione non riuscita con il codice inserito. @@ -645,6 +641,10 @@ Use the international format, e.g. %1 Utilizza il formato internazionale, es. %1 + + Loading... + Carica... + LocationPreview @@ -670,30 +670,10 @@ Fernschreiber Fernschreiber - - Waiting for network… - Attendo la rete… - - - Connecting to network… - Connetto alla rete… - - - Connecting to proxy… - Connetto al proxy… - - - Updating content… - Aggiorna contenuti… - Unknown Sconosciuto - - Loading chat list… - Carica lista chat… - Settings Impostazioni @@ -702,6 +682,26 @@ You don't have any chats yet. Non hai nessuna chat. + + Waiting for network... + Attendo la rete... + + + Connecting to network... + Connetto alla rete... + + + Connecting to proxy... + Connetto al proxy... + + + Updating content... + Aggiorna contenuti... + + + Loading chat list... + Carica lista chat... + PollCreationPage @@ -801,7 +801,7 @@ Multiple Answers are allowed. - Risposte multiple consentite + Risposte multiple consentite. %L1 vote(s) total @@ -933,8 +933,8 @@ Usati di recente - Loading stickers… - Carica sticker… + Loading stickers... + Carica sticker...