nodebb-plugin-poll 4.0.14 → 4.0.15

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.
@@ -1,16 +1,16 @@
1
1
  <form role="form" class="poll-voting-form mb-3 d-flex flex-column gap-3">
2
- <!-- BEGIN poll.options -->
2
+ {{{ each poll.options }}}
3
3
  <div class="poll-view-option {poll.optionType}" data-poll-option-id="{poll.options.id}">
4
4
  <div class="form-check">
5
5
  <input class="form-check-input" type="{poll.optionType}" name="pollVoteSelection" value="{poll.options.id}" id="poll-{poll.info.pollId}-option-id-{poll.options.id}">
6
6
  <label class="form-check-label" for="poll-{poll.info.pollId}-option-id-{poll.options.id}">{poll.options.title}</label>
7
7
  </div>
8
8
  </div>
9
- <!-- END poll.options -->
9
+ {{{ end }}}
10
10
  </form>
11
11
 
12
- <!-- IF poll.settings.disallowVoteUpdate -->
12
+ {{{ if poll.info.disallowVoteUpdate }}}
13
13
  <div class="alert alert-warning" role="alert">
14
- [[poll:vote_is_final]]
14
+ {{tx("poll:vote_is_final")}}
15
15
  </div>
16
- <!-- ENDIF poll.settings.disallowVoteUpdate -->
16
+ {{{ end }}}
@@ -9,7 +9,7 @@
9
9
  {{{ end }}}
10
10
  </h5>
11
11
  {{{ if (isAdmin && !poll.isWidget) }}}
12
- <span class="text-sm text-secondary">[[poll:poll-id-x, {poll.info.pollId}]]</span>
12
+ <span class="text-sm text-secondary">{{tx("poll:poll-id-x", poll.info.pollId)}}</span>
13
13
  {{{ end }}}
14
14
  </div>
15
15
  <div class="card-body">
@@ -19,16 +19,16 @@
19
19
  </div>
20
20
  <div class="poll-view-results d-flex flex-column gap-3 mb-3 {{{ if !poll.hasVoted }}}hidden{{{ end }}}">
21
21
  <!-- IMPORT poll/view/results.tpl -->
22
- <div class="text-end text-sm text-secondary poll-result-total-votecount">[[poll:total-votes-x, {poll.info.voteCount}]]</div>
22
+ <div class="text-end text-sm text-secondary poll-result-total-votecount">{{tx("poll:total-votes-x", poll.info.voteCount)}}</div>
23
23
  </div>
24
24
 
25
25
  <div class="poll-view-buttons">
26
- <button type="button" class="btn btn-sm btn-primary poll-button-vote hidden">[[poll:vote]]</button>
27
- <button type="button" class="btn btn-sm btn-primary poll-button-vote-anon hidden">[[poll:vote_anonymously]]</button>
28
- <button type="button" class="btn btn-sm btn-primary poll-button-update-vote hidden">[[poll:update_vote]]</button>
29
- <button type="button" class="btn btn-sm btn-danger poll-button-remove-vote hidden">[[poll:remove_vote]]</button>
30
- <button type="button" class="btn btn-sm btn-link poll-button-results hidden">[[poll:to_results]]</button>
31
- <button type="button" class="btn btn-sm btn-link poll-button-voting hidden">[[poll:to_voting]]</button>
26
+ <button type="button" class="btn btn-sm btn-primary poll-button-vote hidden">{{tx("poll:vote")}}</button>
27
+ <button type="button" class="btn btn-sm btn-primary poll-button-vote-anon hidden">{{tx("poll:vote_anonymously")}}</button>
28
+ <button type="button" class="btn btn-sm btn-primary poll-button-update-vote hidden">{{tx("poll:update_vote")}}</button>
29
+ <button type="button" class="btn btn-sm btn-danger poll-button-remove-vote hidden">{{tx("poll:remove_vote")}}</button>
30
+ <button type="button" class="btn btn-sm btn-link poll-button-results hidden">{{tx("poll:to_results")}}</button>
31
+ <button type="button" class="btn btn-sm btn-link poll-button-voting hidden">{{tx("poll:to_voting")}}</button>
32
32
  </div>
33
33
  </div>
34
34
  </div>