Skip to content

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

@sandrasi

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].

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