diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-29 23:46:55 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-29 23:48:35 -0300 |
commit | ecb1981bfd3ffaca3a3efd110fc85380ece8191d (patch) | |
tree | 1b48cc326ad1c3ea800967a66cd106525e42e573 /actionmailer/test/fixtures | |
parent | d9b080bf3b1f28a52a2020c5c4b106cddf0303e0 (diff) | |
download | rails-ecb1981bfd3ffaca3a3efd110fc85380ece8191d.tar.gz rails-ecb1981bfd3ffaca3a3efd110fc85380ece8191d.tar.bz2 rails-ecb1981bfd3ffaca3a3efd110fc85380ece8191d.zip |
Template lookup now respect default locale and I18n fallbacks.
Given the following templates:
mailer/demo.html.erb
mailer/demo.en.html.erb
mailer/demo.pt.html.erb
Before this change for a locale that doesn't have its related file
the `mailer/demo.html.erb` will
be rendered even if `en` is the default locale.
Now `mailer/demo.en.html.erb` has precedence over the file without
locale.
Also, it is possible to give a fallback.
mailer/demo.pt.html.erb
mailer/demo.pt-BR.html.erb
So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be
rendered given the right I18n fallback configuration.
Fixes #11884.
Diffstat (limited to 'actionmailer/test/fixtures')
-rw-r--r-- | actionmailer/test/fixtures/base_mailer/implicit_with_locale.de-AT.text.erb | 1 | ||||
-rw-r--r-- | actionmailer/test/fixtures/base_mailer/implicit_with_locale.de.html.erb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de-AT.text.erb b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de-AT.text.erb new file mode 100644 index 0000000000..e97505fad9 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de-AT.text.erb @@ -0,0 +1 @@ +Implicit with locale DE-AT TEXT
\ No newline at end of file diff --git a/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de.html.erb b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de.html.erb new file mode 100644 index 0000000000..0536b5d3e2 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de.html.erb @@ -0,0 +1 @@ +Implicit with locale DE HTML
\ No newline at end of file |