add poll preview type output

as discussed in d45eb28daa
This commit is contained in:
John Gibbon 2020-10-30 19:07:06 +01:00
parent d45eb28daa
commit c185ba1b42
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 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

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