Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error messages are not translatable #20

Open
aramollis opened this issue Mar 31, 2022 · 1 comment
Open

Error messages are not translatable #20

aramollis opened this issue Mar 31, 2022 · 1 comment

Comments

@aramollis
Copy link

aramollis commented Mar 31, 2022

It seems to be a problem with the translation of some text (error message e.g.) of the module. The values defined in the application are not being used, the translation is taken from the acts_as_textcaptcha gem directly and there the error messages are not translatable: https://github.com/matthutchinson/acts_as_textcaptcha/blob/6aaa8c0c433fa79bc1171a029c85ee1757da301f/lib/acts_as_textcaptcha/textcaptcha.rb#L76-L82

      def add_textcaptcha_error(too_slow: false)
        if too_slow
          errors.add(:textcaptcha_answer, :expired, message: "was not submitted quickly enough, try another question instead")
        else
          errors.add(:textcaptcha_answer, :incorrect, message: "is incorrect, try another question instead")
        end
      end
@aramollis aramollis changed the title Error messages are not translatable of the acts_as_textcaptcha gem Error messages are not translatable Mar 31, 2022
@Quentinchampenois
Copy link
Collaborator

Hello @aramollis,

Thank you for your issue, I agree it should be translatable. I will check if we can override this behaviour or suggest a PR directly on the acts_as_textcaptcha module.

I will notify on this issue when I can work on it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants