Merge pull request #113 from jgibbon/feature/reenable-poll-type-display

add poll preview type output
This commit is contained in:
Sebastian Wolf 2020-10-30 20:28:43 +01:00 committed by GitHub
commit 72315312d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 164 additions and 4 deletions

View file

@ -100,14 +100,14 @@ function getMessageText(message, simple, myself) {
if (message.content['@type'] === 'messagePoll') {
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 simple ? (myself ? qsTr("sent an anonymous quiz", "myself") : qsTr("sent an anonymous quiz")) : ("<b>" + qsTr("Anonymous Quiz") + "</b>");
}
return simple ? (myself ? qsTr("sent a quiz", "myself") : qsTr("sent a quiz")) : "";
return simple ? (myself ? qsTr("sent a quiz", "myself") : qsTr("sent a quiz")) : ("<b>" + qsTr("Quiz") + "</b>");
}
if (message.content.poll.is_anonymous) {
return simple ? (myself ? qsTr("sent an anonymous poll", "myself") : qsTr("sent an anonymous poll")) : "";
return simple ? (myself ? qsTr("sent an anonymous poll", "myself") : qsTr("sent an anonymous poll")) : ("<b>" + qsTr("Anonymous Poll") + "</b>");
}
return simple ? (myself ? qsTr("sent a poll", "myself") : qsTr("sent a poll")) : "";
return simple ? (myself ? qsTr("sent a poll", "myself") : qsTr("sent a poll")) : ("<b>" + qsTr("Poll") + "</b>");
}
return qsTr("Unsupported message: %1").arg(message.content['@type'].substring(7));
}

View file

@ -1190,5 +1190,21 @@
<source>sent an anonymous poll</source>
<translation>hat eine anonyme Umfrage gesendet</translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation>Anonymes Quiz</translation>
</message>
<message>
<source>Quiz</source>
<translation>Quiz</translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation>Anonyme Umfrage</translation>
</message>
<message>
<source>Poll</source>
<translation>Umfrage</translation>
</message>
</context>
</TS>

View file

@ -1184,5 +1184,21 @@
<source>sent an anonymous poll</source>
<translation>envió una encuesta anónima</translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1191,5 +1191,21 @@
<source>sent an anonymous poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1184,5 +1184,21 @@
<source>sent an anonymous poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1190,5 +1190,21 @@
<source>sent an anonymous poll</source>
<translation>ha inviato un sondaggio anonimo</translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1196,5 +1196,21 @@
<source>sent an anonymous poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1196,5 +1196,21 @@
<source>sent an anonymous poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1190,5 +1190,21 @@
<source>sent a poll</source>
<translation>skickade en omröstning</translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1184,5 +1184,21 @@
<source>sent an anonymous poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -1184,5 +1184,21 @@
<source>sent an anonymous poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quiz</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Anonymous Poll</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poll</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>