diff --git a/qml/components/PollPreview.qml b/qml/components/PollPreview.qml
index fbb3171..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
}
@@ -102,10 +103,11 @@ Item {
id: canAnswerDelegate
TextSwitch {
id: optionDelegate
+ // TextSwitch changes the html base path:
+ property url emojiBase: "../js/emoji/"
width: pollMessageComponent.width
automaticCheck: false
- // emojify does not work here :/
- text: modelData.text
+ text: Emoji.emojify(modelData.text, Theme.fontSizeMedium, emojiBase)
checked: pollMessageComponent.chosenIndexes.indexOf(index) > -1
onClicked: {
pollMessageComponent.handleChoose(index);
@@ -151,6 +153,7 @@ Item {
Label {
id: displayOptionLabel
text: Emoji.emojify(modelData.text, Theme.fontSizeMedium)
+ textFormat: Text.StyledText
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
anchors {
@@ -263,6 +266,7 @@ Item {
Component {
id: closePollMenuItemComponent
MenuItem {
+ visible: !pollData.is_closed && pollMessageComponent.canEdit
text: qsTr("Close Poll")
onClicked: {
tdLibWrapper.stopPoll(pollMessageComponent.chatId, pollMessageComponent.messageId);
@@ -272,6 +276,7 @@ Item {
Component {
id: resetAnswerMenuItemComponent
MenuItem {
+ visible: !pollData.is_closed && !pollMessageComponent.isQuiz && pollMessageComponent.hasAnswered
text: qsTr("Reset Answer")
onClicked: {
pollMessageComponent.resetChosen()
@@ -282,12 +287,8 @@ Item {
Component.onCompleted: {
opacity = 1;
if(messageItem && messageItem.menu ) { // workaround to add menu entries
- if(!pollData.is_closed && pollMessageComponent.canEdit) {
- closePollMenuItemComponent.createObject(messageItem.menu._contentColumn);
- }
- if(!pollData.is_closed && !pollMessageComponent.isQuiz && pollMessageComponent.hasAnswered) {
- resetAnswerMenuItemComponent.createObject(messageItem.menu._contentColumn);
- }
+ closePollMenuItemComponent.createObject(messageItem.menu._contentColumn);
+ resetAnswerMenuItemComponent.createObject(messageItem.menu._contentColumn);
}
}
}
diff --git a/qml/components/chatInformationPage/ChatInformationTabItemMembersGroups.qml b/qml/components/chatInformationPage/ChatInformationTabItemMembersGroups.qml
index 7077a61..d078191 100644
--- a/qml/components/chatInformationPage/ChatInformationTabItemMembersGroups.qml
+++ b/qml/components/chatInformationPage/ChatInformationTabItemMembersGroups.qml
@@ -79,18 +79,18 @@ ChatInformationTabItemBase {
width: parent.width
// chat title isPrivateChat ? () :
- primaryText.text: Emoji.emojify(Functions.getUserName(user), primaryText.font.pixelSize)
+ primaryText.text: Emoji.emojify(Functions.getUserName(user), primaryText.font.pixelSize, "../../js/emoji/")
// last user
prologSecondaryText.text: "@"+(user.username !== "" ? user.username : user_id) + (user_id === chatInformationPage.myUserId ? " " + qsTr("You") : "")
secondaryText {
horizontalAlignment: Text.AlignRight
property string statusText: Functions.getChatMemberStatusText(model.status["@type"])
- property string customText: model.status.custom_title ? Emoji.emojify(model.status.custom_title, secondaryText.font.pixelSize) : ""
+ property string customText: model.status.custom_title ? Emoji.emojify(model.status.custom_title, secondaryText.font.pixelSize, "../../js/emoji/") : ""
text: (statusText !== "" && customText !== "") ? statusText + ", " + customText : statusText + customText
}
tertiaryText {
maximumLineCount: 1
- text: user.type["@type"] === "userTypeBot" ? (Emoji.emojify("🤖 "+bot_info.description, tertiaryText.font.pixelSize)) : Functions.getChatPartnerStatusText(user.status["@type"], user.status.was_online);
+ text: user.type["@type"] === "userTypeBot" ? (Emoji.emojify("🤖 "+bot_info.description, tertiaryText.font.pixelSize, "../../js/emoji/")) : Functions.getChatPartnerStatusText(user.status["@type"], user.status.was_online);
elide: Text.ElideRight
}
@@ -162,7 +162,7 @@ ChatInformationTabItemBase {
onChatChanged: {
if (changedChatId === chat_id) {
// Force update of some list item elements (currently only last message text seems to create problems). dataChanged() doesn't seem to trigger them all :(
- secondaryText.text = last_message_text ? Emoji.emojify(last_message_text, Theme.fontSizeExtraSmall) : qsTr("Unknown")
+ secondaryText.text = last_message_text ? Emoji.emojify(last_message_text, Theme.fontSizeExtraSmall, "../../js/emoji/") : qsTr("Unknown")
}
}
}
diff --git a/qml/components/chatInformationPage/ChatInformationTextItem.qml b/qml/components/chatInformationPage/ChatInformationTextItem.qml
index 4cffc6e..edb52bb 100644
--- a/qml/components/chatInformationPage/ChatInformationTextItem.qml
+++ b/qml/components/chatInformationPage/ChatInformationTextItem.qml
@@ -50,7 +50,7 @@ Column {
font.pixelSize: Theme.fontSizeExtraSmall
textFormat: Text.StyledText
color: Theme.highlightColor
- text: Emoji.emojify( Functions.replaceUrlsWithLinks(textItem.text).replace(/\n/g, "
"), Theme.fontSizeExtraSmall).replace(/\.\.\/js/g, "../../js")
+ text: Emoji.emojify( Functions.replaceUrlsWithLinks(textItem.text).replace(/\n/g, "
"), Theme.fontSizeExtraSmall, "../../js/emoji/")
linkColor: Theme.primaryColor
visible: text !== ""
onLinkActivated: {
diff --git a/qml/js/functions.js b/qml/js/functions.js
index b62ffb9..fbd193e 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")) : ("" + qsTr("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")) : ("" + qsTr("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")) : ("" + qsTr("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")) : ("" + qsTr("Poll") + "");
}
return qsTr("Unsupported message: %1").arg(message.content['@type'].substring(7));
}
diff --git a/qml/js/twemoji.js b/qml/js/twemoji.js
index abfce8f..446931a 100644
--- a/qml/js/twemoji.js
+++ b/qml/js/twemoji.js
@@ -568,8 +568,8 @@ var twemoji = (function (
}());
-function emojify(rawText, emojiSize) {
- var curatedText = twemoji.parse(rawText, { callback: function(icon, options, variant) { return '../js/emoji/' + icon + '.svg'; }, size: emojiSize });
+function emojify(rawText, emojiSize, basePath) {
+ var curatedText = twemoji.parse(rawText, { callback: function(icon, options, variant) { return (basePath || '../js/emoji/') + icon + '.svg'; }, size: emojiSize });
// QML has a weird bug. If an ampersand is followed by an HTML tag or a character, the tag is ignored and returned as string or the following string is omitted
// Therefore replacing the ampersand with & in these cases...
return curatedText.replace(/((\&[\w\d]+\;)|((\&)(\<|\w+)))/g, function(match, p1, p2, p3, p4, p5, offset, string) {
diff --git a/qml/pages/ChatInformationPage.qml b/qml/pages/ChatInformationPage.qml
index 79e3376..0bbe1e1 100644
--- a/qml/pages/ChatInformationPage.qml
+++ b/qml/pages/ChatInformationPage.qml
@@ -265,8 +265,10 @@ Page {
: "../components/chatInformationPage/ChatInformationProfilePicture.qml"
}
}
+ // PageHeader changes the html base path:
+ property url emojiBase: "../js/emoji/"
leftMargin: imageContainer.minDimension + Theme.horizontalPageMargin + Theme.paddingMedium
- title: chatInformation.title !== "" ? Emoji.emojify(chatInformation.title, Theme.fontSizeLarge) : qsTr("Unknown")
+ title: chatInformation.title !== "" ? Emoji.emojify(chatInformation.title, Theme.fontSizeLarge, emojiBase) : qsTr("Unknown")
description: chatInformationPage.isPrivateChat ? ("@"+(chatInformationPage.privateChatUserInformation.username || chatInformationPage.chatPartnerGroupId)) : ""
}
diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts
index eaae40c..88e665b 100644
--- a/translations/harbour-fernschreiber-de.ts
+++ b/translations/harbour-fernschreiber-de.ts
@@ -1190,5 +1190,21 @@
hat eine anonyme Umfrage gesendet
+
+
+ Anonymes Quiz
+
+
+
+ Quiz
+
+
+
+ Anonyme Umfrage
+
+
+
+ Umfrage
+
diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts
index 2843445..abf9faa 100644
--- a/translations/harbour-fernschreiber-es.ts
+++ b/translations/harbour-fernschreiber-es.ts
@@ -545,20 +545,20 @@
myself
-
+ envió una encuesta
-
+ envió una encuesta
myself
-
+ envió un cuestionario
-
+ envió un cuestionario
@@ -707,83 +707,83 @@
PollCreationPage
-
+ Todas las respuestas deben contener de 1 a 100 caracteres.
-
+ Para enviar una cuestión, debe especificar la respuesta correcta.
-
+ Introducir una pregunta.
-
+ La pregunta debe tener menos de 256 caracteres.
-
+ Una encuesta requiere de 2 a 10 respuestas.
Dialog Header
-
+ Encuesta
After dialog header… Create a Poll in [group name]
-
+ en %1
-
+ Introducir su pregunta aquí
-
-
+
+ Pregunta (quedan %n1 caracteres)
Section header
-
+ Respuestas
-
+ Introducir una respuesta aquí
-
-
+
+ Respuesta (quedan %n1 caracteres)
-
+ Agregar una respuesta
Section header
-
+ Opciones de encuesta
-
+ Respuestas anónimas
-
+ Se permiten múltiples respuestas
-
+ Modo interrogar
-
+ Los interrogatorios tienen una respuesta correcta. Los participantes no pueden revocar sus respuestas.
@@ -791,81 +791,81 @@
% of votes for option
-
+ %L1%
-
+ Resultado final:
-
+ Se permiten múltiples respuestas.
number of total votes
-
-
+
+ %L1 votos totales
-
+ Cerrar encuesta
-
+ Restablecer respuesta
PollResultsPage
-
+ Resultados de cuestionario
-
+ Resultados de encuesta
number of total votes
-
-
+
+ %L1 total de votos
section header
-
+ Pregunta
section header
-
+ Resultados
number of votes for option
-
-
+
+ %L1 votos
% of votes for option
-
+ %L1%
This answer has been chosen by the following users
-
+ Elegido por:
number of votes for option
-
-
+
+ %L1 votos incluyendo el suyo
@@ -1151,37 +1151,53 @@
myself
-
+ envió una encuesta
-
+ envió una encuesta
myself
-
+ envió un cuestionario anónimo
-
+ envió un cuestionario anónimo
myself
-
+ envió un cuestionario
-
+ envió un cuestionario
myself
-
+ envió una encuesta anónima
+ envió una encuesta anónima
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts
index c7dfa43..081cfa2 100644
--- a/translations/harbour-fernschreiber-fi.ts
+++ b/translations/harbour-fernschreiber-fi.ts
@@ -1191,5 +1191,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts
index 42c4433..7116eeb 100644
--- a/translations/harbour-fernschreiber-hu.ts
+++ b/translations/harbour-fernschreiber-hu.ts
@@ -1184,5 +1184,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts
index 73aa1d1..794a756 100644
--- a/translations/harbour-fernschreiber-it.ts
+++ b/translations/harbour-fernschreiber-it.ts
@@ -111,7 +111,7 @@
- Il link d'invito è stato copiato nella clipboard
+ Il link d'invito è stato copiato nella clipboard.
@@ -142,7 +142,7 @@
- Attualmente non è disponibile nessuna informazione
+ Attualmente non è disponibile nessuna informazione.
@@ -261,10 +261,6 @@
Tu
-
-
- Carica messaggi…
-
Riattiva suoni chat
@@ -289,10 +285,6 @@
Cancella messaggio
-
-
- Carica…
-
Messaggio inoltrato
@@ -301,6 +293,14 @@
Questa chat è vuota.
+
+
+ Carica messaggi...
+
+
+
+ Carica...
+
CoverPage
@@ -317,8 +317,20 @@
in
-
- Attendo la rete…
+
+ Connesso
+
+
+
+ chat
+
+
+
+ chat
+
+
+
+ Attendo la rete...
@@ -329,20 +341,8 @@
Connetto al proxy…
-
- Connesso
-
-
-
- Aggiorna contenuti…
-
-
-
- chat
-
-
-
- chat
+
+ Aggiorna contenuti...
@@ -605,10 +605,6 @@
Inserisci il codice che hai ricevuto:
-
-
- Carica…
-
Autenticazione non riuscita con il codice inserito.
@@ -645,6 +641,10 @@
Utilizza il formato internazionale, es. %1
+
+
+ Carica...
+
LocationPreview
@@ -671,8 +671,20 @@
Fernschreiber
-
- Attendo la rete…
+
+ Sconosciuto
+
+
+
+ Impostazioni
+
+
+
+ Non hai nessuna chat.
+
+
+
+ Attendo la rete...
@@ -687,20 +699,8 @@
Aggiorna contenuti…
-
- Sconosciuto
-
-
-
- Carica lista chat…
-
-
-
- Impostazioni
-
-
-
- Non hai nessuna chat.
+
+ Carica lista chat...
@@ -801,7 +801,7 @@
- Risposte multiple consentite
+ Risposte multiple consentite.
@@ -1190,5 +1190,21 @@
ha inviato un sondaggio anonimo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts
index 0ad2981..289adc5 100644
--- a/translations/harbour-fernschreiber-pl.ts
+++ b/translations/harbour-fernschreiber-pl.ts
@@ -1196,5 +1196,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts
index 69bf463..47be5ba 100644
--- a/translations/harbour-fernschreiber-ru.ts
+++ b/translations/harbour-fernschreiber-ru.ts
@@ -1196,5 +1196,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts
index fbed347..90b83f4 100644
--- a/translations/harbour-fernschreiber-sv.ts
+++ b/translations/harbour-fernschreiber-sv.ts
@@ -545,20 +545,20 @@
myself
-
+ skickade en frågesport
-
+ skickade en frågesport
myself
-
+ skickade en omröstning
-
+ skickade en omröstning
@@ -707,172 +707,172 @@
PollCreationPage
-
+ Du måste ange en fråga.
-
+ Frågan måste vara kortare än 256 tecken.
-
+ En omröstning kräver 2-10 svarsalternativ.
-
+ Alla svarsalternativ måste innehålla 1-100 tecken.
-
+ För att skicka en frågesport, måste du ange rätt svar.
Dialog Header
-
+ Skapa en omröstning
After dialog header… Create a Poll in [group name]
-
+ i %1
-
+ Ange din fråga här
-
-
-
+
+ Fråga (%n1 tecken kvar)
+ Fråga (%n1 tecken kvar)
Section header
-
+ Svar
-
+ Ange svaret här
-
-
-
+
+ Svar (%n1 tecken kvar)
+ Svar (%n1 tecken kvar)
-
+ Lägg till ett svar
Section header
-
+ Omröstningsalternativ
-
+ Anonyma svar
-
+ Flera svarsalternativ tillåtna
-
+ Frågesportsläge
-
+ Frågor har ett korrekt svar. Deltagarna kan inte återkalla sina svar.
PollPreview
-
+ Slutresultat:
-
+ Flera svarsalternativ tillåtna.
% of votes for option
-
+ %L1%
number of total votes
-
-
-
+
+ %L1 röst sammanlagt
+ %L1 röster sammanlagt
-
+ Stäng omröstningen
-
+ Återställ svar
PollResultsPage
-
+ Frågesportresultat
-
+ Omröstningsresultat
number of total votes
-
-
-
+
+ %L1 röst sammanlagt
+ %L1 röster sammanlagt
section header
-
+ Fråga
section header
-
+ Resultat
number of votes for option
-
-
-
+
+ %L1 röst inklusive din
+ %L1 röster inklusive din
number of votes for option
-
-
-
+
+ %L1 röst
+ %L1 röster
% of votes for option
-
+ %L1%
This answer has been chosen by the following users
-
+ Valt av
@@ -1157,37 +1157,53 @@
myself
-
+ skickade en anonym frågesport
-
+ skickade en anonym frågesport
myself
-
+ skickade en frågesport
-
+ skickade en frågesport
myself
-
+ skickade en anonym omröstning
-
+ skickade en anonym omröstning
myself
-
+ skickade en omröstning
+ skickade en omröstning
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts
index 7ef0098..7085c5f 100644
--- a/translations/harbour-fernschreiber-zh_CN.ts
+++ b/translations/harbour-fernschreiber-zh_CN.ts
@@ -1184,5 +1184,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts
index 48bfa9e..3c5dd70 100644
--- a/translations/harbour-fernschreiber.ts
+++ b/translations/harbour-fernschreiber.ts
@@ -1184,5 +1184,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+