ruby-on-rails-3.2 - simple_captcha 中的 "translation missing"

标签 ruby-on-rails-3.2 captcha

当您查看 this page 时,我遇到了某种错误。 ,在您输入验证码的框中,显示“缺少翻译”。我环顾四周,注意到它可能与 i18n 或闪光灯有关,但我不确定,到目前为止我没有发现关于这两个的任何内容。谁能带领我朝着正确的方向前进?

最佳答案

将以下内容添加到您应用的翻译文件中(例如 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"

来自这里的文档:

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

有关 rails 国际化 (i18n) 的更多信息:

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

关于ruby-on-rails-3.2 - simple_captcha 中的 "translation missing",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20313384/

相关文章:

java - java 验证码 1.7

security - 如何在不使用 CAPTCHA 的情况下保护我的应用程序的注册 API 免受垃圾邮件发送者的侵害?

php - 允许 Google 绕过 CAPTCHA 验证 - 明智与否?

ruby-on-rails - 如何使用 Rails 中的值初始化 ActiveRecord?

ruby-on-rails - capybara 在 Controller 中选择了错误的格式

ruby-on-rails - Rails 3 中的 tap 方法 - 我是否正确理解了 API 文档?

ruby-on-rails - 在 Devise 中设置语言

ruby-on-rails - 未定义的方法 `before_create'

php - 限制登录尝试失败的次数

symfony - 添加验证码到 Symfony2 登录页面