adds i18n to comments_helper
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
module CommentsHelper
|
module CommentsHelper
|
||||||
|
|
||||||
def comment_link_text(parent)
|
def comment_link_text(parent)
|
||||||
parent.class == Debate ? "Comentar" : "Responder"
|
parent.class == Debate ? t("comments_helper.comment_link") : t("comments_helper.reply_link")
|
||||||
end
|
end
|
||||||
|
|
||||||
def comment_button_text(parent)
|
def comment_button_text(parent)
|
||||||
parent.class == Debate ? "Publicar comentario" : "Publicar respuesta"
|
parent.class == Debate ? t("comments_helper.comment_button") : t("comments_helper.reply_button")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -39,6 +39,11 @@ en:
|
|||||||
new:
|
new:
|
||||||
publish_new: Publish new debate
|
publish_new: Publish new debate
|
||||||
back_link: Back
|
back_link: Back
|
||||||
|
comments_helper:
|
||||||
|
comment_link: Comment
|
||||||
|
comment_button: Publish comment
|
||||||
|
reply_link: Reply
|
||||||
|
reply_button: Publish reply
|
||||||
votes:
|
votes:
|
||||||
notice_thanks: "Thanks for voting."
|
notice_thanks: "Thanks for voting."
|
||||||
notice_already_registered: "Your vote is already registered."
|
notice_already_registered: "Your vote is already registered."
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ es:
|
|||||||
new:
|
new:
|
||||||
publish_new: Publicar debate nuevo
|
publish_new: Publicar debate nuevo
|
||||||
back_link: Volver
|
back_link: Volver
|
||||||
|
comments_helper:
|
||||||
|
comment_link: Comentar
|
||||||
|
comment_button: Publicar comentario
|
||||||
|
reply_link: Responder
|
||||||
|
reply_button: Publicar respuesta
|
||||||
votes:
|
votes:
|
||||||
notice_thanks: "Gracias por votar."
|
notice_thanks: "Gracias por votar."
|
||||||
notice_already_registered: "Tu voto ya ha sido registrado."
|
notice_already_registered: "Tu voto ya ha sido registrado."
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ feature 'Comments' do
|
|||||||
login_as(user)
|
login_as(user)
|
||||||
visit debate_path(debate)
|
visit debate_path(debate)
|
||||||
|
|
||||||
click_on 'Comentar'
|
click_on 'Comment'
|
||||||
|
|
||||||
fill_in 'comment_body', with: '¿Has pensado en esto...?'
|
fill_in 'comment_body', with: '¿Has pensado en esto...?'
|
||||||
click_button 'Publicar comentario'
|
click_button 'Publish comment'
|
||||||
|
|
||||||
within "#comments" do
|
within "#comments" do
|
||||||
expect(page).to have_content '¿Has pensado en esto...?'
|
expect(page).to have_content '¿Has pensado en esto...?'
|
||||||
@@ -45,10 +45,10 @@ feature 'Comments' do
|
|||||||
login_as(manuela)
|
login_as(manuela)
|
||||||
visit debate_path(debate)
|
visit debate_path(debate)
|
||||||
|
|
||||||
click_link "Responder"
|
click_link "Reply"
|
||||||
within "#js-comment-form-comment_#{comment.id}" do
|
within "#js-comment-form-comment_#{comment.id}" do
|
||||||
fill_in 'comment_body', with: 'La semana que viene está hecho.'
|
fill_in 'comment_body', with: 'La semana que viene está hecho.'
|
||||||
click_button 'Publicar respuesta'
|
click_button 'Publish reply'
|
||||||
end
|
end
|
||||||
|
|
||||||
within "#comment-#{comment.id}" do
|
within "#comment-#{comment.id}" do
|
||||||
|
|||||||
Reference in New Issue
Block a user