Minor changes to poll display & translation adjustments

This commit is contained in:
Sebastian Wolf 2020-10-29 22:39:43 +01:00
parent e3224c5b4f
commit d45eb28daa
3 changed files with 62 additions and 60 deletions

View file

@ -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 {

View file

@ -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));
}

View file

@ -111,7 +111,7 @@
</message>
<message>
<source>The Invite Link has been copied to the clipboard.</source>
<translation>Il link d&apos;invito è stato copiato nella clipboard</translation>
<translation>Il link d&apos;invito è stato copiato nella clipboard.</translation>
</message>
<message>
<source>%1 members, %2 online</source>
@ -142,7 +142,7 @@
</message>
<message>
<source>There is no information text available, yet.</source>
<translation>Attualmente non è disponibile nessuna informazione</translation>
<translation>Attualmente non è disponibile nessuna informazione.</translation>
</message>
<message>
<source>Chat Title</source>
@ -261,10 +261,6 @@
<source>You</source>
<translation>Tu</translation>
</message>
<message>
<source>Loading messages</source>
<translation>Carica messaggi</translation>
</message>
<message>
<source>Unmute Chat</source>
<translation>Riattiva suoni chat</translation>
@ -289,10 +285,6 @@
<source>Delete Message</source>
<translation>Cancella messaggio</translation>
</message>
<message>
<source>Uploading</source>
<translation>Carica</translation>
</message>
<message>
<source>Forwarded Message</source>
<translation>Messaggio inoltrato</translation>
@ -301,6 +293,14 @@
<source>This chat is empty.</source>
<translation>Questa chat è vuota.</translation>
</message>
<message>
<source>Loading messages...</source>
<translation>Carica messaggi...</translation>
</message>
<message>
<source>Uploading...</source>
<translation>Carica...</translation>
</message>
</context>
<context>
<name>CoverPage</name>
@ -316,26 +316,10 @@
<source>in</source>
<translation>in</translation>
</message>
<message>
<source>Waiting for network</source>
<translation>Attendo la rete</translation>
</message>
<message>
<source>Connecting to network</source>
<translation>Connetto alla rete</translation>
</message>
<message>
<source>Connecting to proxy</source>
<translation>Connetto al proxy</translation>
</message>
<message>
<source>Connected</source>
<translation>Connesso</translation>
</message>
<message>
<source>Updating content</source>
<translation>Aggiorna contenuti</translation>
</message>
<message>
<source>chat</source>
<translation>chat</translation>
@ -344,6 +328,22 @@
<source>chats</source>
<translation>chat</translation>
</message>
<message>
<source>Waiting for network...</source>
<translation>Attendo la rete...</translation>
</message>
<message>
<source>Connecting to network...</source>
<translation>Connetto alla rete...</translation>
</message>
<message>
<source>Connecting to proxy...</source>
<translation>Connetto al proxy...</translation>
</message>
<message>
<source>Updating content...</source>
<translation>Aggiorna contenuti...</translation>
</message>
</context>
<context>
<name>DocumentPreview</name>
@ -605,10 +605,6 @@
<source>Please enter the code that you received:</source>
<translation>Inserisci il codice che hai ricevuto:</translation>
</message>
<message>
<source>Loading</source>
<translation>Carica</translation>
</message>
<message>
<source>Unable to authenticate you with the entered code.</source>
<translation>Autenticazione non riuscita con il codice inserito.</translation>
@ -645,6 +641,10 @@
<source>Use the international format, e.g. %1</source>
<translation>Utilizza il formato internazionale, es. %1</translation>
</message>
<message>
<source>Loading...</source>
<translation>Carica...</translation>
</message>
</context>
<context>
<name>LocationPreview</name>
@ -670,30 +670,10 @@
<source>Fernschreiber</source>
<translation>Fernschreiber</translation>
</message>
<message>
<source>Waiting for network</source>
<translation>Attendo la rete</translation>
</message>
<message>
<source>Connecting to network</source>
<translation>Connetto alla rete</translation>
</message>
<message>
<source>Connecting to proxy</source>
<translation>Connetto al proxy</translation>
</message>
<message>
<source>Updating content</source>
<translation>Aggiorna contenuti</translation>
</message>
<message>
<source>Unknown</source>
<translation>Sconosciuto</translation>
</message>
<message>
<source>Loading chat list</source>
<translation>Carica lista chat</translation>
</message>
<message>
<source>Settings</source>
<translation>Impostazioni</translation>
@ -702,6 +682,26 @@
<source>You don&apos;t have any chats yet.</source>
<translation>Non hai nessuna chat.</translation>
</message>
<message>
<source>Waiting for network...</source>
<translation>Attendo la rete...</translation>
</message>
<message>
<source>Connecting to network...</source>
<translation>Connetto alla rete...</translation>
</message>
<message>
<source>Connecting to proxy...</source>
<translation>Connetto al proxy...</translation>
</message>
<message>
<source>Updating content...</source>
<translation>Aggiorna contenuti...</translation>
</message>
<message>
<source>Loading chat list...</source>
<translation>Carica lista chat...</translation>
</message>
</context>
<context>
<name>PollCreationPage</name>
@ -801,7 +801,7 @@
</message>
<message>
<source>Multiple Answers are allowed.</source>
<translation>Risposte multiple consentite</translation>
<translation>Risposte multiple consentite.</translation>
</message>
<message numerus="yes">
<source>%L1 vote(s) total</source>
@ -933,8 +933,8 @@
<translation>Usati di recente</translation>
</message>
<message>
<source>Loading stickers</source>
<translation>Carica sticker</translation>
<source>Loading stickers...</source>
<translation>Carica sticker...</translation>
</message>
</context>
<context>