diff --git a/bigbluebutton-html5/imports/ui/components/chat/time-window-list/time-window-chat-item/message-chat-item/poll-list-item/component.jsx b/bigbluebutton-html5/imports/ui/components/chat/time-window-list/time-window-chat-item/message-chat-item/poll-list-item/component.jsx index a2286a62d9237c460752f9ab6b467039a3cd8697..91856398e6a30de1c307ba028d17d759d51a10f5 100644 --- a/bigbluebutton-html5/imports/ui/components/chat/time-window-list/time-window-chat-item/message-chat-item/poll-list-item/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/chat/time-window-list/time-window-chat-item/message-chat-item/poll-list-item/component.jsx @@ -45,7 +45,7 @@ function PollListItem(props) { }; const { answers, numRespondents } = pollResultData; - let { resultString, optionsString } = getPollResultString(isDefaultPoll, answers, numRespondents) + let { resultString, optionsString } = getPollResultString(isDefaultPoll, answers, numRespondents, intl) resultString = sanitize(resultString); optionsString = sanitize(optionsString); diff --git a/bigbluebutton-html5/imports/ui/components/poll/service.js b/bigbluebutton-html5/imports/ui/components/poll/service.js index 2446a8350f0af8f1085f2f2104e1f5b94dcf2577..d7a976983f93e4fe62119388d91aa41ec3d3f2e8 100644 --- a/bigbluebutton-html5/imports/ui/components/poll/service.js +++ b/bigbluebutton-html5/imports/ui/components/poll/service.js @@ -58,7 +58,7 @@ const pollAnswerIds = { }, }; -const getPollResultString = (isDefaultPoll, answers, numRespondents) => { +const getPollResultString = (isDefaultPoll, answers, numRespondents, intl) => { let responded = 0; let resultString = ''; let optionsString = ''; @@ -72,7 +72,8 @@ const getPollResultString = (isDefaultPoll, answers, numRespondents) => { const pctBars = "|".repeat(pct * MAX_POLL_RESULT_BARS / 100); const pctFotmatted = `${Number.isNaN(pct) ? 0 : pct}%`; if (isDefaultPoll) { - resultString += `${item.key}: ${item.numVotes || 0} |${pctBars} ${pctFotmatted}\n`; + const translatedKey = intl.formatMessage(pollAnswerIds[item.key.toLowerCase()]); + resultString += `${translatedKey}: ${item.numVotes || 0} |${pctBars} ${pctFotmatted}\n`; } else { resultString += `${item.id+1}: ${item.numVotes || 0} |${pctBars} ${pctFotmatted}\n`; optionsString += `${item.id+1}: ${item.key}\n`; diff --git a/bigbluebutton-html5/imports/ui/components/polling/component.jsx b/bigbluebutton-html5/imports/ui/components/polling/component.jsx index a47c684803ec375d60dbf16ce4e22d84fea153f1..c95a5e1e186d53915acfa8591b605dd311d4281d 100644 --- a/bigbluebutton-html5/imports/ui/components/polling/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/polling/component.jsx @@ -20,7 +20,7 @@ const intlMessages = defineMessages({ pollAnswerDesc: { id: 'app.polling.pollAnswerDesc', }, - pollQestionTitle: { + pollQuestionTitle: { id: 'app.polling.pollQuestionTitle', }, submitLabel: { @@ -122,7 +122,7 @@ class Polling extends Component { question.length > 0 && ( <span className={styles.qHeader}> <div className={styles.qTitle}> - {intl.formatMessage(intlMessages.pollQestionTitle)} + {intl.formatMessage(intlMessages.pollQuestionTitle)} </div> <div data-test="pollQuestion" className={styles.qText}>{question}</div> </span>