nodebb-plugin-poll 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,5 +43,8 @@
|
|
|
43
43
|
"vote_is_final": "Changing your vote is not allowed for this poll so your vote is final",
|
|
44
44
|
|
|
45
45
|
"vote_count": "users voted for this option",
|
|
46
|
-
"votes": "votes"
|
|
46
|
+
"votes": "votes",
|
|
47
|
+
"x-votes": "%1 votes",
|
|
48
|
+
"total-votes-x": "Total Votes: %1",
|
|
49
|
+
"admin.create-poll": "Create Poll"
|
|
47
50
|
}
|
package/package.json
CHANGED
package/public/js/poll/view.js
CHANGED
|
@@ -227,10 +227,14 @@
|
|
|
227
227
|
|
|
228
228
|
this.pollData.options.forEach(function (option) {
|
|
229
229
|
var el = this.dom.resultsPanel.find('[data-poll-option-id=' + option.id + ']');
|
|
230
|
-
el.find('.poll-result-votecount span').
|
|
230
|
+
el.find('.poll-result-votecount span').translateText(`[[poll:x-votes, ${option.voteCount}]]`);
|
|
231
231
|
el.find('.poll-result-progressbar').css('width', option.percentage + '%')
|
|
232
232
|
.find('span.percent').text(option.percentage);
|
|
233
233
|
}, this);
|
|
234
|
+
|
|
235
|
+
this.dom.resultsPanel
|
|
236
|
+
.find('.poll-result-total-votecount')
|
|
237
|
+
.translateText(`[[poll:total-votes-x, ${pollData.info.voteCount}]]`);
|
|
234
238
|
};
|
|
235
239
|
|
|
236
240
|
View.prototype.showMessage = function (title, content) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="d-flex justify-content-between mb-1">
|
|
4
4
|
<strong>{poll.options.title}</strong>
|
|
5
5
|
<a class="poll-result-votecount small" href="#">
|
|
6
|
-
<span>{poll.options.voteCount}</span>
|
|
6
|
+
<span>[[poll:x-votes, {poll.options.voteCount}]]</span>
|
|
7
7
|
</a>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="progress">
|
package/templates/poll/view.tpl
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
<div class="poll-view-results d-flex flex-column gap-3 mb-3 <!-- IF !poll.hasVoted -->hidden<!-- ENDIF !poll.hasVoted -->">
|
|
17
17
|
<!-- IMPORT poll/view/results.tpl -->
|
|
18
|
+
<div class="text-end text-sm text-secondary poll-result-total-votecount">[[poll:total-votes-x, {poll.info.voteCount}]]</div>
|
|
18
19
|
</div>
|
|
19
20
|
|
|
20
21
|
<div class="poll-view-buttons">
|