diff options
author | José Valim <jose.valim@gmail.com> | 2009-02-06 23:23:50 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-02-06 23:23:50 -0600 |
commit | 24f2e676f700b8a387c6f4c27acf172658cd7863 (patch) | |
tree | 5b664014391c3e8a5828e02492cea72d356358bc /actionpack/lib/action_view/template.rb | |
parent | 43c09383cefbc3b62e9b124792fb0d0278689d2b (diff) | |
download | rails-24f2e676f700b8a387c6f4c27acf172658cd7863.tar.gz rails-24f2e676f700b8a387c6f4c27acf172658cd7863.tar.bz2 rails-24f2e676f700b8a387c6f4c27acf172658cd7863.zip |
Added support to dashed locales in templates localization [#1888 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 553158b82a..a0ae33caf0 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -236,7 +236,7 @@ module ActionView #:nodoc: format = nil extension = nil - if m = extensions.match(/^(\w+)?\.?(\w+)?\.?(\w+)?\.?/) + if m = extensions.match(/^([\w-]+)?\.?(\w+)?\.?(\w+)?\.?/) if valid_locale?(m[1]) && m[2] && valid_extension?(m[3]) # All three locale = m[1] format = m[2] |