fix(contact): translate captcha honeypot label
This commit is contained in:
parent
0641069d0b
commit
bc7cdb6b8e
5 changed files with 6 additions and 6 deletions
|
@ -96,6 +96,6 @@ class SupportController < ApplicationController
|
|||
end
|
||||
|
||||
def redirect_to_root
|
||||
redirect_to root_path, alert: t('invisible_captcha.custom_message')
|
||||
redirect_to root_path, alert: t('invisible_captcha.sentence_for_humans')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
= t('.your_question')
|
||||
= hidden_field_tag :type, params[:type]
|
||||
|
||||
= invisible_captcha
|
||||
|
||||
%dl
|
||||
- @options.each do |(question, question_type, link)|
|
||||
%dt
|
||||
|
@ -71,5 +69,7 @@
|
|||
|
||||
= hidden_field_tag :tags, @tags&.join(',')
|
||||
|
||||
= invisible_captcha
|
||||
|
||||
.send-wrapper
|
||||
= button_tag t('send_mail', scope: [:utils]), type: :submit, class: 'button send primary'
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
en:
|
||||
invisible_captcha:
|
||||
custom_message: 'If you are a human, ignore this field'
|
||||
sentence_for_humans: 'If you are a human, ignore this field'
|
||||
|
||||
help: 'Help'
|
||||
help_dropdown:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
fr:
|
||||
invisible_captcha:
|
||||
custom_message: 'Si vous êtes un humain, veuillez ignorer ce champs'
|
||||
sentence_for_humans: 'Si vous êtes un humain, laissez ce champ vide'
|
||||
help: 'Aide'
|
||||
help_dropdown:
|
||||
problem_title: Un problème avec le site ?
|
||||
|
|
|
@ -122,7 +122,7 @@ describe SupportController, type: :controller do
|
|||
let(:params) { { subject: 'bonjour', text: 'un message', InvisibleCaptcha.honeypots.sample => 'boom' } }
|
||||
it 'does not create a conversation on HelpScout' do
|
||||
expect { subject }.not_to change(Commentaire, :count)
|
||||
expect(flash[:alert]).to eq(I18n.t('invisible_captcha.custom_message'))
|
||||
expect(flash[:alert]).to eq(I18n.t('invisible_captcha.sentence_for_humans'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue