Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"translation missing" in simple_captcha

I have some sort of error that when you view this page, in the box where you enter captchas, it says "translation missing." I've looked around and noticed it may have something to do with i18n or flashes, but I am not sure, and nothing I've found regarding those two thus far has worked. Anyone able to lead me in the right direction?

like image 261
harrisongill Avatar asked Jan 17 '26 19:01

harrisongill


2 Answers

Add the following to your app's translation files (For example myapp/config/locales/en.yml):

en:
  simple_captcha:
    placeholder: "Enter the image value"
    label: "Enter the code in the box:"
    message:
      default: "Secret Code did not match with the Image"
      user: "The secret Image and code were different"

From the documentation here:

https://github.com/pludoni/simple-captcha#i18n

For more information on rails internationalisation (i18n):

http://guides.rubyonrails.org/i18n.html

like image 108
Max Mumford Avatar answered Jan 20 '26 13:01

Max Mumford


Set the attributes directly in the view:

<%= f.simple_captcha(:label => "", :placeholder => "Enter text", :refresh_button_text => "Refresh text") %>
like image 23
Razor Avatar answered Jan 20 '26 15:01

Razor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!