Skip to content

The error messages of the Activatable and Timeoutable hooks are not localized #5765

Description

@sandrasi

Warden used to switch back to the default locale on throw and it's already fixed by passing the current locale to Warden as an option. There are two hooks - Activatable and Timeoutable - that also rely on throw :warden. In these instances, however, the locale is not currently passed down to Warden so even if the corresponding error messages (this and this) are translated to other languages, they are always displayed with the default locale.

The fix is simple: where throw is used (here and here), it should be called with locale: options[:locale].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions