Skip to content

Localized implicit multipart mailer views not working #6

@nikosd

Description

@nikosd

With gettext_rails 2.2.0 and Rails 2.3.8 (was also a case with older Rails for sure) localized implicit multipart views (in the form on foo.text.plain.erb, foo.text.html.erb, foo_el_GR.text.plain.erb, foo_el_GR.text.html.erb) do not work. The default views are always rendered regardless of the current locale. The reason (in essence) is the the original_template_path that's passed to find_template_with_locale_rails is already initialized and (responds to :render) and thus find_template_with_locale_rails returns it as is without trying to localize it.

Here's an ugly monkey patch for ActionMailer::Base#create! that provides a workaround for this issue : https://gist.github.com/663970

Let me know if this should go into gettext_rails instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions