Commit 95b2b828 by Ahsan Ulhaq

Forums vote tracking missing spaces causes awkward reading

AC-102
parent bfb201ec
......@@ -22,7 +22,7 @@ class @DiscussionViewSpecHelper
expect(button.hasClass("is-checked")).toBe(user.voted(model))
expect(button.attr("aria-checked")).toEqual(user.voted(model).toString())
expect(button.find(".vote-count").text()).toMatch("^#{model.get('votes').up_count} Votes?$")
expect(button.find(".sr.js-sr-vote-count").text()).toMatch("^currently #{model.get('votes').up_count} votes?$")
expect(button.find(".sr.js-sr-vote-count").text()).toMatch("^there are currently #{model.get('votes').up_count} votes?$")
@checkRenderVote = (view, model) ->
view.render()
......
......@@ -113,7 +113,7 @@ if Backbone?
numVotes = votes.up_count
button.find(".js-sr-vote-count").html(
interpolate(
ngettext("currently %(numVotes)s vote", "currently %(numVotes)s votes", numVotes),
ngettext("there is currently %(numVotes)s vote", "there are currently %(numVotes)s votes", numVotes),
{numVotes: numVotes},
true
)
......
......@@ -525,7 +525,7 @@ ${primaryAction("follow", "star", _("Follow"), _("Follow"), _("Unfollow"))}
</span>
<a href="#" class="action-button action-vote" role="checkbox" aria-checked="false">
## Vote counts are populated by JS
<span class="sr">${_("Vote")}</span>
<span class="sr">${_("Vote for this post,")}&nbsp;</span>
<span class="sr js-sr-vote-count"></span>
<span class="action-label" aria-hidden="true">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment