diff --git a/app/models/comment.rb b/app/models/comment.rb index 913dd0780..3508d5593 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -28,4 +28,7 @@ class Comment < ActiveRecord::Base user end + def total_votes + votes_for.size + end end diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 9707c6462..466752044 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -14,7 +14,7 @@

- <%= t("debates.debate.responses", count: comment.children_count) %> + <%= t("debates.comment.responses", count: comment.children_count) %> <% if user_signed_in? %>  |  <%= render 'comments/form', {parent: comment, toggeable: true} %> diff --git a/app/views/comments/_votes.html.erb b/app/views/comments/_votes.html.erb index 4763388b3..73efa56ba 100644 --- a/app/views/comments/_votes.html.erb +++ b/app/views/comments/_votes.html.erb @@ -1,5 +1,6 @@ - nĂºmerototal votos + + <%= t('debates.comment.votes', count: comment.total_votes) %>  |  @@ -16,4 +17,4 @@ <% end %> <%= comment.get_dislikes.size %> - \ No newline at end of file + diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb index a15a66a4d..4c252c8b5 100644 --- a/app/views/debates/_votes.html.erb +++ b/app/views/debates/_votes.html.erb @@ -18,7 +18,7 @@ - <%= pluralize(debate.total_votes, t("debates.debate.vote"), t("debates.debate.votes")) %> + <%= t("debates.debate.votes", count: debate.total_votes) %> <% unless user_signed_in? %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 930049b7e..1b64977ff 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -19,16 +19,24 @@ en: create_debate: Create a debate debate: debate: Debate - vote: vote - votes: votes comments: zero: No comments one: 1 Comment other: "%{count} Comments" + votes: + zero: No votes + one: 1 Vote + other: "%{count} Votes" + comment: responses: zero: No Responses one: 1 Response other: "%{count} Responses" + votes: + zero: No votes + one: 1 Vote + other: "%{count} Votes" + votes_weighted_score: "Total: %{score}" form: error: error errors: errors diff --git a/config/locales/es.yml b/config/locales/es.yml index 008c8ce2d..0b8701f18 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -19,16 +19,24 @@ es: create_debate: Crea un debate debate: debate: Debate - vote: voto - votes: votos comments: zero: Sin comentarios one: 1 Comentario other: "%{count} Comentarios" + votes: + zero: Sin votos + one: 1 Voto + other: "%{count} Votos" + comment: responses: zero: Sin respuestas one: 1 Respuesta other: "%{count} Respuestas" + votes: + zero: Sin votos + one: 1 Voto + other: "%{count} Votos" + votes_weighted_score: "Total: %{score}" form: error: error errors: errores